From: Ralf Hartmann Date: Tue, 25 Mar 2008 14:37:18 +0000 (+0000) Subject: Avoid code duplication by moving common code from FEFaceValue::reinit to do_reinit. X-Git-Tag: v8.0.0~9243 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1aa6b029007859c021581b6cd401292057574d53;p=dealii.git 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 --- 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,