diff --git a/code/IO.f90 b/code/IO.f90 index 6a9408d0c..4f293b045 100644 --- a/code/IO.f90 +++ b/code/IO.f90 @@ -1447,11 +1447,9 @@ subroutine IO_error(error_ID,el,ip,g,ext_msg) !-------------------------------------------------------------------------------------------------- ! material error messages and related messages in mesh case (150_pInt) - msg = 'crystallite index out of bounds' + msg = 'index out of bounds' case (151_pInt) - msg = 'phase index out of bounds' - case (152_pInt) - msg = 'texture index out of bounds' + msg = 'microstructure has no constituents' case (153_pInt) msg = 'sum of phase fractions differs from 1' case (154_pInt) diff --git a/code/material.f90 b/code/material.f90 index 05106352c..374e30761 100644 --- a/code/material.f90 +++ b/code/material.f90 @@ -192,13 +192,15 @@ subroutine material_init do m = 1_pInt,material_Nmicrostructure if (microstructure_crystallite(m) < 1_pInt .or. & microstructure_crystallite(m) > material_Ncrystallite) & - call IO_error(150_pInt,m) + call IO_error(150_pInt,m,ext_msg='crystallite') if (minval(microstructure_phase(1:microstructure_Nconstituents(m),m)) < 1_pInt .or. & maxval(microstructure_phase(1:microstructure_Nconstituents(m),m)) > material_Nphase) & - call IO_error(151_pInt,m) + call IO_error(150_pInt,m,ext_msg='phase') if (minval(microstructure_texture(1:microstructure_Nconstituents(m),m)) < 1_pInt .or. & maxval(microstructure_texture(1:microstructure_Nconstituents(m),m)) > material_Ntexture) & - call IO_error(152_pInt,m) + call IO_error(150_pInt,m,ext_msg='texture') + if (microstructure_Nconstituents(m) < 1_pInt) & + call IO_error(151_pInt,m) ! if (abs(sum(microstructure_fraction(:,m)) - 1.0_pReal) >= 1.0e-6_pReal) then ! have ppm precision in fractions ! if (iand(myDebug,debug_levelExtensive) /= 0_pInt) then ! write(6,'(a,1x,f12.9)') ' sum of microstructure fraction = ',sum(microstructure_fraction(:,m))