Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LMGC90
LMGC90_user
Commits
cb16fbfb
Commit
cb16fbfb
authored
Jan 04, 2016
by
mozul
Browse files
Merge commit '
2739da53
'
Merge 2016.rc2 lmgc90_user_examples in examples
parents
191b7bc0
2739da53
Changes
30
Hide whitespace changes
Inline
Side-by-side
examples/Ateliers/Deformables/AvecContact/Bascule/coro/command.py
View file @
cb16fbfb
...
...
@@ -21,8 +21,6 @@ ref_radius = 5.e-2
# info contact
freq_detect
=
1
CSxxx_SetQuadrature
(
0
)
# 123456789012345678901234567890
type
=
'Stored_Delassus_Loops '
#type = 'Exchange_Local_Global '
...
...
examples/Ateliers/Deformables/AvecContact/Bascule/coro/gen_sample.py
View file @
cb16fbfb
...
...
@@ -45,7 +45,7 @@ mesh_cube=buildMeshH8(x0=-0.5, y0=-0.5, z0=0., lx=1., ly=1., lz=2., nb_elem_x=4,
cube
=
buildMeshedAvatar
(
model
=
m3Dl
,
material
=
stone
,
mesh
=
mesh_cube
)
## contacteurs :
cube
.
addContactors
(
group
=
'down'
,
type
=
'CSpx
4
'
,
color
=
'BLEUx'
)
cube
.
addContactors
(
group
=
'down'
,
type
=
'CSpx
x
'
,
color
=
'BLEUx'
)
bodies
+=
cube
# construction d'un polyedre rigide pour la fondation
...
...
examples/Ateliers/Deformables/AvecContact/Bascule/ld/command.py
View file @
cb16fbfb
...
...
@@ -27,8 +27,6 @@ ref_radius = 5.e-2
# info contact
freq_detect
=
1
CSxxx_SetQuadrature
(
0
)
# 123456789012345678901234567890
type
=
'Stored_Delassus_Loops '
#type = 'Exchange_Local_Global '
...
...
examples/Ateliers/Deformables/AvecContact/Bascule/ld/gen_sample.py
View file @
cb16fbfb
...
...
@@ -46,7 +46,7 @@ mesh_cube=buildMeshH8(x0=-0.5, y0=-0.5, z0=0., lx=1., ly=1., lz=2., nb_elem_x=4,
cube
=
buildMeshedAvatar
(
model
=
m3Dl
,
material
=
stone
,
mesh
=
mesh_cube
)
## contacteurs :
cube
.
addContactors
(
group
=
'down'
,
type
=
'CSpx
4
'
,
color
=
'BLEUx'
)
cube
.
addContactors
(
group
=
'down'
,
type
=
'CSpx
x
'
,
color
=
'BLEUx'
)
bodies
+=
cube
# construction d'un polyedre rigide pour la fondation
...
...
examples/Ateliers/Deformables/AvecContact/Comprime_2D/command_post.py
View file @
cb16fbfb
import
os
,
sys
,
shutil
from
pylmgc90.chipy
import
*
from
numpy
import
*
...
...
@@ -13,28 +12,6 @@ inters_dict={}
InitIntersToVTK
([
'CLALp'
],
inters_dict
)
# nom du repertoire ou on va faire le post
tmp
=
'post'
tmp
=
os
.
getcwd
()
+
'/'
+
tmp
+
'/'
if
os
.
path
.
isdir
(
tmp
):
print
"Le repertoire "
,
tmp
,
" existe deja, ca n'est pas la peine de le creer"
# on teste la presence de DATBOX
if
os
.
path
.
isdir
(
tmp
+
'DATBOX'
):
# on le vire si il existe
shutil
.
rmtree
(
tmp
+
'DATBOX'
)
shutil
.
copytree
(
'./DATBOX'
,
tmp
+
'DATBOX'
)
else
:
os
.
mkdir
(
tmp
)
shutil
.
copytree
(
'./DATBOX'
,
tmp
+
'DATBOX'
)
overall_SetWorkingDirectory
(
tmp
)
print
"C'est partie"
####
checkDirectories
()
...
...
@@ -87,35 +64,33 @@ mecaMAILx_ReadIniGPV()
TimeEvolution_ReadIniVlocRloc
()
CLALp_ReadIniVlocRloc
()
fim
=
startCollection
(
tmp
+
'DISPLAY/mecafe.pvd'
)
fii
=
startCollection
(
tmp
+
'DISPLAY/inters.pvd'
)
fim
=
startCollection
(
'DISPLAY/mecafe.pvd'
)
fii
=
startCollection
(
'DISPLAY/inters.pvd'
)
k
=
0
utilities_logMes
(
'tact'
)
writeMecafeToVTK
(
tmp
+
'DISPLAY/mecafe'
+
'_'
+
str
(
k
)
+
'.vtu'
,
fim
,
2
)
writeMecafeToVTK
(
'DISPLAY/mecafe'
+
'_'
+
str
(
k
)
+
'.vtu'
,
fim
,
2
)
for
k
in
xrange
(
min
,
max
+
1
,
1
):
#
utilities_logMes
(
'on traite le set : '
+
str
(
k
))
#
for
name
in
names
:
shutil
.
copy
(
'./OUTBOX/'
+
name
+
'.OUT.'
+
str
(
k
),
tmp
+
'DATBOX/'
+
name
+
'.INI'
)
utilities_logMes
(
'READ INI DOF'
)
TimeEvolution_ReadIniDof
()
mecaMAILx_ReadIniDof
()
TimeEvolution_ReadIniDof
(
k
)
mecaMAILx_ReadIniDof
(
k
)
TimeEvolution_ReadIniGPV
()
mecaMAILx_ReadIniGPV
()
TimeEvolution_ReadIniGPV
(
k
)
mecaMAILx_ReadIniGPV
(
k
)
utilities_logMes
(
'tact'
)
writeMecafeToVTK
(
tmp
+
'DISPLAY/mecafe'
+
'_'
+
str
(
k
)
+
'.vtu'
,
fim
,
2
)
writeMecafeToVTK
(
'DISPLAY/mecafe'
+
'_'
+
str
(
k
)
+
'.vtu'
,
fim
,
2
)
TimeEvolution_ReadIniVlocRloc
()
CLALp_ReadIniVlocRloc
()
TimeEvolution_ReadIniVlocRloc
(
k
)
CLALp_ReadIniVlocRloc
(
k
)
utilities_logMes
(
'inter'
)
writeIntersToVTK
(
tmp
+
'DISPLAY/inters'
+
'_'
+
str
(
k
)
+
'.vtp'
,
fii
,
inters_dict
,
0.3e-1
)
writeIntersToVTK
(
'DISPLAY/inters'
+
'_'
+
str
(
k
)
+
'.vtp'
,
fii
,
inters_dict
,
0.3e-1
)
stopCollection
(
fim
)
stopCollection
(
fii
)
...
...
examples/Ateliers/Deformables/AvecContact/Comprime_3D/command_jacobi.py
View file @
cb16fbfb
...
...
@@ -18,8 +18,6 @@ ref_radius = 5.e-2
# info contact
freq_detect
=
1
CSxxx_SetQuadrature
(
0
)
# 123456789012345678901234567890
type
=
'Stored_Delassus_Loops '
#type = 'Exchange_Local_Global '
...
...
examples/Ateliers/Deformables/AvecContact/Comprime_3D/command_nlgs.py
View file @
cb16fbfb
...
...
@@ -19,8 +19,6 @@ ref_radius = 5.e-2
# info contact
freq_detect
=
1
CSxxx_SetQuadrature
(
0
)
# 123456789012345678901234567890
type
=
'Stored_Delassus_Loops '
#type = 'Exchange_Local_Global '
...
...
examples/Ateliers/Deformables/AvecContact/Comprime_3D/gen_sample.py
View file @
cb16fbfb
...
...
@@ -53,7 +53,7 @@ mesh_cube=buildMeshH8(x0=-0.5, y0=-0.5, z0=0., lx=1., ly=1.0, lz=1., nb_elem_x=4
cube
=
buildMeshedAvatar
(
model
=
m3Dl
,
material
=
stone
,
mesh
=
mesh_cube
)
## contacteurs :
cube
.
addContactors
(
group
=
'down'
,
type
=
'CSpx
4
'
,
color
=
'BLEUx'
)
cube
.
addContactors
(
group
=
'down'
,
type
=
'CSpx
x
'
,
color
=
'BLEUx'
)
bodies
+=
cube
# construction d'un polyedre rigide pour la fondation
...
...
examples/Ateliers/Pre/solutions/TP2/command_post.py
View file @
cb16fbfb
import
os
,
sys
,
shutil
from
pylmgc90.chipy
import
*
from
numpy
import
*
...
...
@@ -7,26 +6,6 @@ from numpy import *
min
=
1
max
=
30
# nom du repertoire ou on va faire le post
tmp
=
'post'
tmp
=
os
.
getcwd
()
+
'/'
+
tmp
+
'/'
if
os
.
path
.
isdir
(
tmp
):
print
"Le repertoire "
,
tmp
,
" existe deja, ca n'est pas la peine de le creer"
# on teste la presence de DATBOX
if
os
.
path
.
isdir
(
tmp
+
'DATBOX'
):
print
" on ne copie pas DATBOX"
else
:
shutil
.
copytree
(
'./DATBOX'
,
tmp
+
'DATBOX'
)
else
:
os
.
mkdir
(
tmp
)
shutil
.
copytree
(
'./DATBOX'
,
tmp
+
'DATBOX'
)
overall_SetWorkingDirectory
(
tmp
)
print
"C'est partie"
####
checkDirectories
()
...
...
@@ -73,29 +52,26 @@ InitTactorsToVTK(['DISKx','JONCx'],tacts_dict)
inters_dict
=
{}
InitIntersToVTK
([
'DKDKx'
,
'DKJCx'
],
inters_dict
)
fit
=
startCollection
(
tmp
+
'DISPLAY/tacts.pvd'
)
fii
=
startCollection
(
tmp
+
'DISPLAY/inters.pvd'
)
fit
=
startCollection
(
'DISPLAY/tacts.pvd'
)
fii
=
startCollection
(
'DISPLAY/inters.pvd'
)
for
k
in
xrange
(
min
,
max
+
1
,
1
):
#
utilities_logMes
(
'on traite le set : '
+
str
(
k
))
#
for
name
in
names
:
shutil
.
copy
(
'./OUTBOX/'
+
name
+
'.OUT.'
+
str
(
k
),
tmp
+
'DATBOX/'
+
name
+
'.INI'
)
utilities_logMes
(
'READ INI DOF'
)
TimeEvolution_ReadIniDof
()
RBDY2_ReadIniDof
()
TimeEvolution_ReadIniDof
(
k
)
RBDY2_ReadIniDof
(
k
)
utilities_logMes
(
'READ INI Vloc Rloc'
)
TimeEvolution_ReadIniVlocRloc
()
DKJCx_ReadIniVlocRloc
()
DKDKx_ReadIniVlocRloc
()
TimeEvolution_ReadIniVlocRloc
(
k
)
DKJCx_ReadIniVlocRloc
(
k
)
DKDKx_ReadIniVlocRloc
(
k
)
utilities_logMes
(
'tact'
)
writeTactorsToVTK
(
tmp
+
'DISPLAY/tacts'
+
'_'
+
str
(
k
)
+
'.vtp'
,
fit
,
tacts_dict
)
writeTactorsToVTK
(
'DISPLAY/tacts'
+
'_'
+
str
(
k
)
+
'.vtp'
,
fit
,
tacts_dict
)
utilities_logMes
(
'inter'
)
writeIntersToVTK
(
tmp
+
'DISPLAY/inters'
+
'_'
+
str
(
k
)
+
'.vtp'
,
fii
,
inters_dict
,
0.1
)
writeIntersToVTK
(
'DISPLAY/inters'
+
'_'
+
str
(
k
)
+
'.vtp'
,
fii
,
inters_dict
,
0.1
)
utilities_logMes
(
'---'
)
stopCollection
(
fit
)
...
...
examples/RIGID_2D/1024DK_BoxJC/command_post.py
View file @
cb16fbfb
import
os
,
sys
,
shutil
from
pylmgc90.chipy
import
*
from
numpy
import
*
...
...
@@ -7,28 +6,6 @@ from numpy import *
min
=
1
max
=
30
# nom du repertoire ou on va faire le post
tmp
=
'post'
tmp
=
os
.
getcwd
()
+
'/'
+
tmp
+
'/'
if
os
.
path
.
isdir
(
tmp
):
print
"Le repertoire "
,
tmp
,
" existe deja, ca n'est pas la peine de le creer"
# on teste la presence de DATBOX
if
os
.
path
.
isdir
(
tmp
+
'DATBOX'
):
print
" on ne copie pas DATBOX"
else
:
shutil
.
copytree
(
'./DATBOX'
,
tmp
+
'DATBOX'
)
else
:
os
.
mkdir
(
tmp
)
shutil
.
copytree
(
'./DATBOX'
,
tmp
+
'DATBOX'
)
overall_SetWorkingDirectory
(
tmp
)
print
"C'est partie"
####
checkDirectories
()
dt
=
2.e-4
...
...
@@ -73,29 +50,26 @@ InitTactorsToVTK(['DISKx','JONCx'],tacts_dict)
inters_dict
=
{}
InitIntersToVTK
([
'DKDKx'
,
'DKJCx'
],
inters_dict
)
fit
=
startCollection
(
tmp
+
'DISPLAY/tacts.pvd'
)
fii
=
startCollection
(
tmp
+
'DISPLAY/inters.pvd'
)
fit
=
startCollection
(
'DISPLAY/tacts.pvd'
)
fii
=
startCollection
(
'DISPLAY/inters.pvd'
)
for
k
in
xrange
(
min
,
max
+
1
,
1
):
#
utilities_logMes
(
'on traite le set : '
+
str
(
k
))
#
for
name
in
names
:
shutil
.
copy
(
'./OUTBOX/'
+
name
+
'.OUT.'
+
str
(
k
),
tmp
+
'DATBOX/'
+
name
+
'.INI'
)
utilities_logMes
(
'READ INI DOF'
)
TimeEvolution_ReadIniDof
()
RBDY2_ReadIniDof
()
TimeEvolution_ReadIniDof
(
k
)
RBDY2_ReadIniDof
(
k
)
utilities_logMes
(
'READ INI Vloc Rloc'
)
TimeEvolution_ReadIniVlocRloc
()
DKJCx_ReadIniVlocRloc
()
DKDKx_ReadIniVlocRloc
()
TimeEvolution_ReadIniVlocRloc
(
k
)
DKJCx_ReadIniVlocRloc
(
k
)
DKDKx_ReadIniVlocRloc
(
k
)
utilities_logMes
(
'tact'
)
writeTactorsToVTK
(
tmp
+
'DISPLAY/tacts'
+
'_'
+
str
(
k
)
+
'.vtp'
,
fit
,
tacts_dict
)
writeTactorsToVTK
(
'DISPLAY/tacts'
+
'_'
+
str
(
k
)
+
'.vtp'
,
fit
,
tacts_dict
)
utilities_logMes
(
'inter'
)
writeIntersToVTK
(
tmp
+
'DISPLAY/inters'
+
'_'
+
str
(
k
)
+
'.vtp'
,
fii
,
inters_dict
,
0.1e-2
)
writeIntersToVTK
(
'DISPLAY/inters'
+
'_'
+
str
(
k
)
+
'.vtp'
,
fii
,
inters_dict
,
0.1e-2
)
utilities_logMes
(
'---'
)
stopCollection
(
fit
)
...
...
examples/RIGID_2D/1024DK_BoxJC/command_post_for_dummies.py
View file @
cb16fbfb
import
os
,
sys
,
shutil
from
pylmgc90.chipy
import
*
from
numpy
import
*
...
...
examples/RIGID_2D/500PL_PerioBoxJC/new_command_post.py
View file @
cb16fbfb
import
os
,
sys
,
shutil
from
pylmgc90.chipy
import
*
from
numpy
import
*
...
...
@@ -6,27 +5,7 @@ from numpy import *
# plage de fichiers a traiter
min
=
1
max
=
100
# nom du repertoire ou on va faire le post
tmp
=
'post'
tmp
=
os
.
getcwd
()
+
'/'
+
tmp
+
'/'
if
os
.
path
.
isdir
(
tmp
):
print
"Le repertoire "
,
tmp
,
" existe deja, ca n'est pas la peine de le creer"
# on teste la presence de DATBOX
if
os
.
path
.
isdir
(
tmp
+
'DATBOX'
):
print
" on ne copie pas DATBOX"
else
:
shutil
.
copytree
(
'./DATBOX'
,
tmp
+
'DATBOX'
)
else
:
os
.
mkdir
(
tmp
)
shutil
.
copytree
(
'./DATBOX'
,
tmp
+
'DATBOX'
)
overall_SetWorkingDirectory
(
tmp
)
print
"C'est partie"
max
=
10
####
...
...
@@ -74,30 +53,27 @@ InitTactorsToVTK(['POLYG','JONCx'],tacts_dict)
inters_dict
=
{}
InitIntersToVTK
([
'PLPLx'
,
'PLJCx'
],
inters_dict
)
fit
=
startCollection
(
tmp
+
'DISPLAY/tacts.pvd'
)
fii
=
startCollection
(
tmp
+
'DISPLAY/inters.pvd'
)
fit
=
startCollection
(
'DISPLAY/tacts.pvd'
)
fii
=
startCollection
(
'DISPLAY/inters.pvd'
)
for
k
in
xrange
(
min
,
max
+
1
,
1
):
#
utilities_logMes
(
'on traite le set : '
+
str
(
k
))
#
for
name
in
names
:
shutil
.
copy
(
'./OUTBOX/'
+
name
+
'.OUT.'
+
str
(
k
),
tmp
+
'DATBOX/'
+
name
+
'.INI'
)
print
'READ INI DOF'
TimeEvolution_ReadIniDof
()
RBDY2_ReadIniDof
()
TimeEvolution_ReadIniDof
(
k
)
RBDY2_ReadIniDof
(
k
)
print
'READ INI Vloc Rloc'
TimeEvolution_ReadIniVlocRloc
()
TimeEvolution_ReadIniVlocRloc
(
k
)
print
'-'
PLPLx_ReadIniVlocRloc
()
PLJCx_ReadIniVlocRloc
()
PLPLx_ReadIniVlocRloc
(
k
)
PLJCx_ReadIniVlocRloc
(
k
)
print
'tact'
writeTactorsToVTK
(
tmp
+
'DISPLAY/tacts'
+
'_'
+
str
(
k
)
+
'.vtp'
,
fit
,
tacts_dict
)
writeTactorsToVTK
(
'DISPLAY/tacts'
+
'_'
+
str
(
k
)
+
'.vtp'
,
fit
,
tacts_dict
)
print
'inter'
writeIntersToVTK
(
tmp
+
'DISPLAY/inters'
+
'_'
+
str
(
k
)
+
'.vtp'
,
fii
,
inters_dict
,
0.1e-1
)
writeIntersToVTK
(
'DISPLAY/inters'
+
'_'
+
str
(
k
)
+
'.vtp'
,
fii
,
inters_dict
,
0.1e-1
)
stopCollection
(
fit
)
stopCollection
(
fii
)
...
...
examples/mecaMAILx_2D/braudel/command_post.py
View file @
cb16fbfb
import
os
,
sys
,
shutil
from
pylmgc90.chipy
import
*
from
numpy
import
*
...
...
examples/mecaMAILx_3D/2H8_traction/DATBOX/BODIES.DAT
View file @
cb16fbfb
...
...
@@ -13,7 +13,7 @@ $nodty
NO3xx
7
coo1
=
0.1000000
D
+
01
coo2
=
0.1000000
D
+
01
coo3
=
0.1000000
D
+
01
NO3xx
8
coo1
=
0.0000000
D
+
00
coo2
=
0.1000000
D
+
01
coo3
=
0.1000000
D
+
01
$
tacty
ASpx
4
1
color
REDxx
noda
=
5
nodb
=
6
nodc
=
7
nodd
=
8
ASpx
x
1
color
REDxx
noda
=
5
nodb
=
6
nodc
=
7
nodd
=
8
$$$$$$
$
bdyty
...
...
@@ -31,5 +31,5 @@ $nodty
NO3xx
7
coo1
=
0.1000000
D
+
01
coo2
=
0.1000000
D
+
01
coo3
=
0.2000000
D
+
01
NO3xx
8
coo1
=
0.0000000
D
+
00
coo2
=
0.1000000
D
+
01
coo3
=
0.2000000
D
+
01
$
tacty
CSpx
4
1
color
REDxx
noda
=
4
nodb
=
3
nodc
=
2
nodd
=
1
CSpx
1
1
color
REDxx
noda
=
4
nodb
=
3
nodc
=
2
nodd
=
1
$$$$$$
examples/mecaMAILx_3D/2H8_traction/command.py
View file @
cb16fbfb
...
...
@@ -84,7 +84,6 @@ utilities_logMes('READ INI GPV')
TimeEvolution_ReadIniGPV
()
mecaMAILx_ReadIniGPV
()
#
CSxxx_SetQuadrature
(
1
)
CSxxx_LoadTactors
()
ASpxx_LoadTactors
()
#
...
...
examples/mecaMAILx_3D/cubes/command.py
View file @
cb16fbfb
...
...
@@ -23,7 +23,6 @@ ref_radius = 0.1
# info contact
freq_detect
=
1
CSxxx_SetQuadrature
(
1
)
# 123456789012345678901234567890
type
=
'Stored_Delassus_Loops '
...
...
examples/mecaMAILx_3D/cubes/command_for_dummies.py
View file @
cb16fbfb
...
...
@@ -23,7 +23,6 @@ freq_write = 100
# info detection contact
freq_detect
=
1
CSxxx_SetQuadrature
(
1
)
# 123456789012345678901234567890
type
=
'Stored_Delassus_Loops '
...
...
examples/mecaMAILx_3D/cubes/gen_sample.py
View file @
cb16fbfb
...
...
@@ -41,16 +41,16 @@ mesh_cube_2 = copy.deepcopy(mesh_cube)
cube
=
buildMeshedAvatar
(
mesh
=
mesh_cube
,
model
=
m3Dl
,
material
=
stone
)
# contacteurs :
# * antagonistes sur la face du haut
cube
.
addContactors
(
group
=
'102'
,
type
=
'ASpx
3
'
,
color
=
'BLEUx'
)
cube
.
addContactors
(
group
=
'102'
,
type
=
'ASpx
x
'
,
color
=
'BLEUx'
)
# * candidats sur la face du bas
cube
.
addContactors
(
group
=
'105'
,
type
=
'CSpx
3
'
,
color
=
'BLEUx'
)
cube
.
addContactors
(
group
=
'105'
,
type
=
'CSpx
x
'
,
color
=
'BLEUx'
,
quadrature
=
0
)
bodies
+=
cube
cube_2
=
buildMeshedAvatar
(
mesh
=
mesh_cube_2
,
model
=
m3Dl
,
material
=
stone
)
# contacteurs :
# * candidats sur la face du bas
cube_2
.
addContactors
(
group
=
'105'
,
type
=
'CSpx
3
'
,
color
=
'BLEUx'
)
cube_2
.
addContactors
(
group
=
'105'
,
type
=
'CSpx
x
'
,
color
=
'BLEUx'
,
quadrature
=
0
)
cube_2
.
translate
(
dz
=
1.
)
bodies
+=
cube_2
...
...
examples/mecaMAILx_3D/cubes_H8/command.py
View file @
cb16fbfb
...
...
@@ -23,8 +23,6 @@ freq_write = 1
# info contact
freq_detect
=
1
CSxxx_SetQuadrature
(
1
)
# 123456789012345678901234567890
type
=
'Stored_Delassus_Loops '
norm
=
'QM/16'
...
...
examples/mecaMAILx_3D/cubes_H8/command_explicit.py
View file @
cb16fbfb
...
...
@@ -24,7 +24,6 @@ freq_write = 100 #100
freq_detect
=
1
mecaMAILx_DiagonalStorage
()
CSxxx_SetQuadrature
(
1
)
# 123456789012345678901234567890
type
=
'Stored_Delassus_Loops '
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment