syntax polishing; use of YAML defaults to avoid if%contains
This commit is contained in:
parent
438167804c
commit
e4271537c5
|
@ -116,7 +116,7 @@ program DAMASK_grid
|
|||
! init DAMASK (all modules)
|
||||
|
||||
call CPFEM_initAll
|
||||
print'(/,a)', ' <<<+- DAMASK_spectral init -+>>>'; flush(IO_STDOUT)
|
||||
print'(/,a)', ' <<<+- DAMASK_grid init -+>>>'; flush(IO_STDOUT)
|
||||
|
||||
print*, 'Shanthraj et al., Handbook of Mechanics of Materials, 2019'
|
||||
print*, 'https://doi.org/10.1007/978-981-10-6855-3_80'
|
||||
|
@ -169,9 +169,10 @@ program DAMASK_grid
|
|||
! initialize field solver information
|
||||
if (solver%get_asString('thermal',defaultVal = 'n/a') == 'spectral') nActiveFields = nActiveFields + 1
|
||||
if (solver%get_asString('damage', defaultVal = 'n/a') == 'spectral') nActiveFields = nActiveFields + 1
|
||||
allocate(solres(nActiveFields))
|
||||
|
||||
allocate(solres(nActiveFields))
|
||||
allocate( ID(nActiveFields))
|
||||
|
||||
field = 1
|
||||
ID(field) = FIELD_MECH_ID ! mechanical active by default
|
||||
thermalActive: if (solver%get_asString('thermal',defaultVal = 'n/a') == 'spectral') then
|
||||
|
@ -232,8 +233,7 @@ program DAMASK_grid
|
|||
|
||||
loadCases(l)%f_restart = load_step%get_asInt('f_restart', defaultVal=huge(0))
|
||||
loadCases(l)%f_out = load_step%get_asInt('f_out', defaultVal=1)
|
||||
loadCases(l)%estimate_rate = (load_step%get_asBool('estimate_rate',defaultVal=.true.) .and. &
|
||||
merge(.true.,.false.,l > 1))
|
||||
loadCases(l)%estimate_rate = (load_step%get_asBool('estimate_rate',defaultVal=.true.) .and. l>1)
|
||||
|
||||
reportAndCheck: if (worldrank == 0) then
|
||||
print'(/,a,i0)', ' load case: ', l
|
||||
|
@ -309,14 +309,9 @@ program DAMASK_grid
|
|||
call mechanical_init
|
||||
|
||||
case(FIELD_THERMAL_ID)
|
||||
if (config_load%contains('initial_conditions')) then
|
||||
initial_conditions => config_load%get('initial_conditions')
|
||||
if (initial_conditions%contains('thermal')) then
|
||||
thermal => initial_conditions%get('thermal')
|
||||
T_0 = thermal%get_asFloat('T',defaultVal = T_0)
|
||||
endif
|
||||
endif
|
||||
call grid_thermal_spectral_init(T_0)
|
||||
initial_conditions => config_load%get('initial_conditions',defaultVal=emptyDict)
|
||||
thermal => initial_conditions%get('thermal',defaultVal=emptyDict)
|
||||
call grid_thermal_spectral_init(thermal%get_asFloat('T',defaultVal = T_0))
|
||||
|
||||
case(FIELD_DAMAGE_ID)
|
||||
call grid_damage_spectral_init
|
||||
|
|
Loading…
Reference in New Issue