#include <deal.II/base/subscriptor.h>
+#include <deal.II/lac/affine_constraints.h>
+
#include <deal.II/multigrid/mg_tools.h>
#include <set>
* 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 <int dim, int spacedim>
void
* Return the level constraint matrix for a given level, containing
* periodicity constraints (if enabled on the triangulation).
*/
- const ConstraintMatrix &
+ const AffineConstraints<double> &
get_level_constraint_matrix(const unsigned int level) const;
private:
* Constraint matrices containing information regarding potential
* periodic boundary conditions for each level .
*/
- std::vector<ConstraintMatrix> level_constraints;
+ std::vector<AffineConstraints<double>> level_constraints;
};
-inline const ConstraintMatrix &
+inline const AffineConstraints<double> &
MGConstrainedDoFs::get_level_constraint_matrix(const unsigned int level) const
{
AssertIndexRange(level, level_constraints.size());
#include <deal.II/dofs/dof_handler.h>
+#include <deal.II/lac/affine_constraints.h>
#include <deal.II/lac/block_sparsity_pattern.h>
#include <deal.II/lac/block_vector.h>
-#include <deal.II/lac/constraint_matrix.h>
#include <deal.II/lac/la_parallel_vector.h>
#include <deal.II/lac/petsc_parallel_sparse_matrix.h>
#include <deal.II/lac/petsc_parallel_vector.h>
* @deprecated @p constraints is unused.
*/
DEAL_II_DEPRECATED
- MGTransferPrebuilt(const ConstraintMatrix & constraints,
- const MGConstrainedDoFs &mg_constrained_dofs);
+ MGTransferPrebuilt(const AffineConstraints<double> &constraints,
+ const MGConstrainedDoFs & mg_constrained_dofs);
/**
* Destructor.
*/
DEAL_II_DEPRECATED
void
- initialize_constraints(const ConstraintMatrix & constraints,
- const MGConstrainedDoFs &mg_constrained_dofs);
+ initialize_constraints(const AffineConstraints<double> &constraints,
+ const MGConstrainedDoFs & mg_constrained_dofs);
/**
* Reset the object to the state it had right after the default constructor.
* @deprecated @p constraints is unused.
*/
DEAL_II_DEPRECATED
- MGTransferBlockBase(const ConstraintMatrix & constraints,
- const MGConstrainedDoFs &mg_constrained_dofs);
+ MGTransferBlockBase(const AffineConstraints<double> &constraints,
+ const MGConstrainedDoFs & mg_constrained_dofs);
/**
* Memory used by this object.
* @deprecated @p constraints is unused.
*/
DEAL_II_DEPRECATED
- MGTransferBlockSelect(const ConstraintMatrix & constraints,
- const MGConstrainedDoFs &mg_constrained_dofs);
+ MGTransferBlockSelect(const AffineConstraints<double> &constraints,
+ const MGConstrainedDoFs & mg_constrained_dofs);
/**
* Destructor.
/**
* Constructor with constraint matrices.
*/
- MGTransferSelect(const ConstraintMatrix &constraints);
+ MGTransferSelect(const AffineConstraints<double> &constraints);
/**
* Destructor.
* The constraints of the global system.
*/
public:
- SmartPointer<const ConstraintMatrix> constraints;
+ SmartPointer<const AffineConstraints<double>> constraints;
};
/*@}*/
template <typename VectorType>
MGTransferPrebuilt<VectorType>::MGTransferPrebuilt(
- const ConstraintMatrix & /*c*/,
+ const AffineConstraints<double> & /*c*/,
const MGConstrainedDoFs &mg_c)
{
this->mg_constrained_dofs = &mg_c;
template <typename VectorType>
void
MGTransferPrebuilt<VectorType>::initialize_constraints(
- const ConstraintMatrix & /*c*/,
+ const AffineConstraints<double> & /*c*/,
const MGConstrainedDoFs &mg_c)
{
initialize_constraints(mg_c);
-MGTransferBlockBase::MGTransferBlockBase(const ConstraintMatrix & /*c*/,
- const MGConstrainedDoFs &mg_c) :
+MGTransferBlockBase::MGTransferBlockBase(
+ const AffineConstraints<double> & /*c*/,
+ const MGConstrainedDoFs &mg_c) :
n_mg_blocks(0),
mg_constrained_dofs(&mg_c)
{}
template <typename number>
-MGTransferSelect<number>::MGTransferSelect(const ConstraintMatrix &c) :
+MGTransferSelect<number>::MGTransferSelect(const AffineConstraints<double> &c) :
selected_component(0),
mg_selected_component(0),
constraints(&c)
template <typename number>
MGTransferBlockSelect<number>::MGTransferBlockSelect(
- const ConstraintMatrix & /*c*/,
+ const AffineConstraints<double> & /*c*/,
const MGConstrainedDoFs &mg_c) :
MGTransferBlockBase(mg_c),
selected_block(0)