make use of submodule property
This commit is contained in:
parent
dda2f2cf22
commit
02ee64bce4
|
@ -317,6 +317,20 @@ module constitutive
|
|||
|
||||
end interface
|
||||
|
||||
|
||||
type :: tDebugOptions
|
||||
logical :: &
|
||||
basic, &
|
||||
extensive, &
|
||||
selective
|
||||
integer :: &
|
||||
element, &
|
||||
ip, &
|
||||
grain
|
||||
end type tDebugOptions
|
||||
|
||||
type(tDebugOptions) :: debug
|
||||
|
||||
public :: &
|
||||
plastic_nonlocal_updateCompatibility, &
|
||||
constitutive_init, &
|
||||
|
@ -341,6 +355,18 @@ subroutine constitutive_init
|
|||
integer :: &
|
||||
ph, & !< counter in phase loop
|
||||
s !< counter in source loop
|
||||
class (tNode), pointer :: &
|
||||
debug_constitutive
|
||||
|
||||
debug_constitutive => debug_root%get('constitutuve', defaultVal=emptyList)
|
||||
debug%basic = debug_constitutive%contains('basic')
|
||||
debug%extensive = debug_constitutive%contains('extensive')
|
||||
debug%selective = debug_constitutive%contains('selective')
|
||||
debug%element = debug_root%get_asInt('element',defaultVal = 1)
|
||||
debug%ip = debug_root%get_asInt('integrationpoint',defaultVal = 1)
|
||||
debug%grain = debug_root%get_asInt('grain',defaultVal = 1)
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! initialized plasticity
|
||||
if (any(phase_plasticity == PLASTICITY_NONE_ID)) call plastic_none_init
|
||||
|
|
|
@ -36,20 +36,6 @@ submodule(constitutive) plastic_isotropic
|
|||
gamma
|
||||
end type tIsotropicState
|
||||
|
||||
#ifdef DEBUG
|
||||
type :: tDebugOptions
|
||||
logical :: &
|
||||
extensive, &
|
||||
selective
|
||||
integer :: &
|
||||
element, &
|
||||
ip, &
|
||||
grain
|
||||
end type tDebugOptions
|
||||
|
||||
type(tDebugOptions) :: debug
|
||||
|
||||
#endif
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! containers for parameters and state
|
||||
type(tParameters), allocatable, dimension(:) :: param
|
||||
|
@ -74,8 +60,6 @@ module subroutine plastic_isotropic_init
|
|||
xi_0 !< initial critical stress
|
||||
character(len=pStringLen) :: &
|
||||
extmsg = ''
|
||||
class(tNode), pointer :: &
|
||||
debug_constitutive
|
||||
|
||||
write(6,'(/,a)') ' <<<+- plastic_'//PLASTICITY_ISOTROPIC_LABEL//' init -+>>>'
|
||||
|
||||
|
@ -85,15 +69,6 @@ module subroutine plastic_isotropic_init
|
|||
Ninstance = count(phase_plasticity == PLASTICITY_ISOTROPIC_ID)
|
||||
write(6,'(a16,1x,i5,/)') '# instances:',Ninstance; flush(6)
|
||||
|
||||
#ifdef DEBUG
|
||||
debug_constitutive => debug_root%get('constitutuve', defaultVal=emptyList)
|
||||
debug%extensive = debug_constitutive%contains('extensive')
|
||||
debug%selective = debug_constitutive%contains('selective')
|
||||
debug%element = debug_root%get_asInt('element',defaultVal = 1)
|
||||
debug%ip = debug_root%get_asInt('integrationpoint',defaultVal = 1)
|
||||
debug%grain = debug_root%get_asInt('grain',defaultVal = 1)
|
||||
#endif
|
||||
|
||||
allocate(param(Ninstance))
|
||||
allocate(state(Ninstance))
|
||||
allocate(dotState(Ninstance))
|
||||
|
|
|
@ -43,21 +43,6 @@ submodule(constitutive) plastic_kinehardening
|
|||
accshear !< accumulated (absolute) shear
|
||||
end type tKinehardeningState
|
||||
|
||||
#ifdef DEBUG
|
||||
type :: tDebugOptions
|
||||
logical :: &
|
||||
extensive, &
|
||||
selective
|
||||
integer :: &
|
||||
element, &
|
||||
ip, &
|
||||
grain
|
||||
end type tDebugOptions
|
||||
|
||||
type(tDebugOptions) :: debug
|
||||
|
||||
#endif
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! containers for parameters and state
|
||||
type(tParameters), allocatable, dimension(:) :: param
|
||||
|
@ -88,23 +73,12 @@ module subroutine plastic_kinehardening_init
|
|||
a !< non-Schmid coefficients
|
||||
character(len=pStringLen) :: &
|
||||
extmsg = ''
|
||||
class(tNode), pointer :: &
|
||||
debug_constitutive
|
||||
|
||||
write(6,'(/,a)') ' <<<+- plastic_'//PLASTICITY_KINEHARDENING_LABEL//' init -+>>>'
|
||||
|
||||
Ninstance = count(phase_plasticity == PLASTICITY_KINEHARDENING_ID)
|
||||
write(6,'(a16,1x,i5,/)') '# instances:',Ninstance; flush(6)
|
||||
|
||||
#ifdef DEBUG
|
||||
debug_constitutive => debug_root%get('constitutuve', defaultVal=emptyList)
|
||||
debug%extensive = debug_constitutive%contains('extensive')
|
||||
debug%selective = debug_constitutive%contains('selective')
|
||||
debug%element = debug_root%get_asInt('element',defaultVal = 1)
|
||||
debug%ip = debug_root%get_asInt('integrationpoint',defaultVal = 1)
|
||||
debug%grain = debug_root%get_asInt('grain',defaultVal = 1)
|
||||
#endif
|
||||
|
||||
allocate(param(Ninstance))
|
||||
allocate(state(Ninstance))
|
||||
allocate(dotState(Ninstance))
|
||||
|
|
|
@ -146,24 +146,8 @@ submodule(constitutive) plastic_nonlocal
|
|||
v_scr_pos, &
|
||||
v_scr_neg
|
||||
end type tNonlocalState
|
||||
|
||||
#ifdef DEBUG
|
||||
type :: tDebugOptions
|
||||
logical :: &
|
||||
basic, &
|
||||
extensive, &
|
||||
selective
|
||||
integer :: &
|
||||
element, &
|
||||
ip, &
|
||||
grain
|
||||
end type tDebugOptions
|
||||
|
||||
type(tDebugOptions) :: debug
|
||||
|
||||
#endif
|
||||
|
||||
type(tNonlocalState), allocatable, dimension(:) :: &
|
||||
|
||||
type(tNonlocalState), allocatable, dimension(:) :: &
|
||||
deltaState, &
|
||||
dotState, &
|
||||
state, &
|
||||
|
@ -194,8 +178,6 @@ module subroutine plastic_nonlocal_init
|
|||
extmsg = ''
|
||||
type(tInitialParameters) :: &
|
||||
ini
|
||||
class(tNode), pointer :: &
|
||||
debug_constitutive
|
||||
|
||||
write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_NONLOCAL_LABEL//' init -+>>>'
|
||||
|
||||
|
@ -208,16 +190,6 @@ module subroutine plastic_nonlocal_init
|
|||
Ninstance = count(phase_plasticity == PLASTICITY_NONLOCAL_ID)
|
||||
write(6,'(a16,1x,i5,/)') '# instances:',Ninstance; flush(6)
|
||||
|
||||
#ifdef DEBUG
|
||||
debug_constitutive => debug_root%get('constitutuve', defaultVal=emptyList)
|
||||
debug%basic = debug_constitutive%contains('basic')
|
||||
debug%extensive = debug_constitutive%contains('extensive')
|
||||
debug%selective = debug_constitutive%contains('selective')
|
||||
debug%element = debug_root%get_asInt('element',defaultVal = 1)
|
||||
debug%ip = debug_root%get_asInt('integrationpoint',defaultVal = 1)
|
||||
debug%grain = debug_root%get_asInt('grain',defaultVal = 1)
|
||||
#endif
|
||||
|
||||
allocate(param(Ninstance))
|
||||
allocate(state(Ninstance))
|
||||
allocate(state0(Ninstance))
|
||||
|
|
|
@ -98,7 +98,6 @@ module crystallite
|
|||
|
||||
type(tNumerics) :: num ! numerics parameters. Better name?
|
||||
|
||||
#ifdef DEBUG
|
||||
type :: tDebugOptions
|
||||
logical :: &
|
||||
basic, &
|
||||
|
@ -112,7 +111,6 @@ module crystallite
|
|||
|
||||
type(tDebugOptions) :: debug
|
||||
|
||||
#endif
|
||||
|
||||
procedure(integrateStateFPI), pointer :: integrateState
|
||||
|
||||
|
@ -151,7 +149,6 @@ subroutine crystallite_init
|
|||
|
||||
write(6,'(/,a)') ' <<<+- crystallite init -+>>>'
|
||||
|
||||
#ifdef DEBUG
|
||||
debug_crystallite => debug_root%get('crystallite', defaultVal=emptyList)
|
||||
debug%basic = debug_crystallite%contains('basic')
|
||||
debug%extensive = debug_crystallite%contains('extensive')
|
||||
|
@ -159,8 +156,6 @@ subroutine crystallite_init
|
|||
debug%element = debug_root%get_asInt('element', defaultVal=1)
|
||||
debug%ip = debug_root%get_asInt('integrationpoint', defaultVal=1)
|
||||
debug%grain = debug_root%get_asInt('grain', defaultVal=1)
|
||||
|
||||
#endif
|
||||
|
||||
cMax = homogenization_maxNgrains
|
||||
iMax = discretization_nIP
|
||||
|
|
|
@ -478,7 +478,7 @@ subroutine formResidual(in, F, &
|
|||
newIteration: if (totalIter <= PETScIter) then
|
||||
totalIter = totalIter + 1
|
||||
write(6,'(1x,a,3(a,i0))') trim(incInfo), ' @ Iteration ', num%itmin, '≤',totalIter, '≤', num%itmax
|
||||
if (debug%rotation) &
|
||||
if (debug_rotation) &
|
||||
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
|
||||
' deformation gradient aim (lab) =', transpose(params%rotation_BC%rotate(F_aim,active=.true.))
|
||||
write(6,'(/,a,/,3(3(f12.7,1x)/))',advance='no') &
|
||||
|
|
|
@ -52,7 +52,6 @@ module homogenization
|
|||
|
||||
type(tNumerics) :: num
|
||||
|
||||
#ifdef DEBUG
|
||||
type :: tDebugOptions
|
||||
logical :: &
|
||||
basic, &
|
||||
|
@ -66,8 +65,6 @@ module homogenization
|
|||
|
||||
type(tDebugOptions) :: debug
|
||||
|
||||
#endif
|
||||
|
||||
interface
|
||||
|
||||
module subroutine mech_none_init
|
||||
|
@ -155,7 +152,6 @@ subroutine homogenization_init
|
|||
num_homogGeneric, &
|
||||
debug_homogenization
|
||||
|
||||
#ifdef DEBUG
|
||||
debug_homogenization => debug_root%get('homogenization', defaultVal=emptyList)
|
||||
debug%basic = debug_homogenization%contains('basic')
|
||||
debug%extensive = debug_homogenization%contains('extensive')
|
||||
|
@ -166,7 +162,6 @@ subroutine homogenization_init
|
|||
|
||||
if (debug%grain < 1 .or. debug%grain > homogenization_Ngrains(material_homogenizationAt(debug%element))) &
|
||||
call IO_error(602,ext_msg='constituent', el=debug%element, g=debug%grain)
|
||||
#endif
|
||||
|
||||
|
||||
num_homog => numerics_root%get('homogenization',defaultVal=emptyDict)
|
||||
|
|
Loading…
Reference in New Issue