leaner group structure, centrally handled

This commit is contained in:
Martin Diehl 2019-04-13 09:47:56 +02:00
parent 12efa108d6
commit 89679147e8
3 changed files with 18 additions and 7 deletions

View File

@ -1108,10 +1108,8 @@ subroutine constitutive_results
integer :: p
character(len=256) :: group
call HDF5_closeGroup(results_addGroup('current/constitutive'))
do p=1,size(config_name_phase)
group = trim('current/constitutive')//'/'//trim(config_name_phase(p))
group = trim('current/constituent')//'/'//trim(config_name_phase(p))
call HDF5_closeGroup(results_addGroup(group))
group = trim(group)//'/'//'plastic'

View File

@ -1077,7 +1077,7 @@ end function crystallite_postResults
!--------------------------------------------------------------------------------------------------
!> @brief writes constitutive results to HDF5 output file
!> @brief writes crystallite results to HDF5 output file
!--------------------------------------------------------------------------------------------------
subroutine crystallite_results
#if defined(PETSc) || defined(DAMASK_HDF5)
@ -1097,11 +1097,9 @@ subroutine crystallite_results
type(rotation), allocatable, dimension(:) :: selected_rotations
character(len=256) :: group,lattice_label
call HDF5_closeGroup(results_addGroup('current/constituent'))
do p=1,size(config_name_phase)
group = trim('current/constituent')//'/'//trim(config_name_phase(p))
call HDF5_closeGroup(results_addGroup(group))
do o = 1, size(output_constituent(p)%label)
select case (output_constituent(p)%label(o))
case('f')

View File

@ -116,6 +116,9 @@ subroutine results_addIncrement(inc,time)
call results_setLink(trim('inc'//trim(adjustl(incChar))),'current')
call HDF5_addAttribute(resultsFile,'time/s',time,trim('inc'//trim(adjustl(incChar))))
call HDF5_closeGroup(results_addGroup('current/constituent'))
call HDF5_closeGroup(results_addGroup('current/materialpoint'))
end subroutine results_addIncrement
!--------------------------------------------------------------------------------------------------
@ -253,6 +256,8 @@ subroutine results_writeScalarDataset_real(group,dataset,label,description,SIuni
call HDF5_addAttribute(groupHandle,'Description',description,label)
if (HDF5_objectExists(groupHandle,label) .and. present(SIunit)) &
call HDF5_addAttribute(groupHandle,'Unit',SIunit,label)
if (HDF5_objectExists(groupHandle,label)) &
call HDF5_addAttribute(groupHandle,'Creator','DAMASK '//DAMASKVERSION,label)
call HDF5_closeGroup(groupHandle)
end subroutine results_writeScalarDataset_real
@ -278,6 +283,8 @@ subroutine results_writeVectorDataset_real(group,dataset,label,description,SIuni
call HDF5_addAttribute(groupHandle,'Description',description,label)
if (HDF5_objectExists(groupHandle,label) .and. present(SIunit)) &
call HDF5_addAttribute(groupHandle,'Unit',SIunit,label)
if (HDF5_objectExists(groupHandle,label)) &
call HDF5_addAttribute(groupHandle,'Creator','DAMASK '//DAMASKVERSION,label)
call HDF5_closeGroup(groupHandle)
end subroutine results_writeVectorDataset_real
@ -304,6 +311,8 @@ subroutine results_writeTensorDataset_real(group,dataset,label,description,SIuni
call HDF5_addAttribute(groupHandle,'Description',description,label)
if (HDF5_objectExists(groupHandle,label) .and. present(SIunit)) &
call HDF5_addAttribute(groupHandle,'Unit',SIunit,label)
if (HDF5_objectExists(groupHandle,label)) &
call HDF5_addAttribute(groupHandle,'Creator','DAMASK '//DAMASKVERSION,label)
call HDF5_closeGroup(groupHandle)
end subroutine results_writeTensorDataset_real
@ -330,6 +339,8 @@ subroutine results_writeVectorDataset_int(group,dataset,label,description,SIunit
call HDF5_addAttribute(groupHandle,'Description',description,label)
if (HDF5_objectExists(groupHandle,label) .and. present(SIunit)) &
call HDF5_addAttribute(groupHandle,'Unit',SIunit,label)
if (HDF5_objectExists(groupHandle,label)) &
call HDF5_addAttribute(groupHandle,'Creator','DAMASK '//DAMASKVERSION,label)
call HDF5_closeGroup(groupHandle)
end subroutine results_writeVectorDataset_int
@ -356,6 +367,8 @@ subroutine results_writeTensorDataset_int(group,dataset,label,description,SIunit
call HDF5_addAttribute(groupHandle,'Description',description,label)
if (HDF5_objectExists(groupHandle,label) .and. present(SIunit)) &
call HDF5_addAttribute(groupHandle,'Unit',SIunit,label)
if (HDF5_objectExists(groupHandle,label)) &
call HDF5_addAttribute(groupHandle,'Creator','DAMASK '//DAMASKVERSION,label)
call HDF5_closeGroup(groupHandle)
end subroutine results_writeTensorDataset_int
@ -384,6 +397,8 @@ subroutine results_writeScalarDataset_rotation(group,dataset,label,description,l
call HDF5_addAttribute(groupHandle,'Description',description,label)
if (HDF5_objectExists(groupHandle,label) .and. present(lattice_structure)) &
call HDF5_addAttribute(groupHandle,'Lattice',lattice_structure,label)
if (HDF5_objectExists(groupHandle,label)) &
call HDF5_addAttribute(groupHandle,'Creator','DAMASK '//DAMASKVERSION,label)
call HDF5_closeGroup(groupHandle)
end subroutine results_writeScalarDataset_rotation