From 660c9212f8437e0bba2c23ab10107abf3aa85a6c Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Wed, 4 May 2011 16:02:18 +0000 Subject: [PATCH] introduced error 667 for out of bounds user result requesting --- code/IO.f90 | 2 ++ code/mpie_cpfem_marc.f90 | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) 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