class DoFHandler;
template <int dim>
class FiniteElementData;
-class ConstraintMatrix;
+template <typename number>
+class AffineConstraints;
* course Q1 on each cell.
*
* For this case (continuous elements on grids with hanging nodes), please
- * use the @p interpolate() function with an additional ConstraintMatrix
- * argument, see below, or make the field conforming yourself by calling the
- * @p distribute function of your hanging node constraints object.
+ * use the @p interpolate() function with an additional AffineConstraints
+ * object as argument, see below, or make the field conforming yourself
+ * by calling the @p distribute function of your hanging node constraints
+ * object.
*/
template <int dim,
int spacedim,
class InVector,
class OutVector>
void
- interpolate(const DoFHandlerType1<dim, spacedim> &dof1,
- const InVector & u1,
- const DoFHandlerType2<dim, spacedim> &dof2,
- const ConstraintMatrix & constraints,
- OutVector & u2);
+ interpolate(
+ const DoFHandlerType1<dim, spacedim> & dof1,
+ const InVector & u1,
+ const DoFHandlerType2<dim, spacedim> & dof2,
+ const AffineConstraints<typename OutVector::value_type> &constraints,
+ OutVector & u2);
/**
* Compute the interpolation of the @p fe1-function @p u1 to a @p
*
* Note, that this function does not work on continuous elements at hanging
* nodes. For that case use the @p back_interpolate function, below, that
- * takes an additional @p ConstraintMatrix object.
+ * takes an additional @p AffineConstraints object.
*
* @p dof1 might be a DoFHandler or a hp::DoFHandler onject.
*
*/
template <int dim, class InVector, class OutVector, int spacedim>
void
- back_interpolate(const DoFHandler<dim, spacedim> &dof1,
- const ConstraintMatrix & constraints1,
- const InVector & u1,
- const DoFHandler<dim, spacedim> &dof2,
- const ConstraintMatrix & constraints2,
- OutVector & u1_interpolated);
+ back_interpolate(
+ const DoFHandler<dim, spacedim> & dof1,
+ const AffineConstraints<typename OutVector::value_type> &constraints1,
+ const InVector & u1,
+ const DoFHandler<dim, spacedim> & dof2,
+ const AffineConstraints<typename OutVector::value_type> &constraints2,
+ OutVector & u1_interpolated);
/**
* Compute $(Id-I_h)z_1$ for a given @p dof1-function $z_1$, where $I_h$ is
*
* Note, that this function does not work for continuous elements at hanging
* nodes. For that case use the @p interpolation_difference function, below,
- * that takes an additional @p ConstraintMatrix object.
+ * that takes an additional @p AffineConstraints object.
*/
template <int dim, class InVector, class OutVector, int spacedim>
void
*/
template <int dim, class InVector, class OutVector, int spacedim>
void
- interpolation_difference(const DoFHandler<dim, spacedim> &dof1,
- const ConstraintMatrix & constraints1,
- const InVector & z1,
- const DoFHandler<dim, spacedim> &dof2,
- const ConstraintMatrix & constraints2,
- OutVector & z1_difference);
+ interpolation_difference(
+ const DoFHandler<dim, spacedim> & dof1,
+ const AffineConstraints<typename OutVector::value_type> &constraints1,
+ const InVector & z1,
+ const DoFHandler<dim, spacedim> & dof2,
+ const AffineConstraints<typename OutVector::value_type> &constraints2,
+ OutVector & z1_difference);
* @note The resulting field does not satisfy continuity requirements of the
* given finite elements if the algorithm outlined above is used. When you
* use continuous elements on grids with hanging nodes, please use the @p
- * extrapolate function with an additional ConstraintMatrix argument, see
+ * extrapolate function with an additional AffineConstraints argument, see
* below.
*
* @note Since this function operates on patches of cells, it requires that
*/
template <int dim, class InVector, class OutVector, int spacedim>
void
- extrapolate(const DoFHandler<dim, spacedim> &dof1,
- const InVector & z1,
- const DoFHandler<dim, spacedim> &dof2,
- const ConstraintMatrix & constraints,
- OutVector & z2);
+ extrapolate(
+ const DoFHandler<dim, spacedim> & dof1,
+ const InVector & z1,
+ const DoFHandler<dim, spacedim> & dof2,
+ const AffineConstraints<typename OutVector::value_type> &constraints,
+ OutVector & z2);
//@}
/**
<< "You are using continuous elements on a grid with "
<< "hanging nodes but without providing hanging node "
<< "constraints. Use the respective function with "
- << "additional ConstraintMatrix argument(s), instead."
+ << "additional AffineConstraints argument(s), instead."
<< (arg1 ? "" : ""));
/**
* You need at least two grid levels.
#include <deal.II/hp/dof_handler.h>
+#include <deal.II/lac/affine_constraints.h>
#include <deal.II/lac/block_vector.h>
-#include <deal.II/lac/constraint_matrix.h>
#include <deal.II/lac/la_parallel_block_vector.h>
#include <deal.II/lac/la_parallel_vector.h>
#include <deal.II/lac/la_vector.h>
const DoFHandlerType2<dim, spacedim> &dof2,
OutVector & u2)
{
- ConstraintMatrix dummy;
+ AffineConstraints<typename OutVector::value_type> dummy;
dummy.close();
interpolate(dof1, u1, dof2, dummy, u2);
}
class InVector,
class OutVector>
void
- interpolate(const DoFHandlerType1<dim, spacedim> &dof1,
- const InVector & u1,
- const DoFHandlerType2<dim, spacedim> &dof2,
- const ConstraintMatrix & constraints,
- OutVector & u2)
+ interpolate(
+ const DoFHandlerType1<dim, spacedim> & dof1,
+ const InVector & u1,
+ const DoFHandlerType2<dim, spacedim> & dof2,
+ const AffineConstraints<typename OutVector::value_type> &constraints,
+ OutVector & u2)
{
Assert(&dof1.get_triangulation() == &dof2.get_triangulation(),
ExcTriangulationMismatch());
if ((cell->subdomain_id() == subdomain_id) ||
(subdomain_id == numbers::invalid_subdomain_id))
{
- // For continuous elements on
- // grids with hanging nodes we
- // need hanging node
- // constraints. Consequently,
- // when the elements are
- // continuous no hanging node
- // constraints are allowed.
+ // For continuous elements on grids with hanging nodes we need
+ // hanging node constraints. Consequently, when the elements are
+ // continuous no hanging node constraints are allowed.
const bool hanging_nodes_not_allowed =
(cell->get_fe().dofs_per_vertex != 0) || (fe2.dofs_per_vertex != 0);
const unsigned int dofs_per_cell1 = cell->get_fe().dofs_per_cell;
- // make sure back_interpolation
- // matrix is available
+ // make sure back_interpolation matrix is available
if (interpolation_matrices[&cell->get_fe()] == nullptr)
{
interpolation_matrices[&cell->get_fe()] =
{
template <int dim, int spacedim, class InVector>
void
- back_interpolate(const DoFHandler<dim, spacedim> &dof1,
- const ConstraintMatrix & constraints1,
- const InVector & u1,
- const DoFHandler<dim, spacedim> &dof2,
- const ConstraintMatrix & constraints2,
- InVector & u1_interpolated)
+ back_interpolate(
+ const DoFHandler<dim, spacedim> & dof1,
+ const AffineConstraints<typename InVector::value_type> &constraints1,
+ const InVector & u1,
+ const DoFHandler<dim, spacedim> & dof2,
+ const AffineConstraints<typename InVector::value_type> &constraints2,
+ InVector & u1_interpolated)
{
Vector<typename InVector::value_type> u2(dof2.n_dofs());
interpolate(dof1, u1, dof2, constraints2, u2);
#ifdef DEAL_II_WITH_PETSC
template <int dim, int spacedim>
void
- back_interpolate(const DoFHandler<dim, spacedim> & dof1,
- const ConstraintMatrix & constraints1,
- const PETScWrappers::MPI::Vector &u1,
- const DoFHandler<dim, spacedim> & dof2,
- const ConstraintMatrix & constraints2,
- PETScWrappers::MPI::Vector & u1_interpolated)
+ back_interpolate(
+ const DoFHandler<dim, spacedim> &dof1,
+ const AffineConstraints<PETScWrappers::MPI::Vector::value_type>
+ & constraints1,
+ const PETScWrappers::MPI::Vector &u1,
+ const DoFHandler<dim, spacedim> & dof2,
+ const AffineConstraints<PETScWrappers::MPI::Vector::value_type>
+ & constraints2,
+ PETScWrappers::MPI::Vector &u1_interpolated)
{
// if u1 is a parallel distributed PETSc vector, we create a
// vector u2 with based on the sets of locally owned and relevant
#ifdef DEAL_II_WITH_TRILINOS
template <int dim, int spacedim>
void
- back_interpolate(const DoFHandler<dim, spacedim> & dof1,
- const ConstraintMatrix & constraints1,
- const TrilinosWrappers::MPI::Vector &u1,
- const DoFHandler<dim, spacedim> & dof2,
- const ConstraintMatrix & constraints2,
- TrilinosWrappers::MPI::Vector & u1_interpolated)
+ back_interpolate(
+ const DoFHandler<dim, spacedim> &dof1,
+ const AffineConstraints<
+ typename TrilinosWrappers::MPI::Vector::value_type> &constraints1,
+ const TrilinosWrappers::MPI::Vector & u1,
+ const DoFHandler<dim, spacedim> & dof2,
+ const AffineConstraints<
+ typename TrilinosWrappers::MPI::Vector::value_type> &constraints2,
+ TrilinosWrappers::MPI::Vector & u1_interpolated)
{
// if u1 is a parallel distributed Trilinos vector, we create a
// vector u2 with based on the sets of locally owned and relevant
void
back_interpolate(
const DoFHandler<dim, spacedim> & dof1,
- const ConstraintMatrix & constraints1,
+ const AffineConstraints<Number> & constraints1,
const LinearAlgebra::distributed::Vector<Number> &u1,
const DoFHandler<dim, spacedim> & dof2,
- const ConstraintMatrix & constraints2,
+ const AffineConstraints<Number> & constraints2,
LinearAlgebra::distributed::Vector<Number> & u1_interpolated)
{
const IndexSet &dof2_locally_owned_dofs = dof2.locally_owned_dofs();
template <int dim, class InVector, class OutVector, int spacedim>
void
- back_interpolate(const DoFHandler<dim, spacedim> &dof1,
- const ConstraintMatrix & constraints1,
- const InVector & u1,
- const DoFHandler<dim, spacedim> &dof2,
- const ConstraintMatrix & constraints2,
- OutVector & u1_interpolated)
+ back_interpolate(
+ const DoFHandler<dim, spacedim> & dof1,
+ const AffineConstraints<typename OutVector::value_type> &constraints1,
+ const InVector & u1,
+ const DoFHandler<dim, spacedim> & dof2,
+ const AffineConstraints<typename OutVector::value_type> &constraints2,
+ OutVector & u1_interpolated)
{
// For discontinuous elements without constraints take the simpler version
// of the back_interpolate function.
{
template <int dim, class InVector, class OutVector, int spacedim>
void
- interpolation_difference(const DoFHandler<dim, spacedim> &dof1,
- const ConstraintMatrix & constraints1,
- const InVector & u1,
- const DoFHandler<dim, spacedim> &dof2,
- const ConstraintMatrix & constraints2,
- OutVector & u1_difference)
+ interpolation_difference(
+ const DoFHandler<dim, spacedim> & dof1,
+ const AffineConstraints<typename OutVector::value_type> &constraints1,
+ const InVector & u1,
+ const DoFHandler<dim, spacedim> & dof2,
+ const AffineConstraints<typename OutVector::value_type> &constraints2,
+ OutVector & u1_difference)
{
back_interpolate(
dof1, constraints1, u1, dof2, constraints2, u1_difference);
#ifdef DEAL_II_WITH_TRILINOS
template <int dim, int spacedim>
void
- interpolation_difference(const DoFHandler<dim, spacedim> &dof1,
- const ConstraintMatrix & constraints1,
- const TrilinosWrappers::MPI::Vector &u1,
- const DoFHandler<dim, spacedim> & dof2,
- const ConstraintMatrix & constraints2,
- TrilinosWrappers::MPI::Vector &u1_difference)
+ interpolation_difference(
+ const DoFHandler<dim, spacedim> &dof1,
+ const AffineConstraints<TrilinosWrappers::MPI::Vector::value_type>
+ & constraints1,
+ const TrilinosWrappers::MPI::Vector &u1,
+ const DoFHandler<dim, spacedim> & dof2,
+ const AffineConstraints<TrilinosWrappers::MPI::Vector::value_type>
+ & constraints2,
+ TrilinosWrappers::MPI::Vector &u1_difference)
{
back_interpolate(
dof1, constraints1, u1, dof2, constraints2, u1_difference);
template <int dim, class InVector, class OutVector, int spacedim>
void
- interpolation_difference(const DoFHandler<dim, spacedim> &dof1,
- const ConstraintMatrix & constraints1,
- const InVector & u1,
- const DoFHandler<dim, spacedim> &dof2,
- const ConstraintMatrix & constraints2,
- OutVector & u1_difference)
+ interpolation_difference(
+ const DoFHandler<dim, spacedim> & dof1,
+ const AffineConstraints<typename OutVector::value_type> &constraints1,
+ const InVector & u1,
+ const DoFHandler<dim, spacedim> & dof2,
+ const AffineConstraints<typename OutVector::value_type> &constraints2,
+ OutVector & u1_difference)
{
// For discontinuous elements
// without constraints take the
{
namespace FETools
\{
+
#if deal_II_dimension <= deal_II_space_dimension
template void
interpolate<deal_II_dimension, deal_II_space_dimension>(
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
const Vector &,
const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
- const ConstraintMatrix &,
+ const AffineConstraints<Vector::value_type> &,
Vector &);
#endif
\}
interpolate<deal_II_dimension>(const hp::DoFHandler<deal_II_dimension> &,
const Vector<double> &,
const hp::DoFHandler<deal_II_dimension> &,
- const ConstraintMatrix &,
+ const AffineConstraints<double> &,
Vector<double> &);
template void
interpolate<deal_II_dimension>(const hp::DoFHandler<deal_II_dimension> &,
const Vector<float> &,
const hp::DoFHandler<deal_II_dimension> &,
- const ConstraintMatrix &,
+ const AffineConstraints<float> &,
Vector<float> &);
#endif
\}
VEC &);
template void
- back_interpolate<deal_II_dimension>(const DoFHandler<deal_II_dimension> &,
- const ConstraintMatrix &,
- const VEC &,
- const DoFHandler<deal_II_dimension> &,
- const ConstraintMatrix &,
- VEC &);
+ back_interpolate<deal_II_dimension>(
+ const DoFHandler<deal_II_dimension> &,
+ const AffineConstraints<VEC::value_type> &,
+ const VEC &,
+ const DoFHandler<deal_II_dimension> &,
+ const AffineConstraints<VEC::value_type> &,
+ VEC &);
template void
interpolation_difference<deal_II_dimension>(
template void
interpolation_difference<deal_II_dimension>(
const DoFHandler<deal_II_dimension> &,
- const ConstraintMatrix &,
+ const AffineConstraints<VEC::value_type> &,
const VEC &,
const DoFHandler<deal_II_dimension> &,
- const ConstraintMatrix &,
+ const AffineConstraints<VEC::value_type> &,
VEC &);
template void