simplified logic to reflect what we are doing

This commit is contained in:
Martin Diehl 2022-02-23 05:42:44 +01:00
parent 94c6542122
commit 339d081dd5
1 changed files with 18 additions and 27 deletions

View File

@ -23,10 +23,6 @@ module homogenization
enum, bind(c); enumerator :: & enum, bind(c); enumerator :: &
THERMAL_ISOTHERMAL_ID, &
THERMAL_CONDUCTION_ID, &
DAMAGE_NONE_ID, &
DAMAGE_NONLOCAL_ID, &
HOMOGENIZATION_UNDEFINED_ID, & HOMOGENIZATION_UNDEFINED_ID, &
HOMOGENIZATION_NONE_ID, & HOMOGENIZATION_NONE_ID, &
HOMOGENIZATION_ISOSTRAIN_ID, & HOMOGENIZATION_ISOSTRAIN_ID, &
@ -37,10 +33,9 @@ module homogenization
homogState, & homogState, &
damageState_h damageState_h
integer(kind(THERMAL_isothermal_ID)), dimension(:), allocatable :: & logical, allocatable, dimension(:) :: &
thermal_type !< thermal transport model thermal_active, &
integer(kind(DAMAGE_none_ID)), dimension(:), allocatable :: & damage_active
damage_type !< nonlocal damage model
logical, public :: & logical, public :: &
terminallyIll = .false. !< at least one material point is terminally ill terminallyIll = .false. !< at least one material point is terminally ill
@ -182,9 +177,7 @@ module homogenization
homogenization_forward, & homogenization_forward, &
homogenization_results, & homogenization_results, &
homogenization_restartRead, & homogenization_restartRead, &
homogenization_restartWrite, & homogenization_restartWrite
THERMAL_CONDUCTION_ID, &
DAMAGE_NONLOCAL_ID
contains contains
@ -351,19 +344,17 @@ subroutine homogenization_results
call mechanical_results(group_base,ho) call mechanical_results(group_base,ho)
select case(damage_type(ho)) if (damage_active(ho)) then
case(DAMAGE_NONLOCAL_ID)
group = trim(group_base)//'/damage' group = trim(group_base)//'/damage'
call results_closeGroup(results_addGroup(group)) call results_closeGroup(results_addGroup(group))
call damage_results(ho,group) call damage_results(ho,group)
end select end if
select case(thermal_type(ho)) if (thermal_active(ho)) then
case(THERMAL_CONDUCTION_ID)
group = trim(group_base)//'/thermal' group = trim(group_base)//'/thermal'
call results_closeGroup(results_addGroup(group)) call results_closeGroup(results_addGroup(group))
call thermal_results(ho,group) call thermal_results(ho,group)
end select end if
enddo enddo
@ -457,8 +448,8 @@ subroutine parseHomogenization
material_homogenization => config_material%get('homogenization') material_homogenization => config_material%get('homogenization')
allocate(thermal_type(size(material_name_homogenization)),source=THERMAL_isothermal_ID) allocate(thermal_active(size(material_name_homogenization)),source=.false.)
allocate(damage_type (size(material_name_homogenization)),source=DAMAGE_none_ID) allocate(damage_active(size(material_name_homogenization)),source=.false.)
do h=1, size(material_name_homogenization) do h=1, size(material_name_homogenization)
homog => material_homogenization%get(h) homog => material_homogenization%get(h)
@ -467,7 +458,7 @@ subroutine parseHomogenization
homogThermal => homog%get('thermal') homogThermal => homog%get('thermal')
select case (homogThermal%get_asString('type')) select case (homogThermal%get_asString('type'))
case('pass','isotemperature') case('pass','isotemperature')
thermal_type(h) = THERMAL_conduction_ID thermal_active(h) = .true.
case default case default
call IO_error(500,ext_msg=homogThermal%get_asString('type')) call IO_error(500,ext_msg=homogThermal%get_asString('type'))
end select end select
@ -477,7 +468,7 @@ subroutine parseHomogenization
homogDamage => homog%get('damage') homogDamage => homog%get('damage')
select case (homogDamage%get_asString('type')) select case (homogDamage%get_asString('type'))
case('pass') case('pass')
damage_type(h) = DAMAGE_nonlocal_ID damage_active(h) = .true.
case default case default
call IO_error(500,ext_msg=homogDamage%get_asString('type')) call IO_error(500,ext_msg=homogDamage%get_asString('type'))
end select end select