solver not specific to load case number
This commit is contained in:
parent
4dd99d4c39
commit
b2fea6b149
|
@ -37,9 +37,10 @@ program DAMASK_grid
|
||||||
f_out, & !< frequency of result writes
|
f_out, & !< frequency of result writes
|
||||||
f_restart !< frequency of restart writes
|
f_restart !< frequency of restart writes
|
||||||
logical :: estimate_rate !< follow trajectory of former loadcase
|
logical :: estimate_rate !< follow trajectory of former loadcase
|
||||||
integer(kind(FIELD_UNDEFINED_ID)), allocatable :: ID(:)
|
|
||||||
end type tLoadCase
|
end type tLoadCase
|
||||||
|
|
||||||
|
integer(kind(FIELD_UNDEFINED_ID)), allocatable :: ID(:)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! variables related to information from load case and geom file
|
! variables related to information from load case and geom file
|
||||||
real(pReal), dimension(9) :: temp_valueVector !< temporarily from loadcase file when reading in tensors (initialize to 0.0)
|
real(pReal), dimension(9) :: temp_valueVector !< temporarily from loadcase file when reading in tensors (initialize to 0.0)
|
||||||
|
@ -166,6 +167,19 @@ program DAMASK_grid
|
||||||
if (any(damage_type == DAMAGE_nonlocal_ID )) nActiveFields = nActiveFields + 1
|
if (any(damage_type == DAMAGE_nonlocal_ID )) 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 (any(thermal_type == THERMAL_conduction_ID)) then
|
||||||
|
field = field + 1
|
||||||
|
ID(field) = FIELD_THERMAL_ID
|
||||||
|
endif thermalActive
|
||||||
|
damageActive: if (any(damage_type == DAMAGE_nonlocal_ID)) then
|
||||||
|
field = field + 1
|
||||||
|
ID(field) = FIELD_DAMAGE_ID
|
||||||
|
endif damageActive
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
load_steps => config_load%get('loadstep')
|
load_steps => config_load%get('loadstep')
|
||||||
|
@ -173,18 +187,6 @@ program DAMASK_grid
|
||||||
|
|
||||||
do l = 1, load_steps%length
|
do l = 1, load_steps%length
|
||||||
|
|
||||||
allocate(loadCases(l)%ID(nActiveFields))
|
|
||||||
field = 1
|
|
||||||
loadCases(l)%ID(field) = FIELD_MECH_ID ! mechanical active by default
|
|
||||||
thermalActive: if (any(thermal_type == THERMAL_conduction_ID)) then
|
|
||||||
field = field + 1
|
|
||||||
loadCases(l)%ID(field) = FIELD_THERMAL_ID
|
|
||||||
endif thermalActive
|
|
||||||
damageActive: if (any(damage_type == DAMAGE_nonlocal_ID)) then
|
|
||||||
field = field + 1
|
|
||||||
loadCases(l)%ID(field) = FIELD_DAMAGE_ID
|
|
||||||
endif damageActive
|
|
||||||
|
|
||||||
load_step => load_steps%get(l)
|
load_step => load_steps%get(l)
|
||||||
step_bc => load_step%get('boundary_conditions')
|
step_bc => load_step%get('boundary_conditions')
|
||||||
step_mech => step_bc%get('mechanical')
|
step_mech => step_bc%get('mechanical')
|
||||||
|
@ -299,7 +301,7 @@ program DAMASK_grid
|
||||||
! doing initialization depending on active solvers
|
! doing initialization depending on active solvers
|
||||||
call spectral_Utilities_init
|
call spectral_Utilities_init
|
||||||
do field = 1, nActiveFields
|
do field = 1, nActiveFields
|
||||||
select case (loadCases(1)%ID(field))
|
select case (ID(field))
|
||||||
case(FIELD_MECH_ID)
|
case(FIELD_MECH_ID)
|
||||||
call mechanical_init
|
call mechanical_init
|
||||||
|
|
||||||
|
@ -375,7 +377,7 @@ program DAMASK_grid
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! forward fields
|
! forward fields
|
||||||
do field = 1, nActiveFields
|
do field = 1, nActiveFields
|
||||||
select case(loadCases(l)%ID(field))
|
select case(ID(field))
|
||||||
case(FIELD_MECH_ID)
|
case(FIELD_MECH_ID)
|
||||||
call mechanical_forward (&
|
call mechanical_forward (&
|
||||||
cutBack,guess,timeinc,timeIncOld,remainingLoadCaseTime, &
|
cutBack,guess,timeinc,timeIncOld,remainingLoadCaseTime, &
|
||||||
|
@ -395,7 +397,7 @@ program DAMASK_grid
|
||||||
stagIterate = .true.
|
stagIterate = .true.
|
||||||
do while (stagIterate)
|
do while (stagIterate)
|
||||||
do field = 1, nActiveFields
|
do field = 1, nActiveFields
|
||||||
select case(loadCases(l)%ID(field))
|
select case(ID(field))
|
||||||
case(FIELD_MECH_ID)
|
case(FIELD_MECH_ID)
|
||||||
solres(field) = mechanical_solution(incInfo)
|
solres(field) = mechanical_solution(incInfo)
|
||||||
case(FIELD_THERMAL_ID)
|
case(FIELD_THERMAL_ID)
|
||||||
|
|
Loading…
Reference in New Issue