always use HDF5 output

This commit is contained in:
Martin Diehl 2019-12-18 20:05:51 +01:00
parent 2fe163be31
commit 4b6388fbb2
10 changed files with 9 additions and 29 deletions

View File

@ -87,10 +87,8 @@ subroutine CPFEM_initAll(el,ip)
call math_init
call rotations_init
call FE_init
#ifdef DAMASK_HDF5
call HDF5_utilities_init
call results_init
#endif
call mesh_init(ip, el)
call lattice_init
call material_init
@ -374,7 +372,6 @@ subroutine CPFEM_results(inc,time)
integer(pInt), intent(in) :: inc
real(pReal), intent(in) :: time
#ifdef DAMASK_HDF5
call results_openJobFile
call results_addIncrement(inc,time)
call constitutive_results
@ -382,7 +379,6 @@ subroutine CPFEM_results(inc,time)
call homogenization_results
call results_removeLink('current') ! ToDo: put this into closeJobFile
call results_closeJobFile
#endif
end subroutine CPFEM_results

View File

@ -5,9 +5,7 @@
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
!--------------------------------------------------------------------------------------------------
module HDF5_utilities
#if defined(PETSc) || defined(DAMASK_HDF5)
use HDF5
#endif
#ifdef PETSc
use PETSC
#endif
@ -20,7 +18,6 @@ module HDF5_utilities
implicit none
public
#if defined(PETSc) || defined(DAMASK_HDF5)
!--------------------------------------------------------------------------------------------------
!> @brief reads integer or float data of defined shape from file ! ToDo: order of arguments wrong
!> @details for parallel IO, all dimension except for the last need to match
@ -1928,6 +1925,5 @@ subroutine finalize_write(plist_id, dset_id, filespace_id, memspace_id)
if (hdferr < 0) call IO_error(1,ext_msg='finalize_write: h5sclose_f/memspace_id')
end subroutine finalize_write
#endif
end module HDF5_Utilities

View File

@ -688,7 +688,7 @@ end function constitutive_postResults
!> @brief writes constitutive results to HDF5 output file
!--------------------------------------------------------------------------------------------------
subroutine constitutive_results
#if defined(PETSc) || defined(DAMASK_HDF5)
integer :: p
character(len=256) :: group
do p=1,size(config_name_phase)
@ -719,8 +719,8 @@ subroutine constitutive_results
call plastic_nonlocal_results(phase_plasticityInstance(p),group)
end select
enddo
#endif
enddo
end subroutine constitutive_results
end module constitutive

View File

@ -767,7 +767,7 @@ end function crystallite_postResults
!> @brief writes crystallite results to HDF5 output file
!--------------------------------------------------------------------------------------------------
subroutine crystallite_results
#if defined(PETSc) || defined(DAMASK_HDF5)
integer :: p,o
real(pReal), allocatable, dimension(:,:,:) :: selected_tensors
type(rotation), allocatable, dimension(:) :: selected_rotations
@ -888,7 +888,7 @@ subroutine crystallite_results
enddo
end function select_rotations
#endif
end subroutine crystallite_results

View File

@ -78,7 +78,7 @@ end subroutine discretization_init
!> @brief write the displacements
!--------------------------------------------------------------------------------------------------
subroutine discretization_results
#if defined(PETSc) || defined(DAMASK_HDF5)
real(pReal), dimension(:,:), allocatable :: u
call results_closeGroup(results_addGroup(trim('current/geometry')))
@ -90,7 +90,7 @@ subroutine discretization_results
u = discretization_IPcoords &
- discretization_IPcoords0
call results_writeDataset('current/geometry',u,'u_c','cell center displacements','m')
#endif
end subroutine discretization_results

View File

@ -790,7 +790,7 @@ end function postResults
!> @brief writes homogenization results to HDF5 output file
!--------------------------------------------------------------------------------------------------
subroutine homogenization_results
#if defined(PETSc) || defined(DAMASK_HDF5)
use material, only: &
material_homogenization_type => homogenization_type
@ -822,7 +822,7 @@ subroutine homogenization_results
! '1st Piola-Kirchoff stress','Pa')
enddo
#endif
end subroutine homogenization_results
end module homogenization

View File

@ -928,7 +928,6 @@ end subroutine mech_RGC_averageStressAndItsTangent
!> @brief writes results to HDF5 output file
!--------------------------------------------------------------------------------------------------
module subroutine mech_RGC_results(instance,group)
#if defined(PETSc) || defined(DAMASK_HDF5)
integer, intent(in) :: instance
character(len=*), intent(in) :: group
@ -962,11 +961,6 @@ module subroutine mech_RGC_results(instance,group)
enddo outputsLoop
end associate
#else
integer, intent(in) :: instance
character(len=*), intent(in) :: group
#endif
end subroutine mech_RGC_results

View File

@ -354,12 +354,10 @@ subroutine material_init
call config_deallocate('material.config/microstructure')
call config_deallocate('material.config/texture')
#if defined(PETSc) || defined(DAMASK_HDF5)
call results_openJobFile
call results_mapping_constituent(material_phaseAt,material_phaseMemberAt,config_name_phase)
call results_mapping_materialpoint(material_homogenizationAt,material_homogenizationMemberAt,config_name_homogenization)
call results_closeJobFile
#endif
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

View File

@ -150,7 +150,6 @@ subroutine writeGeometry(elemType, &
real(pReal), dimension(:,:), allocatable :: &
coordinates_temp
#if defined(DAMASK_HDF5)
call results_openJobFile
call HDF5_closeGroup(results_addGroup('geometry'))
@ -171,7 +170,6 @@ subroutine writeGeometry(elemType, &
'coordinates of the material points','m')
call results_closeJobFile
#endif
end subroutine writeGeometry

View File

@ -16,7 +16,6 @@ module results
implicit none
private
#if defined(PETSc) || defined(DAMASK_HDF5)
integer(HID_T) :: resultsFile
interface results_writeDataset
@ -978,5 +977,4 @@ end subroutine results_mapping_materialpoint
!end subroutine HDF5_mappingCells
#endif
end module results