Commit 9b7019a5 authored by mozul's avatar mozul
Browse files

Merge commit 'cf6bfb43'

Merge lmgc90_dev for 2016 second release candidate
parents 738c41fd cf6bfb43
......@@ -11,6 +11,7 @@ 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)
set(LMGC90_BINDINGS_MODELS_DEPS PARENT_SCOPE)
else()
......@@ -20,6 +21,12 @@ else()
set(LMGC90_BINDINGS_MODELS_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/MatLib_ExternalModels_v4.f90 PARENT_SCOPE)
endif()
if(BUILD_MATLIB)
set(LMGC90_BINDINGS_MODELS_DEPS matlib PARENT_SCOPE)
else(BUILD_MATLIB)
set(LMGC90_BINDINGS_MODELS_DEPS PARENT_SCOPE)
endif(BUILD_MATLIB)
if(MATLIB_LIBRARY)
message(STATUS "Matlib Library used : " ${MATLIB_LIBRARY})
set(LMGC90_BINDINGS_MODELS_TARGET_LIBS ${MATLIB_LIBRARY} PARENT_SCOPE)
......
......@@ -8,6 +8,12 @@ if( CMAKE_MAJOR_VERSION EQUAL 2 )
endif( CMAKE_MINOR_VERSION EQUAL 8 )
endif( CMAKE_MAJOR_VERSION EQUAL 2 )
# path to homemade/taken macros/finds
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/tools/cmake/modules ${CMAKE_MODULE_PATH})
# Force out-of-source build
include(OutOfSourcesBuild)
project(LMGC90_dev Fortran C CXX)
SET(LMGC90_MAJOR_VERSION 2)
......@@ -52,9 +58,6 @@ if(NOT DEFINED CMAKE_MACOSX_RPATH)
set(CMAKE_MACOSX_RPATH 0)
endif(NOT DEFINED CMAKE_MACOSX_RPATH)
# path to homemade/taken macros/finds
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/tools/cmake/modules ${CMAKE_MODULE_PATH})
# some path for output : libs, modules, executables
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
......@@ -79,8 +82,8 @@ set_property(CACHE EXT_FEM_VERSION PROPERTY STRINGS
)
set(EXT_MBS_VERSION "none" CACHE STRING "External MBS library to use")
set_property(CACHE EXT_FEM_VERSION PROPERTY STRINGS
"none" "Robotran"
set_property(CACHE EXT_MBS_VERSION PROPERTY STRINGS
"none" "Robotran" "FiberModel"
)
# options definition
......@@ -103,12 +106,11 @@ 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" )
set_property(CACHE MUMPS_VERSION PROPERTY STRINGS
"none" "sequential" "parallel"
"off" "sequential" "parallel"
)
option(BUILD_MUMPS "Build MUMPs and scalapack from scratch?" OFF)
......@@ -133,17 +135,10 @@ get_compiler_options()
find_package(Python)
if( PYTHON_EXECUTABLE )
if(${PYTHON_VERSION_MAJOR} LESS 3)
execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0,0,'${CMAKE_INSTALL_PREFIX}')"
OUTPUT_VARIABLE PYTHON_INSTALL_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
else(${PYTHON_VERSION_MAJOR} LESS 3)
execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(0,0,'${CMAKE_INSTALL_PREFIX}'))"
OUTPUT_VARIABLE PYTHON_INSTALL_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif(${PYTHON_VERSION_MAJOR} LESS 3)
execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(0,0,'${CMAKE_INSTALL_PREFIX}'))"
OUTPUT_VARIABLE PYTHON_INSTALL_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif( PYTHON_EXECUTABLE )
if(NOT ${MATLIB_VERSION} STREQUAL "off")
......
......@@ -418,10 +418,11 @@ CONTAINS
END SUBROUTINE
SUBROUTINE UseRegul() bind(C, name = 'nlgs_UseRegularization')
SUBROUTINE UseRegul(rvalue1,rvalue2) bind(C, name = 'nlgs_UseRegularization')
IMPLICIT NONE
REAL(C_DOUBLE), INTENT(IN), VALUE :: rvalue1,rvalue2
call use_regul()
call use_regul(rvalue1,rvalue2)
END SUBROUTINE
......
......@@ -311,13 +311,16 @@
extern "C" void nlgs_UseJacobiSolver(bool jacobi);
/**
* @fn void nlgs_UseRegularization(void)
* @fn void nlgs_UseRegularization(double rvalue1, double rvalue2)
* @brief use some regularization heuristics on interaction laws
*
* @cond PYDOC
* python usage : nlgs_UseRegularization()
* python usage : nlgs_UseRegularization(krn, krt)
* @param[in] krn (double) : normal penality (default 1e14)
* @param[in] krt (double) : tangential penality (default 1e14)
* @endcond
*/
extern "C" void nlgs_UseRegularization(void);
extern "C" void nlgs_UseRegularization(double rvalue1=1e14, double rvalue2=1e14);
#endif /* wrap_nlgs */
......@@ -505,12 +505,12 @@ CONTAINS
END SUBROUTINE
SUBROUTINE UseRegul() bind(C, name = 'nlgs_3D_UseRegularization')
SUBROUTINE UseRegul(rvalue1,rvalue2) bind(C, name = 'nlgs_3D_UseRegularization')
IMPLICIT NONE
REAL(C_DOUBLE), INTENT(IN), VALUE :: rvalue1,rvalue2
call use_regul()
call use_regul(rvalue1,rvalue2)
END SUBROUTINE
END MODULE wrap_NLGS_3D
......@@ -374,13 +374,16 @@ extern "C" void nlgs_3D_SetWithReverseContactOrder(void);
// extern "C" void nlgs_3D_InitCohesiveBehav(void);
/**
* @fn void nlgs_3D_UseRegularization(void)
* @fn void nlgs_3D_UseRegularization(double rvalue1, double rvalue2)
* @brief use some regularization heuristics on interaction laws
*
* @cond PYDOC
* python usage : nlgs_3D_UseRegularization()
* python usage : nlgs_3D_UseRegularization(krn, krt)
* @param[in] krn (double) : normal penality (default 1e14)
* @param[in] krt (double) : tangential penality (default 1e14)
* @endcond
*/
extern "C" void nlgs_3D_UseRegularization(void);
extern "C" void nlgs_3D_UseRegularization(double rvalue1=1e14, double rvalue2=1e14);
#endif /* wrap_nlgs_3D_h */
......@@ -42,6 +42,8 @@ MODULE wrap_mecaMAILx
USE ISO_C_BINDING
USE LMGC90_MPI
use overall, only: nstep
USE parameters, ONLY: get_body_vector_id_from_name
USE mecaMAILx,ONLY:&
......@@ -162,6 +164,10 @@ MODULE wrap_mecaMAILx
use utilities, only: faterr,logmes
!fd une securite pour verifier que computefield a ete appelee avec updatebulk
integer :: laststep_computefield=0
CONTAINS
!!!---------------------------------------------------
......@@ -867,6 +873,8 @@ CONTAINS
integer(kind=4) :: timer_id = 0
integer(kind=4), dimension(:), pointer :: list
laststep_computefield=nstep
!12345678901234567890
if( timer_id == 0 ) timer_id = get_new_itimer_ID('i Compute Field ')
if( timer_id /= 0 ) call start_itimer(timer_id)
......@@ -906,7 +914,16 @@ CONTAINS
integer(kind=4) :: i
integer(kind=4) :: timer_id = 0
integer(kind=4), dimension(:), pointer :: list
!
character(len=26) :: IAM
!12345678901234567890123456
IAM='wrap_mecaMAILx::UpdateBulk'
if (laststep_computefield /= nstep) then
call faterr(IAM,'You need to call ComputeField before updating')
endif
!12345678901234567890
if( timer_id == 0 ) timer_id = get_new_itimer_ID('i Update Bulk ')
if( timer_id /= 0 ) call start_itimer(timer_id)
......@@ -921,7 +938,7 @@ CONTAINS
!$OMP PARALLEL DEFAULT(SHARED) PRIVATE(i)
!$OMP DO SCHEDULE(RUNTIME)
do i = 1, get_nb_mecaMAILx()
call compute_bulk_mecaMAILx(i,1)
!fd fait par ComputeField call compute_bulk_mecaMAILx(i,1)
call update_bulk_mecaMAILx(i)
end do
!$OMP END DO
......@@ -931,7 +948,7 @@ CONTAINS
!$OMP PARALLEL DEFAULT(SHARED) PRIVATE(i)
!$OMP DO SCHEDULE(RUNTIME)
do i = 1, length
call compute_bulk_mecaMAILx(list(i),1)
!fd fait par ComputeField call compute_bulk_mecaMAILx(list(i),1)
call update_bulk_mecaMAILx(list(i))
end do
!$OMP END DO
......
......@@ -75,6 +75,7 @@ MODULE wrap_poroMAILx
apply_drvdof_KT_poroMAILx, &
set_Matrix_Storage_poroMAILx, &
set_Matrix_Shape_poroMAILx, &
get_meca_field_rank, get_ther_field_rank, &
set_ther_field_bynode, set_ther_field_byelem, &
set_meca_field_bynode, set_meca_field_byelem, &
get_meca_vfield_rank, get_ther_vfield_rank, &
......@@ -455,6 +456,27 @@ CONTAINS
end subroutine
function getTherScalarFieldRank(ibdyty, iblmty, name) bind(c, name='poroMAILx_GetTherScalarFieldRank')
implicit none
integer(c_int), intent(in), value :: ibdyty
integer(c_int), intent(in), value :: iblmty
character(c_char), dimension(*) :: name
integer(c_int) :: getTherScalarFieldRank
!
integer(kind=4) :: i
character(len=30) :: f_name
f_name = ''
i = 1
do while( name(i) /= c_null_char .and. i <= 30 )
f_name = f_name(1:i-1) // name(i)
i = i+1
end do
getTherScalarFieldRank = get_ther_field_rank(ibdyty, iblmty, f_name)
end function
function getTherVectorFieldRank(ibdyty, iblmty, name) bind(c, name='poroMAILx_GetTherVectorFieldRank')
implicit none
integer(c_int), intent(in), value :: ibdyty
......@@ -476,6 +498,27 @@ CONTAINS
end function
function getMecaScalarFieldRank(ibdyty, iblmty, name) bind(c, name='poroMAILx_GetMecaScalarFieldRank')
implicit none
integer(c_int), intent(in), value :: ibdyty
integer(c_int), intent(in), value :: iblmty
character(c_char), dimension(*) :: name
integer(c_int) :: getMecaScalarFieldRank
!
integer(kind=4) :: i
character(len=30) :: f_name
f_name = ''
i = 1
do while( name(i) /= c_null_char .and. i <= 30 )
f_name = f_name(1:i-1) // name(i)
i = i+1
end do
getMecaScalarFieldRank = get_meca_field_rank(ibdyty, iblmty, f_name)
end function
function getMecaVectorFieldRank(ibdyty, iblmty, name) bind(c, name='poroMAILx_GetMecaVectorFieldRank')
implicit none
integer(c_int), intent(in), value :: ibdyty
......
......@@ -548,6 +548,27 @@
*/
extern "C" void poroMAILx_SetTherScalarFieldByElement(int IdBody, int f_rank, double * rvector_in, int rlength_in);
/**
* @fn int poroMAILx_GetMecaScalarFieldRank(int ibdyty, int iblmty, char* field_name);
* @brief Get the rank of field of an element of a body from its name
*
* @cond PYDOC
* python usage : f_rank = poroMAILx_GetMecaScalarFieldRank(ibdyty, iblmty, name)
* @param[in] ibdyty (integer) : id of the concern body
* @param[in] iblmty (integer) : id of the concern element
* @param[in] name (string) : name of the desired scalar field
* @return f_rank (integer) : rank of the corresponding scalar field
* @endcond
*
* @cond CDOC
* @param[in] ibdyty (int) : id of the concern body
* @param[in] iblmty (int) : id of the concern element
* @param[in] name (char[30]) : name of the scalar field
* @return (int) : rank of the corresponding scalar field
* @endcond
*/
extern "C" int poroMAILx_GetMecaScalarFieldRank(int ibdyty, int blmty, char* name);
/**
* @fn int poroMAILx_GetMecaVectorFieldRank(int ibdyty, int iblmty, char* field_name);
* @brief Get the rank of field of an element of a body from its name
......@@ -569,6 +590,27 @@
*/
extern "C" int poroMAILx_GetMecaVectorFieldRank(int ibdyty, int blmty, char* name);
/**
* @fn int poroMAILx_GetTherScalarFieldRank(int ibdyty, int iblmty, char* field_name);
* @brief Get the rank of field of an element of a body from its name
*
* @cond PYDOC
* python usage : f_rank = poroMAILx_GetTherScalarFieldRank(ibdyty, iblmty, name)
* @param[in] ibdyty (integer) : id of the concern body
* @param[in] iblmty (integer) : id of the concern element
* @param[in] name (string) : name of the desired scalar field
* @return f_rank (integer) : rank of the corresponding scalar field
* @endcond
*
* @cond CDOC
* @param[in] ibdyty (int) : id of the concern body
* @param[in] iblmty (int) : id of the concern element
* @param[in] name (char[30]) : name of the scalar field
* @return (int) : rank of the corresponding scalar field
* @endcond
*/
extern "C" int poroMAILx_GetTherScalarFieldRank(int ibdyty, int blmty, char* name);
/**
* @fn int poroMAILx_GetTherVectorFieldRank(int ibdyty, int iblmty, char* field_name);
* @brief Get the rank of field of an element of a body from its name
......
!===========================================================================
!
! Copyright 2000-2013 CNRS.
! Copyright 2000-2016 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).
......
!===========================================================================
!
! Copyright 2000-2013 CNRS.
! Copyright 2000-2016 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).
......
!===========================================================================
!
! Copyright 2000-2013 CNRS.
! Copyright 2000-2016 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).
......
!===========================================================================
!
! Copyright 2000-2013 CNRS.
! Copyright 2000-2016 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).
......
!===========================================================================
!
! Copyright 2000-2013 CNRS.
! Copyright 2000-2016 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).
......
!===========================================================================
!
! Copyright 2000-2013 CNRS.
! Copyright 2000-2016 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).
......
!===========================================================================
!
! Copyright 2000-2013 CNRS.
! Copyright 2000-2016 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).
......
!===========================================================================
!
! Copyright 2000-2013 CNRS.
! Copyright 2000-2016 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).
......
!===========================================================================
!
! Copyright 2000-2013 CNRS.
! Copyright 2000-2016 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).
......
!===========================================================================
!
! Copyright 2000-2013 CNRS.
! Copyright 2000-2016 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).
......
!===========================================================================
!
! Copyright 2000-2013 CNRS.
! Copyright 2000-2016 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).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment