diff --git a/src/constitutive.f90 b/src/constitutive.f90 index 5e99abfd3..e49932cfe 100644 --- a/src/constitutive.f90 +++ b/src/constitutive.f90 @@ -348,9 +348,6 @@ end function constitutive_deltaState C end subroutine source_damage_isoBrittle_deltaState - module subroutine plastic_results - end subroutine plastic_results - module subroutine damage_results end subroutine damage_results @@ -844,7 +841,22 @@ end subroutine constitutive_forward !-------------------------------------------------------------------------------------------------- subroutine constitutive_results - call plastic_results + integer :: ph + character(len=:), allocatable :: group + + + group = '/current/phase/' + call results_closeGroup(results_addGroup(group)) + + do ph = 1, size(material_name_phase) + + group = group//trim(material_name_phase(ph))//'/' + call results_closeGroup(results_addGroup(group)) + + call mech_results(group,ph) + + enddo + call damage_results end subroutine constitutive_results diff --git a/src/constitutive_mech.f90 b/src/constitutive_mech.f90 index ba10ed39a..7d6ef2998 100644 --- a/src/constitutive_mech.f90 +++ b/src/constitutive_mech.f90 @@ -651,6 +651,9 @@ module subroutine mech_results(group,ph) character(len=*), intent(in) :: group integer, intent(in) :: ph + if (phase_plasticity(ph) /= PLASTICITY_NONE_ID) & + call results_closeGroup(results_addGroup(group//'plastic')) + select case(phase_plasticity(ph)) case(PLASTICITY_ISOTROPIC_ID) @@ -670,6 +673,7 @@ module subroutine mech_results(group,ph) case(PLASTICITY_NONLOCAL_ID) call plastic_nonlocal_results(phase_plasticityInstance(ph),group//'plastic') + end select end subroutine mech_results @@ -679,48 +683,6 @@ end subroutine mech_results end subroutine mech_restart_read - -!-------------------------------------------------------------------------------------------- -!> @brief writes plasticity constitutive results to HDF5 output file -!-------------------------------------------------------------------------------------------- -module subroutine plastic_results - - integer :: p - character(len=:), allocatable :: group - - plasticityLoop: do p=1,size(material_name_phase) - group = '/current/phase/'//trim(material_name_phase(p)) - call results_closeGroup(results_addGroup(group)) - - group = trim(group)//'/plastic' - - call results_closeGroup(results_addGroup(group)) - select case(phase_plasticity(p)) - - case(PLASTICITY_ISOTROPIC_ID) - call plastic_isotropic_results(phase_plasticityInstance(p),group) - - case(PLASTICITY_PHENOPOWERLAW_ID) - call plastic_phenopowerlaw_results(phase_plasticityInstance(p),group) - - case(PLASTICITY_KINEHARDENING_ID) - call plastic_kinehardening_results(phase_plasticityInstance(p),group) - - case(PLASTICITY_DISLOTWIN_ID) - call plastic_dislotwin_results(phase_plasticityInstance(p),group) - - case(PLASTICITY_DISLOTUNGSTEN_ID) - call plastic_dislotungsten_results(phase_plasticityInstance(p),group) - - case(PLASTICITY_NONLOCAL_ID) - call plastic_nonlocal_results(phase_plasticityInstance(p),group) - end select - - enddo plasticityLoop - -end subroutine plastic_results - - !-------------------------------------------------------------------------------------------------- !> @brief calculation of stress (P) with time integration based on a residuum in Lp and !> intermediate acceleration of the Newton-Raphson correction diff --git a/src/homogenization.f90 b/src/homogenization.f90 index 6ed53c13c..49cb0a9f7 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -399,6 +399,7 @@ subroutine homogenization_results integer :: p character(len=:), allocatable :: group_base,group + call results_closeGroup(results_addGroup('current/homogenization/')) do p=1,size(material_name_homogenization) group_base = 'current/homogenization/'//trim(material_name_homogenization(p)) diff --git a/src/results.f90 b/src/results.f90 index ea9fd62d4..6363e3efc 100644 --- a/src/results.f90 +++ b/src/results.f90 @@ -111,8 +111,6 @@ subroutine results_addIncrement(inc,time) call results_closeGroup(results_addGroup(trim('inc'//trim(adjustl(incChar))))) call results_setLink(trim('inc'//trim(adjustl(incChar))),'current') call results_addAttribute('time/s',time,trim('inc'//trim(adjustl(incChar)))) - call results_closeGroup(results_addGroup('current/phase')) - call results_closeGroup(results_addGroup('current/homogenization')) end subroutine results_addIncrement