DADF5-results replaces postResults

This commit is contained in:
Martin Diehl 2019-12-10 07:14:39 +01:00
parent 4be7aa990c
commit 5681e661e2
3 changed files with 87 additions and 18 deletions

View File

@ -11,6 +11,7 @@ module damage_local
use source_damage_isoDuctile use source_damage_isoDuctile
use source_damage_anisoBrittle use source_damage_anisoBrittle
use source_damage_anisoDuctile use source_damage_anisoDuctile
use results
implicit none implicit none
private private
@ -42,7 +43,8 @@ module damage_local
public :: & public :: &
damage_local_init, & damage_local_init, &
damage_local_updateState, & damage_local_updateState, &
damage_local_postResults damage_local_postResults, &
damage_local_Results
contains contains
@ -210,6 +212,33 @@ subroutine damage_local_getSourceAndItsTangent(phiDot, dPhiDot_dPhi, phi, ip, el
end subroutine damage_local_getSourceAndItsTangent end subroutine damage_local_getSourceAndItsTangent
!--------------------------------------------------------------------------------------------------
!> @brief writes results to HDF5 output file
!--------------------------------------------------------------------------------------------------
module subroutine damage_local_results(homog,group)
integer, intent(in) :: homog
character(len=*), intent(in) :: group
#if defined(PETSc) || defined(DAMASK_HDF5)
integer :: o, instance
instance = damage_typeInstance(homog)
associate(prm => param(instance))
outputsLoop: do o = 1,size(prm%outputID)
select case(prm%outputID(o))
case (damage_ID)
call results_writeDataset(group,damage(homog)%p,'phi',&
'damage indicator','-')
end select
enddo outputsLoop
end associate
#endif
end subroutine damage_local_results
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief return array of damage results !> @brief return array of damage results
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------

View File

@ -14,6 +14,7 @@ module damage_nonlocal
use source_damage_isoDuctile use source_damage_isoDuctile
use source_damage_anisoBrittle use source_damage_anisoBrittle
use source_damage_anisoDuctile use source_damage_anisoDuctile
use results
implicit none implicit none
private private
@ -45,7 +46,8 @@ module damage_nonlocal
damage_nonlocal_getDiffusion33, & damage_nonlocal_getDiffusion33, &
damage_nonlocal_getMobility, & damage_nonlocal_getMobility, &
damage_nonlocal_putNonLocalDamage, & damage_nonlocal_putNonLocalDamage, &
damage_nonlocal_postResults damage_nonlocal_postResults, &
damage_nonlocal_Results
contains contains
@ -246,6 +248,34 @@ subroutine damage_nonlocal_putNonLocalDamage(phi,ip,el)
end subroutine damage_nonlocal_putNonLocalDamage end subroutine damage_nonlocal_putNonLocalDamage
!--------------------------------------------------------------------------------------------------
!> @brief writes results to HDF5 output file
!--------------------------------------------------------------------------------------------------
module subroutine damage_nonlocal_results(homog,group)
integer, intent(in) :: homog
character(len=*), intent(in) :: group
#if defined(PETSc) || defined(DAMASK_HDF5)
integer :: o, instance
instance = damage_typeInstance(homog)
associate(prm => param(instance))
outputsLoop: do o = 1,size(prm%outputID)
select case(prm%outputID(o))
case (damage_ID)
call results_writeDataset(group,damage(homog)%p,'phi',&
'damage indicator','-')
end select
enddo outputsLoop
end associate
#endif
end subroutine damage_nonlocal_results
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief return array of damage results !> @brief return array of damage results
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------

View File

@ -23,7 +23,6 @@ module homogenization
use damage_local use damage_local
use damage_nonlocal use damage_nonlocal
use results use results
use HDF5_utilities
implicit none implicit none
private private
@ -790,25 +789,16 @@ subroutine homogenization_results
material_homogenization_type => homogenization_type material_homogenization_type => homogenization_type
integer :: p integer :: p
character(len=256) :: group character(len=pStringLen) :: group_base,group
!real(pReal), dimension(:,:,:), allocatable :: temp !real(pReal), dimension(:,:,:), allocatable :: temp
do p=1,size(config_name_homogenization) do p=1,size(config_name_homogenization)
group = trim('current/materialpoint')//'/'//trim(config_name_homogenization(p)) group_base = 'current/materialpoint/'//trim(config_name_homogenization(p))
call HDF5_closeGroup(results_addGroup(group)) call results_closeGroup(results_addGroup(group_base))
group = trim(group)//'/mech'
call HDF5_closeGroup(results_addGroup(group))
select case(material_homogenization_type(p))
case(HOMOGENIZATION_rgc_ID)
call mech_RGC_results(homogenization_typeInstance(p),group)
end select
group = trim('current/materialpoint')//'/'//trim(config_name_homogenization(p))//'/generic'
call HDF5_closeGroup(results_addGroup(group))
group = trim(group_base)//'/generic'
call results_closeGroup(results_addGroup(group))
!temp = reshape(materialpoint_F,[3,3,discretization_nIP*discretization_nElem]) !temp = reshape(materialpoint_F,[3,3,discretization_nIP*discretization_nElem])
!call results_writeDataset(group,temp,'F',& !call results_writeDataset(group,temp,'F',&
! 'deformation gradient','1') ! 'deformation gradient','1')
@ -816,7 +806,27 @@ subroutine homogenization_results
!call results_writeDataset(group,temp,'P',& !call results_writeDataset(group,temp,'P',&
! '1st Piola-Kirchoff stress','Pa') ! '1st Piola-Kirchoff stress','Pa')
group = trim(group_base)//'/mech'
call results_closeGroup(results_addGroup(group))
select case(material_homogenization_type(p))
case(HOMOGENIZATION_rgc_ID)
call mech_RGC_results(homogenization_typeInstance(p),group)
end select
group = trim(group_base)//'/damage'
call results_closeGroup(results_addGroup(group))
select case(damage_type(p))
case(DAMAGE_LOCAL_ID)
call damage_local_results(p,group)
case(DAMAGE_NONLOCAL_ID)
call damage_nonlocal_results(p,group)
end select
group = trim(group_base)//'/thermal'
call results_closeGroup(results_addGroup(group))
enddo enddo
#endif #endif
end subroutine homogenization_results end subroutine homogenization_results