From 4138067682d650d097f162300a8c31781a9ced5c Mon Sep 17 00:00:00 2001 From: kanschat Date: Sat, 9 Jul 2011 17:02:27 +0000 Subject: [PATCH] new functions for setting face and subfaces without deleting matrices git-svn-id: https://svn.dealii.org/trunk@23936 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/numerics/mesh_worker_info.h | 75 +++++++++++++++---- 1 file changed, 61 insertions(+), 14 deletions(-) diff --git a/deal.II/include/deal.II/numerics/mesh_worker_info.h b/deal.II/include/deal.II/numerics/mesh_worker_info.h index 6106343830..bdd8f2db01 100644 --- a/deal.II/include/deal.II/numerics/mesh_worker_info.h +++ b/deal.II/include/deal.II/numerics/mesh_worker_info.h @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- // $Id$ // -// Copyright (C) 2006, 2007, 2008, 2009, 2010 by the deal.II authors +// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -139,6 +139,26 @@ namespace MeshWorker const unsigned int n, const unsigned int s); + /** + * Switch to a new face of the + * same cell. Does not change + * #indices and does not reset + * data in LocalResults. + */ + template + void set_face (const DHFaceIterator& f, + const unsigned int n); + /** + * Switch to a new subface of the + * same cell. Does not change + * #indices and does not reset + * data in LocalResults. + */ + template + void set_subface (const DHFaceIterator& f, + const unsigned int n, + const unsigned int s); + const BlockIndices& local_indices() const; @@ -957,20 +977,33 @@ namespace MeshWorker } + template + template + inline void + DoFInfo::set_face( + const DHFaceIterator& f, + unsigned int n) + { + face = static_cast::face_iterator> (f); + face_number = n; + sub_number = deal_II_numbers::invalid_unsigned_int; + } + + template template inline void - DoFInfo::reinit(const DHCellIterator& c, - const DHFaceIterator& f, - unsigned int n) + DoFInfo::reinit( + const DHCellIterator& c, + const DHFaceIterator& f, + unsigned int n) { if ((cell.state() != IteratorState::valid) || cell != static_cast::cell_iterator> (c)) get_indices(c); cell = static_cast::cell_iterator> (c); - face = static_cast::face_iterator> (f); - face_number = n; - sub_number = deal_II_numbers::invalid_unsigned_int; + set_face(f,n); + if (block_info) LocalResults::reinit(block_info->local()); else @@ -978,21 +1011,35 @@ namespace MeshWorker } + template + template + inline void + DoFInfo::set_subface( + const DHFaceIterator& f, + unsigned int n, + unsigned int s) + { + face = static_cast::face_iterator> (f); + face_number = n; + sub_number = s; + } + + template template inline void - DoFInfo::reinit(const DHCellIterator& c, - const DHFaceIterator& f, - unsigned int n, - const unsigned int s) + DoFInfo::reinit( + const DHCellIterator& c, + const DHFaceIterator& f, + unsigned int n, + unsigned int s) { if (cell.state() != IteratorState::valid || cell != static_cast::cell_iterator> (c)) get_indices(c); cell = static_cast::cell_iterator> (c); - face = static_cast::face_iterator> (f); - face_number = n; - sub_number = s; + set_subface(f,n,s); + if (block_info) LocalResults::reinit(block_info->local()); else -- 2.39.5