Commit e75b7a86 authored by mozul's avatar mozul
Browse files

Squashed 'src/' changes from 61c003c..1197b55

1197b55 Merge branch 'dev' into 'master'
d954d3b Merge branch 'planx_inertia_fix' into 'dev'
cf7ccd7 fix inertia computaiton of planx in pre_lmgc
7c7b117 fix inertia matrix computation of PLANx
8a3cfa5 Merge branch 'PutBodyVector' into 'dev'
5ea882f Merge branch 'fix_SPSP' into 'dev'
fcf23a1 correction bug calcul Vbegin
886cdc6 modif des xxxxMAILx_put_vector
2827d26 Merge branch 'siconos' into 'dev'
99ab331 attempt to fix bug when quadrature of CSxxx not 0
a810416 set C_FLAGS of SiconosNumerics compilation through LMGC90
4422cb7 fix compilation error
988adae Merge branch 'logmes' into 'dev'
66f087a WARNING log messages always displayed
23af95c adding internal timer for nlgs_3d ExSolver function
d2ed071 switch some print to logmes and possibility to force message even if disabled
34ba5fd Merge branch 'nlgs_log' into 'dev'
bb08e85 Ajout d'un log dans ExSolver
46c9a09 Merge branch 'get_coor_POLYR_fix' into 'dev'
19aae6d fix get_coor_POLYR function call
01b04b3 Merge branch 'loi_preGAP_SGR_CLB' into 'dev'
9a2459e pta: reactivation loi preGAP_SGR_CLB
a086ba9 pta: correction pour merge
d9558f0 pta: reactivation de la loi preGAP_SGR_CLB dans le Core et le pre
94b51e4 Merge branch 'ExternalFEM' into 'dev'
1b053d6 Merge branch 'fix_gfortran44' into 'dev'
70bcd67 Merge branch 'mpi_without_mumps' into 'dev'
dae179c Merge branch 'ddm_fix' into 'dev'
5e1d76b Ajout de la fonction externalFEM_get_V dans Std_ExternalFEM.f90
4a4ef62 Modification de la syntaxe ExternalFEM_ComputeV. La boucle n'est plus faite dans LMGC90. Ceci corrige un bug pour les calculs periodiques
89b7955 Ajout d'un patch pour compilation avec GCC 4.4
dfe2a2b Autorise une compilation AVEC mpi mais SANS mumps
5556f20 Correction : ne marchait pas lorsque la fonction est lancée dans un thread mpirun
2b36d5e Merge branch 'perales_fix' into 'dev'
8422774 Ugly fix of seg fault when calling clean_memory and skipping He build
79a1cc9 add F. Perales fix according to change of library name in Xper
9f8363c Merge branch 'fix' into 'dev'
6043aca update warning/error messages when trying to import/use optional modules
4159a85 fix seg fault when using mecaMAILx_GpvVTKDrawAll when no mecaMAILx present
8c8bf84 Add wrap of reverse contact order for nlgs_3D
9043d15 fix README
53ae1fb Merge branch 'reload' into 'dev'
e1030dc When restarting a computation, get starting file increment
5327a89 possibility to read VlocRloc file of OUTBOX directory
e29245e possibility to read GPV file of OUTBOX directory
d273f69 possibility to read DOF file of OUTBOX for all body type
37a497a add a parameter to RBDY2_ReadIniDof routine to read output file
ca4ddcb Merge branch 'fix_RTA_laws' into 'dev'
321e8c1 correction bug 2
853b79c correction bug
39508df  prise en compte _nosldt
140fba9 one more modif
c7d3ecd one more modif
7168730 des modifs pour la loi gap_sgr_clb_g0 et les lois _nosldt et _noslds
0213711 Merge branch 'fix_bars' into 'dev'
3f42c22 correction in extrusion of group function and management of Q4 element
25ae2ad update coordinates of nodes in Track class of gmshutils
1d54535 no critical bug when using GpvVTKDrawAll with bar elements
51fa425 activate only linear prisme in SHB
c3826c4 use a list of points in Track class of gmshutils
9850972 fix in mesh tracking
229bea4 add point tracking in a mesh using gmshpy
6f1e8fd update comments in compute_center function of a_EF module
b9d279f fix from bad merge
1fb16c8 Update SHB module
fb9008b remove ugly spaces
40890c0 adding gmshutils module in pylmgc90 package allowing to read inp file, write geo file and generate msh file from geo one
982c678 in mesh class, possibility to extruded a physical entity
870a065 add BARxx to possible 2D elements
65eefb2 visu axial stress/strain
4bc2f6e modif bar element ; add BARxx to pre ; modify name of function for ByElement fields
3f2381f passage mecaEF_iso en private, reactivation mecaEF_bar
db1ad43 Merge branch 'new_IQS_Stick' into 'dev'
16ce851 modifs pour loi xxx_STICK
6abf4d3 Merge branch 'inter_accessor' into 'dev'
11ac90a adding access to antagonist and candidat contactor index of an interaction
bafed69 fix swig file dependency to .h files
a2817cf Merge branch 'api' into 'dev'
5636726 add function to get number and color of contactors of a RBDY2
b2588a4 add dependency of overall to externalMBS module
75961da Merge branch 'fix_mbs_name' into 'dev'
b695ead fix lowercase name of wrap_mbs.h file in chipy.i.in
3509f90 Merge branch 'fix' into 'dev'
76b5433 buildMeshedAvatar function of pre_lmgc now to deepcopy of bulks and nodes objects
2abdc5b fix map use in therMAILx and poroMAILx too
3d389b2 fix bug when number of mecaMAILx and therMAILx are different
448f384 Merge branch 'mbs' into 'dev'
ce7a262 modify some comments
2951df1 fix strange bug when printing result of a function
8d904e8 link with FiberModel external MBS library
34d3679 fix case dependent name for compile and improve display function of mbs
ed4ab9c adding Nicolas Docquier's fix to use external mbs library
8ade4bf correction in call of get_inertia_frame_POLYR and cluster of PLANx in PRPL detection
e992417 adding third index to all tact2bdyty map to store on what type of body a contactor is tied to
bf790b5 draft of cmake link with robotran external mbs library
947a306 cmake file to look for external mbs library (empty)
0cf6615 prepare compiling with external mbs library
fe3177c diverses modfis pour prendre en compte le mbs
983e63c qq modif de fd liees au mbs
50286ce correct loading of interaction with mbs in nlgs_3D... no resolution yet
ddbae90 attempt to create MBS with POLYR contactors
f2d87ae genesis of a Multi Body System handler module
f7088e6 Merge branch 'these_riviere' into 'dev'
905488e ajout modif these jriviere
7f399cc Merge branch 'bug_fix' into 'dev'
b5aabfc fix therMAILx get_all function when used with mecaMAILx
211e38a fix bug when reading DOF.INI with more therMAILx than mecaMAILx
16bdd00 Merge branch 'rev_2015.3' into 'dev'
75dbab3 ugly trick to check metis version when compiling MUMPS-5.0.0
b61ff53 simple attempt to automatically set min and max time step when setting time step
e6a2d35 put numpy include dir flag befor Python's one
728c061 check cython version before compiling rTree python binding
273a8d2 Possibility to desactivate use of Python Framework use in CMake
5fa6f98 minor bug fix
6877226 fix error in orthotropic frame computation
3fab071 Maj to vtk field
2663812 remove obsolete buildMeshedAvatar method from mesh class
9ed5f0b fix typo in material of Pre sphinx doc
afc3e1b fix external fields (scalar/vector) in Pre sphinx doc
c5369e8 Merge branch 'fix_display' into 'dev'
b625851 un peu plus de commentaires
165e0bd fix de la visu des champs grad/flux en meca avec les modele builin
ae6c187 Merge branch 'dev' into 'master'

git-subtree-dir: src
git-subtree-split: 1197b55e6c0d6420fd7dd639f44604d44919f2c6
parent d5cd31b9
......@@ -81,6 +81,21 @@ else()
endif()
# Compiling with ExternalMBS library :
if(EXT_MBS_VERSION STREQUAL "none")
set(LMGC90_BINDINGS_MBS_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/Std_ExternalMBS.f90)
set(LMGC90_BINDINGS_MBS_TARGET_LIBS)
add_library(lmgc_bindings_MBS ${LMGC90_BINDINGS_MBS_SRCS})
target_link_libraries(lmgc_bindings_MBS ${LMGC90_BINDINGS_MBS_TARGET_LIBS})
else()
find_package(ExternalMBS_FOR_LMGC REQUIRED)
message(STATUS "EXT_MBS binding found : ${EXT_MBS_F90_MODULE}")
message(STATUS "EXT_MBS libraries : ${LMGC90_BINDINGS_MBS_TARGET_LIBS}")
set(LMGC90_BINDINGS_MBS_SRCS ${EXT_MBS_F90_MODULE})
add_library(lmgc_bindings_MBS ${LMGC90_BINDINGS_MBS_SRCS})
target_link_libraries(lmgc_bindings_MBS ${LMGC90_BINDINGS_MBS_TARGET_LIBS} lmgc_core_shared)
endif()
####################################################################################
......@@ -115,24 +115,29 @@ end subroutine
end subroutine
!------------------------------------------------------------------------
!------------------------------------------------------------------------
subroutine externalFEM_compute_V(ibdyty,R,V)
subroutine externalFEM_compute_V
implicit none
integer :: ibdyty
real(kind=8),dimension(:) :: R,V
! PEL calcule Vf=Vfree+M**-1 Reac
! call PELcomputeV()
!
! call PELcomputeV(ibdyty,R)
!fp on recupere V
! call PELgetV(ibdyty,V)
! PEL met a jour les deplacements Xf = Xm + (h*theta*Vf)
! call PELupdateAfterNewtonIteration()
!
! call PELupdateAfterNewton()
end subroutine
!------------------------------------------------------------------------
!------------------------------------------------------------------------
subroutine externalFEM_get_V(ibdyty,V)
implicit none
integer :: ibdyty
real(kind=8),dimension(:) :: V
!call PELgetV(ibdyty,V)
end subroutine
!------------------------------------------------------------------------
!------------------------------------------------------------------------
subroutine externalFEM_update_position
......
!>binding of an external mbs library
module ExternalMBS
implicit none
contains
!------------------------------------------------------------------------
!> Initialize the MBS library
subroutine initialize()
implicit none
end subroutine
!> Prepare libray for next time step
subroutine increment(tbegin)
implicit none
!> value of simulation time at the begining of the time step
real(kind=8), intent(in) :: tbegin
end subroutine
! debut boucle Newton
!> Compute the velocity of all multibody
subroutine compute_free_vlocy(h, theta)
implicit none
!> time step size
real(kind=8), intent(in) :: h
!> theta parameter for the theta-integration scheme
real(kind=8), intent(in) :: theta
end subroutine
!> Get nodes coordinates and local in detection configuration
subroutine update_nodes(i_mbs, coorTT, localFrameTT)
implicit none
!> multi-body index
integer(kind=4), intent(in) :: i_mbs
!> coordinates in detection configuration
real(kind=8), dimension(:,:), pointer :: coorTT
!> local frame in detection configuration
real(kind=8), dimension(:,:), pointer :: localFrameTT
end subroutine
!> Nullify a reaction array
subroutine nullify_reac(i_mbs, storage)
implicit none
!> multi-body index
integer(kind=4), intent(in) :: i_mbs
!> array to work on
integer(kind=4), intent(in) :: storage
end subroutine
!> Set a reaction array
subroutine add_reac(i_mbs, i_node, reac, storage)
implicit none
!> multi-body index
integer(kind=4), intent(in) :: i_mbs
!> node index of multi-body
integer(kind=4), intent(in) :: i_node
!> reaction array
real(kind=8) , dimension(6), intent(in) :: reac
!> array to work on
integer(kind=4), intent(in) :: storage
end subroutine
!> Set a velocity array to zero
subroutine nullify_vlocy(i_mbs, storage)
implicit none
!> multi-body index
integer(kind=4), intent(in) :: i_mbs
!> array to work on
integer(kind=4), intent(in) :: storage
end subroutine
!> Compute a velocity array
subroutine comp_vlocy(i_mbs, storage)
implicit none
!> multi-body index
integer(kind=4), intent(in) :: i_mbs
!> array to work on
integer(kind=4), intent(in) :: storage
end subroutine
!> Get a velocity array
subroutine get_vlocy(i_mbs, i_node, vlocy, storage)
implicit none
!> multi-body index
integer(kind=4), intent(in) :: i_mbs
!> node index of multi-body
integer(kind=4), intent(in) :: i_node
!> velocity array
real(kind=8) , dimension(6), intent(inout) :: vlocy
!> array to work on
integer(kind=4), intent(in) :: storage
end subroutine
!> Compute displacements
subroutine compute_dof(h, theta)
implicit none
!> time step size
real(kind=8), intent(in) :: h
!> theta parameter for the theta-integration scheme
real(kind=8), intent(in) :: theta
end subroutine
! fin boucle newton
!> Update values at the end of time step
subroutine update_dof()
implicit none
! calcul nouvelle configuration
! update integration
end subroutine
!> Clean library
subroutine finalize()
implicit none
! on termine le calcul
end subroutine
end module
......@@ -264,7 +264,7 @@ contains
DO I = 1 , N
CALL dcopy ( 3 , L , 1 , VECLRT(1,1,I) , 1 )
!
CALL dcopy ( 3 , XCOOR(1,N) , 1 , WRK , 1 )
CALL dcopy ( 3 , XCOOR(1,I) , 1 , WRK , 1 )
CALL daxpy ( 3 , MONE , P0 , 1 , WRK , 1 )
CALL dgemv ( 'N' , 3 , 3 , ONE , PROJ1 , 3 , WRK , 1 , &
ZERO , R , 1 )
......
......@@ -73,11 +73,16 @@ set_property(CACHE MATLIB_VERSION PROPERTY STRINGS
"off" "default"
)
set(EXT_FEM_VERSION "none" CACHE STRING "External FEM to use")
set(EXT_FEM_VERSION "none" CACHE STRING "External FEM library to use")
set_property(CACHE EXT_FEM_VERSION PROPERTY STRINGS
"none" "Xper"
)
set(EXT_MBS_VERSION "none" CACHE STRING "External MBS library to use")
set_property(CACHE EXT_FEM_VERSION PROPERTY STRINGS
"none" "Robotran"
)
# options definition
option(WITH_NEW "With new simulation module of Core " OFF )
option(WITH_SALADYN "With wrapper for coupling with Saladyn" OFF )
......@@ -98,6 +103,7 @@ option(WITH_SICONOS_NUMERICS "Activate SiconosNumerics contact solvers use"
option(WITH_MEDPRE "Look for med library and activate medpre reading features" OFF)
option(GFORTRAN44_PATCHING "Apply patch when using gfortran 4.4 (which is very buggy)" OFF)
option(NO_PYTHON_FRAMEWORK "On Darwin, do not use framework for Python library" OFF)
# Lapack options
set(MUMPS_VERSION "sequential" CACHE STRING "Use of MUMPS library" )
......@@ -144,9 +150,9 @@ if(NOT ${MATLIB_VERSION} STREQUAL "off")
find_package(MatLib_FOR_LMGC REQUIRED)
endif(NOT ${MATLIB_VERSION} STREQUAL "off")
if(WITH_MPI)
if(WITH_MPI AND NOT ${MUMPS_VERSION} STREQUAL "none")
set(MUMPS_VERSION "parallel")
endif(WITH_MPI)
endif(WITH_MPI AND NOT ${MUMPS_VERSION} STREQUAL "none")
if(NOT ${MUMPS_VERSION} STREQUAL "none" AND NOT BUILD_MUMPS )
......@@ -231,6 +237,17 @@ if(BUILD_PRE)
ADD_SUBDIRECTORY(pre_lmgc)
endif(BUILD_PRE)
#copying gmshutils module to build directory
add_custom_target(gmshutils_module ALL
${CMAKE_COMMAND} -DDIR_TO_COPY=${CMAKE_SOURCE_DIR}/gmshutils -DDEST=${CMAKE_BINARY_DIR}/pylmgc90
-P ${CMAKE_CURRENT_SOURCE_DIR}/tools/cmake/modules/copy_py_module.cmake
)
if(${PYTHON_VERSION_MAJOR} EQUAL 3)
add_custom_command(TARGET pre_py_module POST_BUILD
COMMAND 2to3 ${CMAKE_BINARY_DIR}/pylmgc90/pre_lmgc -w -W -n --no-diffs
)
endif(${PYTHON_VERSION_MAJOR} EQUAL 3)
if(DOXYGEN_FOUND)
add_subdirectory(Docs)
endif(DOXYGEN_FOUND)
......
......@@ -17,6 +17,7 @@ SET(LMGC90_PYTHON_LINK_LIBRARIES lmgc_python_shared
lmgc_python_kernel_2d
lmgc_python_contact_2d
lmgc_python_rigid_3d
lmgc_python_mbs
lmgc_python_post_3d
lmgc_python_kernel_3d
lmgc_python_contact_3d
......@@ -70,9 +71,9 @@ if(BUILD_ChiPy)
# preparing swig use
include(${SWIG_USE_FILE})
include_directories(${PYTHON_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/ChiPy
${NUMPY_INCLUDE_DIR})
include_directories(${NUMPY_INCLUDE_DIR}
${PYTHON_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/ChiPy)
set(CMAKE_SWIG_FLAGS "")
......@@ -141,7 +142,7 @@ if(BUILD_ChiPy)
# defining swig target
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/pylmgc90/chipy)
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/chipy.i PROPERTIES CPLUSPLUS ON )
set(SWIG_MODULE_lmgc90_EXTRA_DEPS ${NUMPY_DOT_I})
set(SWIG_MODULE_lmgc90_EXTRA_DEPS ${NUMPY_DOT_I} ${headers_list})
SWIG_ADD_MODULE(lmgc90 python ${CMAKE_CURRENT_BINARY_DIR}/chipy.i)
add_dependencies(${SWIG_MODULE_lmgc90_REAL_NAME} chipy_swig_docstrings)
......
......@@ -23,6 +23,8 @@
#include "src/rigid_3D/wrap_RBDY3.h"
#include "src/rigid_3D/wrap_SPHER.h"
#include "src/mbs/wrap_mbs.h"
#include "src/mailx/wrap_ALpxx.h"
#include "src/mailx/wrap_ASpxx.h"
#include "src/mailx/wrap_CLxxx.h"
......@@ -429,6 +431,8 @@ import_array();
%include "src/rigid_3D/wrap_RBDY3.h"
%include "src/rigid_3D/wrap_SPHER.h"
%include "src/mbs/wrap_mbs.h"
%include "src/mailx/wrap_ALpxx.h"
%include "src/mailx/wrap_ASpxx.h"
%include "src/mailx/wrap_CLxxx.h"
......
......@@ -7,6 +7,7 @@ ADD_SUBDIRECTORY(contact_3D)
ADD_SUBDIRECTORY(rigid_2D)
ADD_SUBDIRECTORY(rigid_3D)
add_subdirectory(mbs)
ADD_SUBDIRECTORY(kernel)
......
......@@ -63,6 +63,8 @@ module wrap_CLALp
get_nb_vCLALp, &
get_all_CLALp, &
get_all_internal_CLALp, &
get_icdtac_CLALp, &
get_iantac_CLALp, &
! display_contact_energy_CLALp, &
! display_contact_internal_CLALp, &
! get_icdbdy_CLALp, &
......@@ -228,12 +230,13 @@ contains
!!!----------------------------------------------------
subroutine ReadIniVlocRloc() bind(c, name='CLALp_ReadIniVlocRloc')
subroutine ReadIniVlocRloc(step) bind(c, name='CLALp_ReadIniVlocRloc')
implicit none
integer(c_int), intent(in), value :: step
if( .not. check_CLALp() ) return
call read_ini_Vloc_Rloc_CLALp
call read_ini_Vloc_Rloc_CLALp(step)
end subroutine
......@@ -328,6 +331,22 @@ contains
end subroutine GetAllInternalCLALp
function GetCandidatTactId(icdan) bind(c, name='CLALp_GetCandidatTactId')
implicit none
integer(c_int), intent(in), value :: icdan
integer(c_int) :: GetCandidatTactId
GetCandidatTactId = get_icdtac_CLALp(icdan)
end function
function GetAntagonistTactId(icdan) bind(c, name='CLALp_GetAntagonistTactId')
implicit none
integer(c_int), intent(in), value :: icdan
integer(c_int) :: GetAntagonistTactId
GetAntagonistTactId = get_iantac_CLALp(icdan)
end function
subroutine CleanMemory() bind(c, name='CLALp_CleanMemory')
implicit none
......
......@@ -134,16 +134,27 @@
extern "C" void CLALp_DisplayProxTactors(void);
/**
* @fn void CLALp_ReadIniVlocRloc(void)
* @brief read file Vloc_Rloc.INI in DATBOX
* @fn void CLALp_ReadIniVlocRloc(int step=0)
* @brief Read VlocRloc file
*
* If step <= 0 : DATBOX/VlocRloc.INI file is read
* Else : OUTBOX/VlocRloc.OUT.num is read, num being
* the parameter used in TimeEvolution_ReadIniVlocRloc
* last call
*
* @cond PYDOC
* python usage : CLALp_ReadIniVlocRloc()
* usage : CLALp_ReadIniVlocRloc(step=0)
* @param[in] step (integer) : which VlocRloc file to read
* @endcond
*
* @cond CDOC
* @param[in] step (int) : which VlocRloc file to read
* @endcond
*
*/
extern "C" void CLALp_ReadIniVlocRloc(void);
extern "C" void CLALp_ReadIniVlocRloc(int step=0);
/**
/**
* @fn void CLALp_SetNonSymetricDetection(void);
* @brief this function allows non symetric detection i.e. only one
* interaction is kept when two bodies with candidate and antagonist
......@@ -260,6 +271,40 @@
*/
extern "C" void CLALp_GetAllInternal(double ** matrix_out, int * dim1, int * dim2);
/**
* @fn int CLALp_GetCandidatTactId(int icdan)
* @brief return the candidate contactor index for the icdan CLALp contact
*
* @cond PYDOC
* python usage : icdtac = CLALp_GetCandidatTacId(icdan)
* @param[in] icdan (integer) : CLALp contact index
* @return icdtac (integer) : candidate contactor index
* @endcond
*
* @cond CDOC
* @param[in] icdan (int) : CLALp contact index
* @return icdtac (int) : candidate contactor idenx
* @endcond
*/
extern "C" int CLALp_GetCandidatTactId(int icdan);
/**
* @fn int CLALp_GetAntagonistTactId(int icdan)
* @brief return the antagonist contactor index for the icdan CLALp contact
*
* @cond PYDOC
* python usage : iantac = CLALp_GetAntagonistTactId(icdan)
* @param[in] icdan (integer) : CLALp contact idenx
* @return iantac (integer) : antagonist contactor index
* @endcond
*
* @cond CDOC
* @param[in] icdan (int) : CLALp contact index
* @return iantac (int) : antagonist contactor index
* @endcond
*/
extern "C" int CLALp_GetAntagonistTactId(int icdan);
/**
* @fn void CLALp_CleanMemory(void)
* @brief Free all memory allocated within CLALp module
......
......@@ -58,6 +58,8 @@ module wrap_CLJCx
get_write_Vloc_Rloc_CLJCx,&
get_nb_vCLJCx, &
get_all_CLJCx, &
get_icdtac_CLJCx, &
get_iantac_CLJCx, &
clean_memory_CLJCx
use utilities, only : faterr
......@@ -169,15 +171,16 @@ contains
end subroutine DisplayProxTactors
subroutine ReadIniVlocRloc() bind(c, name='CLJCx_ReadIniVlocRloc')
subroutine ReadIniVlocRloc(step) bind(c, name='CLJCx_ReadIniVlocRloc')
implicit none
if( .not. CHECK_CLJCx() ) return
call read_ini_Vloc_Rloc_CLJCx
end subroutine ReadIniVlocRloc
integer(c_int), intent(in), value :: step
if( .not. check_CLJCx() ) return
call read_ini_Vloc_Rloc_CLJCx(step)
end subroutine
function GetNbCLJCx() bind(c, name='CLJCx_GetNbCLJCx')
implicit none
integer(c_int) :: GetNbCLJCx
......@@ -214,6 +217,22 @@ contains
end subroutine GetAllCLJCx
function GetCandidatTactId(icdan) bind(c, name='CLJCx_GetCandidatTactId')
implicit none
integer(c_int), intent(in), value :: icdan
integer(c_int) :: GetCandidatTactId
GetCandidatTactId = get_icdtac_CLJCx(icdan)
end function
function GetAntagonistTactId(icdan) bind(c, name='CLJCx_GetAntagonistTactId')
implicit none
integer(c_int), intent(in), value :: icdan
integer(c_int) :: GetAntagonistTactId
GetAntagonistTactId = get_iantac_CLJCx(icdan)
end function
subroutine CleanMemory() bind(c, name='CLJCx_CleanMemory')
implicit none
......
......@@ -125,14 +125,25 @@
extern "C" void CLJCx_DisplayProxTactors(void);
/**
* @fn void CLJCx_ReadIniVlocRloc(void)
* @brief read file Vloc_Rloc.INI in DATBOX
* @fn void CLJCx_ReadIniVlocRloc(int step=0)
* @brief Read VlocRloc file
*
* If step <= 0 : DATBOX/VlocRloc.INI file is read
* Else : OUTBOX/VlocRloc.OUT.num is read, num being
* the parameter used in TimeEvolution_ReadIniVlocRloc
* last call
*
* @cond PYDOC
* python usage : CLJCx_ReadIniVlocRloc()
* usage : CLJCx_ReadIniVlocRloc(step=0)
* @param[in] step (integer) : which VlocRloc file to read
* @endcond
*
* @cond CDOC
* @param[in] step (int) : which VlocRloc file to read
* @endcond
*
*/
extern "C" void CLJCx_ReadIniVlocRloc(void);
extern "C" void CLJCx_ReadIniVlocRloc(int step=0);
/**
* @fn int CLJCx_GetNbCLJCx(void)
......@@ -181,6 +192,40 @@
*/
extern "C" void CLJCx_GetAll(double** matrix_out, int* dim1, int* dim2);
/**
* @fn int CLJCx_GetCandidatTactId(int icdan)
* @brief return the candidate contactor index for the icdan CLJCx contact
*
* @cond PYDOC
* python usage : icdtac = CLJCx_GetCandidatTacId(icdan)
* @param[in] icdan (integer) : CLJCx contact index
* @return icdtac (integer) : candidate contactor index
* @endcond
*
* @cond CDOC
* @param[in] icdan (int) : CLJCx contact index
* @return icdtac (int) : candidate contactor idenx
* @endcond
*/
extern "C" int CLJCx_GetCandidatTactId(int icdan);
/**
* @fn int CLJCx_GetAntagonistTactId(int icdan)
* @brief return the antagonist contactor index for the icdan CLJCx contact
*
* @cond PYDOC
* python usage : iantac = CLJCx_GetAntagonistTactId(icdan)
* @param[in] icdan (integer) : CLJCx contact idenx
* @return iantac (integer) : antagonist contactor index
* @endcond
*
* @cond CDOC
* @param[in] icdan (int) : CLJCx contact index
* @return iantac (int) : antagonist contactor index
* @endcond
*/
extern "C" int CLJCx_GetAntagonistTactId(int icdan);
/**
* @fn void CLJCx_CleanMemory(void)
* @brief Free all memory allocated within CLJCx module
......
......@@ -58,6 +58,8 @@ module wrap_DKALp
get_write_Vloc_Rloc_DKALp, &
get_nb_vDKALp, &
get_all_DKALp, &
get_icdtac_DKALp, &
get_iantac_DKALp, &
clean_memory_DKALp
use utilities, only : faterr
......@@ -170,12 +172,13 @@ contains
end subroutine
subroutine ReadIniVlocRloc() bind(c, name='DKALp_ReadIniVlocRloc')
subroutine ReadIniVlocRloc(step) bind(c, name='DKALp_ReadIniVlocRloc')
implicit none
integer(c_int), intent(in), value :: step
if( .not. check_DKALp() ) return
call read_ini_Vloc_Rloc_DKALp
call read_ini_Vloc_Rloc_DKALp(step)
end subroutine
......@@ -214,6 +217,22 @@ contains
end subroutine GetAllDKALp
function GetCandidatTactId(icdan) bind(c, name='DKALp_GetCandidatTactId')
implicit none
integer(c_int), intent(in), value :: icdan
integer(c_int) :: GetCandidatTactId
GetCandidatTactId = get_icdtac_DKALp(icdan)
end function