From df55167fcbc0140f917b8ce1d07171f63eee030e Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Sun, 5 Oct 2014 15:31:52 +0000 Subject: [PATCH] [bugfix] Fix computation of average Neumann displacement That code was written back in the days when we were only using first order spaces. Now, with other spaces, we have to properly distinguish between grid vertices and Lagrange nodes. [[Imported from SVN: r9911]] --- cosserat-continuum.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cosserat-continuum.cc b/cosserat-continuum.cc index ca6f472b..45a8d91d 100644 --- a/cosserat-continuum.cc +++ b/cosserat-continuum.cc @@ -197,6 +197,9 @@ int main (int argc, char *argv[]) try BitSetVector<1> dirichletNodes(feBasis.size(), false); constructBoundaryDofs(dirichletBoundary,feBasis,dirichletNodes); + BitSetVector<1> neumannNodes(feBasis.size(), false); + constructBoundaryDofs(neumannBoundary,feBasis,neumannNodes); + BitSetVector<blocksize> dirichletDofs(feBasis.size(), false); for (size_t i=0; i<feBasis.size(); i++) if (dirichletNodes[i][0]) @@ -336,9 +339,9 @@ int main (int argc, char *argv[]) try // That is what we need for the locking tests FieldVector<double,3> averageDef(0); for (size_t i=0; i<x.size(); i++) - if (neumannVertices[i][0]) + if (neumannNodes[i][0]) averageDef += x[i].r; - averageDef /= neumannVertices.count(); + averageDef /= neumannNodes.count(); if (mpiHelper.rank()==0) { -- GitLab