diff --git a/code/constitutive.f90 b/code/constitutive.f90 index 082711a7b..5d10b4bf8 100644 --- a/code/constitutive.f90 +++ b/code/constitutive.f90 @@ -47,7 +47,7 @@ type(p_vec), dimension(:,:,:,:), allocatable :: constitutive_RKCK45dotState integer(pInt), dimension(:,:,:), allocatable :: constitutive_sizeDotState, & ! size of dotState array constitutive_sizeState, & ! size of state array per grain constitutive_sizePostResults ! size of postResults array per grain -integer(pInt) constitutive_maxSizeDotState, & +integer(pInt) constitutive_maxSizeDotState, & constitutive_maxSizeState, & constitutive_maxSizePostResults diff --git a/code/crystallite.f90 b/code/crystallite.f90 index e88707701..54c5e5cf4 100644 --- a/code/crystallite.f90 +++ b/code/crystallite.f90 @@ -284,7 +284,13 @@ do i = 1,material_Ncrystallite endif enddo enddo -crystallite_maxSizePostResults = maxval(crystallite_sizePostResults) + +crystallite_maxSizePostResults = 0_pInt +do j = 1,material_Nmicrostructure + if (microstructure_active(j)) & + crystallite_maxSizePostResults = max(crystallite_maxSizePostResults,& + crystallite_sizePostResults(microstructure_crystallite(j))) +enddo ! write description file for crystallite output diff --git a/code/mesh.f90 b/code/mesh.f90 index c9274cec3..7edee592c 100644 --- a/code/mesh.f90 +++ b/code/mesh.f90 @@ -3352,7 +3352,7 @@ if (mesh_maxValStateVar(2) < 1_pInt) call IO_error(120) ! no microstructure spec allocate (mesh_HomogMicro(mesh_maxValStateVar(1),mesh_maxValStateVar(2))); mesh_HomogMicro = 0_pInt do e = 1,mesh_NcpElems if (mesh_element(3,e) < 1_pInt) call IO_error(110,e) ! no homogenization specified - if (mesh_element(4,e) < 1_pInt) call IO_error(120,e) ! no homogenization specified + if (mesh_element(4,e) < 1_pInt) call IO_error(120,e) ! no microstructure specified mesh_HomogMicro(mesh_element(3,e),mesh_element(4,e)) = & mesh_HomogMicro(mesh_element(3,e),mesh_element(4,e)) + 1 ! count combinations of homogenization and microstructure enddo