spelling mistakes in documentation

This commit is contained in:
Martin Diehl 2020-06-26 11:44:17 +02:00
parent 9c89d537d2
commit 130cf7fe2e
10 changed files with 89 additions and 89 deletions

View File

@ -6,7 +6,7 @@
!> @brief Interfacing between the PETSc-based solvers and the material subroutines provided !> @brief Interfacing between the PETSc-based solvers and the material subroutines provided
!! by DAMASK !! by DAMASK
!> @details Interfacing between the PETSc-based solvers and the material subroutines provided !> @details Interfacing between the PETSc-based solvers and the material subroutines provided
!> by DAMASK. Interpretating the command line arguments to get load case, geometry file, !> by DAMASK. Interpreting the command line arguments to get load case, geometry file,
!> and working directory. !> and working directory.
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
#define PETSC_MAJOR 3 #define PETSC_MAJOR 3
@ -20,11 +20,11 @@ module DAMASK_interface
use prec use prec
use system_routines use system_routines
implicit none implicit none
private private
logical, volatile, public, protected :: & logical, volatile, public, protected :: &
SIGTERM, & !< termination signal SIGTERM, & !< termination signal
SIGUSR1, & !< 1. user-defined signal SIGUSR1, & !< 1. user-defined signal
SIGUSR2 !< 2. user-defined signal SIGUSR2 !< 2. user-defined signal
integer, public, protected :: & integer, public, protected :: &
@ -159,14 +159,14 @@ subroutine DAMASK_interface_init
call MPI_Type_size(MPI_INTEGER,typeSize,err) call MPI_Type_size(MPI_INTEGER,typeSize,err)
if (err /= 0) call quit(1) if (err /= 0) call quit(1)
if (typeSize*8 /= bit_size(0)) then if (typeSize*8 /= bit_size(0)) then
write(6,'(a)') ' Mismatch between MPI and DAMASK integer' write(6,'(a)') ' Mismatch between MPI and DAMASK integer'
call quit(1) call quit(1)
endif endif
call MPI_Type_size(MPI_DOUBLE,typeSize,err) call MPI_Type_size(MPI_DOUBLE,typeSize,err)
if (err /= 0) call quit(1) if (err /= 0) call quit(1)
if (typeSize*8 /= storage_size(0.0_pReal)) then if (typeSize*8 /= storage_size(0.0_pReal)) then
write(6,'(a)') ' Mismatch between MPI and DAMASK real' write(6,'(a)') ' Mismatch between MPI and DAMASK real'
call quit(1) call quit(1)
endif endif
@ -340,7 +340,7 @@ end function getGeometryFile
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief relative path of loadcase from command line arguments !> @brief relative path of load case from command line arguments
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
function getLoadCaseFile(loadCaseParameter) function getLoadCaseFile(loadCaseParameter)

View File

@ -375,7 +375,7 @@ subroutine constitutive_init
constitutive_source_maxSizeDotState = 0 constitutive_source_maxSizeDotState = 0
PhaseLoop2:do ph = 1,material_Nphase PhaseLoop2:do ph = 1,material_Nphase
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! partition and inititalize state ! partition and initialize state
plasticState(ph)%partionedState0 = plasticState(ph)%state0 plasticState(ph)%partionedState0 = plasticState(ph)%state0
plasticState(ph)%state = plasticState(ph)%partionedState0 plasticState(ph)%state = plasticState(ph)%partionedState0
forall(s = 1:phase_Nsources(ph)) forall(s = 1:phase_Nsources(ph))
@ -450,7 +450,7 @@ end subroutine constitutive_dependentState
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief contains the constitutive equation for calculating the velocity gradient !> @brief contains the constitutive equation for calculating the velocity gradient
! ToDo: Discuss wheter it makes sense if crystallite handles the configuration conversion, i.e. ! ToDo: Discuss whether it makes sense if crystallite handles the configuration conversion, i.e.
! Mp in, dLp_dMp out ! Mp in, dLp_dMp out
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine constitutive_LpAndItsTangents(Lp, dLp_dS, dLp_dFi, & subroutine constitutive_LpAndItsTangents(Lp, dLp_dS, dLp_dFi, &
@ -660,7 +660,7 @@ end subroutine constitutive_SandItsTangents
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief returns the 2nd Piola-Kirchhoff stress tensor and its tangent with respect to !> @brief returns the 2nd Piola-Kirchhoff stress tensor and its tangent with respect to
!> the elastic and intermeidate deformation gradients using Hookes law !> the elastic and intermediate deformation gradients using Hooke's law
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, & subroutine constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, &
Fe, Fi, ipc, ip, el) Fe, Fi, ipc, ip, el)

View File

@ -37,7 +37,7 @@ submodule(constitutive) plastic_nonlocal
! BEGIN DEPRECATED ! BEGIN DEPRECATED
integer, dimension(:,:,:), allocatable :: & integer, dimension(:,:,:), allocatable :: &
iRhoU, & !< state indices for unblocked density iRhoU, & !< state indices for unblocked density
iV, & !< state indices for dislcation velocities iV, & !< state indices for dislocation velocities
iD !< state indices for stable dipole height iD !< state indices for stable dipole height
!END DEPRECATED !END DEPRECATED

View File

@ -9,7 +9,7 @@ submodule(homogenization) homogenization_mech_none
contains contains
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief allocates all neccessary fields, reads information from material configuration file !> @brief allocates all necessary fields, reads information from material configuration file
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module subroutine mech_none_init module subroutine mech_none_init
@ -17,22 +17,22 @@ module subroutine mech_none_init
Ninstance, & Ninstance, &
h, & h, &
NofMyHomog NofMyHomog
write(6,'(/,a)') ' <<<+- homogenization_'//HOMOGENIZATION_NONE_label//' init -+>>>'; flush(6) write(6,'(/,a)') ' <<<+- homogenization_'//HOMOGENIZATION_NONE_label//' init -+>>>'; flush(6)
Ninstance = count(homogenization_type == HOMOGENIZATION_NONE_ID) Ninstance = count(homogenization_type == HOMOGENIZATION_NONE_ID)
if (iand(debug_level(debug_HOMOGENIZATION),debug_levelBasic) /= 0) & if (iand(debug_level(debug_HOMOGENIZATION),debug_levelBasic) /= 0) &
write(6,'(a16,1x,i5,/)') '# instances:',Ninstance write(6,'(a16,1x,i5,/)') '# instances:',Ninstance
do h = 1, size(homogenization_type) do h = 1, size(homogenization_type)
if (homogenization_type(h) /= HOMOGENIZATION_NONE_ID) cycle if (homogenization_type(h) /= HOMOGENIZATION_NONE_ID) cycle
NofMyHomog = count(material_homogenizationAt == h) NofMyHomog = count(material_homogenizationAt == h)
homogState(h)%sizeState = 0 homogState(h)%sizeState = 0
allocate(homogState(h)%state0 (0,NofMyHomog)) allocate(homogState(h)%state0 (0,NofMyHomog))
allocate(homogState(h)%subState0(0,NofMyHomog)) allocate(homogState(h)%subState0(0,NofMyHomog))
allocate(homogState(h)%state (0,NofMyHomog)) allocate(homogState(h)%state (0,NofMyHomog))
enddo enddo
end subroutine mech_none_init end subroutine mech_none_init

View File

@ -102,7 +102,7 @@ end function kinematics_thermal_expansion_initialStrain
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief contains the constitutive equation for calculating the velocity gradient !> @brief constitutive equation for calculating the velocity gradient
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine kinematics_thermal_expansion_LiAndItsTangent(Li, dLi_dTstar, ipc, ip, el) subroutine kinematics_thermal_expansion_LiAndItsTangent(Li, dLi_dTstar, ipc, ip, el)

View File

@ -1,18 +1,18 @@
!------------------------------------------------------------------------------------------------- !-------------------------------------------------------------------------------------------------
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH !> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
!> @brief linked list !> @brief Linked list
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module list module list
use prec use prec
use IO use IO
implicit none implicit none
private private
type, private :: tPartitionedString type, private :: tPartitionedString
character(len=:), allocatable :: val character(len=:), allocatable :: val
integer, dimension(:), allocatable :: pos integer, dimension(:), allocatable :: pos
end type tPartitionedString end type tPartitionedString
type, public :: tPartitionedStringList type, public :: tPartitionedStringList
type(tPartitionedString) :: string type(tPartitionedString) :: string
type(tPartitionedStringList), pointer :: next => null() type(tPartitionedStringList), pointer :: next => null()
@ -20,31 +20,31 @@ module list
procedure :: add => add procedure :: add => add
procedure :: show => show procedure :: show => show
procedure :: free => free procedure :: free => free
! currently, a finalize is needed for all shapes of tPartitionedStringList. ! currently, a finalize is needed for all shapes of tPartitionedStringList.
! with Fortran 2015, we can define one recursive elemental function ! with Fortran 2015, we can define one recursive elemental function
! https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/543326 ! https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/543326
final :: finalize, & final :: finalize, &
finalizeArray finalizeArray
procedure :: keyExists => keyExists procedure :: keyExists => keyExists
procedure :: countKeys => countKeys procedure :: countKeys => countKeys
procedure :: getFloat => getFloat procedure :: getFloat => getFloat
procedure :: getInt => getInt procedure :: getInt => getInt
procedure :: getString => getString procedure :: getString => getString
procedure :: getFloats => getFloats procedure :: getFloats => getFloats
procedure :: getInts => getInts procedure :: getInts => getInts
procedure :: getStrings => getStrings procedure :: getStrings => getStrings
end type tPartitionedStringList end type tPartitionedStringList
contains contains
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief add element !> @brief add element
!> @details Adds a string together with the start/end position of chunks in this string. The new !> @details Adds a string together with the start/end position of chunks in this string. The new
!! element is added at the end of the list. Empty strings are not added. All strings are converted !! element is added at the end of the list. Empty strings are not added. All strings are converted
!! to lower case. The data is not stored in the new element but in the current. !! to lower case. The data is not stored in the new element but in the current.
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
@ -177,7 +177,7 @@ end function countKeys
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief gets float value of for a given key from a linked list !> @brief gets float value of for a given key from a linked list
!> @details gets the last value if the key occurs more than once. If key is not found exits with !> @details gets the last value if the key occurs more than once. If key is not found exits with
!! error unless default is given !! error unless default is given
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
real(pReal) function getFloat(this,key,defaultVal) real(pReal) function getFloat(this,key,defaultVal)
@ -187,11 +187,11 @@ real(pReal) function getFloat(this,key,defaultVal)
real(pReal), intent(in), optional :: defaultVal real(pReal), intent(in), optional :: defaultVal
type(tPartitionedStringList), pointer :: item type(tPartitionedStringList), pointer :: item
logical :: found logical :: found
getFloat = huge(1.0) ! suppress warning about unitialized value getFloat = huge(1.0) ! suppress warning about unitialized value
found = present(defaultVal) found = present(defaultVal)
if (found) getFloat = defaultVal if (found) getFloat = defaultVal
item => this item => this
do while (associated(item%next)) do while (associated(item%next))
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
@ -209,7 +209,7 @@ end function getFloat
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief gets integer value of for a given key from a linked list !> @brief gets integer value of for a given key from a linked list
!> @details gets the last value if the key occurs more than once. If key is not found exits with !> @details gets the last value if the key occurs more than once. If key is not found exits with
!! error unless default is given !! error unless default is given
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
integer function getInt(this,key,defaultVal) integer function getInt(this,key,defaultVal)
@ -223,7 +223,7 @@ integer function getInt(this,key,defaultVal)
getInt = huge(1) ! suppress warning about unitialized value getInt = huge(1) ! suppress warning about unitialized value
found = present(defaultVal) found = present(defaultVal)
if (found) getInt = defaultVal if (found) getInt = defaultVal
item => this item => this
do while (associated(item%next)) do while (associated(item%next))
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
@ -241,12 +241,12 @@ end function getInt
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief gets string value of for a given key from a linked list !> @brief gets string value of for a given key from a linked list
!> @details gets the last value if the key occurs more than once. If key is not found exits with !> @details gets the last value if the key occurs more than once. If key is not found exits with
!! error unless default is given. If raw is true, the the complete string is returned, otherwise !! error unless default is given. If raw is true, the the complete string is returned, otherwise
!! the individual chunks are returned !! the individual chunks are returned
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
character(len=pStringLen) function getString(this,key,defaultVal,raw) character(len=pStringLen) function getString(this,key,defaultVal,raw)
class(tPartitionedStringList), target, intent(in) :: this class(tPartitionedStringList), target, intent(in) :: this
character(len=*), intent(in) :: key character(len=*), intent(in) :: key
character(len=*), intent(in), optional :: defaultVal character(len=*), intent(in), optional :: defaultVal
@ -259,19 +259,19 @@ character(len=pStringLen) function getString(this,key,defaultVal,raw)
else else
whole = .false. whole = .false.
endif endif
found = present(defaultVal) found = present(defaultVal)
if (found) then if (found) then
if (len_trim(defaultVal) > len(getString)) call IO_error(0,ext_msg='getString') if (len_trim(defaultVal) > len(getString)) call IO_error(0,ext_msg='getString')
getString = trim(defaultVal) getString = trim(defaultVal)
endif endif
item => this item => this
do while (associated(item%next)) do while (associated(item%next))
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
found = .true. found = .true.
if (item%string%pos(1) < 2) call IO_error(143,ext_msg=key) if (item%string%pos(1) < 2) call IO_error(143,ext_msg=key)
if (whole) then if (whole) then
getString = trim(item%string%val(item%string%pos(4):)) ! raw string starting a second chunk getString = trim(item%string%val(item%string%pos(4):)) ! raw string starting a second chunk
else else
@ -280,7 +280,7 @@ character(len=pStringLen) function getString(this,key,defaultVal,raw)
endif endif
item => item%next item => item%next
enddo enddo
if (.not. found) call IO_error(140,ext_msg=key) if (.not. found) call IO_error(140,ext_msg=key)
end function getString end function getString
@ -292,7 +292,7 @@ end function getString
!! values from the last occurrence. If key is not found exits with error unless default is given. !! values from the last occurrence. If key is not found exits with error unless default is given.
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
function getFloats(this,key,defaultVal,requiredSize) function getFloats(this,key,defaultVal,requiredSize)
real(pReal), dimension(:), allocatable :: getFloats real(pReal), dimension(:), allocatable :: getFloats
class(tPartitionedStringList), target, intent(in) :: this class(tPartitionedStringList), target, intent(in) :: this
character(len=*), intent(in) :: key character(len=*), intent(in) :: key
@ -302,12 +302,12 @@ function getFloats(this,key,defaultVal,requiredSize)
integer :: i integer :: i
logical :: found, & logical :: found, &
cumulative cumulative
cumulative = (key(1:1) == '(' .and. key(len_trim(key):len_trim(key)) == ')') cumulative = (key(1:1) == '(' .and. key(len_trim(key):len_trim(key)) == ')')
found = .false. found = .false.
allocate(getFloats(0)) allocate(getFloats(0))
item => this item => this
do while (associated(item%next)) do while (associated(item%next))
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
@ -320,7 +320,7 @@ function getFloats(this,key,defaultVal,requiredSize)
endif endif
item => item%next item => item%next
enddo enddo
if (.not. found) then if (.not. found) then
if (present(defaultVal)) then; getFloats = defaultVal; else; call IO_error(140,ext_msg=key); endif if (present(defaultVal)) then; getFloats = defaultVal; else; call IO_error(140,ext_msg=key); endif
endif endif
@ -337,7 +337,7 @@ end function getFloats
!! values from the last occurrence. If key is not found exits with error unless default is given. !! values from the last occurrence. If key is not found exits with error unless default is given.
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
function getInts(this,key,defaultVal,requiredSize) function getInts(this,key,defaultVal,requiredSize)
integer, dimension(:), allocatable :: getInts integer, dimension(:), allocatable :: getInts
class(tPartitionedStringList), target, intent(in) :: this class(tPartitionedStringList), target, intent(in) :: this
character(len=*), intent(in) :: key character(len=*), intent(in) :: key
@ -347,12 +347,12 @@ function getInts(this,key,defaultVal,requiredSize)
integer :: i integer :: i
logical :: found, & logical :: found, &
cumulative cumulative
cumulative = (key(1:1) == '(' .and. key(len_trim(key):len_trim(key)) == ')') cumulative = (key(1:1) == '(' .and. key(len_trim(key):len_trim(key)) == ')')
found = .false. found = .false.
allocate(getInts(0)) allocate(getInts(0))
item => this item => this
do while (associated(item%next)) do while (associated(item%next))
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
@ -365,7 +365,7 @@ function getInts(this,key,defaultVal,requiredSize)
endif endif
item => item%next item => item%next
enddo enddo
if (.not. found) then if (.not. found) then
if (present(defaultVal)) then; getInts = defaultVal; else; call IO_error(140,ext_msg=key); endif if (present(defaultVal)) then; getInts = defaultVal; else; call IO_error(140,ext_msg=key); endif
endif endif
@ -383,7 +383,7 @@ end function getInts
!! If raw is true, the the complete string is returned, otherwise the individual chunks are returned !! If raw is true, the the complete string is returned, otherwise the individual chunks are returned
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
function getStrings(this,key,defaultVal,raw) function getStrings(this,key,defaultVal,raw)
character(len=pStringLen),dimension(:), allocatable :: getStrings character(len=pStringLen),dimension(:), allocatable :: getStrings
class(tPartitionedStringList),target, intent(in) :: this class(tPartitionedStringList),target, intent(in) :: this
character(len=*), intent(in) :: key character(len=*), intent(in) :: key
@ -395,7 +395,7 @@ function getStrings(this,key,defaultVal,raw)
logical :: found, & logical :: found, &
whole, & whole, &
cumulative cumulative
cumulative = (key(1:1) == '(' .and. key(len_trim(key):len_trim(key)) == ')') cumulative = (key(1:1) == '(' .and. key(len_trim(key):len_trim(key)) == ')')
if (present(raw)) then if (present(raw)) then
whole = raw whole = raw
@ -403,14 +403,14 @@ function getStrings(this,key,defaultVal,raw)
whole = .false. whole = .false.
endif endif
found = .false. found = .false.
item => this item => this
do while (associated(item%next)) do while (associated(item%next))
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
found = .true. found = .true.
if (allocated(getStrings) .and. .not. cumulative) deallocate(getStrings) if (allocated(getStrings) .and. .not. cumulative) deallocate(getStrings)
if (item%string%pos(1) < 2) call IO_error(143,ext_msg=key) if (item%string%pos(1) < 2) call IO_error(143,ext_msg=key)
notAllocated: if (.not. allocated(getStrings)) then notAllocated: if (.not. allocated(getStrings)) then
if (whole) then if (whole) then
str = item%string%val(item%string%pos(4):) str = item%string%val(item%string%pos(4):)
@ -437,7 +437,7 @@ function getStrings(this,key,defaultVal,raw)
endif endif
item => item%next item => item%next
enddo enddo
if (.not. found) then if (.not. found) then
if (present(defaultVal)) then if (present(defaultVal)) then
if (len(defaultVal) > len(getStrings)) call IO_error(0,ext_msg='getStrings') if (len(defaultVal) > len(getStrings)) call IO_error(0,ext_msg='getStrings')

View File

@ -1,7 +1,7 @@
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @author Pratheek Shanthraj, Max-Planck-Institut für Eisenforschung GmbH !> @author Pratheek Shanthraj, Max-Planck-Institut für Eisenforschung GmbH
!> @author Luv Sharma, Max-Planck-Institut für Eisenforschung GmbH !> @author Luv Sharma, Max-Planck-Institut für Eisenforschung GmbH
!> @brief material subroutine incoprorating isotropic ductile damage source mechanism !> @brief material subroutine incorporating isotropic ductile damage source mechanism
!> @details to be done !> @details to be done
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module source_damage_isoDuctile module source_damage_isoDuctile

View File

@ -1,14 +1,14 @@
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH !> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
!> @brief provides wrappers to C routines !> @brief Wrappers to C routines for system operations
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module system_routines module system_routines
use, intrinsic :: ISO_C_Binding use, intrinsic :: ISO_C_Binding
use prec use prec
implicit none implicit none
public :: & public :: &
signalterm_C, & signalterm_C, &
signalusr1_C, & signalusr1_C, &
@ -17,74 +17,74 @@ module system_routines
getCWD, & getCWD, &
getHostName, & getHostName, &
setCWD setCWD
interface interface
function isDirectory_C(path) bind(C) function isDirectory_C(path) bind(C)
use, intrinsic :: ISO_C_Binding, only: & use, intrinsic :: ISO_C_Binding, only: &
C_INT, & C_INT, &
C_CHAR C_CHAR
use prec use prec
integer(C_INT) :: isDirectory_C integer(C_INT) :: isDirectory_C
character(kind=C_CHAR), dimension(pPathLen), intent(in) :: path ! C string is an array character(kind=C_CHAR), dimension(pPathLen), intent(in) :: path ! C string is an array
end function isDirectory_C end function isDirectory_C
subroutine getCurrentWorkDir_C(path, stat) bind(C) subroutine getCurrentWorkDir_C(path, stat) bind(C)
use, intrinsic :: ISO_C_Binding, only: & use, intrinsic :: ISO_C_Binding, only: &
C_INT, & C_INT, &
C_CHAR C_CHAR
use prec use prec
character(kind=C_CHAR), dimension(pPathLen), intent(out) :: path ! C string is an array character(kind=C_CHAR), dimension(pPathLen), intent(out) :: path ! C string is an array
integer(C_INT), intent(out) :: stat integer(C_INT), intent(out) :: stat
end subroutine getCurrentWorkDir_C end subroutine getCurrentWorkDir_C
subroutine getHostName_C(str, stat) bind(C) subroutine getHostName_C(str, stat) bind(C)
use, intrinsic :: ISO_C_Binding, only: & use, intrinsic :: ISO_C_Binding, only: &
C_INT, & C_INT, &
C_CHAR C_CHAR
use prec use prec
character(kind=C_CHAR), dimension(pStringLen), intent(out) :: str ! C string is an array character(kind=C_CHAR), dimension(pStringLen), intent(out) :: str ! C string is an array
integer(C_INT), intent(out) :: stat integer(C_INT), intent(out) :: stat
end subroutine getHostName_C end subroutine getHostName_C
function chdir_C(path) bind(C) function chdir_C(path) bind(C)
use, intrinsic :: ISO_C_Binding, only: & use, intrinsic :: ISO_C_Binding, only: &
C_INT, & C_INT, &
C_CHAR C_CHAR
use prec use prec
integer(C_INT) :: chdir_C integer(C_INT) :: chdir_C
character(kind=C_CHAR), dimension(pPathLen), intent(in) :: path ! C string is an array character(kind=C_CHAR), dimension(pPathLen), intent(in) :: path ! C string is an array
end function chdir_C end function chdir_C
subroutine signalterm_C(handler) bind(C) subroutine signalterm_C(handler) bind(C)
use, intrinsic :: ISO_C_Binding, only: & use, intrinsic :: ISO_C_Binding, only: &
C_FUNPTR C_FUNPTR
type(C_FUNPTR), intent(in), value :: handler type(C_FUNPTR), intent(in), value :: handler
end subroutine signalterm_C end subroutine signalterm_C
subroutine signalusr1_C(handler) bind(C) subroutine signalusr1_C(handler) bind(C)
use, intrinsic :: ISO_C_Binding, only: & use, intrinsic :: ISO_C_Binding, only: &
C_FUNPTR C_FUNPTR
type(C_FUNPTR), intent(in), value :: handler type(C_FUNPTR), intent(in), value :: handler
end subroutine signalusr1_C end subroutine signalusr1_C
subroutine signalusr2_C(handler) bind(C) subroutine signalusr2_C(handler) bind(C)
use, intrinsic :: ISO_C_Binding, only: & use, intrinsic :: ISO_C_Binding, only: &
C_FUNPTR C_FUNPTR
type(C_FUNPTR), intent(in), value :: handler type(C_FUNPTR), intent(in), value :: handler
end subroutine signalusr2_C end subroutine signalusr2_C
end interface end interface
contains contains
@ -96,8 +96,8 @@ logical function isDirectory(path)
character(len=*), intent(in) :: path character(len=*), intent(in) :: path
character(kind=C_CHAR), dimension(pPathLen) :: strFixedLength ! C string as array character(kind=C_CHAR), dimension(pPathLen) :: strFixedLength ! C string as array
integer :: i integer :: i
strFixedLength = repeat(C_NULL_CHAR,len(strFixedLength)) strFixedLength = repeat(C_NULL_CHAR,len(strFixedLength))
do i=1,len(path) ! copy array components do i=1,len(path) ! copy array components
strFixedLength(i)=path(i:i) strFixedLength(i)=path(i:i)
@ -116,9 +116,9 @@ function getCWD()
character(len=:), allocatable :: getCWD character(len=:), allocatable :: getCWD
integer(C_INT) :: stat integer(C_INT) :: stat
integer :: i integer :: i
call getCurrentWorkDir_C(charArray,stat) call getCurrentWorkDir_C(charArray,stat)
if (stat /= 0_C_INT) then if (stat /= 0_C_INT) then
getCWD = 'Error occured when getting currend working directory' getCWD = 'Error occured when getting currend working directory'
else else
@ -145,7 +145,7 @@ function getHostName()
character(len=:), allocatable :: getHostName character(len=:), allocatable :: getHostName
integer(C_INT) :: stat integer(C_INT) :: stat
integer :: i integer :: i
call getHostName_C(charArray,stat) call getHostName_C(charArray,stat)
if (stat /= 0_C_INT) then if (stat /= 0_C_INT) then
@ -173,7 +173,7 @@ logical function setCWD(path)
character(len=*), intent(in) :: path character(len=*), intent(in) :: path
character(kind=C_CHAR), dimension(pPathLen) :: strFixedLength ! C string is an array character(kind=C_CHAR), dimension(pPathLen) :: strFixedLength ! C string is an array
integer :: i integer :: i
strFixedLength = repeat(C_NULL_CHAR,len(strFixedLength)) strFixedLength = repeat(C_NULL_CHAR,len(strFixedLength))
do i=1,len(path) ! copy array components do i=1,len(path) ! copy array components
strFixedLength(i)=path(i:i) strFixedLength(i)=path(i:i)

View File

@ -73,7 +73,7 @@ end subroutine thermal_conduction_init
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief returns heat generation rate !> @brief return heat generation rate
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine thermal_conduction_getSourceAndItsTangent(Tdot, dTdot_dT, T, ip, el) subroutine thermal_conduction_getSourceAndItsTangent(Tdot, dTdot_dT, T, ip, el)
@ -132,7 +132,7 @@ end subroutine thermal_conduction_getSourceAndItsTangent
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief returns homogenized thermal conductivity in reference configuration !> @brief return homogenized thermal conductivity in reference configuration
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
function thermal_conduction_getConductivity(ip,el) function thermal_conduction_getConductivity(ip,el)

View File

@ -8,14 +8,14 @@ module thermal_isothermal
implicit none implicit none
public public
contains contains
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief allocates all neccessary fields, reads information from material configuration file !> @brief allocates fields, reads information from material configuration file
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine thermal_isothermal_init subroutine thermal_isothermal_init
integer :: h,NofMyHomog integer :: h,NofMyHomog
write(6,'(/,a)') ' <<<+- thermal_'//THERMAL_isothermal_label//' init -+>>>'; flush(6) write(6,'(/,a)') ' <<<+- thermal_'//THERMAL_isothermal_label//' init -+>>>'; flush(6)
@ -28,7 +28,7 @@ subroutine thermal_isothermal_init
allocate(thermalState(h)%state0 (0,NofMyHomog)) allocate(thermalState(h)%state0 (0,NofMyHomog))
allocate(thermalState(h)%subState0(0,NofMyHomog)) allocate(thermalState(h)%subState0(0,NofMyHomog))
allocate(thermalState(h)%state (0,NofMyHomog)) allocate(thermalState(h)%state (0,NofMyHomog))
deallocate(temperature (h)%p) deallocate(temperature (h)%p)
allocate (temperature (h)%p(1), source=thermal_initialT(h)) allocate (temperature (h)%p(1), source=thermal_initialT(h))
deallocate(temperatureRate(h)%p) deallocate(temperatureRate(h)%p)