Commit 2739da53 authored by mozul's avatar mozul
Browse files

Squashed 'examples/' changes from a3e112b..06e5e26

06e5e26 Update to new type of contactor CSxxx and ASpxx and quadrature management
be046ba command_post new style

git-subtree-dir: examples
git-subtree-split: 06e5e26e284bb448960238f89b786c44490babae
parent e0fef735
...@@ -21,8 +21,6 @@ ref_radius = 5.e-2 ...@@ -21,8 +21,6 @@ ref_radius = 5.e-2
# info contact # info contact
freq_detect = 1 freq_detect = 1
CSxxx_SetQuadrature(0)
# 123456789012345678901234567890 # 123456789012345678901234567890
type = 'Stored_Delassus_Loops ' type = 'Stored_Delassus_Loops '
#type = 'Exchange_Local_Global ' #type = 'Exchange_Local_Global '
......
...@@ -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, ...@@ -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) cube=buildMeshedAvatar(model=m3Dl, material=stone,mesh=mesh_cube)
## contacteurs : ## contacteurs :
cube.addContactors(group='down', type='CSpx4', color='BLEUx') cube.addContactors(group='down', type='CSpxx', color='BLEUx')
bodies += cube bodies += cube
# construction d'un polyedre rigide pour la fondation # construction d'un polyedre rigide pour la fondation
......
...@@ -27,8 +27,6 @@ ref_radius = 5.e-2 ...@@ -27,8 +27,6 @@ ref_radius = 5.e-2
# info contact # info contact
freq_detect = 1 freq_detect = 1
CSxxx_SetQuadrature(0)
# 123456789012345678901234567890 # 123456789012345678901234567890
type = 'Stored_Delassus_Loops ' type = 'Stored_Delassus_Loops '
#type = 'Exchange_Local_Global ' #type = 'Exchange_Local_Global '
......
...@@ -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, ...@@ -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) cube=buildMeshedAvatar(model=m3Dl, material=stone,mesh=mesh_cube)
## contacteurs : ## contacteurs :
cube.addContactors(group='down', type='CSpx4', color='BLEUx') cube.addContactors(group='down', type='CSpxx', color='BLEUx')
bodies += cube bodies += cube
# construction d'un polyedre rigide pour la fondation # construction d'un polyedre rigide pour la fondation
......
import os,sys,shutil
from pylmgc90.chipy import * from pylmgc90.chipy import *
from numpy import * from numpy import *
...@@ -13,28 +12,6 @@ inters_dict={} ...@@ -13,28 +12,6 @@ inters_dict={}
InitIntersToVTK(['CLALp'],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() checkDirectories()
...@@ -87,35 +64,33 @@ mecaMAILx_ReadIniGPV() ...@@ -87,35 +64,33 @@ mecaMAILx_ReadIniGPV()
TimeEvolution_ReadIniVlocRloc() TimeEvolution_ReadIniVlocRloc()
CLALp_ReadIniVlocRloc() CLALp_ReadIniVlocRloc()
fim = startCollection(tmp+'DISPLAY/mecafe.pvd') fim = startCollection('DISPLAY/mecafe.pvd')
fii = startCollection(tmp+'DISPLAY/inters.pvd') fii = startCollection('DISPLAY/inters.pvd')
k=0 k=0
utilities_logMes('tact') 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): for k in xrange(min,max+1,1):
# #
utilities_logMes('on traite le set : '+str(k)) 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') utilities_logMes('READ INI DOF')
TimeEvolution_ReadIniDof() TimeEvolution_ReadIniDof(k)
mecaMAILx_ReadIniDof() mecaMAILx_ReadIniDof(k)
TimeEvolution_ReadIniGPV() TimeEvolution_ReadIniGPV(k)
mecaMAILx_ReadIniGPV() mecaMAILx_ReadIniGPV(k)
utilities_logMes('tact') utilities_logMes('tact')
writeMecafeToVTK(tmp+'DISPLAY/mecafe'+'_'+str(k)+'.vtu',fim,2) writeMecafeToVTK('DISPLAY/mecafe'+'_'+str(k)+'.vtu',fim,2)
TimeEvolution_ReadIniVlocRloc() TimeEvolution_ReadIniVlocRloc(k)
CLALp_ReadIniVlocRloc() CLALp_ReadIniVlocRloc(k)
utilities_logMes('inter') 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(fim)
stopCollection(fii) stopCollection(fii)
......
...@@ -18,8 +18,6 @@ ref_radius = 5.e-2 ...@@ -18,8 +18,6 @@ ref_radius = 5.e-2
# info contact # info contact
freq_detect = 1 freq_detect = 1
CSxxx_SetQuadrature(0)
# 123456789012345678901234567890 # 123456789012345678901234567890
type = 'Stored_Delassus_Loops ' type = 'Stored_Delassus_Loops '
#type = 'Exchange_Local_Global ' #type = 'Exchange_Local_Global '
......
...@@ -19,8 +19,6 @@ ref_radius = 5.e-2 ...@@ -19,8 +19,6 @@ ref_radius = 5.e-2
# info contact # info contact
freq_detect = 1 freq_detect = 1
CSxxx_SetQuadrature(0)
# 123456789012345678901234567890 # 123456789012345678901234567890
type = 'Stored_Delassus_Loops ' type = 'Stored_Delassus_Loops '
#type = 'Exchange_Local_Global ' #type = 'Exchange_Local_Global '
......
...@@ -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 ...@@ -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) cube=buildMeshedAvatar(model=m3Dl, material=stone,mesh=mesh_cube)
## contacteurs : ## contacteurs :
cube.addContactors(group='down', type='CSpx4', color='BLEUx') cube.addContactors(group='down', type='CSpxx', color='BLEUx')
bodies += cube bodies += cube
# construction d'un polyedre rigide pour la fondation # construction d'un polyedre rigide pour la fondation
......
import os,sys,shutil
from pylmgc90.chipy import * from pylmgc90.chipy import *
from numpy import * from numpy import *
...@@ -7,26 +6,6 @@ from numpy import * ...@@ -7,26 +6,6 @@ from numpy import *
min=1 min=1
max=30 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() checkDirectories()
...@@ -73,29 +52,26 @@ InitTactorsToVTK(['DISKx','JONCx'],tacts_dict) ...@@ -73,29 +52,26 @@ InitTactorsToVTK(['DISKx','JONCx'],tacts_dict)
inters_dict={} inters_dict={}
InitIntersToVTK(['DKDKx','DKJCx'],inters_dict) InitIntersToVTK(['DKDKx','DKJCx'],inters_dict)
fit = startCollection(tmp+'DISPLAY/tacts.pvd') fit = startCollection('DISPLAY/tacts.pvd')
fii = startCollection(tmp+'DISPLAY/inters.pvd') fii = startCollection('DISPLAY/inters.pvd')
for k in xrange(min,max+1,1): for k in xrange(min,max+1,1):
# #
utilities_logMes('on traite le set : '+str(k)) 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') utilities_logMes('READ INI DOF')
TimeEvolution_ReadIniDof() TimeEvolution_ReadIniDof(k)
RBDY2_ReadIniDof() RBDY2_ReadIniDof(k)
utilities_logMes('READ INI Vloc Rloc') utilities_logMes('READ INI Vloc Rloc')
TimeEvolution_ReadIniVlocRloc() TimeEvolution_ReadIniVlocRloc(k)
DKJCx_ReadIniVlocRloc() DKJCx_ReadIniVlocRloc(k)
DKDKx_ReadIniVlocRloc() DKDKx_ReadIniVlocRloc(k)
utilities_logMes('tact') 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') 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('---') utilities_logMes('---')
stopCollection(fit) stopCollection(fit)
......
import os,sys,shutil
from pylmgc90.chipy import * from pylmgc90.chipy import *
from numpy import * from numpy import *
...@@ -7,28 +6,6 @@ from numpy import * ...@@ -7,28 +6,6 @@ from numpy import *
min=1 min=1
max=30 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() checkDirectories()
dt = 2.e-4 dt = 2.e-4
...@@ -73,29 +50,26 @@ InitTactorsToVTK(['DISKx','JONCx'],tacts_dict) ...@@ -73,29 +50,26 @@ InitTactorsToVTK(['DISKx','JONCx'],tacts_dict)
inters_dict={} inters_dict={}
InitIntersToVTK(['DKDKx','DKJCx'],inters_dict) InitIntersToVTK(['DKDKx','DKJCx'],inters_dict)
fit = startCollection(tmp+'DISPLAY/tacts.pvd') fit = startCollection('DISPLAY/tacts.pvd')
fii = startCollection(tmp+'DISPLAY/inters.pvd') fii = startCollection('DISPLAY/inters.pvd')
for k in xrange(min,max+1,1): for k in xrange(min,max+1,1):
# #
utilities_logMes('on traite le set : '+str(k)) 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') utilities_logMes('READ INI DOF')
TimeEvolution_ReadIniDof() TimeEvolution_ReadIniDof(k)
RBDY2_ReadIniDof() RBDY2_ReadIniDof(k)
utilities_logMes('READ INI Vloc Rloc') utilities_logMes('READ INI Vloc Rloc')
TimeEvolution_ReadIniVlocRloc() TimeEvolution_ReadIniVlocRloc(k)
DKJCx_ReadIniVlocRloc() DKJCx_ReadIniVlocRloc(k)
DKDKx_ReadIniVlocRloc() DKDKx_ReadIniVlocRloc(k)
utilities_logMes('tact') 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') 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('---') utilities_logMes('---')
stopCollection(fit) stopCollection(fit)
......
import os,sys,shutil
from pylmgc90.chipy import * from pylmgc90.chipy import *
from numpy import * from numpy import *
......
import os,sys,shutil
from pylmgc90.chipy import * from pylmgc90.chipy import *
from numpy import * from numpy import *
...@@ -6,27 +5,7 @@ from numpy import * ...@@ -6,27 +5,7 @@ from numpy import *
# plage de fichiers a traiter # plage de fichiers a traiter
min=1 min=1
max=100 max=10
# 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"
#### ####
...@@ -74,30 +53,27 @@ InitTactorsToVTK(['POLYG','JONCx'],tacts_dict) ...@@ -74,30 +53,27 @@ InitTactorsToVTK(['POLYG','JONCx'],tacts_dict)
inters_dict={} inters_dict={}
InitIntersToVTK(['PLPLx','PLJCx'],inters_dict) InitIntersToVTK(['PLPLx','PLJCx'],inters_dict)
fit = startCollection(tmp+'DISPLAY/tacts.pvd') fit = startCollection('DISPLAY/tacts.pvd')
fii = startCollection(tmp+'DISPLAY/inters.pvd') fii = startCollection('DISPLAY/inters.pvd')
for k in xrange(min,max+1,1): for k in xrange(min,max+1,1):
# #
utilities_logMes('on traite le set : '+str(k)) 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' print 'READ INI DOF'
TimeEvolution_ReadIniDof() TimeEvolution_ReadIniDof(k)
RBDY2_ReadIniDof() RBDY2_ReadIniDof(k)
print 'READ INI Vloc Rloc' print 'READ INI Vloc Rloc'
TimeEvolution_ReadIniVlocRloc() TimeEvolution_ReadIniVlocRloc(k)
print '-' print '-'
PLPLx_ReadIniVlocRloc() PLPLx_ReadIniVlocRloc(k)
PLJCx_ReadIniVlocRloc() PLJCx_ReadIniVlocRloc(k)
print 'tact' print 'tact'
writeTactorsToVTK(tmp+'DISPLAY/tacts'+'_'+str(k)+'.vtp',fit,tacts_dict) writeTactorsToVTK('DISPLAY/tacts'+'_'+str(k)+'.vtp',fit,tacts_dict)
print 'inter' 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(fit)
stopCollection(fii) stopCollection(fii)
......
import os,sys,shutil
from pylmgc90.chipy import * from pylmgc90.chipy import *
from numpy import * from numpy import *
......
...@@ -13,7 +13,7 @@ $nodty ...@@ -13,7 +13,7 @@ $nodty
NO3xx 7 coo1= 0.1000000D+01 coo2= 0.1000000D+01 coo3= 0.1000000D+01 NO3xx 7 coo1= 0.1000000D+01 coo2= 0.1000000D+01 coo3= 0.1000000D+01
NO3xx 8 coo1= 0.0000000D+00 coo2= 0.1000000D+01 coo3= 0.1000000D+01 NO3xx 8 coo1= 0.0000000D+00 coo2= 0.1000000D+01 coo3= 0.1000000D+01
$tacty $tacty
ASpx4 1 color REDxx noda= 5 nodb= 6 nodc= 7 nodd= 8 ASpxx 1 color REDxx noda= 5 nodb= 6 nodc= 7 nodd= 8
$$$$$$ $$$$$$
$bdyty $bdyty
...@@ -31,5 +31,5 @@ $nodty ...@@ -31,5 +31,5 @@ $nodty
NO3xx 7 coo1= 0.1000000D+01 coo2= 0.1000000D+01 coo3= 0.2000000D+01 NO3xx 7 coo1= 0.1000000D+01 coo2= 0.1000000D+01 coo3= 0.2000000D+01
NO3xx 8 coo1= 0.0000000D+00 coo2= 0.1000000D+01 coo3= 0.2000000D+01 NO3xx 8 coo1= 0.0000000D+00 coo2= 0.1000000D+01 coo3= 0.2000000D+01
$tacty $tacty
CSpx4 1 color REDxx noda= 4 nodb= 3 nodc= 2 nodd= 1 CSpx1 1 color REDxx noda= 4 nodb= 3 nodc= 2 nodd= 1
$$$$$$ $$$$$$
...@@ -84,7 +84,6 @@ utilities_logMes('READ INI GPV') ...@@ -84,7 +84,6 @@ utilities_logMes('READ INI GPV')
TimeEvolution_ReadIniGPV() TimeEvolution_ReadIniGPV()
mecaMAILx_ReadIniGPV() mecaMAILx_ReadIniGPV()
# #
CSxxx_SetQuadrature(1)
CSxxx_LoadTactors() CSxxx_LoadTactors()
ASpxx_LoadTactors() ASpxx_LoadTactors()
# #
......
...@@ -23,7 +23,6 @@ ref_radius = 0.1 ...@@ -23,7 +23,6 @@ ref_radius = 0.1
# info contact # info contact
freq_detect = 1 freq_detect = 1
CSxxx_SetQuadrature(1)
# 123456789012345678901234567890 # 123456789012345678901234567890
type = 'Stored_Delassus_Loops ' type = 'Stored_Delassus_Loops '
......
...@@ -23,7 +23,6 @@ freq_write = 100 ...@@ -23,7 +23,6 @@ freq_write = 100
# info detection contact # info detection contact
freq_detect = 1 freq_detect = 1
CSxxx_SetQuadrature(1)
# 123456789012345678901234567890 # 123456789012345678901234567890
type = 'Stored_Delassus_Loops ' type = 'Stored_Delassus_Loops '
......
...@@ -41,16 +41,16 @@ mesh_cube_2 = copy.deepcopy(mesh_cube) ...@@ -41,16 +41,16 @@ mesh_cube_2 = copy.deepcopy(mesh_cube)
cube=buildMeshedAvatar(mesh=mesh_cube, model=m3Dl, material=stone) cube=buildMeshedAvatar(mesh=mesh_cube, model=m3Dl, material=stone)
# contacteurs : # contacteurs :
# * antagonistes sur la face du haut # * antagonistes sur la face du haut
cube.addContactors(group='102', type='ASpx3', color='BLEUx') cube.addContactors(group='102', type='ASpxx', color='BLEUx')
# * candidats sur la face du bas # * candidats sur la face du bas
cube.addContactors(group='105', type='CSpx3', color='BLEUx') cube.addContactors(group='105', type='CSpxx', color='BLEUx',quadrature=0)
bodies += cube bodies += cube
cube_2=buildMeshedAvatar(mesh=mesh_cube_2, model=m3Dl, material=stone) cube_2=buildMeshedAvatar(mesh=mesh_cube_2, model=m3Dl, material=stone)
# contacteurs : # contacteurs :
# * candidats sur la face du bas # * candidats sur la face du bas
cube_2.addContactors(group='105', type='CSpx3', color='BLEUx') cube_2.addContactors(group='105', type='CSpxx', color='BLEUx',quadrature=0)
cube_2.translate(dz=1.) cube_2.translate(dz=1.)
bodies += cube_2