From e1bd637be9ea3ea01123f812d69f47ffd9d3fb37 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 25 May 2018 19:13:38 -0500 Subject: [PATCH] RCM: Update multigrid --- .../deal.II/multigrid/mg_constrained_dofs.h | 24 ++++++++++--------- include/deal.II/multigrid/mg_transfer.h | 10 ++++---- include/deal.II/multigrid/mg_transfer_block.h | 8 +++---- .../deal.II/multigrid/mg_transfer_component.h | 4 ++-- source/multigrid/mg_transfer_prebuilt.cc | 4 ++-- source/multigrid/multigrid.cc | 9 +++---- 6 files changed, 31 insertions(+), 28 deletions(-) diff --git a/include/deal.II/multigrid/mg_constrained_dofs.h b/include/deal.II/multigrid/mg_constrained_dofs.h index 22c6435639..6aefdebd38 100644 --- a/include/deal.II/multigrid/mg_constrained_dofs.h +++ b/include/deal.II/multigrid/mg_constrained_dofs.h @@ -20,6 +20,8 @@ #include +#include + #include #include @@ -53,14 +55,14 @@ public: * freedom at the boundary of the domain untouched assuming that no * Dirichlet boundary conditions for them exist. * - * Furthermore, this call sets up a ConstraintMatrix on each level that - * contains possible periodicity constraints in case those have been added to - * the underlying triangulation. The constraint matrix can be queried by - * get_level_constraint_matrix(level). Note that the current implementation of - * periodicity constraints in this class does not support rotation matrices in - * the periodicity definition, i.e., the respective argument in the - * GridTools::collect_periodic_faces() may not be different from the identity - * matrix. + * Furthermore, this call sets up an AffineConstraints object on each + * level that contains possible periodicity constraints in case those + * have been added to the underlying triangulation. The constraint matrix + * can be queried by get_level_constraint_matrix(level). Note that the + * current implementation of periodicity constraints in this class does + * not support rotation matrices in the periodicity definition, i.e., the + * respective argument in the GridTools::collect_periodic_faces() may not + * be different from the identity matrix. */ template void @@ -160,7 +162,7 @@ public: * Return the level constraint matrix for a given level, containing * periodicity constraints (if enabled on the triangulation). */ - const ConstraintMatrix & + const AffineConstraints & get_level_constraint_matrix(const unsigned int level) const; private: @@ -179,7 +181,7 @@ private: * Constraint matrices containing information regarding potential * periodic boundary conditions for each level . */ - std::vector level_constraints; + std::vector> level_constraints; }; @@ -376,7 +378,7 @@ MGConstrainedDoFs::have_boundary_indices() const -inline const ConstraintMatrix & +inline const AffineConstraints & MGConstrainedDoFs::get_level_constraint_matrix(const unsigned int level) const { AssertIndexRange(level, level_constraints.size()); diff --git a/include/deal.II/multigrid/mg_transfer.h b/include/deal.II/multigrid/mg_transfer.h index 2dbcfee7a2..dcd6a2e621 100644 --- a/include/deal.II/multigrid/mg_transfer.h +++ b/include/deal.II/multigrid/mg_transfer.h @@ -22,9 +22,9 @@ #include +#include #include #include -#include #include #include #include @@ -646,8 +646,8 @@ public: * @deprecated @p constraints is unused. */ DEAL_II_DEPRECATED - MGTransferPrebuilt(const ConstraintMatrix & constraints, - const MGConstrainedDoFs &mg_constrained_dofs); + MGTransferPrebuilt(const AffineConstraints &constraints, + const MGConstrainedDoFs & mg_constrained_dofs); /** * Destructor. @@ -667,8 +667,8 @@ public: */ DEAL_II_DEPRECATED void - initialize_constraints(const ConstraintMatrix & constraints, - const MGConstrainedDoFs &mg_constrained_dofs); + initialize_constraints(const AffineConstraints &constraints, + const MGConstrainedDoFs & mg_constrained_dofs); /** * Reset the object to the state it had right after the default constructor. diff --git a/include/deal.II/multigrid/mg_transfer_block.h b/include/deal.II/multigrid/mg_transfer_block.h index 3ec899a49b..7854cd721d 100644 --- a/include/deal.II/multigrid/mg_transfer_block.h +++ b/include/deal.II/multigrid/mg_transfer_block.h @@ -77,8 +77,8 @@ public: * @deprecated @p constraints is unused. */ DEAL_II_DEPRECATED - MGTransferBlockBase(const ConstraintMatrix & constraints, - const MGConstrainedDoFs &mg_constrained_dofs); + MGTransferBlockBase(const AffineConstraints &constraints, + const MGConstrainedDoFs & mg_constrained_dofs); /** * Memory used by this object. @@ -329,8 +329,8 @@ public: * @deprecated @p constraints is unused. */ DEAL_II_DEPRECATED - MGTransferBlockSelect(const ConstraintMatrix & constraints, - const MGConstrainedDoFs &mg_constrained_dofs); + MGTransferBlockSelect(const AffineConstraints &constraints, + const MGConstrainedDoFs & mg_constrained_dofs); /** * Destructor. diff --git a/include/deal.II/multigrid/mg_transfer_component.h b/include/deal.II/multigrid/mg_transfer_component.h index 8ce0e025fc..72904d736c 100644 --- a/include/deal.II/multigrid/mg_transfer_component.h +++ b/include/deal.II/multigrid/mg_transfer_component.h @@ -186,7 +186,7 @@ public: /** * Constructor with constraint matrices. */ - MGTransferSelect(const ConstraintMatrix &constraints); + MGTransferSelect(const AffineConstraints &constraints); /** * Destructor. @@ -373,7 +373,7 @@ private: * The constraints of the global system. */ public: - SmartPointer constraints; + SmartPointer> constraints; }; /*@}*/ diff --git a/source/multigrid/mg_transfer_prebuilt.cc b/source/multigrid/mg_transfer_prebuilt.cc index 1fdc0ed803..45e69bb56e 100644 --- a/source/multigrid/mg_transfer_prebuilt.cc +++ b/source/multigrid/mg_transfer_prebuilt.cc @@ -56,7 +56,7 @@ MGTransferPrebuilt::MGTransferPrebuilt( template MGTransferPrebuilt::MGTransferPrebuilt( - const ConstraintMatrix & /*c*/, + const AffineConstraints & /*c*/, const MGConstrainedDoFs &mg_c) { this->mg_constrained_dofs = &mg_c; @@ -77,7 +77,7 @@ MGTransferPrebuilt::initialize_constraints( template void MGTransferPrebuilt::initialize_constraints( - const ConstraintMatrix & /*c*/, + const AffineConstraints & /*c*/, const MGConstrainedDoFs &mg_c) { initialize_constraints(mg_c); diff --git a/source/multigrid/multigrid.cc b/source/multigrid/multigrid.cc index e19da1f61d..c0c8105e17 100644 --- a/source/multigrid/multigrid.cc +++ b/source/multigrid/multigrid.cc @@ -48,8 +48,9 @@ MGTransferBlockBase::MGTransferBlockBase(const MGConstrainedDoFs &mg_c) : -MGTransferBlockBase::MGTransferBlockBase(const ConstraintMatrix & /*c*/, - const MGConstrainedDoFs &mg_c) : +MGTransferBlockBase::MGTransferBlockBase( + const AffineConstraints & /*c*/, + const MGConstrainedDoFs &mg_c) : n_mg_blocks(0), mg_constrained_dofs(&mg_c) {} @@ -200,7 +201,7 @@ MGTransferSelect::MGTransferSelect() : template -MGTransferSelect::MGTransferSelect(const ConstraintMatrix &c) : +MGTransferSelect::MGTransferSelect(const AffineConstraints &c) : selected_component(0), mg_selected_component(0), constraints(&c) @@ -260,7 +261,7 @@ MGTransferBlockSelect::MGTransferBlockSelect( template MGTransferBlockSelect::MGTransferBlockSelect( - const ConstraintMatrix & /*c*/, + const AffineConstraints & /*c*/, const MGConstrainedDoFs &mg_c) : MGTransferBlockBase(mg_c), selected_block(0) -- 2.39.5