better encapsulation
for results operations, do not rely directly on HDF5 module
This commit is contained in:
parent
2e834cc3c1
commit
bb73a08cf4
|
@ -6,9 +6,6 @@ module discretization
|
||||||
|
|
||||||
use prec
|
use prec
|
||||||
use results
|
use results
|
||||||
#if defined(PETSc) || defined(DAMASK_HDF5)
|
|
||||||
use HDF5_utilities
|
|
||||||
#endif
|
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
|
@ -84,7 +81,7 @@ subroutine discretization_results
|
||||||
#if defined(PETSc) || defined(DAMASK_HDF5)
|
#if defined(PETSc) || defined(DAMASK_HDF5)
|
||||||
real(pReal), dimension(:,:), allocatable :: u
|
real(pReal), dimension(:,:), allocatable :: u
|
||||||
|
|
||||||
call HDF5_closeGroup(results_addGroup(trim('current/geometry')))
|
call results_closeGroup(results_addGroup(trim('current/geometry')))
|
||||||
|
|
||||||
u = discretization_NodeCoords (1:3,:discretization_sharedNodesBeginn) &
|
u = discretization_NodeCoords (1:3,:discretization_sharedNodesBeginn) &
|
||||||
- discretization_NodeCoords0(1:3,:discretization_sharedNodesBeginn)
|
- discretization_NodeCoords0(1:3,:discretization_sharedNodesBeginn)
|
||||||
|
|
|
@ -119,15 +119,17 @@ subroutine mesh_init(ip,el)
|
||||||
reshape(connectivity_cell,[elem%NcellNodesPerCell,elem%nIPs*nElems]),&
|
reshape(connectivity_cell,[elem%NcellNodesPerCell,elem%nIPs*nElems]),&
|
||||||
node0_cell,ip_reshaped)
|
node0_cell,ip_reshaped)
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
! geometry information required by the nonlocal CP model
|
||||||
call geometry_plastic_nonlocal_setIPvolume(IPvolume(elem,node0_cell,connectivity_cell))
|
call geometry_plastic_nonlocal_setIPvolume(IPvolume(elem,node0_cell,connectivity_cell))
|
||||||
unscaledNormals = IPareaNormal(elem,nElems,connectivity_cell,node0_cell)
|
unscaledNormals = IPareaNormal(elem,nElems,connectivity_cell,node0_cell)
|
||||||
call geometry_plastic_nonlocal_setIParea(norm2(unscaledNormals,1))
|
call geometry_plastic_nonlocal_setIParea(norm2(unscaledNormals,1))
|
||||||
call geometry_plastic_nonlocal_setIPareaNormal(unscaledNormals/spread(norm2(unscaledNormals,1),1,3))
|
call geometry_plastic_nonlocal_setIPareaNormal(unscaledNormals/spread(norm2(unscaledNormals,1),1,3))
|
||||||
call geometry_plastic_nonlocal_results
|
call geometry_plastic_nonlocal_results
|
||||||
|
|
||||||
|
|
||||||
end subroutine mesh_init
|
end subroutine mesh_init
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Writes all information needed for the DADF5 geometry
|
!> @brief Writes all information needed for the DADF5 geometry
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -50,6 +50,7 @@ module results
|
||||||
results_addIncrement, &
|
results_addIncrement, &
|
||||||
results_addGroup, &
|
results_addGroup, &
|
||||||
results_openGroup, &
|
results_openGroup, &
|
||||||
|
results_closeGroup, &
|
||||||
results_writeDataset, &
|
results_writeDataset, &
|
||||||
results_setLink, &
|
results_setLink, &
|
||||||
results_addAttribute, &
|
results_addAttribute, &
|
||||||
|
@ -120,6 +121,7 @@ subroutine results_addIncrement(inc,time)
|
||||||
|
|
||||||
end subroutine results_addIncrement
|
end subroutine results_addIncrement
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief open a group from the results file
|
!> @brief open a group from the results file
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
@ -144,6 +146,18 @@ integer(HID_T) function results_addGroup(groupName)
|
||||||
end function results_addGroup
|
end function results_addGroup
|
||||||
|
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief close a group
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
subroutine results_closeGroup(group_id)
|
||||||
|
|
||||||
|
integer(HID_T), intent(in) :: group_id
|
||||||
|
|
||||||
|
call HDF5_closeGroup(group_id)
|
||||||
|
|
||||||
|
end subroutine results_closeGroup
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief set link to object in results file
|
!> @brief set link to object in results file
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue