solver is selected in load case, not numerics.yaml
This commit is contained in:
parent
dc50400863
commit
4dd99d4c39
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit 0289c1bbfec1a1aef77a8cbaeed134035549e738
|
Subproject commit 738526ac7ae63678c885faba7621782499f2bce9
|
|
@ -78,8 +78,7 @@ program DAMASK_grid
|
||||||
maxCutBack, & !< max number of cut backs
|
maxCutBack, & !< max number of cut backs
|
||||||
stagItMax !< max number of field level staggered iterations
|
stagItMax !< max number of field level staggered iterations
|
||||||
character(len=pStringLen) :: &
|
character(len=pStringLen) :: &
|
||||||
incInfo, &
|
incInfo
|
||||||
loadcase_string
|
|
||||||
|
|
||||||
type(tLoadCase), allocatable, dimension(:) :: loadCases !< array of all load cases
|
type(tLoadCase), allocatable, dimension(:) :: loadCases !< array of all load cases
|
||||||
type(tSolutionState), allocatable, dimension(:) :: solres
|
type(tSolutionState), allocatable, dimension(:) :: solres
|
||||||
|
@ -98,10 +97,10 @@ program DAMASK_grid
|
||||||
quit
|
quit
|
||||||
class (tNode), pointer :: &
|
class (tNode), pointer :: &
|
||||||
num_grid, &
|
num_grid, &
|
||||||
debug_grid, & ! pointer to grid debug options
|
|
||||||
config_load, &
|
config_load, &
|
||||||
load_steps, &
|
load_steps, &
|
||||||
load_step, &
|
load_step, &
|
||||||
|
solver, &
|
||||||
step_bc, &
|
step_bc, &
|
||||||
step_mech, &
|
step_mech, &
|
||||||
step_discretization, &
|
step_discretization, &
|
||||||
|
@ -117,12 +116,6 @@ program DAMASK_grid
|
||||||
print*, 'Shanthraj et al., Handbook of Mechanics of Materials, 2019'
|
print*, 'Shanthraj et al., Handbook of Mechanics of Materials, 2019'
|
||||||
print*, 'https://doi.org/10.1007/978-981-10-6855-3_80'
|
print*, 'https://doi.org/10.1007/978-981-10-6855-3_80'
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
! initialize field solver information
|
|
||||||
nActiveFields = 1
|
|
||||||
if (any(thermal_type == THERMAL_conduction_ID )) nActiveFields = nActiveFields + 1
|
|
||||||
if (any(damage_type == DAMAGE_nonlocal_ID )) nActiveFields = nActiveFields + 1
|
|
||||||
allocate(solres(nActiveFields))
|
|
||||||
|
|
||||||
!-------------------------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------------------------
|
||||||
! reading field paramters from numerics file and do sanity checks
|
! reading field paramters from numerics file and do sanity checks
|
||||||
|
@ -132,20 +125,23 @@ program DAMASK_grid
|
||||||
|
|
||||||
if (stagItMax < 0) call IO_error(301,ext_msg='maxStaggeredIter')
|
if (stagItMax < 0) call IO_error(301,ext_msg='maxStaggeredIter')
|
||||||
if (maxCutBack < 0) call IO_error(301,ext_msg='maxCutBack')
|
if (maxCutBack < 0) call IO_error(301,ext_msg='maxCutBack')
|
||||||
|
|
||||||
|
config_load => YAML_parse_file(trim(interface_loadFile))
|
||||||
|
solver => config_load%get('solver')
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! assign mechanics solver depending on selected type
|
! assign mechanics solver depending on selected type
|
||||||
|
|
||||||
debug_grid => config_debug%get('grid',defaultVal=emptyList)
|
nActiveFields = 1
|
||||||
select case (trim(num_grid%get_asString('solver', defaultVal = 'Basic')))
|
select case (solver%get_asString('mechanical'))
|
||||||
case ('Basic')
|
case ('spectral_basic')
|
||||||
mechanical_init => grid_mechanical_spectral_basic_init
|
mechanical_init => grid_mechanical_spectral_basic_init
|
||||||
mechanical_forward => grid_mechanical_spectral_basic_forward
|
mechanical_forward => grid_mechanical_spectral_basic_forward
|
||||||
mechanical_solution => grid_mechanical_spectral_basic_solution
|
mechanical_solution => grid_mechanical_spectral_basic_solution
|
||||||
mechanical_updateCoords => grid_mechanical_spectral_basic_updateCoords
|
mechanical_updateCoords => grid_mechanical_spectral_basic_updateCoords
|
||||||
mechanical_restartWrite => grid_mechanical_spectral_basic_restartWrite
|
mechanical_restartWrite => grid_mechanical_spectral_basic_restartWrite
|
||||||
|
|
||||||
case ('Polarisation')
|
case ('spectral_polarization')
|
||||||
mechanical_init => grid_mechanical_spectral_polarisation_init
|
mechanical_init => grid_mechanical_spectral_polarisation_init
|
||||||
mechanical_forward => grid_mechanical_spectral_polarisation_forward
|
mechanical_forward => grid_mechanical_spectral_polarisation_forward
|
||||||
mechanical_solution => grid_mechanical_spectral_polarisation_solution
|
mechanical_solution => grid_mechanical_spectral_polarisation_solution
|
||||||
|
@ -160,14 +156,17 @@ program DAMASK_grid
|
||||||
mechanical_restartWrite => grid_mechanical_FEM_restartWrite
|
mechanical_restartWrite => grid_mechanical_FEM_restartWrite
|
||||||
|
|
||||||
case default
|
case default
|
||||||
call IO_error(error_ID = 891, ext_msg = trim(num_grid%get_asString('solver')))
|
call IO_error(error_ID = 891, ext_msg = trim(solver%get_asString('mechanical')))
|
||||||
|
|
||||||
end select
|
end select
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
! initialize field solver information
|
||||||
|
if (any(thermal_type == THERMAL_conduction_ID )) nActiveFields = nActiveFields + 1
|
||||||
|
if (any(damage_type == DAMAGE_nonlocal_ID )) nActiveFields = nActiveFields + 1
|
||||||
|
allocate(solres(nActiveFields))
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! reading information from load case file and to sanity checks
|
|
||||||
config_load => YAML_parse_file(trim(interface_loadFile))
|
|
||||||
|
|
||||||
load_steps => config_load%get('loadstep')
|
load_steps => config_load%get('loadstep')
|
||||||
allocate(loadCases(load_steps%length)) ! array of load cases
|
allocate(loadCases(load_steps%length)) ! array of load cases
|
||||||
|
@ -232,7 +231,6 @@ program DAMASK_grid
|
||||||
merge(.true.,.false.,l > 1))
|
merge(.true.,.false.,l > 1))
|
||||||
|
|
||||||
reportAndCheck: if (worldrank == 0) then
|
reportAndCheck: if (worldrank == 0) then
|
||||||
write (loadcase_string, '(i0)' ) l
|
|
||||||
print'(/,a,i0)', ' load case: ', l
|
print'(/,a,i0)', ' load case: ', l
|
||||||
print*, ' estimate_rate:', loadCases(l)%estimate_rate
|
print*, ' estimate_rate:', loadCases(l)%estimate_rate
|
||||||
if (loadCases(l)%deformation%myType == 'L') then
|
if (loadCases(l)%deformation%myType == 'L') then
|
||||||
|
@ -292,7 +290,7 @@ program DAMASK_grid
|
||||||
if (loadCases(l)%f_restart < huge(0)) &
|
if (loadCases(l)%f_restart < huge(0)) &
|
||||||
print'(a,i0)', ' f_restart: ', loadCases(l)%f_restart
|
print'(a,i0)', ' f_restart: ', loadCases(l)%f_restart
|
||||||
|
|
||||||
if (errorID > 0) call IO_error(error_ID = errorID, ext_msg = loadcase_string) ! exit with error message
|
if (errorID > 0) call IO_error(error_ID = errorID, el = l)
|
||||||
|
|
||||||
endif reportAndCheck
|
endif reportAndCheck
|
||||||
enddo
|
enddo
|
||||||
|
|
|
@ -116,7 +116,7 @@ subroutine grid_mechanical_spectral_polarisation_init
|
||||||
num_grid, &
|
num_grid, &
|
||||||
debug_grid
|
debug_grid
|
||||||
|
|
||||||
print'(/,a)', ' <<<+- grid_mechanical_spectral_polarisation init -+>>>'; flush(IO_STDOUT)
|
print'(/,a)', ' <<<+- grid_mechanical_spectral_polarization init -+>>>'; flush(IO_STDOUT)
|
||||||
|
|
||||||
print*, 'Shanthraj et al., International Journal of Plasticity 66:31–45, 2015'
|
print*, 'Shanthraj et al., International Journal of Plasticity 66:31–45, 2015'
|
||||||
print*, 'https://doi.org/10.1016/j.ijplas.2014.02.006'
|
print*, 'https://doi.org/10.1016/j.ijplas.2014.02.006'
|
||||||
|
|
Loading…
Reference in New Issue