diff --git a/code/IO.f90 b/code/IO.f90 index e499c6893..de09dd1c4 100644 --- a/code/IO.f90 +++ b/code/IO.f90 @@ -1323,6 +1323,8 @@ endfunction case (666) msg = 'Memory leak detected' + case (667) + msg = 'Invalid materialpoint result requested' case (670) msg = 'math_check: quat -> axisAngle -> quat failed' diff --git a/code/mpie_cpfem_marc.f90 b/code/mpie_cpfem_marc.f90 index bcd4f3dea..cf31320c3 100644 --- a/code/mpie_cpfem_marc.f90 +++ b/code/mpie_cpfem_marc.f90 @@ -392,13 +392,16 @@ subroutine plotv(& ) use prec, only: pReal,pInt use mesh, only: mesh_FEasCP - use homogenization, only: materialpoint_results + use IO, only: IO_error + use homogenization, only: materialpoint_results,materialpoint_sizeResults implicit none real(pReal) s(*),etot(*),eplas(*),ecreep(*),sp(*) real(pReal) v, t(*) integer(pInt) m, nn, layer, ndi, nshear, jpltcd + if (jpltcd > materialpoint_sizeResults) IO_error(667,jpltcd) ! complain about out of bounds error + v = materialpoint_results(jpltcd,nn,mesh_FEasCP('elem', m)) return