diff --git a/src/HDF5_utilities.f90 b/src/HDF5_utilities.f90 index 48b98812b..a2c023ef5 100644 --- a/src/HDF5_utilities.f90 +++ b/src/HDF5_utilities.f90 @@ -175,7 +175,7 @@ end subroutine HDF5_closeFile !-------------------------------------------------------------------------------------------------- integer(HID_T) function HDF5_addGroup(fileHandle,groupName) - integer(HID_T), intent(in) :: fileHandle + integer(HID_T), intent(in) :: fileHandle character(len=*), intent(in) :: groupName integer :: hdferr diff --git a/src/constitutive_mech.f90 b/src/constitutive_mech.f90 index 2a6bf97eb..dc3a935e3 100644 --- a/src/constitutive_mech.f90 +++ b/src/constitutive_mech.f90 @@ -454,10 +454,10 @@ end subroutine constitutive_plastic_LpAndItsTangents module subroutine plastic_results integer :: p - character(len=pStringLen) :: group + character(len=:), allocatable :: group plasticityLoop: do p=1,size(material_name_phase) - group = trim('current/phase')//'/'//trim(material_name_phase(p)) + group = '/current/phase/'//trim(material_name_phase(p)) call results_closeGroup(results_addGroup(group)) group = trim(group)//'/plastic' diff --git a/src/material.f90 b/src/material.f90 index 8679afdc4..94548e052 100644 --- a/src/material.f90 +++ b/src/material.f90 @@ -52,7 +52,7 @@ module material HOMOGENIZATION_RGC_ID end enum - character(len=pStringLen), public, protected, allocatable, dimension(:) :: & + character(len=:), public, protected, allocatable, dimension(:) :: & material_name_phase, & !< name of each phase material_name_homogenization !< name of each homogenization @@ -392,13 +392,21 @@ end subroutine sanityCheck function getKeys(dict) class(tNode), intent(in) :: dict - character(len=pStringLen), dimension(:), allocatable :: getKeys + character(len=:), dimension(:), allocatable :: getKeys + character(len=pStringLen), dimension(:), allocatable :: temp - integer :: i + integer :: i,l - allocate(getKeys(dict%length)) + allocate(temp(dict%length)) + l = 0 do i=1, dict%length - getKeys(i) = dict%getKey(i) + temp(i) = dict%getKey(i) + l = max(len_trim(temp(i)),l) + enddo + + allocate(character(l)::getKeys(dict%length)) + do i=1, dict%length + getKeys(i) = trim(temp(i)) enddo end function getKeys diff --git a/src/results.f90 b/src/results.f90 index ab4e244ba..8b097179b 100644 --- a/src/results.f90 +++ b/src/results.f90 @@ -503,8 +503,8 @@ end subroutine results_writeScalarDataset_rotation subroutine results_mapping_constituent(phaseAt,memberAtLocal,label) integer, dimension(:,:), intent(in) :: phaseAt !< phase section at (constituent,element) - integer, dimension(:,:,:), intent(in) :: memberAtLocal !< phase member at (constituent,IP,element) - character(len=pStringLen), dimension(:), intent(in) :: label !< label of each phase section + integer, dimension(:,:,:), intent(in) :: memberAtLocal !< phase member at (constituent,IP,element) + character(len=*), dimension(:), intent(in) :: label !< label of each phase section integer, dimension(size(memberAtLocal,1),size(memberAtLocal,2),size(memberAtLocal,3)) :: & phaseAtMaterialpoint, & @@ -527,7 +527,6 @@ subroutine results_mapping_constituent(phaseAt,memberAtLocal,label) plist_id, & dt_id - integer(SIZE_T) :: type_size_string, type_size_int integer :: hdferr, ierr, i @@ -571,10 +570,10 @@ subroutine results_mapping_constituent(phaseAt,memberAtLocal,label) if(hdferr < 0) error stop 'HDF5 error' memberOffset = 0 do i=1, size(label) - memberOffset(i,worldrank) = count(phaseAt == i)*size(memberAtLocal,2) ! number of points/instance of this process + memberOffset(i,worldrank) = count(phaseAt == i)*size(memberAtLocal,2) ! number of points/instance of this process enddo writeSize = 0 - writeSize(worldrank) = size(memberAtLocal(1,:,:)) ! total number of points by this process + writeSize(worldrank) = size(memberAtLocal(1,:,:)) ! total number of points by this process !-------------------------------------------------------------------------------------------------- ! MPI settings and communication @@ -658,8 +657,8 @@ end subroutine results_mapping_constituent subroutine results_mapping_homogenization(homogenizationAt,memberAtLocal,label) integer, dimension(:), intent(in) :: homogenizationAt !< homogenization section at (element) - integer, dimension(:,:), intent(in) :: memberAtLocal !< homogenization member at (IP,element) - character(len=pStringLen), dimension(:), intent(in) :: label !< label of each homogenization section + integer, dimension(:,:), intent(in) :: memberAtLocal !< homogenization member at (IP,element) + character(len=*), dimension(:), intent(in) :: label !< label of each homogenization section integer, dimension(size(memberAtLocal,1),size(memberAtLocal,2)) :: & homogenizationAtMaterialpoint, & @@ -682,7 +681,6 @@ subroutine results_mapping_homogenization(homogenizationAt,memberAtLocal,label) plist_id, & dt_id - integer(SIZE_T) :: type_size_string, type_size_int integer :: hdferr, ierr, i