From 6a8f052f16acaa5f41465f9f5ba8168a412492ed Mon Sep 17 00:00:00 2001 From: hartmann Date: Tue, 25 Mar 2008 14:37:18 +0000 Subject: [PATCH] Avoid code duplication by moving common code from FEFaceValue::reinit to do_reinit. git-svn-id: https://svn.dealii.org/trunk@15931 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/fe/fe_values.cc | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/deal.II/deal.II/source/fe/fe_values.cc b/deal.II/deal.II/source/fe/fe_values.cc index 2a94eab2a9..efcc7630cc 100644 --- a/deal.II/deal.II/source/fe/fe_values.cc +++ b/deal.II/deal.II/source/fe/fe_values.cc @@ -1539,9 +1539,6 @@ void FEFaceValues::reinit (const typename DoFHandler::cell_iterator &c this->present_cell.reset (new typename FEValuesBase::template CellIterator::cell_iterator> (cell)); - - // set the present face index - this->present_face_index=cell->face_index(face_no); // this was the part of the work // that is dependent on the actual @@ -1578,9 +1575,6 @@ void FEFaceValues::reinit (const typename hp::DoFHandler::cell_iterato (new typename FEValuesBase::template CellIterator::cell_iterator> (cell)); - // set the present face index - this->present_face_index=cell->face_index(face_no); - // this was the part of the work // that is dependent on the actual // data type of the iterator. now @@ -1614,9 +1608,6 @@ void FEFaceValues::reinit (const typename MGDoFHandler::cell_iterator (new typename FEValuesBase::template CellIterator::cell_iterator> (cell)); - // set the present face index - this->present_face_index=cell->face_index(face_no); - // this was the part of the work // that is dependent on the actual // data type of the iterator. now @@ -1641,9 +1632,6 @@ void FEFaceValues::reinit (const typename Triangulation::cell_iterator this->present_cell.reset (new typename FEValuesBase::TriaCellIterator (cell)); - // set the present face index - this->present_face_index=cell->face_index(face_no); - // this was the part of the work // that is dependent on the actual // data type of the iterator. now @@ -1657,6 +1645,12 @@ void FEFaceValues::reinit (const typename Triangulation::cell_iterator template void FEFaceValues::do_reinit (const unsigned int face_no) { + // first of all, set the + // present_face_index (if + // available) + const typename Triangulation::cell_iterator cell=*this->present_cell; + this->present_face_index=cell->face_index(face_no); + this->get_mapping().fill_fe_face_values(*this->present_cell, face_no, this->quadrature, *this->mapping_data, -- 2.39.5