From fcc437ce61212cc7a0966a700e16933cc4e6fcab Mon Sep 17 00:00:00 2001 From: Joscha Gedicke Date: Mon, 7 Mar 2016 18:44:07 +0100 Subject: [PATCH] Re-use constraint pointer from ResidualSimple --- include/deal.II/meshworker/simple.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) 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]); } } -- 2.39.5