Commit ad0f6767 authored by mozul's avatar mozul
Browse files

Squashed 'src/' changes from 1197b55..ed992f2

ed992f2 Merge branch 'dev' into 'master'
b5ebfb1 Merge branch 'matlib4' into 'dev'
c51d0cc use of Matlib v4
1cdbb24 Merge branch 'fix_qh' into 'dev'
864c5c9 modif de la routine convex hull
d99f6e8 Merge branch 'fix_flags' into 'dev'
cb76f92 correction de bugs dans les tests de polyr2bdyty(3,xx) ; ajout regul gap_sgr_clb
2c76a13 Merge branch 'visu_restart' into 'dev'
2d6f760 Allow to restart visualization from a certain index value
9f9f9e8 Merge branch 'da_fix' into 'dev'
3aefb7b fix bug in set vector field by node in meca and ther MAILx (thanks to DA)
1a240cc Merge branch 'compil_fix' into 'dev'
82759b6 fix compilation with ifort
64ba5e7 Merge branch 'fix_contacteursquadratiques' into 'dev'
c2181e2 correction timer disparu
215d1a6 suppression dans write_bodies, get_idata, get_idata_sz de la reference aux vieux contacteurs
b33e7ec modif contacteurs quadratiques ; correction qq bug : integration 1 pg sur Q4 , masse lumpee Q8 et H20
fc086e6 modifs
04b6eac qq modifs
f91a8ca ajout gestion Q quadra
8f9f925 ajout ASpx6 et ASpx8
ef8df90 Merge branch 'CSAS_projection' into 'dev'
62f4360 fix realloc in second_form
c960189 put back systematic reallocation in FONCT_FORME and DERIVE_FORM to avoid side effects, and correct potential memory leak in second_form
6280ec4 draft of test of second derivative of form function
0e431f5 fix second derivatives of form functions
cc0b192 finish and test projection function with linear hexahedron
52a0db0 draft of projection computation using form function and derivatives in minimization problem
21eff87 add second derivative of form functions
6192f3d Merge branch 'fix_regul' into 'dev'
099cbac modifs pour la regul avec ajout sur la partie tangente, correction nlgs_3D pour diagonal resolution
fcc4922 Merge branch 'fix' into 'dev'
232b6fe Write postpro in checkInteractiveCommand
041cef5 Merge branch 'fix_mecaEF' into 'dev'
fdf9764 remise en place get_ele_ptr_mecaEF_iso
764bd0f Merge branch 'rigidPolyhedron_fix' into 'dev'
e3d4af9 Putting back FatalDamping macro function but without arguments and blindly applying it to all objects
2dd7648 fix documentation
4b69a01 consistent API of FatalDamping functions and remove corresponding macro function
df7ea58 if scipy is available, use qhull to generate connectivity of a polyhedron in pre_lmgc
487c024 Merge branch 'compil_fix' into 'dev'
6167d66 fix compilation when not using robotran
29c3b33 Merge branch 'mbs' into 'dev'
5849bb7 Merge branch 'mbs_ucl' into 'mbs'
5141da9 external_add_reac and external_get_vlocy now get the transformation maxtrix to change the frame of torque and angular velocities
a2fd58a improving comments
1242036 Replace write(*...) by call to logmes
37bd4e7 Correction d'une erreur introduite sur l'argument de get_behav_POLYR
f941726 Remplacement des appel au mot-clefs 'stop' par des appel à la fonction faterr. Remplacement effectué dans mod_PLANx et mod_POLYR.
734d77b Bug correction : shift TT for i_mbs3 was never called
3a65e76 Nullify Reac and Raux in increment function
a2bd970 Torque vector is now projected in body Frame (before it was in global frame)
ca018d2 get_isee function argument replaced to get body type (RBDY3 or MBS)... modify_behaviour_SPPLx does no more check body type (only check contactor type and color) Update arguments of XX_PLANx functions call.
9087c4a Angular velocity vector is now projected in body Frame (before it was in global frame)
3554adb get_isee function argument replaced to get body type (RBDY3 or MBS)... Update arguments of XX_PLANx functions call.
d0c3e88 get_isee function argument replaced to get body type (RBDY3 or MBS)... Update arguments of XX_PLANx functions call.
d944f87 Correcting get_coor_POLYR and get_intertia_frame_POLYR functions call... Update arguments of XX_PLANx functions call.
d2c6114 Heavy modification to call MBS module in case of the contactor is on a MBS or RBDY3 module in the other case.
9e89503 New function to retrieve embedded frame and loading PLAnx on MBS
f56b7ec attempt to fix clean_memory bug with mbs
18dff66 MBS : null pointer initialization
e891c14 cleaning lmgc90 memory in MBS when calling Finalize()
ca0c348 fix compil in clean_memory of mbs module
ffe4871 real clean_memory in mbs
1ff8a9f correct detection in PRPR when mixing MBS and RBDY3
5370be2 Merge branch 'CSxxx_SetQuadrature' into 'dev'
96a6d82 fix error sphinx doc of pre
5503d2d adding possibility to have real options when instanciating contactors in pre_lmgc
c9cf310 fix bug in CSxxx point computation with quadrature rule
01e0353 Putting back SetQuadrature python function as obsolete one
93ef14c suppress compilation warning
7b5b06f In pre_lmgc delete xSxxx contactor and have only CSpxx and ASpxx type with quadrature as an option of CSpxx
f495289 Change api in wrapped function to select version file format
22e75c5 file version reading management
ac20548 Change contactor type to ASpxx and CSpxx and include quadrature rule of CS as a number instead of last x
f91bd8b change CSxxx_SetQuadrature to have constant point by element
50f8a2d Merge branch 'regul' into 'dev'
24fb2dc ajout regularisation pour MC et modif findnumpy
7b17aaf Merge branch 'ASpxx_Explode' into 'dev'
601115c Merge branch 'megabug' into 'dev'
7f9011f mega buuuuuuuuuuuuuuuug !
c0aedf3 ajout d'une commande pour exploser les patch ASpxx en singleton
35cf6c0 ajout d'une commande pour exploser les patches ASpxx -> ASxxx
34b5fe2 Merge branch 'Creation_pvtu_pvtp' into 'dev'
fc65953 Creation des fichier .pvtu et .pvtp pour la DDM

git-subtree-dir: src
git-subtree-split: ed992f24dbfa057de53694a002bde30542ac47dd
parent e75b7a86
......@@ -7,17 +7,26 @@
#ENDIF( NOT OLD_MATLIB_VERSION STREQUAL MATLIB_VERSION )
if(${MATLIB_VERSION} STREQUAL "off")
message(STATUS "No external models library used")
set(LMGC90_BINDINGS_MODELS_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/Std_ExternalModels.f90 PARENT_SCOPE)
set(LMGC90_BINDINGS_MODELS_TARGET_LIBS PARENT_SCOPE)
else()
set(LMGC90_BINDINGS_MODELS_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/MatLib_ExternalModels.f90 PARENT_SCOPE)
if(MATLIB_LIBRARY)
message(STATUS "Matlib Library used : " ${MATLIB_LIBRARY})
set(LMGC90_BINDINGS_MODELS_TARGET_LIBS ${MATLIB_LIBRARY} PARENT_SCOPE)
else(MATLIB_LIBRARY)
set(LMGC90_BINDINGS_MODELS_TARGET_LIBS matlib PARENT_SCOPE)
endif(MATLIB_LIBRARY)
if(${MATLIB_VERSION} STREQUAL "v3")
set(LMGC90_BINDINGS_MODELS_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/MatLib_ExternalModels_v3.f90 PARENT_SCOPE)
else()
set(LMGC90_BINDINGS_MODELS_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/MatLib_ExternalModels_v4.f90 PARENT_SCOPE)
endif()
if(MATLIB_LIBRARY)
message(STATUS "Matlib Library used : " ${MATLIB_LIBRARY})
set(LMGC90_BINDINGS_MODELS_TARGET_LIBS ${MATLIB_LIBRARY} PARENT_SCOPE)
else(MATLIB_LIBRARY)
set(LMGC90_BINDINGS_MODELS_TARGET_LIBS matlib PARENT_SCOPE)
endif(MATLIB_LIBRARY)
endif()
#add_library(lmgc_bindings_models ${LMGC90_BINDINGS_MODELS_SRCS})
......
This diff is collapsed.
......@@ -55,7 +55,7 @@ module ExternalMBS
end subroutine
!> Set a reaction array
subroutine add_reac(i_mbs, i_node, reac, storage)
subroutine add_reac(i_mbs, i_node, reac, storage, frame)
implicit none
!> multi-body index
integer(kind=4), intent(in) :: i_mbs
......@@ -65,6 +65,8 @@ module ExternalMBS
real(kind=8) , dimension(6), intent(in) :: reac
!> array to work on
integer(kind=4), intent(in) :: storage
!> local frame in which to express torques
real(kind=8), dimension(3,3), intent(in) :: frame
end subroutine
......@@ -89,7 +91,7 @@ module ExternalMBS
end subroutine
!> Get a velocity array
subroutine get_vlocy(i_mbs, i_node, vlocy, storage)
subroutine get_vlocy(i_mbs, i_node, vlocy, storage, frame)
implicit none
!> multi-body index
integer(kind=4), intent(in) :: i_mbs
......@@ -99,6 +101,8 @@ module ExternalMBS
real(kind=8) , dimension(6), intent(inout) :: vlocy
!> array to work on
integer(kind=4), intent(in) :: storage
!> local frame in which to express rotation
real(kind=8), dimension(3,3), intent(in) :: frame
end subroutine
......
......@@ -70,7 +70,7 @@ set_property(CACHE OPT PROPERTY STRINGS
# if matlib is to be used and which one
set(MATLIB_VERSION "default" CACHE STRING "Type of matlib to use" )
set_property(CACHE MATLIB_VERSION PROPERTY STRINGS
"off" "default"
"off" "default" "v3"
)
set(EXT_FEM_VERSION "none" CACHE STRING "External FEM library to use")
......
......@@ -60,7 +60,8 @@ MODULE wrap_nlgs
Nullify_EntityList_nlgs,&
update_cohe_nlgs, &
get_all_this, &
use_jacobi_solver
use_jacobi_solver, &
use_regul
logical :: with_quick_scramble = .FALSE.
integer(kind=4) :: nb_iter_in_module
......@@ -357,6 +358,8 @@ CONTAINS
if( timer_id_check /= 0 ) call stop_itimer(timer_id_check)
call display_check_nlgs
IF (iconv == 0) EXIT
END DO
......@@ -415,4 +418,11 @@ CONTAINS
END SUBROUTINE
SUBROUTINE UseRegul() bind(C, name = 'nlgs_UseRegularization')
IMPLICIT NONE
call use_regul()
END SUBROUTINE
END MODULE wrap_nlgs
......@@ -310,4 +310,14 @@
*/
extern "C" void nlgs_UseJacobiSolver(bool jacobi);
/**
* @fn void nlgs_UseRegularization(void)
* @brief use some regularization heuristics on interaction laws
*
* @cond PYDOC
* python usage : nlgs_UseRegularization()
* @endcond
*/
extern "C" void nlgs_UseRegularization(void);
#endif /* wrap_nlgs */
......@@ -61,7 +61,8 @@ MODULE wrap_NLGS_3D
!!$ init_cohe_nlgs_3D, &
assume_is_initialized, &
display_tacinfo, &
use_jacobi_solver
use_jacobi_solver,&
use_regul
logical :: with_quick_scramble = .FALSE.
......@@ -459,7 +460,9 @@ CONTAINS
CALL comp_check_nlgs(iconv)
if( timer_id_check /= 0 ) call stop_itimer(timer_id_check)
call display_check_nlgs
IF (iconv == 0) EXIT
END DO
......@@ -502,5 +505,12 @@ CONTAINS
END SUBROUTINE
SUBROUTINE UseRegul() bind(C, name = 'nlgs_3D_UseRegularization')
IMPLICIT NONE
call use_regul()
END SUBROUTINE
END MODULE wrap_NLGS_3D
......@@ -373,5 +373,14 @@ extern "C" void nlgs_3D_SetWithReverseContactOrder(void);
// */
// extern "C" void nlgs_3D_InitCohesiveBehav(void);
/**
* @fn void nlgs_3D_UseRegularization(void)
* @brief use some regularization heuristics on interaction laws
*
* @cond PYDOC
* python usage : nlgs_3D_UseRegularization()
* @endcond
*/
extern "C" void nlgs_3D_UseRegularization(void);
#endif /* wrap_nlgs_3D_h */
......@@ -439,16 +439,6 @@ def DisplayProxTactors():
SPPLx_DisplayProxTactors()
SPSPx_DisplayProxTactors()
def FatalDamping(nb_step):
"""Compute fatal damping if the current step number is a multiple of nb_step.
"""
global DIMENSION
if DIMENSION == 2:
RBDY2_FatalDamping(nb_step)
elif DIMENSION == 3:
RBDY3_FatalDamping(nb_step)
mecaMAILx_FatalDamping(nb_step)
def FdSelectProxTactors():
"""Special way of computing sphere/sphere contacts.
"""
......@@ -456,6 +446,22 @@ def FdSelectProxTactors():
if DIMENSION == 3:
SPSPx_FdSelectProxTactors()
def FatalDamping(bodies=None):
"""Compute fatal damping for all bodies.
"""
global DIMENSION
if bodies != None:
print 'ERROR : Cannot use input list of bodies in macro function.'
print ' Please use specific function prefixed with either RBDY2_, RBDY3_ or mecaMAILx_ .'
raise Exception
if DIMENSION == 2:
RBDY2_FatalDamping()
elif DIMENSION == 3:
RBDY3_FatalDamping()
mecaMAILx_FatalDamping()
def IncrementStep():
"""Prepare a new time step computation.
"""
......@@ -625,11 +631,16 @@ def ReadModels():
models_InitModels()
ExternalModels_InitModels()
def ReadBodies():
def ReadBodies(version=None):
"""Read BODIES.DAT file in DATBOX directory.
"""
global DIMENSION
MAILx_ReadBodies()
if version :
MAILx_ReadBodies(version)
else :
MAILx_ReadBodies()
if DIMENSION == 2:
RBDY2_ReadBodies()
elif DIMENSION == 3:
......@@ -907,12 +918,17 @@ def WriteBehaviours():
bulk_behav_WriteBehaviours()
tact_behav_WriteBehaviours()
def WriteBodies():
def WriteBodies(version=None):
"""Write bodies in ascii file (OUTBOX/BODIES.OUT).
"""
global DIMENSION
overall_WriteBodies()
MAILx_WriteBodies()
if version :
MAILx_WriteBodies(version)
else :
MAILx_WriteBodies()
if DIMENSION == 2:
RBDY2_WriteBodies()
elif DIMENSION == 3:
......@@ -1026,19 +1042,22 @@ def WriteMpBehaviours():
elif DIMENSION == 3:
mp_solver_3D_WriteMpBehaviour()
def OpenDisplayFiles(ref_reac=0.):
def OpenDisplayFiles(restart=1,ref_reac=0.):
"""Initialize visualization file writing.
"""
global DIMENSION, is_vtk_display, fim, fin, fip, fiu, fit, fii, fir, tact_names, inter_names
global DIMENSION, is_vtk_display, wdf, fim, fin, fip, fiu, fit, fii, fir, tact_names, inter_names
wdf = restart-1
if is_vtk_display :
wd = overall_GetWorkingDirectory()
fim = startCollection(os.path.join(wd,'DISPLAY','mecafe.pvd'))
fin = startCollection(os.path.join(wd,'DISPLAY','therfe.pvd'))
fip = startCollection(os.path.join(wd,'DISPLAY','porofe.pvd'))
fiu = startCollection(os.path.join(wd,'DISPLAY','multife.pvd'))
fit = startCollection(os.path.join(wd,'DISPLAY','tacts.pvd'))
fii = startCollection(os.path.join(wd,'DISPLAY','inters.pvd'))
fir = startCollection(os.path.join(wd,'DISPLAY','rigids.pvd'))
fim = startCollection(wdf,os.path.join(wd,'DISPLAY','mecafe.pvd'))
fin = startCollection(wdf,os.path.join(wd,'DISPLAY','therfe.pvd'))
fip = startCollection(wdf,os.path.join(wd,'DISPLAY','porofe.pvd'))
fiu = startCollection(wdf,os.path.join(wd,'DISPLAY','multife.pvd'))
fit = startCollection(wdf,os.path.join(wd,'DISPLAY','tacts.pvd'))
fii = startCollection(wdf,os.path.join(wd,'DISPLAY','inters.pvd'))
fir = startCollection(wdf,os.path.join(wd,'DISPLAY','rigids.pvd'))
if DIMENSION == 2:
tact_names = ['DISKx', 'DISKx', 'DISPx', 'JONCx', 'POLYG', 'PT2Dx', 'xKSID', 'xPSID']
inter_names = ['CLALp', 'CLJCx', 'DKALp', 'DKDKL', 'DKDKx', 'DKDPx', 'DKJCx', 'DKKDx',
......@@ -1291,6 +1310,8 @@ def checkInteractiveCommand():
WriteLastVlocRloc()
WriteDisplayFiles()
CloseDisplayFiles()
WritePostproFiles()
ClosePostproFiles()
os.remove('stop')
sys.exit()
......@@ -1298,6 +1319,7 @@ def checkInteractiveCommand():
WriteLastDof()
WriteLastGPV()
WriteLastVlocRloc()
WritePostproFiles()
os.remove('save')
if( os.path.exists('display_now') ):
......
......@@ -4,6 +4,7 @@ import os
import subprocess
import shutil
import glob
import vtk
import lmgc90
......@@ -104,6 +105,7 @@ def concatenate_DISPLAY():
my_output.write("<?xml version=\"1.0\"?>\n")
my_output.write("<VTKFile type=\"Collection\" version=\"0.1\" byte_order=\"LittleEndian\">\n")
my_output.write("<Collection>\n")
extension = "." + glob.glob("DDM_WD_00001/DISPLAY/"+fic+"_*")[0].split(".")[1]
for j in range(nb_SDM):
my_file = os.path.join(working_dir,"DDM_WD_"+"%(#)05d" % {"#": j+1},'DISPLAY',fic+".pvd")
my_input=open(my_file, "r")
......@@ -125,6 +127,45 @@ def concatenate_DISPLAY():
#on copie la ligne
line = line.replace("./","../DDM_WD_"+"%(#)05d" % {"#": j+1} + "/DISPLAY/")
my_output.write(line)
# Pour concatener les fichiers meme si le calcul s'est arrete brutalement et que les fichier .pvd
# de chaque processeur ne sont pas generes.
if( iline < 2 ):
for k in range(nb_out) :
f = my_file.replace(".pvd", "")
line = '<DataSet timestep="' + "%(#)05d" % {"#": k} + '.0" group="" part="0" file=".' + f + '_' + str(k+1) + extension + '"/>\n'
my_output.write(line)
# Pour generer des fichiers .pvtu et .pvtp a partir des fichiers .vtu et .vtp
nb_step = len( glob.glob("DDM_WD_00001/DISPLAY/"+fic+"_*"+extension) )
for k in range(nb_step):
vtxFile = None
pvtxFile = None
if( extension == ".vtu" ) :
vtxFile = vtk.vtkXMLUnstructuredGridReader()
pvtxFile = vtk.vtkXMLPUnstructuredGridWriter()
elif( extension == ".vtp" ) :
vtxFile = vtk.vtkXMLPolyDataReader()
pvtxFile = vtk.vtkXMLPPolyDataWriter()
vtxFile.SetFileName("./DDM_WD_00001/DISPLAY/"+fic+"_"+str(k+1)+extension)
pvtxFile.SetNumberOfPieces(nb_SDM)
pvtxFile.SetFileName("./DISPLAY/TEMP.tmp")
pvtxFile.SetInputConnection( vtxFile.GetOutputPort() )
pvtxFile.Write()
orig = open("./DISPLAY/TEMP.tmp","r")
dest = open("./DISPLAY/"+fic+"_"+str(k+1)+extension.replace(".",".p"),'w')
text = orig.read()
for j in range(nb_SDM):
piece_orig = "TEMP_"+str(j)+extension
domain = int(piece_orig.split("_")[1].split(".")[0]) +1
piece_new = "../DDM_WD_"+"%(#)05d" % {"#": domain} + "/DISPLAY/"+fic+"_" + str(k+1) + extension
text = text.replace(piece_orig,piece_new)
dest.write(text)
orig.close()
dest.close()
os.remove( "./DISPLAY/TEMP_0"+extension)
os.remove( "./DISPLAY/TEMP.tmp" )
my_output.write("</Collection>")
my_output.write("</VTKFile>")
my_output.close()
......
......@@ -2298,10 +2298,25 @@ def writeMultifeToVTK(fichier,fid,dim,**kw):
#######################################
# ecriture collections
def startCollection(fichier):
header= '<?xml version="1.0"?>\n<VTKFile type="Collection" version="0.1" byte_order="LittleEndian">\n<Collection>'
fid = open(fichier,'w')
fid.write(header)
def startCollection(restart,fichier):
if restart > 0 :
# taken from stackoverflow :
# smart way to remove last ltd lines from a file
import collections, fileinput
q = collections.deque()
ltd = 2
for line in fileinput.input(fichier, inplace=True):
q.append(line)
if ltd == 0:
print q.popleft(),
else:
ltd -= 1
q.clear()
fid = open(fichier,'a')
else :
header= '<?xml version="1.0"?>\n<VTKFile type="Collection" version="0.1" byte_order="LittleEndian">\n<Collection>\n'
fid = open(fichier,'w')
fid.write(header)
return fid
def stopCollection(fid):
......
......@@ -43,6 +43,7 @@ MODULE wrap_ASpxx
USE iso_c_binding
USE ASpxx,ONLY: load_tactors_ASpxx, set_precon_node_ASpxx, clean_memory_ASpxx
USE a_BDARY_xSpxx,ONLY: set_explode_patch_ASpxx
CONTAINS
!!!----------------------------------------------------
......@@ -70,4 +71,11 @@ CONTAINS
end subroutine
subroutine ExplodePatch() bind(c, name='ASpxx_ExplodePatch')
implicit none
call set_Explode_Patch_ASpxx
end subroutine
END MODULE wrap_ASpxx
......@@ -72,4 +72,14 @@
*/
extern "C" void ASpxx_CleanMemory(void);
/**
* @fn void ASpxx_ExplodePatch(void)
* @brief Explode ASpxx patch in singleton
*
* @cond PYDOC
* python usage : ASpxx_ExplodePatch()
* @endcond
*/
extern "C" void ASpxx_ExplodePatch(void);
#endif /* wrap_ASpxx_h */
......@@ -41,15 +41,14 @@ MODULE wrap_CSxxx
USE iso_c_binding
USE CSxxx,ONLY: load_tactors_CSxxx, &
set_precon_node_CSxxx, &
flip_orientation_CSxxx, &
USE CSxxx,ONLY: load_tactors_CSxxx , &
set_precon_node_CSxxx , &
flip_orientation_CSxxx , &
flip_orientation_one_CSpxx, &
set_shrink_CSxxx, &
set_Quadrature_CSxxx, &
apply_pressure_CSpxx, &
add_reac_CSxxx, &
clean_memory_CSxxx, &
set_shrink_CSxxx , &
apply_pressure_CSpxx , &
add_reac_CSxxx , &
clean_memory_CSxxx , &
apply_surface_load_CSpxx
CONTAINS
......@@ -103,17 +102,17 @@ CONTAINS
END SUBROUTINE
SUBROUTINE SetQuadratureCSxxx(ivalue) bind(c, name='CSxxx_SetQuadrature')
IMPLICIT NONE
!! PURPOSE
!! set the number of CS nodes by face.
!! it helps to compute the length associated to a contact node
subroutine SetQuadratureCSxxx(ivalue) bind(c, name='CSxxx_SetQuadrature')
use utilities, only : logmes
implicit none
integer(c_int), value :: ivalue
integer(c_int), value :: ivalue
CALL set_Quadrature_CSxxx(ivalue)
call logmes('SetQuadratureCSxxx : Obsolete function please remove it in the future',.true.)
!call faterr('wrap::SetQuadratureCSxxx','Obsolete function')
!call set_Quadrature_CSxxx(ivalue)
END SUBROUTINE
end subroutine
SUBROUTINE ApplyPressureCSxxx(ivalue,rvalue) bind(c, name='CSpxx_ApplyPressure')
IMPLICIT NONE
......
......@@ -108,10 +108,10 @@ extern "C" void CSxxx_FlipOrientationOnePatch(int ibdyty,int icspxx);
*/
extern "C" void CSxxx_SetShrink(double shrink);
/**
/**
* @fn void CSxxx_SetQuadrature(int ivalue)
* @brief Set the contact quadrature rule of a CSxxx face.
* It helps to compute the surface associated to a contact node
* OBSOLETE FUNCTION !!!! To remove in the future
*
* @cond PYDOC
* python usage : CSxxx_SetQuadrature(ivalue)
......
......@@ -59,22 +59,66 @@ MODULE wrap_MAILx
set_nodal_field_MAILx, &
clean_memory_MAILx
use overall, only : faterr
CONTAINS
SUBROUTINE ReadBodies() bind(c, name='MAILx_ReadBodies')
IMPLICIT NONE
CALL read_in_bodies_MAILx
END SUBROUTINE
subroutine ReadBodies(version) bind(c, name='MAILx_ReadBodies')
implicit none
character(c_char), dimension(*) :: version
!
integer(kind=4) :: v_maj, v_min, i, j
if( version(1) == c_null_char ) then
v_maj = 2
v_min = 1
else
if( version(1) /= 'v' ) then
call faterr('MAILx::ReadBodies',"Input string must be of form 'vX.Y' (with X and Y major and minor version number)")
end if
i = 2
do while( version(i) /= '.' )
i = i+1
end do
read(version(2:i-1),*) v_maj
j = i + 1
do while( version(j) /= c_null_char )
j = j+1
end do
read(version(i+1:j-1),*) v_min
end if
call read_in_bodies_MAILx(v_maj,v_min)
SUBROUTINE WriteBodies() bind(c, name='MAILx_WriteBodies')
IMPLICIT NONE
end subroutine
CALL write_out_bodies_MAILx
subroutine WriteBodies(version) bind(c, name='MAILx_WriteBodies')
implicit none
character(c_char), dimension(*) :: version
!
integer(kind=4) :: v_maj, v_min, i, j
if( version(1) == c_null_char ) then
v_maj = 2
v_min = 1
else
if( version(1) /= 'v' ) then
call faterr('MAILx::ReadBodies',"Input string must be of form 'vX.Y' (with X and Y major and minor version number)")
end if
i = 2
do while( version(i) /= '.' )
i = i+1
end do
read(version(2:i-1),*) v_maj
j = i + 1
do while( version(j) /= c_null_char )
j = j+1
end do
read(version(i+1:j-1),*) v_min
end if
call write_out_bodies_MAILx(v_maj,v_min)
END SUBROUTINE
end subroutine
SUBROUTINE WriteLastGPV() bind(c, name='MAILx_WriteLastGPV')
IMPLICIT NONE
......
/*==========================================================================
*
* Copyright 2000-2004 CNRS.
* Copyright 2000-2015 CNRS.
*
* This file is part of a software (LMGC90) which is a computer program
* which purpose is to modelize interaction problems (contact, multi-Physics,etc).
......@@ -32,10 +32,10 @@
* knowledge of the CeCILL license and that you accept its terms.
*
* To report bugs, suggest enhancements, etc. to the Authors, contact
* Frederic Dubois or Michel Jean.
* Frederic Dubois or Remy Mozul.
*
* dubois@lmgc.univ-montp2.fr
* mjean@mn.esm2.imt-mrs.fr
* frederic.dubois@univ-montp2.fr
* remy.mozul@umontpellier.fr
*
*=========================================================================*/
......@@ -43,24 +43,42 @@
#define wrap_MAILx_h
/**
* @fn void MAILx_ReadBodies(void)