further removal of public variables

This commit is contained in:
Sharan Roongta 2020-06-17 13:24:31 +02:00
parent f234f8cd25
commit 45f1e3a986
4 changed files with 18 additions and 22 deletions

@ -1 +1 @@
Subproject commit e01b61982a1eee58ba024a4760b05ba82d2c0edc
Subproject commit a22650393972eeaf4fa20bb5a5fe69f853c211fa

View File

@ -125,12 +125,19 @@ subroutine CPFEM_general(mode, ffn, ffn1, temperature_inp, dt, elFE, ip, cauchyS
H
integer(pInt) elCP, & ! crystal plasticity element number
i, j, k, l, m, n, ph, homog, mySource
i, j, k, l, m, n, ph, homog, mySource, &
iJacoStiffness
logical updateJaco ! flag indicating if Jacobian has to be updated
real(pReal), parameter :: ODD_STRESS = 1e15_pReal, & !< return value for stress if terminallyIll
ODD_JACOBIAN = 1e50_pReal !< return value for jacobian if terminallyIll
class(tNode), pointer :: &
num_commercialFEM
num_commercialFEM => numerics_root%get('commercialFEM',defaultVal=emptyDict)
iJacoStiffness = num_commercialFEM%get_asInt('ijacostiffness',defaultVal=1)
elCP = mesh_FEM2DAMASK_elem(elFE)
if (iand(debug_level(debug_CPFEM), debug_levelBasic) /= 0_pInt &

View File

@ -9,6 +9,7 @@ module math
use prec
use IO
use numerics
use YAML_types
use LAPACK_interface
implicit none
@ -89,11 +90,16 @@ contains
subroutine math_init
real(pReal), dimension(4) :: randTest
integer :: randSize
integer :: randSize,randomSeed
integer, dimension(:), allocatable :: randInit
class(tNode), pointer :: &
num_generic
write(6,'(/,a)') ' <<<+- math init -+>>>'; flush(6)
num_generic => numerics_root%get('generic',defaultVal=emptyDict)
randomSeed = num_generic%get_asInt('random_seed', defaultVal = 0)
call random_seed(size=randSize)
allocate(randInit(randSize))
if (randomSeed > 0) then

View File

@ -20,9 +20,7 @@ module numerics
class(tNode), pointer, public :: &
numerics_root
integer, protected, public :: &
iJacoStiffness = 1, & !< frequency of stiffness update
randomSeed = 0, & !< fixed seeding for pseudo-random number generator, Default 0: use random seed
integer, protected, public :: &
worldrank = 0, & !< MPI worldrank (/=0 for MPI simulations only)
worldsize = 1 !< MPI worldsize (/=1 for MPI simulations only)
integer(4), protected, public :: &
@ -129,16 +127,9 @@ subroutine numerics_init
select case(key)
case ('defgradtolerance')
defgradTolerance = num_generic%get_asFloat(key)
case ('ijacostiffness')
iJacoStiffness = num_generic%get_asInt(key)
case ('unitlength')
numerics_unitlength = num_generic%get_asFloat(key)
!--------------------------------------------------------------------------------------------------
! random seeding parameter
case ('fixed_seed', 'random_seed')
randomSeed = num_generic%get_asInt(key)
!--------------------------------------------------------------------------------------------------
! gradient parameter
case ('charLength')
@ -156,15 +147,8 @@ subroutine numerics_init
!--------------------------------------------------------------------------------------------------
! writing parameters to output
write(6,'(a24,1x,es8.1)') ' defgradTolerance: ',defgradTolerance
write(6,'(a24,1x,i8)') ' iJacoStiffness: ',iJacoStiffness
write(6,'(a24,1x,es8.1,/)')' unitlength: ',numerics_unitlength
!--------------------------------------------------------------------------------------------------
! Random seeding parameter
write(6,'(a16,1x,i16,/)') ' random_seed: ',randomSeed
if (randomSeed <= 0) &
write(6,'(a,/)') ' random seed will be generated!'
!--------------------------------------------------------------------------------------------------
! gradient parameter
write(6,'(a24,1x,es8.1)') ' charLength: ',charLength
@ -189,7 +173,6 @@ subroutine numerics_init
!--------------------------------------------------------------------------------------------------
! sanity checks
if (defgradTolerance <= 0.0_pReal) call IO_error(301,ext_msg='defgradTolerance')
if (iJacoStiffness < 1) call IO_error(301,ext_msg='iJacoStiffness')
if (numerics_unitlength <= 0.0_pReal) call IO_error(301,ext_msg='unitlength')
if (residualStiffness < 0.0_pReal) call IO_error(301,ext_msg='residualStiffness')
if (itmax <= 1) call IO_error(301,ext_msg='itmax')