diff --git a/src/constitutive.f90 b/src/constitutive.f90 index 086ee1327..b05b3e3d5 100644 --- a/src/constitutive.f90 +++ b/src/constitutive.f90 @@ -1102,33 +1102,64 @@ end function constitutive_postResults !> @brief writes constitutive results to HDF5 output file !-------------------------------------------------------------------------------------------------- subroutine constitutive_results() - use material, only: & - PLASTICITY_ISOTROPIC_ID, & - PLASTICITY_PHENOPOWERLAW_ID, & - PLASTICITY_KINEHARDENING_ID, & - PLASTICITY_DISLOTWIN_ID, & - PLASTICITY_DISLOUCLA_ID, & - PLASTICITY_NONLOCAL_ID + use material, only: & + PLASTICITY_ISOTROPIC_ID, & + PLASTICITY_PHENOPOWERLAW_ID, & + PLASTICITY_KINEHARDENING_ID, & + PLASTICITY_DISLOTWIN_ID, & + PLASTICITY_DISLOUCLA_ID, & + PLASTICITY_NONLOCAL_ID #if defined(PETSc) || defined(DAMASKHDF5) - use results - use HDF5_utilities - use config, only: & - config_name_phase => phase_name ! anticipate logical name + use results + use HDF5_utilities + use config, only: & + config_name_phase => phase_name ! anticipate logical name - use material, only: & - phase_plasticityInstance, & - material_phase_plasticity_type => phase_plasticity - use plastic_phenopowerlaw, only: & - plastic_phenopowerlaw_results - - implicit none - integer(pInt) :: p - call HDF5_closeGroup(results_addGroup('current/phase')) - do p=1,size(config_name_phase) - call HDF5_closeGroup(results_addGroup('current/phase/'//trim(config_name_phase(p)))) - if (material_phase_plasticity_type(p) == PLASTICITY_PHENOPOWERLAW_ID) then - call plastic_phenopowerlaw_results(phase_plasticityInstance(p),'current/phase/'//trim(config_name_phase(p))) - endif + use material, only: & + phase_plasticityInstance, & + material_phase_plasticity_type => phase_plasticity + + use plastic_isotropic, only: & + plastic_isotropic_results + use plastic_phenopowerlaw, only: & + plastic_phenopowerlaw_results + use plastic_kinehardening, only: & + plastic_kinehardening_results + use plastic_dislotwin, only: & + plastic_dislotwin_results + use plastic_disloUCLA, only: & + plastic_disloUCLA_results + use plastic_nonlocal, only: & + plastic_nonlocal_results + + implicit none + integer :: p + call HDF5_closeGroup(results_addGroup('current/phase')) + do p=1,size(config_name_phase) + call HDF5_closeGroup(results_addGroup('current/phase/'//trim(config_name_phase(p)))) + + select case(material_phase_plasticity_type(p)) + + case(PLASTICITY_ISOTROPIC_ID) + call plastic_isotropic_results(phase_plasticityInstance(p),'current/phase/'//trim(config_name_phase(p))) + + case(PLASTICITY_PHENOPOWERLAW_ID) + call plastic_phenopowerlaw_results(phase_plasticityInstance(p),'current/phase/'//trim(config_name_phase(p))) + + case(PLASTICITY_KINEHARDENING_ID) + call plastic_kinehardening_results(phase_plasticityInstance(p),'current/phase/'//trim(config_name_phase(p))) + + case(PLASTICITY_DISLOTWIN_ID) + call plastic_dislotwin_results(phase_plasticityInstance(p),'current/phase/'//trim(config_name_phase(p))) + + case(PLASTICITY_DISLOUCLA_ID) + call plastic_disloUCLA_results(phase_plasticityInstance(p),'current/phase/'//trim(config_name_phase(p))) + + case(PLASTICITY_NONLOCAL_ID) + call plastic_nonlocal_results(phase_plasticityInstance(p),'current/phase/'//trim(config_name_phase(p))) + + end select + enddo #endif diff --git a/src/plastic_disloUCLA.f90 b/src/plastic_disloUCLA.f90 index 836dab38e..e32c707e9 100644 --- a/src/plastic_disloUCLA.f90 +++ b/src/plastic_disloUCLA.f90 @@ -102,7 +102,8 @@ module plastic_disloUCLA plastic_disloUCLA_dependentState, & plastic_disloUCLA_LpAndItsTangent, & plastic_disloUCLA_dotState, & - plastic_disloUCLA_postResults + plastic_disloUCLA_postResults, & + plastic_disloUCLA_results private :: & kinetics @@ -561,6 +562,32 @@ function plastic_disloUCLA_postResults(Mp,Temperature,instance,of) result(postRe end function plastic_disloUCLA_postResults +!-------------------------------------------------------------------------------------------------- +!> @brief writes results to HDF5 output file +!-------------------------------------------------------------------------------------------------- +subroutine plastic_disloUCLA_results(instance,group) +#if defined(PETSc) || defined(DAMASKHDF5) + use results + + implicit none + integer, intent(in) :: instance + character(len=*) :: group + integer :: o + + associate(prm => param(instance), stt => state(instance)) + outputsLoop: do o = 1_pInt,size(prm%outputID) + select case(prm%outputID(o)) + end select + enddo outputsLoop + end associate +#else + integer, intent(in) :: instance + character(len=*) :: group +#endif + +end subroutine plastic_disloUCLA_results + + !-------------------------------------------------------------------------------------------------- !> @brief Shear rates on slip systems, their derivatives with respect to resolved stress and the ! resolved stresss diff --git a/src/plastic_dislotwin.f90 b/src/plastic_dislotwin.f90 index 7799c197b..6976e2096 100644 --- a/src/plastic_dislotwin.f90 +++ b/src/plastic_dislotwin.f90 @@ -168,7 +168,8 @@ module plastic_dislotwin plastic_dislotwin_dependentState, & plastic_dislotwin_LpAndItsTangent, & plastic_dislotwin_dotState, & - plastic_dislotwin_postResults + plastic_dislotwin_postResults, & + plastic_dislotwin_results private :: & kinetics_slip, & kinetics_twin, & @@ -1088,6 +1089,32 @@ function plastic_dislotwin_postResults(Mp,Temperature,instance,of) result(postRe end function plastic_dislotwin_postResults +!-------------------------------------------------------------------------------------------------- +!> @brief writes results to HDF5 output file +!-------------------------------------------------------------------------------------------------- +subroutine plastic_dislotwin_results(instance,group) +#if defined(PETSc) || defined(DAMASKHDF5) + use results + + implicit none + integer, intent(in) :: instance + character(len=*) :: group + integer :: o + + associate(prm => param(instance), stt => state(instance)) + outputsLoop: do o = 1_pInt,size(prm%outputID) + select case(prm%outputID(o)) + end select + enddo outputsLoop + end associate +#else + integer, intent(in) :: instance + character(len=*) :: group +#endif + +end subroutine plastic_dislotwin_results + + !-------------------------------------------------------------------------------------------------- !> @brief Shear rates on slip systems, their derivatives with respect to resolved stress and the ! resolved stresss diff --git a/src/plastic_isotropic.f90 b/src/plastic_isotropic.f90 index b86c9321d..3c53037d6 100644 --- a/src/plastic_isotropic.f90 +++ b/src/plastic_isotropic.f90 @@ -68,7 +68,8 @@ module plastic_isotropic plastic_isotropic_LpAndItsTangent, & plastic_isotropic_LiAndItsTangent, & plastic_isotropic_dotState, & - plastic_isotropic_postResults + plastic_isotropic_postResults, & + plastic_isotropic_results contains @@ -482,4 +483,30 @@ function plastic_isotropic_postResults(Mp,instance,of) result(postResults) end function plastic_isotropic_postResults +!-------------------------------------------------------------------------------------------------- +!> @brief writes results to HDF5 output file +!-------------------------------------------------------------------------------------------------- +subroutine plastic_isotropic_results(instance,group) +#if defined(PETSc) || defined(DAMASKHDF5) + use results + + implicit none + integer, intent(in) :: instance + character(len=*) :: group + integer :: o + + associate(prm => param(instance), stt => state(instance)) + outputsLoop: do o = 1_pInt,size(prm%outputID) + select case(prm%outputID(o)) + end select + enddo outputsLoop + end associate +#else + integer, intent(in) :: instance + character(len=*) :: group +#endif + +end subroutine plastic_isotropic_results + + end module plastic_isotropic diff --git a/src/plastic_kinematichardening.f90 b/src/plastic_kinematichardening.f90 index b93da06f9..5b29fd799 100644 --- a/src/plastic_kinematichardening.f90 +++ b/src/plastic_kinematichardening.f90 @@ -83,7 +83,8 @@ module plastic_kinehardening plastic_kinehardening_LpAndItsTangent, & plastic_kinehardening_dotState, & plastic_kinehardening_deltaState, & - plastic_kinehardening_postResults + plastic_kinehardening_postResults, & + plastic_kinehardening_results private :: & kinetics @@ -548,6 +549,32 @@ function plastic_kinehardening_postResults(Mp,instance,of) result(postResults) end function plastic_kinehardening_postResults +!-------------------------------------------------------------------------------------------------- +!> @brief writes results to HDF5 output file +!-------------------------------------------------------------------------------------------------- +subroutine plastic_kinehardening_results(instance,group) +#if defined(PETSc) || defined(DAMASKHDF5) + use results + + implicit none + integer, intent(in) :: instance + character(len=*) :: group + integer :: o + + associate(prm => param(instance), stt => state(instance)) + outputsLoop: do o = 1_pInt,size(prm%outputID) + select case(prm%outputID(o)) + end select + enddo outputsLoop + end associate +#else + integer, intent(in) :: instance + character(len=*) :: group +#endif + +end subroutine plastic_kinehardening_results + + !-------------------------------------------------------------------------------------------------- !> @brief calculates shear rates on slip systems and derivatives with respect to resolved stress !> @details: Shear rates are calculated only optionally. diff --git a/src/plastic_nonlocal.f90 b/src/plastic_nonlocal.f90 index ec3dfd9bf..2a3b7f294 100644 --- a/src/plastic_nonlocal.f90 +++ b/src/plastic_nonlocal.f90 @@ -222,7 +222,8 @@ module plastic_nonlocal plastic_nonlocal_dotState, & plastic_nonlocal_deltaState, & plastic_nonlocal_updateCompatibility, & - plastic_nonlocal_postResults + plastic_nonlocal_postResults, & + plastic_nonlocal_results private :: & plastic_nonlocal_kinetics @@ -2558,4 +2559,30 @@ enddo outputsLoop end associate end function plastic_nonlocal_postResults + +!-------------------------------------------------------------------------------------------------- +!> @brief writes results to HDF5 output file +!-------------------------------------------------------------------------------------------------- +subroutine plastic_nonlocal_results(instance,group) +#if defined(PETSc) || defined(DAMASKHDF5) + use results + + implicit none + integer, intent(in) :: instance + character(len=*) :: group + integer :: o + + associate(prm => param(instance), stt => state(instance)) + outputsLoop: do o = 1_pInt,size(prm%outputID) + select case(prm%outputID(o)) + end select + enddo outputsLoop + end associate +#else + integer, intent(in) :: instance + character(len=*) :: group +#endif + +end subroutine plastic_nonlocal_results + end module plastic_nonlocal diff --git a/src/plastic_phenopowerlaw.f90 b/src/plastic_phenopowerlaw.f90 index e7966dd7d..d7df5cd40 100644 --- a/src/plastic_phenopowerlaw.f90 +++ b/src/plastic_phenopowerlaw.f90 @@ -575,9 +575,9 @@ subroutine plastic_phenopowerlaw_results(instance,group) use results implicit none - integer(pInt), intent(in) :: instance + integer, intent(in) :: instance character(len=*) :: group - integer(pInt) :: o + integer :: o associate(prm => param(instance), stt => state(instance)) outputsLoop: do o = 1_pInt,size(prm%outputID) @@ -590,7 +590,7 @@ subroutine plastic_phenopowerlaw_results(instance,group) enddo outputsLoop end associate #else - integer(pInt), intent(in) :: instance + integer, intent(in) :: instance character(len=*) :: group #endif end subroutine plastic_phenopowerlaw_results