fixed: don't blindly deref index 2 in gNorm

git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@1396 e10b68d5-8a6e-419e-a041-bce267b0401d
This commit is contained in:
akva 2012-01-13 13:42:32 +00:00 committed by Knut Morten Okstad
parent 8af83cdf5c
commit 24a74fa039

View File

@ -1242,7 +1242,8 @@ bool SIMbase::solutionNorms (const TimeDomain& time,
ok = false;
// Add problem-dependent external norm contributions
gNorm(2) += this->externalEnergy(psol);
if (gNorm.size() >= 2)
gNorm(2) += this->externalEnergy(psol);
#ifdef PARALLEL_PETSC
if (nProc > 1)