From: Joscha Gedicke Date: Mon, 7 Mar 2016 17:44:07 +0000 (+0100) Subject: Re-use constraint pointer from ResidualSimple X-Git-Tag: v8.5.0-rc1~1212^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fcc437ce61212cc7a0966a700e16933cc4e6fcab;p=dealii.git Re-use constraint pointer from ResidualSimple --- diff --git a/include/deal.II/meshworker/simple.h b/include/deal.II/meshworker/simple.h index 9ea2e007f6..a08e9b00be 100644 --- a/include/deal.II/meshworker/simple.h +++ b/include/deal.II/meshworker/simple.h @@ -112,7 +112,7 @@ namespace MeshWorker * The global residal vectors filled by assemble(). */ AnyData residuals; - private: + /** * A pointer to the object containing constraints. */ @@ -462,10 +462,6 @@ namespace MeshWorker const DOFINFO &info2); private: - /** - * A pointer to the object containing constraints. - */ - SmartPointer > constraints; /** * Assemble a single matrix M into the element at * index in the vector #matrix. @@ -1143,7 +1139,7 @@ namespace MeshWorker inline void SystemSimple::initialize(const ConstraintMatrix &c) { - constraints = &c; + ResidualSimple::initialize(c); } @@ -1170,7 +1166,7 @@ namespace MeshWorker AnyData residuals = ResidualSimple::residuals; VectorType *v = residuals.entry(index); - if (constraints == 0) + if (ResidualSimple::constraints == 0) { for (unsigned int i=0; idistribute_local_to_global(M,vector,indices,*MatrixSimple::matrix[index],*v, true); + ResidualSimple::constraints->distribute_local_to_global(M,vector,indices,*MatrixSimple::matrix[index],*v, true); } } @@ -1200,7 +1196,7 @@ namespace MeshWorker AnyData residuals = ResidualSimple::residuals; VectorType *v = residuals.entry(index); - if (constraints == 0) + if (ResidualSimple::constraints == 0) { for (unsigned int i=0; idistribute_local_to_global(vector, i1, i2, *v, M); - constraints->distribute_local_to_global(M, i1, i2, *MatrixSimple::matrix[index]); + ResidualSimple::constraints->distribute_local_to_global(vector, i1, i2, *v, M); + ResidualSimple::constraints->distribute_local_to_global(M, i1, i2, *MatrixSimple::matrix[index]); } }