From f196926b7edc008be32ce2d707cf191957da03f1 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Mon, 24 Nov 2014 18:09:24 +0100 Subject: [PATCH] Pass TriaIterator by reference ant not by value This makes the interface of FEValues::reinit consistent between Triangulation::cell_iterator and DoFHandler::cell_iterator. --- include/deal.II/fe/fe_values.h | 6 +++--- source/fe/fe_values.cc | 6 +++--- source/fe/fe_values.inst.in | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/deal.II/fe/fe_values.h b/include/deal.II/fe/fe_values.h index 6018d3b021..8493c301b9 100644 --- a/include/deal.II/fe/fe_values.h +++ b/include/deal.II/fe/fe_values.h @@ -2582,7 +2582,7 @@ public: * by the given cell is also the one used by this FEValues object. */ template - void reinit (const TriaIterator > cell); + void reinit (const TriaIterator > &cell); /** * Reinitialize the gradients, Jacobi determinants, etc for the given cell @@ -2787,7 +2787,7 @@ public: * number @p face_no of @p cell and the given finite element. */ template - void reinit (const TriaIterator > cell, + void reinit (const TriaIterator > &cell, const unsigned int face_no); /** @@ -2896,7 +2896,7 @@ public: * by the given cell is also the one used by this FESubfaceValues object. */ template - void reinit (const TriaIterator > cell, + void reinit (const TriaIterator > &cell, const unsigned int face_no, const unsigned int subface_no); diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index 6fac190cca..d0566b0d29 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -3471,7 +3471,7 @@ void FEValues::reinit (const typename Triangulation: template template void -FEValues::reinit (const TriaIterator > cell) +FEValues::reinit (const TriaIterator > &cell) { // assert that the finite elements // passed to the constructor and @@ -3646,7 +3646,7 @@ FEFaceValues::initialize (const UpdateFlags update_flags) template template void -FEFaceValues::reinit (const TriaIterator > cell, +FEFaceValues::reinit (const TriaIterator > &cell, const unsigned int face_no) { // assert that the finite elements @@ -3802,7 +3802,7 @@ FESubfaceValues::initialize (const UpdateFlags update_flags) template template -void FESubfaceValues::reinit (const TriaIterator > cell, +void FESubfaceValues::reinit (const TriaIterator > &cell, const unsigned int face_no, const unsigned int subface_no) { diff --git a/source/fe/fe_values.inst.in b/source/fe/fe_values.inst.in index cdf87b8a99..d57d432864 100644 --- a/source/fe/fe_values.inst.in +++ b/source/fe/fe_values.inst.in @@ -52,11 +52,11 @@ for (dof_handler : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS; deal_II #if (deal_II_space_dimension == DIM_A) || (deal_II_space_dimension == DIM_B) template void FEValues::reinit( - TriaIterator, lda> >); + const TriaIterator, lda> >&); template void FEFaceValues::reinit( - TriaIterator, lda> >, unsigned int); + const TriaIterator, lda> >&, unsigned int); template void FESubfaceValues::reinit( - TriaIterator, lda> >, unsigned int, unsigned int); + const TriaIterator, lda> >&, unsigned int, unsigned int); #endif #endif } -- 2.39.5