std::vector<Vector<double>> eigenvectors;
std::vector<std::complex<double>> eigenvalues;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
unsigned int n_eigenvalues;
};
dealii::Utilities::MPI::this_mpi_process(mpi_communicator);
- dealii::Triangulation<dim> triangulation;
- dealii::DoFHandler<dim> dof_handler(triangulation);
- dealii::FE_Q<dim> fe(1);
- dealii::ConstraintMatrix constraints;
- dealii::IndexSet locally_owned_dofs;
- dealii::IndexSet locally_relevant_dofs;
+ dealii::Triangulation<dim> triangulation;
+ dealii::DoFHandler<dim> dof_handler(triangulation);
+ dealii::FE_Q<dim> fe(1);
+ dealii::AffineConstraints<double> constraints;
+ dealii::IndexSet locally_owned_dofs;
+ dealii::IndexSet locally_relevant_dofs;
std::vector<dealii::PETScWrappers::MPI::Vector> eigenfunctions;
std::vector<dealii::PETScWrappers::MPI::Vector> arpack_vectors;
Utilities::MPI::this_mpi_process(mpi_communicator);
- Triangulation<dim> triangulation;
- DoFHandler<dim> dof_handler(triangulation);
- FE_Q<dim> fe(1);
- ConstraintMatrix constraints;
- IndexSet locally_owned_dofs;
- IndexSet locally_relevant_dofs;
+ Triangulation<dim> triangulation;
+ DoFHandler<dim> dof_handler(triangulation);
+ FE_Q<dim> fe(1);
+ AffineConstraints<double> constraints;
+ IndexSet locally_owned_dofs;
+ IndexSet locally_relevant_dofs;
std::vector<TrilinosWrappers::MPI::Vector> eigenfunctions;
std::vector<TrilinosWrappers::MPI::Vector> arpack_vectors;
std::vector<Vector<double>> eigenfunctions;
std::vector<std::complex<double>> eigenvalues;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
};
std::vector<Vector<double>> eigenfunctions;
std::vector<std::complex<double>> eigenvalues;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
};
dealii::Utilities::MPI::this_mpi_process(mpi_communicator);
- dealii::Triangulation<dim> triangulation;
- dealii::DoFHandler<dim> dof_handler(triangulation);
- dealii::FE_Q<dim> fe(1);
- dealii::ConstraintMatrix constraints;
- dealii::IndexSet locally_owned_dofs;
- dealii::IndexSet locally_relevant_dofs;
+ dealii::Triangulation<dim> triangulation;
+ dealii::DoFHandler<dim> dof_handler(triangulation);
+ dealii::FE_Q<dim> fe(1);
+ dealii::AffineConstraints<double> constraints;
+ dealii::IndexSet locally_owned_dofs;
+ dealii::IndexSet locally_relevant_dofs;
std::vector<dealii::PETScWrappers::MPI::Vector> eigenfunctions;
std::vector<PetscScalar> eigenvalues;
IndexSet locally_relevant_dofs;
DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
VectorTools::interpolate_boundary_values(dof_handler,
IndexSet locally_relevant_dofs;
DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
VectorTools::interpolate_boundary_values(dof_handler,
IndexSet locally_relevant_dofs;
DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
VectorTools::interpolate_boundary_values(dof_handler,
Utilities::MPI::this_mpi_process(mpi_communicator);
- Triangulation<dim> triangulation;
- DoFHandler<dim> dof_handler(triangulation);
- FE_Q<dim> fe(1);
- ConstraintMatrix constraints;
- IndexSet locally_owned_dofs;
- IndexSet locally_relevant_dofs;
+ Triangulation<dim> triangulation;
+ DoFHandler<dim> dof_handler(triangulation);
+ FE_Q<dim> fe(1);
+ AffineConstraints<double> constraints;
+ IndexSet locally_owned_dofs;
+ IndexSet locally_relevant_dofs;
std::vector<TrilinosWrappers::MPI::Vector> eigenfunctions;
std::vector<double> eigenvalues;
DoFToolsEx::transfer(dof, sol, both_dof, both_sol);
// handle hanging nodes
- ConstraintMatrix both_constraints;
+ AffineConstraints<double> both_constraints;
DoFTools::make_hanging_node_constraints(both_dof, both_constraints);
both_constraints.close();
both_constraints.distribute(both_sol);
deallog << "n_dofs=" << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "n_dofs=" << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "n_dofs=" << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
// constraints. this should trip the
// new code using the hp constraints,
// added in late July 2006
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
for (unsigned int j = 0; j < dof.n_dofs(); ++j)
// consequently subtracting the vector from
// itself should yield zero
{
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
VectorTools::project(dh, cm, QGauss<dim>(3), fef, v2);
}
// consequently subtracting the vector from
// itself should yield zero
{
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
VectorTools::project(dh, cm, QGauss<dim>(3), fef, v2);
}
void
test();
- Triangulation<dim> triangulation;
- FE_Q<dim> fe;
- DoFHandler<dim> dof_handler;
- ConstraintMatrix hanging_node_constraints;
+ Triangulation<dim> triangulation;
+ FE_Q<dim> fe;
+ DoFHandler<dim> dof_handler;
+ AffineConstraints<double> hanging_node_constraints;
};
template <int dim>
dofh.distribute_dofs(fe);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_hanging_node_constraints(dofh, cm);
cm.close();
std::unique_ptr<Triangulation<dim>> tria(make_tria<dim>());
std::unique_ptr<DoFHandler<dim>> dof1(make_dof_handler(*tria, fe1));
std::unique_ptr<DoFHandler<dim>> dof2(make_dof_handler(*tria, fe2));
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_hanging_node_constraints(*dof2, cm);
cm.close();
std::unique_ptr<Triangulation<dim>> tria(make_tria<dim>());
std::unique_ptr<DoFHandler<dim>> dof1(make_dof_handler(*tria, fe1));
std::unique_ptr<DoFHandler<dim>> dof2(make_dof_handler(*tria, fe2));
- ConstraintMatrix cm1, cm2;
+ AffineConstraints<double> cm1, cm2;
DoFTools::make_hanging_node_constraints(*dof1, cm1);
DoFTools::make_hanging_node_constraints(*dof2, cm2);
cm1.close();
std::unique_ptr<Triangulation<dim>> tria(make_tria<dim>());
std::unique_ptr<DoFHandler<dim>> dof1(make_dof_handler(*tria, fe1));
std::unique_ptr<DoFHandler<dim>> dof2(make_dof_handler(*tria, fe2));
- ConstraintMatrix cm1, cm2;
+ AffineConstraints<double> cm1, cm2;
DoFTools::make_hanging_node_constraints(*dof1, cm1);
DoFTools::make_hanging_node_constraints(*dof2, cm2);
cm1.close();
std::unique_ptr<Triangulation<dim>> tria(make_tria<dim>());
std::unique_ptr<DoFHandler<dim>> dof1(make_dof_handler(*tria, fe1));
std::unique_ptr<DoFHandler<dim>> dof2(make_dof_handler(*tria, fe2));
- ConstraintMatrix cm1, cm2;
+ AffineConstraints<double> cm1, cm2;
DoFTools::make_hanging_node_constraints(*dof1, cm1);
DoFTools::make_hanging_node_constraints(*dof2, cm2);
cm1.close();
std::unique_ptr<Triangulation<dim>> tria(make_tria<dim>());
std::unique_ptr<DoFHandler<dim>> dof1(make_dof_handler(*tria, fe1));
std::unique_ptr<DoFHandler<dim>> dof2(make_dof_handler(*tria, fe2));
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_hanging_node_constraints(*dof2, cm);
cm.close();
// object which holds a list of
// constraints originating from
// the hanging nodes:
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
// The next step is <code>closing</code>
// this object. For this note that,
// in principle, the
- // <code>ConstraintMatrix</code> class can
+ // <code>AffineConstraints<double></code> class can
// hold other constraints as well,
// i.e. constraints that do not
// stem from hanging
// nodes. Sometimes, it is useful
// to use such constraints, in
// which case they may be added to
- // the <code>ConstraintMatrix</code> object
+ // the <code>AffineConstraints<double></code> object
// after the hanging node
// constraints were computed. After
// all constraints have been added,
0,
Functions::ConstantFunction<dim>(1.),
boundary_values);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.clear();
DoFTools::make_zero_boundary_constraints(dof_handler, constraints);
constraints.close();
1,
Functions::ConstantFunction<dim>(1.),
boundary_values);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.clear();
DoFTools::make_zero_boundary_constraints(dof_handler, 1, constraints);
constraints.close();
// DoFRenumbering::component_wise(dof_handler);
deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
FEValuesExtractors::Vector velocities(1);
ComponentMask mask = fe.component_mask(velocities);
DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(fe);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_periodicity_constraints(dof_handler.begin(0)->face(0),
(++dof_handler.begin(0))->face(1),
cm);
DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(fe);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_periodicity_constraints(dof_handler.begin(0)->face(0),
(++dof_handler.begin(0))->face(1),
cm);
DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(fe);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_periodicity_constraints(dof_handler.begin(0)->face(0),
(++dof_handler.begin(0))->face(1),
cm);
std::vector<bool> mask(2, true);
mask[1] = false;
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_periodicity_constraints(dof_handler.begin(0)->face(0),
(++dof_handler.begin(0))->face(1),
cm,
void
setup_system();
- Triangulation<2> triangulation;
- FE_Q<2> fe;
- DoFHandler<2> dof_handler;
- ConstraintMatrix constraints;
+ Triangulation<2> triangulation;
+ FE_Q<2> fe;
+ DoFHandler<2> dof_handler;
+ AffineConstraints<double> constraints;
};
Deal2PeriodicBug::Deal2PeriodicBug()
using namespace dealii;
-ConstraintMatrix
+AffineConstraints<double>
make_constraint_matrix(const DoFHandler<2> &dof_handler, int version)
{
- constexpr int dim = 2;
- ConstraintMatrix constraints;
+ constexpr int dim = 2;
+ AffineConstraints<double> constraints;
constraints.clear();
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(fe);
- std::vector<ConstraintMatrix> constraints(8);
+ std::vector<AffineConstraints<double>> constraints(8);
PeriodicReference<dim> periodic_function;
using namespace dealii;
-ConstraintMatrix
+AffineConstraints<double>
make_constraint_matrix(const DoFHandler<3> &dof_handler, int version)
{
constexpr int dim = 3;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.clear();
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(fe);
- std::vector<ConstraintMatrix> constraints(4);
+ std::vector<AffineConstraints<double>> constraints(4);
PeriodicReference<dim> periodic_function;
Triangulation<dim> tria;
GridGenerator::hyper_cube(tria);
tria.refine_global(5 - dim);
- FE_Q<dim> fe_q(1);
- FE_DGQ<dim> fe_dgq(1);
- DoFHandler<dim> q_dof_handler(tria);
- DoFHandler<dim> dgq_dof_handler(tria);
- Vector<double> q_solution;
- Vector<double> dgq_solution;
- MappingQGeneric<dim> mapping(1);
- DataOut<dim> q_data_out, dgq_data_out;
- ConstraintMatrix cm;
+ FE_Q<dim> fe_q(1);
+ FE_DGQ<dim> fe_dgq(1);
+ DoFHandler<dim> q_dof_handler(tria);
+ DoFHandler<dim> dgq_dof_handler(tria);
+ Vector<double> q_solution;
+ Vector<double> dgq_solution;
+ MappingQGeneric<dim> mapping(1);
+ DataOut<dim> q_data_out, dgq_data_out;
+ AffineConstraints<double> cm;
cm.close();
q_dof_handler.distribute_dofs(fe_q);
void
process_solution(const unsigned int cycle);
- Triangulation<dim> triangulation;
- FE_Q<dim> fe;
- DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
- SparsityPattern sparsity_pattern;
- SparseMatrix<double> system_matrix;
- Vector<double> solution;
- Vector<double> system_rhs;
-
- FE_TraceQ<dim> fe_trace;
- DoFHandler<dim> dof_handler_trace;
- ConstraintMatrix constraints_trace;
- SparsityPattern sparsity_pattern_trace;
- SparseMatrix<double> system_matrix_trace;
- Vector<double> solution_trace_full;
- Vector<double> solution_trace;
- Vector<double> system_rhs_trace;
+ Triangulation<dim> triangulation;
+ FE_Q<dim> fe;
+ DoFHandler<dim> dof_handler;
+ AffineConstraints<double> constraints;
+ SparsityPattern sparsity_pattern;
+ SparseMatrix<double> system_matrix;
+ Vector<double> solution;
+ Vector<double> system_rhs;
+
+ FE_TraceQ<dim> fe_trace;
+ DoFHandler<dim> dof_handler_trace;
+ AffineConstraints<double> constraints_trace;
+ SparsityPattern sparsity_pattern_trace;
+ SparseMatrix<double> system_matrix_trace;
+ Vector<double> solution_trace_full;
+ Vector<double> solution_trace;
+ Vector<double> system_rhs_trace;
const RefinementMode refinement_mode;
DoFHandler<dim> dof_handler;
MappingQ<dim> mapping;
- SparsityPattern sparsity_pattern;
- SparseMatrix<double> system_matrix;
- ConstraintMatrix mean_value_constraints;
+ SparsityPattern sparsity_pattern;
+ SparseMatrix<double> system_matrix;
+ AffineConstraints<double> mean_value_constraints;
Vector<double> solution;
Vector<double> system_rhs;
void
solve(Vector<double> &solution) const;
- ConstraintMatrix hanging_node_constraints;
- SparsityPattern sparsity_pattern;
- SparseMatrix<double> matrix;
- Vector<double> rhs;
+ AffineConstraints<double> hanging_node_constraints;
+ SparsityPattern sparsity_pattern;
+ SparseMatrix<double> matrix;
+ Vector<double> rhs;
};
void
{
hanging_node_constraints.clear();
- void (*mhnc_p)(const DoFHandler<dim> &, ConstraintMatrix &) =
+ void (*mhnc_p)(const DoFHandler<dim> &, AffineConstraints<double> &) =
&DoFTools::make_hanging_node_constraints;
Threads::Thread<> mhnc_thread =
void
solve(Vector<double> &solution) const;
- ConstraintMatrix hanging_node_constraints;
- SparsityPattern sparsity_pattern;
- SparseMatrix<double> matrix;
- Vector<double> rhs;
+ AffineConstraints<double> hanging_node_constraints;
+ SparsityPattern sparsity_pattern;
+ SparseMatrix<double> matrix;
+ Vector<double> rhs;
};
void
{
hanging_node_constraints.clear();
- void (*mhnc_p)(const DoFHandler<dim> &, ConstraintMatrix &) =
+ void (*mhnc_p)(const DoFHandler<dim> &, AffineConstraints<double> &) =
&DoFTools::make_hanging_node_constraints;
Threads::Thread<> mhnc_thread =
const PrimalSolver<dim> &primal_solver = *this;
const DualSolver<dim> & dual_solver = *this;
- ConstraintMatrix primal_hanging_node_constraints;
+ AffineConstraints<double> primal_hanging_node_constraints;
DoFTools::make_hanging_node_constraints(primal_solver.dof_handler,
primal_hanging_node_constraints);
primal_hanging_node_constraints.close();
const PrimalSolver<dim> &primal_solver = *this;
const DualSolver<dim> & dual_solver = *this;
- ConstraintMatrix dual_hanging_node_constraints;
+ AffineConstraints<double> dual_hanging_node_constraints;
DoFTools::make_hanging_node_constraints(dual_solver.dof_handler,
dual_hanging_node_constraints);
dual_hanging_node_constraints.close();
dual_hanging_node_constraints,
primal_solution);
- ConstraintMatrix primal_hanging_node_constraints;
+ AffineConstraints<double> primal_hanging_node_constraints;
DoFTools::make_hanging_node_constraints(primal_solver.dof_handler,
primal_hanging_node_constraints);
primal_hanging_node_constraints.close();
DoFHandler<dim> dof_handler_u_post;
Vector<double> solution_u_post;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
DoFHandler<dim> dof_handler_u_post;
Vector<double> solution_u_post;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
DoFHandler<dim> dof_handler;
FE_Q<dim> fe;
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
DoFHandler<dim> dof_handler;
FE_Q<dim> fe;
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
DoFHandler<dim> dof_handler;
FE_Q<dim> fe;
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
SmartPointer<const FiniteElement<dim>> fe;
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
FESystem<dim> fe;
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
exp[2] = 0;
Functions::Monomial<spacedim> monomial(exp);
- const QGauss<dim> quad(5);
- ConstraintMatrix constraints;
+ const QGauss<dim> quad(5);
+ AffineConstraints<double> constraints;
constraints.close();
VectorTools::project(dof_handler, constraints, quad, monomial, projected_one);
// exp[2]=0;
// Functions::Monomial<spacedim> the_function(exp);
- const QGauss<dim> quad(2 * fe.degree + 1);
- ConstraintMatrix constraints;
+ const QGauss<dim> quad(2 * fe.degree + 1);
+ AffineConstraints<double> constraints;
constraints.close();
VectorTools::project(
mapping, dof_handler, constraints, quad, the_function, projected_one);
/*****************************************************************/
FE_Q<dim, spacedim> fe(1);
DoFHandler<dim, spacedim> dh(boundary_mesh);
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
dh.distribute_dofs(fe);
hanging_node_constraints.clear();
Functions::CosineFunction<spacedim> cosine;
QGauss<dim> quad(5);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
VectorTools::project(dof_handler, constraints, quad, cosine, projected_one);
Functions::CosineFunction<spacedim> cosine;
QGauss<dim> quad(5);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
VectorTools::project(
dof_handler, constraints, quad, cosine, interpolated_one);
template <int dim, int fe_degree, typename Number, int n_q_points_1d>
void
-do_test(const DoFHandler<dim> &dof, const ConstraintMatrix &constraints)
+do_test(const DoFHandler<dim> & dof,
+ const AffineConstraints<double> &constraints)
{
deallog << "Testing " << dof.get_fe().get_name() << std::endl;
FESystem<dim> fe;
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
DoFHandler<dim> dof_handler;
FE_Q<dim> fe;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
const unsigned int degree = fe.degree;
system_matrix = 0;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
FEValues<dim> fe_values(fe,
quadrature_formula,
dof_handler.distribute_dofs(fe);
deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "Number of constraints: " << constraints.n_constraints()
dof_handler.distribute_dofs(fe);
deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "Number of constraints: " << constraints.n_constraints()
dof_handler.distribute_dofs(fe);
deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "Number of constraints: " << constraints.n_constraints()
dof_handler.distribute_dofs(fe);
deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "Number of constraints: " << constraints.n_constraints()
dof_handler.distribute_dofs(fe);
deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "Number of constraints: " << constraints.n_constraints()
dof_handler.distribute_dofs(fe);
deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "Number of constraints: " << constraints.n_constraints()
dof_handler.distribute_dofs(fe);
deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "Number of constraints: " << constraints.n_constraints()
dof_handler.distribute_dofs(fe);
deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "Number of constraints: " << constraints.n_constraints()
dof_handler.distribute_dofs(fe);
deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "Number of constraints: " << constraints.n_constraints()
dof_handler.distribute_dofs(fe);
deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "Number of constraints: " << constraints.n_constraints()
dof_handler.distribute_dofs(fe);
deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "Number of constraints: " << constraints.n_constraints()
dof_handler.distribute_dofs(fe);
deallog << "Number of dofs: " << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "Number of constraints: " << constraints.n_constraints()
// computing constraints
deallog << " Computing constraints..." << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(*dof, constraints);
constraints.close();
constraints.condense(sparsity);
// DoFTools::
// make_sparsity_pattern (const DoFHandler<dim> &,
// SparsityPattern &,
-// ConstraintMatrix,
+// AffineConstraints<double>,
// true);
void
check_this(const DoFHandler<dim> &dof_handler)
{
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_hanging_node_constraints(dof_handler, cm);
cm.close();
// DoFTools::
// make_sparsity_pattern (const DoFHandler<dim> &,
// SparsityPattern &,
-// ConstraintMatrix,
+// AffineConstraints<double>,
// true);
void
check_this(const DoFHandler<dim> &dof_handler)
{
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_hanging_node_constraints(dof_handler, cm);
cm.close();
// pass a subdomain id; note that
// the framework sets the subdomain
// id to the level of each cell
- DoFTools::make_sparsity_pattern(dof_handler, sp, ConstraintMatrix(), true, 2);
+ DoFTools::make_sparsity_pattern(
+ dof_handler, sp, AffineConstraints<double>(), true, 2);
sp.compress();
// write out 10 lines of this
// make_sparsity_pattern (const DoFHandler<dim> &,
// std::vector<std::vector<bool> > &,
// SparsityPattern &,
-// ConstraintMatrix,
+// AffineConstraints<double>,
// true);
for (unsigned int i = 0; i < n_components; ++i)
mask[i][i] = mask[i][n_components - i - 1] = DoFTools::always;
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_hanging_node_constraints(dof_handler, cm);
cm.close();
// make_sparsity_pattern (const DoFHandler<dim> &,
// Table<2,DoFTools::Coupling> &,
// SparsityPattern &,
-// ConstraintMatrix,
+// AffineConstraints<double>,
// true);
for (unsigned int i = 0; i < n_components; ++i)
mask[i][i] = mask[i][n_components - i - 1] = DoFTools::always;
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_hanging_node_constraints(dof_handler, cm);
cm.close();
// the framework sets the subdomain
// id to the level of each cell
DoFTools::make_sparsity_pattern(
- dof_handler, mask, sp, ConstraintMatrix(), true, 2);
+ dof_handler, mask, sp, AffineConstraints<double>(), true, 2);
sp.compress();
// write out 10 lines of this
// check
// DoFTools::
// make_hanging_node_constraints (const DoFHandler<dim> &,
-// ConstraintMatrix &);
+// AffineConstraints<double> &);
if (dof_handler.get_fe().constraints_are_implemented() == false)
return;
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_hanging_node_constraints(dof_handler, cm);
cm.close();
std::vector<bool> hanging_node_dofs(n_dofs);
DoFTools::extract_hanging_node_dofs(dof_handler, hanging_node_dofs);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
std::vector<bool> is_hanging_node_constrained(n_dofs);
DoFTools::extract_hanging_node_dofs(dof_handler, is_hanging_node_constrained);
- ConstraintMatrix constraints(locally_relevant_dofs);
+ AffineConstraints<double> constraints(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
// DoFTools::
// make_flux_sparsity_pattern (const DoFHandler<dim> &,
// SparsityPattern &,
-// ConstraintMatrix &);
+// AffineConstraints<double> &);
// this used to fail at one point because we forgot that in 1d
// neighboring cells can be more than one level apart. with
// FE_DGQ(0) elements, we get the following mesh and DoF indices:
// create sparsity pattern
SparsityPattern sp(dof_handler.n_dofs(),
dof_handler.max_couplings_between_dofs() * 2);
- DoFTools::make_flux_sparsity_pattern(dof_handler, sp, ConstraintMatrix());
+ DoFTools::make_flux_sparsity_pattern(dof_handler,
+ sp,
+ AffineConstraints<double>());
sp.compress();
// write out 20 lines of this
// check
// DoFTools::
// make_hanging_node_constraints (const DoFHandler<dim> &,
-// ConstraintMatrix &);
+// AffineConstraints<double> &);
//
// As the results of dof_tools_03 seem unclear, this test aims
// at verifying the constraints by projecting a constant function
if (dof_handler.get_fe().constraints_are_implemented() == false)
return;
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_hanging_node_constraints(dof_handler, cm);
cm.close();
// DoFTools::
// make_periodicity_constraints (const FaceIterator &,
// const FaceIterator &,
-// dealii::ConstraintMatrix &,
+// dealii::AffineConstraints<double> &,
// const std::vector<bool> &)
//
// We project an already periodic function onto the FE space of
{
Functions::CosineFunction<dim> test_func(dof_handler.get_fe().n_components());
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
// Apply periodic boundary conditions only in the one direction where
// we can match the (locally refined) faces:
// DoFTools::
// make_periodicity_constraints (const FaceIterator &,
// const FaceIterator &,
-// dealii::ConstraintMatrix &,
+// dealii::AffineConstraints<double> &,
// const std::vector<bool> &,
// bool, bool, bool)
// for correct behaviour on non standard oriented meshes.
const FiniteElement<dim> &fe = dof_handler.get_fe();
MappingQ<dim> mapping(1);
- ConstraintMatrix constraint_matrix;
- ConstraintMatrix constraint_matrix_reverse;
- std::vector<Point<dim>> support_points(dof_handler.n_dofs());
+ AffineConstraints<double> constraint_matrix;
+ AffineConstraints<double> constraint_matrix_reverse;
+ std::vector<Point<dim>> support_points(dof_handler.n_dofs());
DoFTools::map_dofs_to_support_points<dim>(mapping,
dof_handler,
support_points);
// DoFTools::
// make_periodicity_constraints (const FaceIterator &,
// const FaceIterator &,
-// dealii::ConstraintMatrix &,
+// dealii::AffineConstraints<double> &,
// const std::vector<bool> &,
// bool, bool, bool)
// for correct behaviour on non standard oriented meshes.
const FiniteElement<dim> &fe = dof_handler.get_fe();
MappingQ<dim> mapping(1);
- ConstraintMatrix constraint_matrix;
- std::vector<Point<dim>> support_points(dof_handler.n_dofs());
+ AffineConstraints<double> constraint_matrix;
+ std::vector<Point<dim>> support_points(dof_handler.n_dofs());
DoFTools::map_dofs_to_support_points<dim>(mapping,
dof_handler,
support_points);
// DoFTools::
// make_periodicity_constraints (const FaceIterator &,
// const FaceIterator &,
-// dealii::ConstraintMatrix &,
+// dealii::AffineConstraints<double> &,
// const std::vector<bool> &,
// bool, bool, bool)
// for correct behaviour on non standard oriented meshes.
const FiniteElement<dim> &fe = dof_handler.get_fe();
MappingQ<dim> mapping(1);
- ConstraintMatrix constraint_matrix;
- std::vector<Point<dim>> support_points(dof_handler.n_dofs());
+ AffineConstraints<double> constraint_matrix;
+ std::vector<Point<dim>> support_points(dof_handler.n_dofs());
DoFTools::map_dofs_to_support_points<dim>(mapping,
dof_handler,
support_points);
// DoFTools::
// make_periodicity_constraints (const FaceIterator &,
// const FaceIterator &,
-// dealii::ConstraintMatrix &,
+// dealii::AffineConstraints<double> &,
// const std::vector<bool> &,
// bool, bool, bool)
// for correct behaviour on non standard oriented meshes.
const FiniteElement<dim> &fe = dof_handler.get_fe();
MappingQ<dim> mapping(1);
- ConstraintMatrix constraint_matrix;
- std::vector<Point<dim>> support_points(dof_handler.n_dofs());
+ AffineConstraints<double> constraint_matrix;
+ std::vector<Point<dim>> support_points(dof_handler.n_dofs());
DoFTools::map_dofs_to_support_points<dim>(mapping,
dof_handler,
support_points);
// DoFTools::
// make_periodicity_constraints (const FaceIterator &,
// const FaceIterator &,
-// dealii::ConstraintMatrix &,
+// dealii::AffineConstraints<double> &,
// const std::vector<bool> &,
// bool, bool, bool)
//
const FiniteElement<dim> &fe = dof_handler.get_fe();
MappingQ<dim> mapping(1);
- ConstraintMatrix constraint_matrix;
- ConstraintMatrix constraint_matrix_reverse;
- std::vector<Point<dim>> support_points(dof_handler.n_dofs());
+ AffineConstraints<double> constraint_matrix;
+ AffineConstraints<double> constraint_matrix_reverse;
+ std::vector<Point<dim>> support_points(dof_handler.n_dofs());
DoFTools::map_dofs_to_support_points<dim>(mapping,
dof_handler,
support_points);
// This test was written by Sam Cox.
// Tests the behaviour of DoFTools::make_flux_sparsity_pattern (DoFHandler,
-// SparsityPattern, ConstraintMatrix, bool,
+// SparsityPattern, AffineConstraints<double>, bool,
// coupling, flux_coupling, subdomain_id)
#include <deal.II/base/point.h>
DoFTools::extract_locally_relevant_dofs(dh, relevant_partitioning);
// Generate hanging node constraints
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.clear();
DoFTools::make_hanging_node_constraints(dh, constraints);
constraints.close();
FE_Q<dim> fe(2);
dh.distribute_dofs(fe);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_hanging_node_constraints(dh, cm);
IndexSet support = DoFTools::extract_dofs_with_support_contained_within(
IndexSet locally_relevant_set;
DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_set);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.reinit(locally_relevant_set);
DoFTools::make_hanging_node_constraints(dh, cm);
cm.close();
FE_Q<dim> fe(2);
dh.distribute_dofs(fe);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_hanging_node_constraints(dh, cm);
IndexSet support =
IndexSet locally_relevant_set;
DoFTools::extract_locally_relevant_dofs(dh, locally_relevant_set);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.reinit(locally_relevant_set);
DoFTools::make_hanging_node_constraints(dh, cm);
cm.close();
DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
mask2.set(1, true);
mask2.set(2, true);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
DoFHandler<dim> dof_handler;
FE_Q<dim> fe;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
DoFHandler<dim> dof(tr);
dof.distribute_dofs(element);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
DoFHandler<dim> dof(tr);
dof.distribute_dofs(element);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
DoFHandler<dim> dof(tr);
dof.distribute_dofs(element);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
TestPoly<2> pol(deg);
// Project solution onto RT FE field
- ConstraintMatrix hn_constraints;
+ AffineConstraints<double> hn_constraints;
hn_constraints.clear();
DoFTools::make_hanging_node_constraints(*dof_handler, hn_constraints);
hn_constraints.close();
solution_q.reinit(dof_handler->n_dofs());
deformation.reinit(dof_handler_def->n_dofs());
- ConstraintMatrix hn_constraints_def;
+ AffineConstraints<double> hn_constraints_def;
hn_constraints_def.clear();
DoFTools::make_hanging_node_constraints(*dof_handler_def, hn_constraints_def);
hn_constraints_def.close();
hp::QCollection<dim> quadrature_collection;
hp::QCollection<dim - 1> face_quadrature_collection;
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
void
solve(Vector<double> &solution) const;
- ConstraintMatrix hanging_node_constraints;
- SparsityPattern sparsity_pattern;
- SparseMatrix<double> matrix;
- Vector<double> rhs;
+ AffineConstraints<double> hanging_node_constraints;
+ SparsityPattern sparsity_pattern;
+ SparseMatrix<double> matrix;
+ Vector<double> rhs;
};
void
{
hanging_node_constraints.clear();
- void (*mhnc_p)(const hp::DoFHandler<dim> &, ConstraintMatrix &) =
+ void (*mhnc_p)(const hp::DoFHandler<dim> &, AffineConstraints<double> &) =
&DoFTools::make_hanging_node_constraints;
Threads::Thread<> mhnc_thread =
const PrimalSolver<dim> &primal_solver = *this;
const DualSolver<dim> & dual_solver = *this;
- ConstraintMatrix primal_hanging_node_constraints;
+ AffineConstraints<double> primal_hanging_node_constraints;
DoFTools::make_hanging_node_constraints(primal_solver.dof_handler,
primal_hanging_node_constraints);
primal_hanging_node_constraints.close();
const PrimalSolver<dim> &primal_solver = *this;
const DualSolver<dim> & dual_solver = *this;
- ConstraintMatrix dual_hanging_node_constraints;
+ AffineConstraints<double> dual_hanging_node_constraints;
DoFTools::make_hanging_node_constraints(dual_solver.dof_handler,
dual_hanging_node_constraints);
dual_hanging_node_constraints.close();
dual_hanging_node_constraints,
primal_solution);
- ConstraintMatrix primal_hanging_node_constraints;
+ AffineConstraints<double> primal_hanging_node_constraints;
DoFTools::make_hanging_node_constraints(primal_solver.dof_handler,
primal_hanging_node_constraints);
primal_hanging_node_constraints.close();
hp::FECollection<dim> fe;
hp::DoFHandler<dim> dof_handler;
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> matrix;
if (dof_handler.get_fe().constraints_are_implemented() == false)
return;
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_hanging_node_constraints(dof_handler, cm);
cm.close();
deformation.reinit(dof_handler_def->n_dofs());
// Project solution onto RT FE field
- ConstraintMatrix hn_constraints;
+ AffineConstraints<double> hn_constraints;
hn_constraints.clear();
DoFTools::make_hanging_node_constraints(*dof_handler, hn_constraints);
hn_constraints.close();
*dof_handler, hn_constraints, QGauss<2>(6), TestMap1<2>(2), solution);
// Project reference solution onto RT FE field
- ConstraintMatrix hn_constraints_def;
+ AffineConstraints<double> hn_constraints_def;
hn_constraints_def.clear();
DoFTools::make_hanging_node_constraints(*dof_handler_def, hn_constraints_def);
hn_constraints_def.close();
deformation.reinit(dof_handler_def.n_dofs());
// Project solution onto RT FE field
- ConstraintMatrix hn_constraints;
+ AffineConstraints<double> hn_constraints;
hn_constraints.clear();
DoFTools::make_hanging_node_constraints(dof_handler, hn_constraints);
hn_constraints.close();
dof_handler, hn_constraints, QGauss<2>(6), TestMap1<2>(2), solution);
// Project reference solution onto RT FE field
- ConstraintMatrix hn_constraints_def;
+ AffineConstraints<double> hn_constraints_def;
hn_constraints_def.clear();
DoFTools::make_hanging_node_constraints(dof_handler_def, hn_constraints_def);
hn_constraints_def.close();
FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> matrix;
template <int dim>
void
-project(const Mapping<dim> & mapping,
- const DoFHandler<dim> & dof,
- const ConstraintMatrix &constraints,
- const Quadrature<dim> & quadrature,
- const Function<dim> & function,
- Vector<double> & vec,
- const bool enforce_zero_boundary = false,
- const Quadrature<dim - 1> & = QGauss<dim - 1>(2),
- const bool project_to_boundary_first = false)
+project(const Mapping<dim> & mapping,
+ const DoFHandler<dim> & dof,
+ const AffineConstraints<double> &constraints,
+ const Quadrature<dim> & quadrature,
+ const Function<dim> & function,
+ Vector<double> & vec,
+ const bool enforce_zero_boundary = false,
+ const Quadrature<dim - 1> & = QGauss<dim - 1>(2),
+ const bool project_to_boundary_first = false)
{
Assert(dof.get_fe().n_components() == function.n_components,
ExcInternalError());
solution = 1;
// Project solution onto FE field
- ConstraintMatrix hn_constraints;
+ AffineConstraints<double> hn_constraints;
hn_constraints.clear();
DoFTools::make_hanging_node_constraints(*dof_handler, hn_constraints);
hn_constraints.close();
template <int dim>
void
-project(const Mapping<dim> & mapping,
- const DoFHandler<dim> & dof,
- const ConstraintMatrix &constraints,
- const Quadrature<dim> & quadrature,
- const Function<dim> & function,
- Vector<double> & vec,
- const bool enforce_zero_boundary = false,
- const Quadrature<dim - 1> & = QGauss<dim - 1>(2),
- const bool project_to_boundary_first = false)
+project(const Mapping<dim> & mapping,
+ const DoFHandler<dim> & dof,
+ const AffineConstraints<double> &constraints,
+ const Quadrature<dim> & quadrature,
+ const Function<dim> & function,
+ Vector<double> & vec,
+ const bool enforce_zero_boundary = false,
+ const Quadrature<dim - 1> & = QGauss<dim - 1>(2),
+ const bool project_to_boundary_first = false)
{
Assert(dof.get_fe().n_components() == function.n_components,
ExcInternalError());
solution = 1;
// Project solution onto FE field
- ConstraintMatrix hn_constraints;
+ AffineConstraints<double> hn_constraints;
hn_constraints.clear();
DoFTools::make_hanging_node_constraints(dof_handler, hn_constraints);
hn_constraints.close();
tria.refine_global(1);
DoFHandler<dim> dof_handler(tria);
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
Functions::ZeroFunction<dim> boundary_values(fe.n_components());
VectorTools::project_boundary_values_curl_conforming(
dof_handler, 0, boundary_values, 0, constraints);
void
solve();
void
- process_solution(const unsigned int cycle);
- Triangulation<dim> triangulation;
- DoFHandler<dim> dof_handler;
- FE_Nedelec<dim> fe;
- ConstraintMatrix constraints;
- SparsityPattern sparsity_pattern;
- SparseMatrix<double> system_matrix;
- Vector<double> solution;
- Vector<double> system_rhs;
+ process_solution(const unsigned int cycle);
+ Triangulation<dim> triangulation;
+ DoFHandler<dim> dof_handler;
+ FE_Nedelec<dim> fe;
+ AffineConstraints<double> constraints;
+ SparsityPattern sparsity_pattern;
+ SparseMatrix<double> system_matrix;
+ Vector<double> solution;
+ Vector<double> system_rhs;
unsigned int p_order;
unsigned int quad_order;
template <int dim>
void
-project(const Mapping<dim> & mapping,
- const DoFHandler<dim> & dof,
- const ConstraintMatrix &constraints,
- const Quadrature<dim> & quadrature,
- const Function<dim> & function,
- Vector<double> & vec,
- const unsigned int min_convergence_steps,
- const bool enforce_zero_boundary = false,
- const Quadrature<dim - 1> & = QGauss<dim - 1>(2),
- const bool project_to_boundary_first = false)
+project(const Mapping<dim> & mapping,
+ const DoFHandler<dim> & dof,
+ const AffineConstraints<double> &constraints,
+ const Quadrature<dim> & quadrature,
+ const Function<dim> & function,
+ Vector<double> & vec,
+ const unsigned int min_convergence_steps,
+ const bool enforce_zero_boundary = false,
+ const Quadrature<dim - 1> & = QGauss<dim - 1>(2),
+ const bool project_to_boundary_first = false)
{
Assert(dof.get_fe().n_components() == function.n_components,
ExcInternalError());
Vector<double> solution(dof_handler->n_dofs());
// Project solution onto FE field
- ConstraintMatrix hn_constraints;
+ AffineConstraints<double> hn_constraints;
hn_constraints.clear();
DoFTools::make_hanging_node_constraints(*dof_handler, hn_constraints);
hn_constraints.close();
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.clear();
dealii::DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "n_cells: " << triangulation.n_active_cells() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.clear();
dealii::DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
dof_handler.distribute_dofs(fe_collection);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.clear();
dealii::DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
dof_handler.distribute_dofs(fe_collection);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.clear();
dealii::DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
std::vector<PetscScalar> eigenvalues;
PETScWrappers::MPI::SparseMatrix stiffness_matrix, mass_matrix;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
MPI_Comm mpi_communicator;
const unsigned int n_mpi_processes;
std::vector<PetscScalar> eigenvalues;
PETScWrappers::MPI::SparseMatrix stiffness_matrix, mass_matrix;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
MPI_Comm mpi_communicator;
const unsigned int n_mpi_processes;
const DoFHandler<3> & dof_handler_ref,
const Vector<double> &u_ref)
{
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
const DoFHandler<3> & dof_handler_ref,
const Vector<double> &u_ref)
{
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
unsigned int p_order;
unsigned int quad_order;
- Triangulation<dim> tria;
- DoFHandler<dim> dof_handler;
- FE_NedelecSZ<dim> fe;
- ConstraintMatrix constraints;
- SparsityPattern sparsity_pattern;
- SparseMatrix<double> system_matrix;
- Vector<double> solution;
- Vector<double> system_rhs;
+ Triangulation<dim> tria;
+ DoFHandler<dim> dof_handler;
+ FE_NedelecSZ<dim> fe;
+ AffineConstraints<double> constraints;
+ SparsityPattern sparsity_pattern;
+ SparseMatrix<double> system_matrix;
+ Vector<double> solution;
+ Vector<double> system_rhs;
};
template <int dim>
double
calcErrorHcurlNorm();
- Triangulation<dim> triangulation;
- MappingQ<dim> mapping;
- DoFHandler<dim> dof_handler;
- FE_NedelecSZ<dim> fe;
- ConstraintMatrix constraints;
- SparsityPattern sparsity_pattern;
- SparseMatrix<double> system_matrix;
- Vector<double> solution;
- Vector<double> system_rhs;
+ Triangulation<dim> triangulation;
+ MappingQ<dim> mapping;
+ DoFHandler<dim> dof_handler;
+ FE_NedelecSZ<dim> fe;
+ AffineConstraints<double> constraints;
+ SparsityPattern sparsity_pattern;
+ SparseMatrix<double> system_matrix;
+ Vector<double> solution;
+ Vector<double> system_rhs;
ConvergenceTable convergence_table;
dof_handler.distribute_dofs(fe_collection);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.clear();
dealii::DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
{
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
{
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
FESystem<dim> & fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> system_matrix;
Vector<double> function1_back(dof_handler1.n_dofs());
Vector<double> function2(dof_handler2.n_dofs());
- ConstraintMatrix constraints1;
+ AffineConstraints<double> constraints1;
DoFTools::make_hanging_node_constraints(dof_handler1, constraints1);
constraints1.close();
- ConstraintMatrix constraints2;
+ AffineConstraints<double> constraints2;
DoFTools::make_hanging_node_constraints(dof_handler2, constraints2);
constraints2.close();
QGauss<dim> cell_quadrature;
MappingQGeneric<dim> cell_mapping;
- ConstraintMatrix all_constraints;
- SparsityPattern sparsity_pattern;
- SparseMatrix<double> system_matrix;
- Vector<double> system_rhs;
- Vector<double> solution;
+ AffineConstraints<double> all_constraints;
+ SparsityPattern sparsity_pattern;
+ SparseMatrix<double> system_matrix;
+ Vector<double> system_rhs;
+ Vector<double> solution;
void
setup_dofs();
Vector<double> fe_function(dof.n_dofs());
// set the elements of the vector in such a way that the function
// equals the vector function (0,x^2)
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
VectorTools::project(dof, cm, QGauss<2>(4), F(), fe_function);
Vector<double> fe_function(dof.n_dofs());
// set the elements of the vector in such a way that the function
// equals the vector function (0,x^2)
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
VectorTools::project(dof, cm, QGauss<2>(2 + degree), F(), fe_function);
update_values | update_gradients |
update_3rd_derivatives);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
FE_Nedelec<dim> fe_ned(p);
DoFHandler<dim> dof(tr);
dof.distribute_dofs(fe_ned);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_hanging_node_constraints(dof, cm);
cm.close();
DoFHandler<3> dof(tr);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
unsigned int p_order;
unsigned int quad_order;
- Triangulation<dim> tria;
- DoFHandler<dim> dof_handler;
- FE_Nedelec<dim> fe;
- ConstraintMatrix constraints;
- SparsityPattern sparsity_pattern;
- SparseMatrix<double> system_matrix;
- Vector<double> solution;
- Vector<double> system_rhs;
+ Triangulation<dim> tria;
+ DoFHandler<dim> dof_handler;
+ FE_Nedelec<dim> fe;
+ AffineConstraints<double> constraints;
+ SparsityPattern sparsity_pattern;
+ SparseMatrix<double> system_matrix;
+ Vector<double> solution;
+ Vector<double> system_rhs;
};
template <int dim>
double
calcErrorHcurlNorm();
- Triangulation<dim> triangulation;
- MappingQ<dim> mapping;
- DoFHandler<dim> dof_handler;
- FE_Nedelec<dim> fe;
- ConstraintMatrix constraints;
- SparsityPattern sparsity_pattern;
- SparseMatrix<double> system_matrix;
- Vector<double> solution;
- Vector<double> system_rhs;
+ Triangulation<dim> triangulation;
+ MappingQ<dim> mapping;
+ DoFHandler<dim> dof_handler;
+ FE_Nedelec<dim> fe;
+ AffineConstraints<double> constraints;
+ SparsityPattern sparsity_pattern;
+ SparseMatrix<double> system_matrix;
+ Vector<double> solution;
+ Vector<double> system_rhs;
ConvergenceTable convergence_table;
TestPoly<2> pol(deg);
// Project solution onto RT FE field
- ConstraintMatrix hn_constraints;
+ AffineConstraints<double> hn_constraints;
hn_constraints.clear();
DoFTools::make_hanging_node_constraints(*dof_handler, hn_constraints);
hn_constraints.close();
solution_q.reinit(dof_handler->n_dofs());
deformation.reinit(dof_handler_def->n_dofs());
- ConstraintMatrix hn_constraints_def;
+ AffineConstraints<double> hn_constraints_def;
hn_constraints_def.clear();
DoFTools::make_hanging_node_constraints(*dof_handler_def, hn_constraints_def);
hn_constraints_def.close();
stokes_relevant_set.print(deallog.get_file_stream());
- ConstraintMatrix cm(stokes_relevant_set);
+ AffineConstraints<double> cm(stokes_relevant_set);
DoFTools::make_hanging_node_constraints(stokes_dof_handler, cm);
stokes_relevant_set.get_view(n_u, n_u + n_p));
stokes_relevant_set.print(deallog.get_file_stream());
- ConstraintMatrix cm(stokes_relevant_set);
+ AffineConstraints<double> cm(stokes_relevant_set);
DoFTools::make_hanging_node_constraints(stokes_dof_handler, cm);
locally_relevant_dofs.print(deallog);
- ConstraintMatrix constraints(locally_relevant_dofs);
+ AffineConstraints<double> constraints(locally_relevant_dofs);
constraints.close();
TrilinosWrappers::BlockSparsityPattern sp(locally_owned_partitioning,
-// block vectors: test ConstraintMatrix::distribute (fails currently)
+// block vectors: test AffineConstraints<double>::distribute (fails currently)
#include <deal.II/base/index_set.h>
// document bug in assembling a LA::MPI::SparseMatrix
-// this was due to handing a wrong IndexSet to the ConstraintMatrix
+// this was due to handing a wrong IndexSet to the AffineConstraints<double>
#include <deal.II/base/index_set.h>
if (myid == 0)
deallog << "numproc=" << numproc << std::endl;
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
parallel::distributed::Triangulation<dim> triangulation(
if (myid == 0)
deallog << "numproc=" << numproc << std::endl;
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
parallel::distributed::Triangulation<dim> triangulation(
if (myid == 0)
deallog << "numproc=" << numproc << std::endl;
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
parallel::distributed::Triangulation<dim> triangulation(
dh.distribute_dofs(fe);
DataOut<dim> d_o;
d_o.attach_dof_handler(dh);
- Vector<double> vec(dh.n_dofs());
- ConstraintMatrix constraints;
+ Vector<double> vec(dh.n_dofs());
+ AffineConstraints<double> constraints;
for (unsigned int c = 0; c < 6; ++c)
VectorTools::interpolate_boundary_values(
dh, c, Functions::ConstantFunction<dim>(c), constraints);
// now compute intergrid constraints
InterGridMap<DoFHandler<dim>> intergrid_map;
intergrid_map.make_mapping(dof_1, dof_2);
- ConstraintMatrix intergrid_constraints;
+ AffineConstraints<double> intergrid_constraints;
if (dim != 3)
{
deallog << "n_dofs=" << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
}
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
}
done:
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
void
test()
{
- Triangulation<dim> triangulation;
- hp::FECollection<dim> fe;
- hp::DoFHandler<dim> dof_handler(triangulation);
- ConstraintMatrix hanging_node_constraints;
+ Triangulation<dim> triangulation;
+ hp::FECollection<dim> fe;
+ hp::DoFHandler<dim> dof_handler(triangulation);
+ AffineConstraints<double> hanging_node_constraints;
FE_Q<dim> fe_1(1), fe_2(2), fe_3(QIterated<1>(QTrapez<1>(), 3)),
fe_4(QIterated<1>(QTrapez<1>(), 4));
}
done:
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
hp::QCollection<dim> quadrature_collection;
hp::QCollection<dim - 1> face_quadrature_collection;
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
hp::QCollection<dim> quadrature_collection;
hp::QCollection<dim - 1> face_quadrature_collection;
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
hp::QCollection<dim> quadrature_collection;
hp::QCollection<dim - 1> face_quadrature_collection;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
// not couple, so use pattern
SparsityPattern sparsity(dof.n_dofs(), dof.n_dofs());
DoFTools::make_sparsity_pattern(dof, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
// not couple, so use pattern
SparsityPattern sparsity(dof.n_dofs(), dof.n_dofs());
DoFTools::make_sparsity_pattern(dof, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
// not couple, so use pattern
SparsityPattern sparsity(dof.n_dofs(), dof.n_dofs());
DoFTools::make_sparsity_pattern(dof, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
// not couple, so use pattern
SparsityPattern sparsity(dof.n_dofs(), dof.n_dofs());
DoFTools::make_sparsity_pattern(dof, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
MappingQ<dim> mapping(3);
QGauss<dim> quadrature(6);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(
dof, 0, Functions::ConstantFunction<dim>(1., 2), constraints);
MappingQ<dim> mapping(3);
QGauss<dim> quadrature(6);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(
dof, 0, Functions::ConstantFunction<dim>(1., 2), constraints);
// not couple, so use pattern
SparsityPattern sparsity(dof.n_dofs(), dof.n_dofs());
DoFTools::make_sparsity_pattern(dof, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
// not couple, so use pattern
SparsityPattern sparsity(dof.n_dofs(), dof.n_dofs());
DoFTools::make_sparsity_pattern(dof, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
// not couple, so use pattern
SparsityPattern sparsity(dof.n_dofs(), dof.n_dofs());
DoFTools::make_sparsity_pattern(dof, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
// not couple, so use pattern
SparsityPattern sparsity(dof.n_dofs(), dof.n_dofs());
DoFTools::make_sparsity_pattern(dof, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask[dim + i][dim + j] = DoFTools::always;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
MappingQ<dim> mapping(3);
QGauss<dim> quadrature(6);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(
dof, 0, Functions::ConstantFunction<dim>(1., 2), constraints);
MappingQ<dim> mapping(3);
QGauss<dim> quadrature(6);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(
dof, 0, Functions::ConstantFunction<dim>(1., 2), constraints);
print_dofs(dof_handler.begin_active());
print_dofs(++dof_handler.begin_active());
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.clear();
dealii::DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
print_dofs(dof_handler.begin_active());
print_dofs(++dof_handler.begin_active());
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.clear();
dealii::DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
print_dofs(dof_handler.begin_active());
print_dofs(++dof_handler.begin_active());
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.clear();
dealii::DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
// .... test constraint handling
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
// .... test constraint handling
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
// .... test constraint handling
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
// .... test constraint handling
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
dof_handler.distribute_dofs(fe_collection);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
dof_handler.distribute_dofs(fe_collection);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
dof_handler.distribute_dofs(fe_collection);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
FESystem<dim> fe(FE_Q<dim>(1), 1, FE_Nothing<dim>(), 1);
DoFHandler<dim> dof_handler(tria);
- Vector<double> solution;
- ConstraintMatrix cm;
+ Vector<double> solution;
+ AffineConstraints<double> cm;
cm.close();
dof_handler.distribute_dofs(fe);
hp::FECollection<dim> fe; // used to stack several other elements together to
// form one vector-valued finite element.
- ConstraintMatrix hanging_node_constraints; // object to hold hanging node
- // constraints after refinement
- ConstraintMatrix constraints;
+ AffineConstraints<double>
+ hanging_node_constraints; // object to hold hanging node
+ // constraints after refinement
+ AffineConstraints<double> constraints;
BlockSparsityPattern sparsity_pattern; // store sparsity pattern
deallog << std::endl;
}
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
DoFTools::make_hanging_node_constraints(dof_handler,
hanging_node_constraints);
hanging_node_constraints.close();
deallog << "n_dofs=" << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "n_dofs=" << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
dof_handler.distribute_dofs(fe_collection);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.clear();
dealii::DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
}
dof_handler.distribute_dofs(fe_collection);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.clear();
dealii::DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "DoFs: " << dof_handler.n_dofs() << std::endl;
// Create the constraints.
- ConstraintMatrix constraint_matrix;
+ AffineConstraints<double> constraint_matrix;
DoFTools::make_hanging_node_constraints(dof_handler, constraint_matrix);
deallog << "DoFs: " << dof_handler.n_dofs() << std::endl;
// Create the constraints.
- ConstraintMatrix constraint_matrix;
+ AffineConstraints<double> constraint_matrix;
DoFTools::make_hanging_node_constraints(dof_handler, constraint_matrix);
// compute hanging node constraints (before and after the processing
-// we do in ConstraintMatrix::close()) for some grids with and without
+// we do in AffineConstraints<double>::close()) for some grids with and without
// random distribution of FEs
#include <deal.II/base/function.h>
void
run(bool random_p, unsigned int *indx)
{
- Triangulation<dim> triangulation;
- hp::FECollection<dim> fe;
- hp::DoFHandler<dim> dof_handler(triangulation);
- ConstraintMatrix hanging_node_constraints;
+ Triangulation<dim> triangulation;
+ hp::FECollection<dim> fe;
+ hp::DoFHandler<dim> dof_handler(triangulation);
+ AffineConstraints<double> hanging_node_constraints;
FE_Q<dim> fe_1(QIterated<1>(QTrapez<1>(), indx[0])),
fe_2(QIterated<1>(QTrapez<1>(), indx[1])),
triangulation);
}
- hp::FECollection<dim> fe;
- hp::DoFHandler<dim> dof_handler(triangulation);
- ConstraintMatrix constraints; // for boundary conditions
+ hp::FECollection<dim> fe;
+ hp::DoFHandler<dim> dof_handler(triangulation);
+ AffineConstraints<double> constraints; // for boundary conditions
// populate fe system:
hp::DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(hp_fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
hp::DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(hp_fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
hp::DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(hp_fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
Vector<double> v(dh.n_dofs());
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
VectorTools::project(
dh, cm, hp::QCollection<dim>(QGauss<dim>(3)), F<dim>(), v);
Vector<double> v(dh.n_dofs());
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
// use the implicit Q1 mapping. this will yield a zero solution
v.block(1).reinit(dh.n_dofs() - dh.n_dofs() / 2);
v.collect_sizes();
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
VectorTools::project(
dh, cm, hp::QCollection<dim>(QGauss<dim>(3)), F<dim>(), v);
dgq_dof_handler.distribute_dofs(fe_dgq);
dgq_solution.reinit(dgq_dof_handler.n_dofs());
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
VectorTools::interpolate(mapping, q_dof_handler, function, q_solution);
VectorTools::interpolate(mapping, dgq_dof_handler, function, dgq_solution);
hp::DoFHandler<dim> dof_handler(tria);
dof_handler.begin(0)->child(0)->set_active_fe_index(1);
- Vector<double> solution;
- ConstraintMatrix cm;
+ Vector<double> solution;
+ AffineConstraints<double> cm;
cm.close();
dof_handler.distribute_dofs(fe);
q_dof_handler.distribute_dofs(fe_q);
q_solution.reinit(q_dof_handler.n_dofs());
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
// interpolation is not straight forward for FE_Q_Hierarchical.
hp::DoFHandler<dim> dof_handler;
hp::MappingCollection<dim> mapping;
- SparsityPattern sparsity_pattern;
- SparseMatrix<double> system_matrix;
- ConstraintMatrix mean_value_constraints;
+ SparsityPattern sparsity_pattern;
+ SparseMatrix<double> system_matrix;
+ AffineConstraints<double> mean_value_constraints;
Vector<double> solution;
Vector<double> system_rhs;
void
solve(Vector<double> &solution) const;
- ConstraintMatrix hanging_node_constraints;
- SparsityPattern sparsity_pattern;
- SparseMatrix<double> matrix;
- Vector<double> rhs;
+ AffineConstraints<double> hanging_node_constraints;
+ SparsityPattern sparsity_pattern;
+ SparseMatrix<double> matrix;
+ Vector<double> rhs;
};
void
{
hanging_node_constraints.clear();
- void (*mhnc_p)(const hp::DoFHandler<dim> &, ConstraintMatrix &) =
+ void (*mhnc_p)(const hp::DoFHandler<dim> &, AffineConstraints<double> &) =
&DoFTools::make_hanging_node_constraints;
Threads::Thread<> mhnc_thread =
std::vector<double> ln_k;
Table<dim, std::complex<double>> fourier_coefficients;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
// Although we do not have h-refinement,
// hanging nodes will inevitably appear
// due to different polynomial degrees.
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
Vector<double> solution;
Vector<double> system_rhs;
// Although we do not have h-refinement,
// hanging nodes will inevitably appear
// due to different polynomial degrees.
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
Vector<double> solution;
Vector<double> system_rhs;
// Although we do not have h-refinement,
// hanging nodes will inevitably appear
// due to different polynomial degrees.
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
Vector<double> solution;
Vector<double> system_rhs;
// Although we do not have h-refinement,
// hanging nodes will inevitably appear
// due to different polynomial degrees.
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
Vector<double> solution;
Vector<double> system_rhs;
hp::DoFHandler<dim> dof_handler;
hp::FECollection<dim> fe;
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
SmartPointer<const hp::FECollection<dim>> fe;
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
hp::FECollection<dim> fe;
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
* Main class
*/
template <int dim>
-class MeshWorkerConstraintMatrixTest
+class MeshWorkerAffineConstraints<double> Test
{
public:
- MeshWorkerConstraintMatrixTest(const FiniteElement<dim> &fe);
- ~MeshWorkerConstraintMatrixTest();
+ MeshWorkerAffineConstraints<double>
+ Test(const FiniteElement<dim> &fe);
+ ~MeshWorkerAffineConstraints<double>
+ Test();
void
run();
Vector<double> rhs;
Vector<double> error_rhs;
- ConstraintMatrix constraintsInhom;
- ConstraintMatrix constraints;
- ConstraintMatrix constraintsAll;
+ AffineConstraints<double> constraintsInhom;
+ AffineConstraints<double> constraints;
+ AffineConstraints<double> constraintsAll;
};
template <int dim>
-MeshWorkerConstraintMatrixTest<dim>::MeshWorkerConstraintMatrixTest(
- const FiniteElement<dim> &fe)
+MeshWorkerAffineConstraints<double>
+ Test<dim>::MeshWorkerAffineConstraints<double>
+ Test(const FiniteElement<dim> &fe)
: mapping()
, dof_handler(triangulation)
, fe(fe)
template <int dim>
-MeshWorkerConstraintMatrixTest<dim>::~MeshWorkerConstraintMatrixTest()
+MeshWorkerAffineConstraints<double>
+ Test<dim>::~MeshWorkerAffineConstraints<double>
+ Test()
{
dof_handler.clear();
}
template <int dim>
-void
-MeshWorkerConstraintMatrixTest<dim>::setup_system()
+void MeshWorkerAffineConstraints<double>
+ Test<dim>::setup_system()
{
dof_handler.distribute_dofs(fe);
* Assemble with SystemSimple
*/
template <int dim>
-void
-MeshWorkerConstraintMatrixTest<dim>::assemble_system_MeshWorker()
+void MeshWorkerAffineConstraints<double>
+ Test<dim>::assemble_system_MeshWorker()
{
MeshWorker::IntegrationInfoBox<dim> info_box;
* Assemble matrix and vector separately
*/
template <int dim>
-void
-MeshWorkerConstraintMatrixTest<dim>::assemble_MeshWorker()
+void MeshWorkerAffineConstraints<double>
+ Test<dim>::assemble_MeshWorker()
{
MeshWorker::IntegrationInfoBox<dim> info_box;
template <int dim>
-void
-MeshWorkerConstraintMatrixTest<dim>::createInhomConstraints()
+void MeshWorkerAffineConstraints<double>
+ Test<dim>::createInhomConstraints()
{
this->constraintsInhom.clear();
// boundary constraints
template <int dim>
-void
-MeshWorkerConstraintMatrixTest<dim>::run()
+void MeshWorkerAffineConstraints<double>
+ Test<dim>::run()
{
setup_system();
createInhomConstraints();
FE_Q<2> fe(1);
deallog.push(fe.get_name());
- MeshWorkerConstraintMatrixTest<2> test(fe);
+ MeshWorkerAffineConstraints<double> Test<2> test(fe);
test.run();
deallog.pop();
FE_DGQ<2> fe2(1);
deallog.push(fe2.get_name());
- MeshWorkerConstraintMatrixTest<2> test2(fe2);
+ MeshWorkerAffineConstraints<double> Test<2> test2(fe2);
test2.run();
deallog.pop();
}
dof.initialize_local_block_info();
// Initialize hanging node constraints
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
// DoFTools::make_zero_boundary_constraints(dof, constraints);
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
DoFHandler<dim> dof(tr);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_zero_boundary_constraints(dof, constraints);
QGauss<dim - 1> quadrature(fe.tensor_degree() + 1);
DoFHandler<dim> dof(tr);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_zero_boundary_constraints(dof, constraints);
QGauss<dim - 1> quadrature(fe.tensor_degree() + 1);
void
refine_grid();
- Triangulation<dim> triangulation;
- FE_Q<dim> fe;
- DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
+ Triangulation<dim> triangulation;
+ FE_Q<dim> fe;
+ DoFHandler<dim> dof_handler;
+ AffineConstraints<double> constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
dof_handler.distribute_dofs(fe_collection);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_hanging_node_constraints(dof_handler, cm);
cm.write_dot(deallog.get_file_stream());
}
void
test()
{
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
// a "regular" constraint
cm.add_line(1);
void
test()
{
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.add_line(1);
constraints.add_entry(1, 2, 1.);
constraints.close();
// copy the object above
- ConstraintMatrix constraints_2;
+ AffineConstraints<double> constraints_2;
constraints_2.copy_from(constraints);
// let both objects describe themselves in string form
DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
DoFHandler<3> dof(tria);
dof.distribute_dofs(*fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
#include "../tests.h"
-// bug in ConstraintMatrix
+// bug in AffineConstraints<double>
// index=18466 line_index=652 lines_cache[line_index]=919940456 lines.size()=21
std::ifstream f(SOURCE_DIR "/constraints_01/is.23");
rel.read(f);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.clear();
cm.reinit(rel);
void
test()
{
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.add_line(1);
constraints.add_entry(1, 2, 1.);
* The interface check is simplified for this 2x2 case
*/
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
const unsigned int dofs_per_fl_msh_face = fluid_fe->dofs_per_face;
const unsigned int dofs_per_solid_face = solid_fe->dofs_per_face;
void
setup_constraints(const DoFHandler<dim> &dof_handler)
{
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.clear();
const FiniteElement<dim> &fe = dof_handler.get_fe();
void
run()
{
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
{
constraints.add_line(7);
-// test: test the ConstraintMatrix::get_lines() range object
+// test: test the AffineConstraints<double>::get_lines() range object
#include <deal.II/lac/affine_constraints.h>
void
test()
{
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
// an inhomogeneous constraint
cm.add_line(4);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix correct_constraints, library_constraints;
+ AffineConstraints<double> correct_constraints, library_constraints;
DoFTools::make_hanging_node_constraints(dof, correct_constraints);
library_constraints.merge(correct_constraints);
void
test()
{
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
// an inhomogeneous constraint
cm.add_line(4);
// this function tests the correctness of the implementation of
-// ConstraintMatrix::distribute_local_to_global for FullMatrix by comparing
-// the results with a sparse matrix. As a test case, we use a square mesh that
-// is refined once globally and then the first cell is refined adaptively.
+// AffineConstraints<double>::distribute_local_to_global for FullMatrix by
+// comparing the results with a sparse matrix. As a test case, we use a square
+// mesh that is refined once globally and then the first cell is refined
+// adaptively.
#include <deal.II/base/function.h>
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
1,
// this function tests the correctness of the implementation of
-// ConstraintMatrix::distribute_local_to_global for ChunkSparseMatrix by
-// comparing the results with a sparse matrix. As a test case, we use a square
-// mesh that is refined once globally and then the first cell is refined
+// AffineConstraints<double>::distribute_local_to_global for ChunkSparseMatrix
+// by comparing the results with a sparse matrix. As a test case, we use a
+// square mesh that is refined once globally and then the first cell is refined
// adaptively.
#include <deal.II/base/function.h>
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
1,
// this function tests the correctness of the implementation of
-// ConstraintMatrix::distribute_local_to_global for row and column indices
-// with different constraints on the rows and columns.
+// AffineConstraints<double>::distribute_local_to_global for row and column
+// indices with different constraints on the rows and columns.
#include <deal.II/base/function.h>
local(0, 1) = 2.;
local(1, 0) = -2.;
local(1, 1) = 12.;
- FullMatrix<double> global1(4, 6), global2(4, 6);
- ConstraintMatrix cm1, cm2;
+ FullMatrix<double> global1(4, 6), global2(4, 6);
+ AffineConstraints<double> cm1, cm2;
cm1.add_line(2);
cm1.add_entry(2, 1, 0.5);
cm1.add_entry(2, 3, 0.5);
void
merge_check()
{
- deallog << "Checking ConstraintMatrix::merge" << std::endl;
+ deallog << "Checking AffineConstraints<double>::merge" << std::endl;
// check twice, once with closed
// objects, once with open ones
// check that the `merge' function
// works correctly
- ConstraintMatrix c1, c2;
+ AffineConstraints<double> c1, c2;
// enter simple line
c1.add_line(0);
void
merge_check()
{
- deallog << "Checking ConstraintMatrix::merge" << std::endl;
+ deallog << "Checking AffineConstraints<double>::merge" << std::endl;
// check twice, once with closed
// objects, once with open ones
// check that the `merge' function
// works correctly
- ConstraintMatrix c1, c2;
+ AffineConstraints<double> c1, c2;
// enter simple line
c1.add_line(0);
void
merge_check()
{
- deallog << "Checking ConstraintMatrix::merge" << std::endl;
+ deallog << "Checking AffineConstraints<double>::merge" << std::endl;
// check twice, once with closed
// objects, once with open ones
// check that the `merge' function
// works correctly
- ConstraintMatrix c1, c2;
+ AffineConstraints<double> c1, c2;
// enter simple line
c1.add_line(0);
// results
try
{
- c1.merge(c2, ConstraintMatrix::no_conflicts_allowed);
+ c1.merge(c2, AffineConstraints<double>::no_conflicts_allowed);
}
catch (...)
{
void
merge_check()
{
- deallog << "Checking ConstraintMatrix::merge" << std::endl;
+ deallog << "Checking AffineConstraints<double>::merge" << std::endl;
// check twice, once with closed
// objects, once with open ones
// check that the `merge' function
// works correctly
- ConstraintMatrix c1, c2;
+ AffineConstraints<double> c1, c2;
// enter simple line
c1.add_line(0);
// results
try
{
- c1.merge(c2, ConstraintMatrix::left_object_wins);
+ c1.merge(c2, AffineConstraints<double>::left_object_wins);
}
catch (...)
{
void
merge_check()
{
- deallog << "Checking ConstraintMatrix::merge" << std::endl;
+ deallog << "Checking AffineConstraints<double>::merge" << std::endl;
// check twice, once with closed
// objects, once with open ones
// check that the `merge' function
// works correctly
- ConstraintMatrix c1, c2;
+ AffineConstraints<double> c1, c2;
// enter simple line
c1.add_line(0);
// results
try
{
- c1.merge(c2, ConstraintMatrix::right_object_wins);
+ c1.merge(c2, AffineConstraints<double>::right_object_wins);
}
catch (...)
{
void
merge_check()
{
- deallog << "Checking ConstraintMatrix::merge" << std::endl;
+ deallog << "Checking AffineConstraints<double>::merge" << std::endl;
// check twice, once with closed
// objects, once with open ones
// check that the `merge' function
// works correctly
- ConstraintMatrix c1, c2;
+ AffineConstraints<double> c1, c2;
// enter simple line
c1.add_line(0);
// results
try
{
- c1.merge(c2, ConstraintMatrix::right_object_wins);
+ c1.merge(c2, AffineConstraints<double>::right_object_wins);
}
catch (...)
{
void
merge_check()
{
- deallog << "Checking ConstraintMatrix::merge" << std::endl;
+ deallog << "Checking AffineConstraints<double>::merge" << std::endl;
// check twice, once with closed
// objects, once with open ones
// check that the `merge' function
// works correctly
- ConstraintMatrix c1, c2;
+ AffineConstraints<double> c1, c2;
// enter simple line
c1.add_line(0);
// results
try
{
- c1.merge(c2, ConstraintMatrix::right_object_wins);
+ c1.merge(c2, AffineConstraints<double>::right_object_wins);
}
catch (...)
{
void
merge_check()
{
- deallog << "Checking ConstraintMatrix::merge with localized lines"
+ deallog << "Checking AffineConstraints<double>::merge with localized lines"
<< std::endl;
// set local lines to a very large range that
// check that the `merge' function
// works correctly
- ConstraintMatrix c1(local_lines), c2(local_lines);
+ AffineConstraints<double> c1(local_lines), c2(local_lines);
// enter simple line
c1.add_line(index_0);
void
merge_check()
{
- deallog << "Checking ConstraintMatrix::merge with localized lines"
+ deallog << "Checking AffineConstraints<double>::merge with localized lines"
<< std::endl;
// set local lines to a very large range that
// check that the `merge' function
// works correctly
- ConstraintMatrix c1(local_lines), c2(local_lines);
+ AffineConstraints<double> c1(local_lines), c2(local_lines);
// enter simple line
c1.add_line(index_0);
// results
try
{
- c1.merge(c2, ConstraintMatrix::right_object_wins);
+ c1.merge(c2, AffineConstraints<double>::right_object_wins);
}
catch (...)
{
void
merge_check()
{
- deallog << "Checking ConstraintMatrix::merge with localized lines"
+ deallog << "Checking AffineConstraints<double>::merge with localized lines"
<< std::endl;
// set local lines to a very large range that
// check that the `merge' function
// works correctly
- ConstraintMatrix c1(local_lines1), c2(local_lines2);
+ AffineConstraints<double> c1(local_lines1), c2(local_lines2);
// enter simple line
c1.add_line(index_0);
// now merge the two and print the
// results
- c1.merge(c2, ConstraintMatrix::no_conflicts_allowed, true);
+ c1.merge(c2, AffineConstraints<double>::no_conflicts_allowed, true);
c1.print(deallog.get_file_stream());
};
}
-// Try to merge two empty ConstraintMatrix objects initialized with IndexSets
-// that don't match.
+// Try to merge two empty AffineConstraints<double> objects initialized with
+// IndexSets that don't match.
#include <deal.II/lac/affine_constraints.h>
void
merge_check()
{
- deallog << "Checking ConstraintMatrix::merge with localized lines"
+ deallog << "Checking AffineConstraints<double>::merge with localized lines"
<< std::endl;
// set local lines to a very large range that
local_lines2.print(deallog.get_file_stream());
// works correctly
- ConstraintMatrix c1(local_lines1), c2(local_lines2);
+ AffineConstraints<double> c1(local_lines1), c2(local_lines2);
// now merge the two and print the
// results
- c1.merge(c2, ConstraintMatrix::no_conflicts_allowed, true);
+ c1.merge(c2, AffineConstraints<double>::no_conflicts_allowed, true);
c1.print(deallog.get_file_stream());
deallog << "OK" << std::endl;
-// Merge two ConstraintMatrix objects initialized with IndexSets where entries
-// have been added in a way that local_lines extends beyond the end of the
-// IndexSet
+// Merge two AffineConstraints<double> objects initialized with IndexSets where
+// entries have been added in a way that local_lines extends beyond the end of
+// the IndexSet
#include <deal.II/lac/affine_constraints.h>
void
merge_check()
{
- deallog << "Checking ConstraintMatrix::merge with localized lines"
+ deallog << "Checking AffineConstraints<double>::merge with localized lines"
<< std::endl;
// set local lines to a very large range that surely triggers an error if
local_lines.compress();
// works correctly
- ConstraintMatrix c1(local_lines), c2(local_lines);
+ AffineConstraints<double> c1(local_lines), c2(local_lines);
for (types::global_dof_index i = 99999800; i < local_lines.size(); ++i)
if (i % 2 == 1)
c1.add_line(i);
c2.add_line(99999802);
// now merge the two and print the results
- c2.merge(c1, ConstraintMatrix::right_object_wins);
+ c2.merge(c1, AffineConstraints<double>::right_object_wins);
c2.print(deallog.get_file_stream());
deallog << "OK" << std::endl;
deallog.attach(logfile);
- ConstraintMatrix constraints;
- unsigned int IDs[] = {1, 2, 3, 5, 8, 13, 21};
- double vals[] = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0};
+ AffineConstraints<double> constraints;
+ unsigned int IDs[] = {1, 2, 3, 5, 8, 13, 21};
+ double vals[] = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0};
for (unsigned int i = 0; i < sizeof(IDs) / sizeof(IDs[0]); ++i)
{
constraints.add_line(IDs[i]);
constraints.print(deallog.get_file_stream());
deallog << std::endl;
- ConstraintMatrix cm(std::move(constraints));
+ AffineConstraints<double> cm(std::move(constraints));
cm.print(deallog.get_file_stream());
deallog << constraints.n_constraints() << std::endl << std::endl;
// ---------------------------------------------------------------------
-// test ConstraintMatrix::shift for a ConstraintMatrix object
+// test AffineConstraints<double>::shift for a AffineConstraints<double> object
// initialized with an IndexSet object
#include <deal.II/base/index_set.h>
index_set.print(deallog);
deallog
- << "Create ConstraintMatrix with constraints u(2)=.5*u(5), u(5)=.7*u(8)"
+ << "Create AffineConstraints<double> with constraints u(2)=.5*u(5), u(5)=.7*u(8)"
<< std::endl;
- dealii::ConstraintMatrix constraints1(index_set);
+ dealii::AffineConstraints<double> constraints1(index_set);
constraints1.add_line(5);
constraints1.add_entry(5, 8, .7);
constraints1.add_line(2);
constraints1.add_entry(2, 5, .5);
- dealii::ConstraintMatrix constraints2(constraints1);
+ dealii::AffineConstraints<double> constraints2(constraints1);
constraints1.print(deallog.get_file_stream());
constraints1.shift(size / 2);
constraints1.print(deallog.get_file_stream());
constraints1.merge(constraints2,
- ConstraintMatrix::no_conflicts_allowed,
+ AffineConstraints<double>::no_conflicts_allowed,
true);
deallog << "Shifted and merged constraints" << std::endl;
constraints1.print(deallog.get_file_stream());
void
test()
{
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
// a "regular" constraint
cm.add_line(1);
{
// constrain each dof to zero. this
// should yield a diagonal matrix
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
for (unsigned int i = 0; i < 5; ++i)
cm.add_line(i);
void
test()
{
- ConstraintMatrix cm1, cm2;
+ AffineConstraints<double> cm1, cm2;
// a "regular" and a singular
// constraint to each of the
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
hp::QCollection<dim> quadrature_collection;
hp::QCollection<dim - 1> face_quadrature_collection;
- ConstraintMatrix hanging_nodes_only;
- ConstraintMatrix test_all_constraints;
+ AffineConstraints<double> hanging_nodes_only;
+ AffineConstraints<double> test_all_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> reference_matrix;
void
test(bool use_inhomogeneity_for_rhs)
{
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.add_line(2);
cm.set_inhomogeneity(2, 3.0);
void
test(bool use_inhomogeneity_for_rhs)
{
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.add_line(1);
cm.set_inhomogeneity(1, -5.0);
if (use_constraint_matrix == true)
{
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.add_line(1);
cm.set_inhomogeneity(1, -5.0);
DoFHandler<dim> dof_handler;
FESystem<dim> fe;
- ConstraintMatrix hanging_nodes_only;
- ConstraintMatrix test_all_constraints;
+ AffineConstraints<double> hanging_nodes_only;
+ AffineConstraints<double> test_all_constraints;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> reference_matrix;
DoFHandler<dim> dof_handler;
FE_Q<dim> fe;
- ConstraintMatrix hanging_nodes_only;
- ConstraintMatrix test_all_constraints;
+ AffineConstraints<double> hanging_nodes_only;
+ AffineConstraints<double> test_all_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> reference_matrix;
// this function tests the correctness of the implementation of
// inhomogeneous constraints with
-// ConstraintMatrix::distribute_local_to_global operating only on a vector,
-// based on a modification of the step-5 tutorial program. It assumes
-// correctness of the function ConstraintMatrix::distribute_local_to_global
-// operating on both the matrix and vector simultaneously.
+// AffineConstraints<double>::distribute_local_to_global operating only on a
+// vector, based on a modification of the step-5 tutorial program. It assumes
+// correctness of the function
+// AffineConstraints<double>::distribute_local_to_global operating on both the
+// matrix and vector simultaneously.
#include <deal.II/base/function.h>
#include <deal.II/base/quadrature_lib.h>
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
- Vector<double> solution;
- Vector<double> system_rhs;
- ConstraintMatrix constraints;
+ Vector<double> solution;
+ Vector<double> system_rhs;
+ AffineConstraints<double> constraints;
};
template <int dim>
FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TrilinosWrappers::SparseMatrix system_matrix;
TrilinosWrappers::MPI::Vector solution;
FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
- SparsityPattern sparsity_pattern;
+ AffineConstraints<double> constraints;
+ SparsityPattern sparsity_pattern;
TrilinosWrappers::SparseMatrix system_matrix;
FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
- SparsityPattern sparsity_pattern;
+ AffineConstraints<double> constraints;
+ SparsityPattern sparsity_pattern;
TrilinosWrappers::SparseMatrix system_matrix;
block_component[1] = 1;
// Initialise
- const FESystem<dim> fe(fe_test, 1, fe_trial, 1);
- Triangulation<dim> triangulation;
- QGauss<dim> quadrature_formula(fe_trial.degree + 1);
- DoFHandler<dim> dof_handler(triangulation);
- ConstraintMatrix constraints;
+ const FESystem<dim> fe(fe_test, 1, fe_trial, 1);
+ Triangulation<dim> triangulation;
+ QGauss<dim> quadrature_formula(fe_trial.degree + 1);
+ DoFHandler<dim> dof_handler(triangulation);
+ AffineConstraints<double> constraints;
const unsigned int dofs_per_cell = fe.dofs_per_cell;
typename Triangulation<dim>::MeshSmoothing(
Triangulation<dim>::smoothing_on_refinement |
Triangulation<dim>::smoothing_on_coarsening));
- QGauss<dim> quadrature_formula(fe_trial.degree + 1);
- DoFHandler<dim> dof_handler(triangulation);
- ConstraintMatrix constraints;
+ QGauss<dim> quadrature_formula(fe_trial.degree + 1);
+ DoFHandler<dim> dof_handler(triangulation);
+ AffineConstraints<double> constraints;
const unsigned int dofs_per_cell = fe.dofs_per_cell;
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
Triangulation<dim> triangulation;
FESystem<dim> fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> system_matrix;
BlockVector<double> solution;
IndexSet locally_relevant_dofs;
DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
VectorTools::interpolate_boundary_values(dof_handler,
{
Geometry<dim> geometry;
TranscendentalManufacturedSolution<dim> fe_function;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
deallog << "FE degree: " << fe.degree << std::endl;
DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
// constraints:
- ConstraintMatrix constraints_euler;
+ AffineConstraints<double> constraints_euler;
constraints_euler.reinit(locally_relevant_dofs_euler);
DoFTools::make_hanging_node_constraints(dof_handler_euler, constraints_euler);
constraints_euler.close();
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints_euler.close();
update_values | update_gradients | update_JxW_values |
update_quadrature_points;
- ConstraintMatrix level_constraints;
- IndexSet relevant_dofs;
+ AffineConstraints<double> level_constraints;
+ IndexSet relevant_dofs;
DoFTools::extract_locally_relevant_level_dofs(dof_handler,
level,
relevant_dofs);
DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
// constraints:
- ConstraintMatrix constraints_euler;
+ AffineConstraints<double> constraints_euler;
constraints_euler.reinit(locally_relevant_dofs_euler);
DoFTools::make_hanging_node_constraints(dof_handler_euler, constraints_euler);
constraints_euler.close();
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints_euler.close();
{
MappingQ<dim> mapping(mapping_p, true);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
FE_DGQ<dim> fe(1);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
MatrixFree<dim> mf_data;
update_JxW_values | update_normal_vectors | update_jacobians;
addit_data.mapping_update_flags_faces_by_cells =
update_JxW_values | update_normal_vectors | update_jacobians;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
data.reinit(mapping, dof_handler, constraints, quad, addit_data);
FE_Q<dim> fe(2);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
FE_Q<dim> fe(1);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
FE_Q<dim> fe(1);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
FE_Q<dim> fe(1);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
tria.execute_coarsening_and_refinement();
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
MatrixFree<dim, double> mf_data;
- ConstraintMatrix constraints, constraints_u, constraints_p;
+ AffineConstraints<double> constraints, constraints_u, constraints_p;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> system_matrix;
std::vector<const DoFHandler<dim> *> dofs;
dofs.push_back(&dof_handler_u);
dofs.push_back(&dof_handler_p);
- std::vector<const ConstraintMatrix *> constraints;
+ std::vector<const AffineConstraints<double> *> constraints;
constraints.push_back(&constraints_u);
constraints.push_back(&constraints_p);
QGauss<1> quad(fe_degree + 2);
FE_DGQ<dim> fe(0);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
MappingQ<dim> mapping(fe_degree + 1);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
dof.distribute_mg_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
const QGauss<1> quad(1);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
deallog << "Testing " << dof.get_fe().get_name() << std::endl;
FE_DGQ<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
typedef double number;
FE_DGQ<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
typedef double number;
dof.distribute_dofs(*fes[i]);
MatrixFree<dim> matrix_free;
matrix_free.reinit(dof,
- ConstraintMatrix(),
+ AffineConstraints<double>(),
QGauss<1>(degree + 3),
typename MatrixFree<dim>::AdditionalData());
if (i < 2)
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
do_test<dim, fe_degree, double>(dof, constraints);
}
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
template <int dim, int fe_degree, typename number>
void
-do_test(const DoFHandler<dim> &dof, const ConstraintMatrix &constraints)
+do_test(const DoFHandler<dim> & dof,
+ const AffineConstraints<double> &constraints)
{
deallog << "Testing " << dof.get_fe().get_name() << std::endl;
// use this for info on problem
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
FE_DGQ<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
MatrixFree<dim, double> mf_data;
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
1,
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
for (unsigned int no = 0; no < dof.size(); ++no)
src[no].reinit(dof[no]->n_dofs());
- std::vector<const ConstraintMatrix *> constraints(2);
- ConstraintMatrix constraint0;
+ std::vector<const AffineConstraints<double> *> constraints(2);
+ AffineConstraints<double> constraint0;
DoFTools::make_hanging_node_constraints(*dof[0], constraint0);
constraint0.close();
constraints[0] = &constraint0;
- ConstraintMatrix constraint1;
+ AffineConstraints<double> constraint1;
DoFTools::make_hanging_node_constraints(*dof[1], constraint1);
constraint1.close();
constraints[1] = &constraint1;
for (unsigned int i = 0; i < dof.size(); ++i)
src[i].reinit(dof[i]->n_dofs());
- std::vector<const ConstraintMatrix *> constraints(3);
- ConstraintMatrix constraint0;
+ std::vector<const AffineConstraints<double> *> constraints(3);
+ AffineConstraints<double> constraint0;
DoFTools::make_hanging_node_constraints(*dof[0], constraint0);
constraint0.close();
constraints[0] = &constraint0;
- ConstraintMatrix constraint1;
+ AffineConstraints<double> constraint1;
DoFTools::make_hanging_node_constraints(*dof[1], constraint1);
constraint1.close();
constraints[1] = &constraint1;
- ConstraintMatrix constraint2;
+ AffineConstraints<double> constraint2;
DoFTools::make_hanging_node_constraints(*dof[2], constraint2);
constraint2.close();
constraints[2] = &constraint2;
template <int dim, int fe_degree, int n_q_points_1d, typename number>
void
-sub_test(const DoFHandler<dim> & dof,
- const ConstraintMatrix & constraints,
- MatrixFree<dim, number> &mf_data,
- Vector<number> & solution)
+sub_test(const DoFHandler<dim> & dof,
+ const AffineConstraints<double> &constraints,
+ MatrixFree<dim, number> & mf_data,
+ Vector<number> & solution)
{
deallog << "Test with fe_degree " << fe_degree
<< ", n_q_points_1d: " << (n_q_points_1d) << std::endl;
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
template <int dim, int fe_degree, int n_q_points_1d, typename number>
void
-sub_test(const DoFHandler<dim> & dof,
- const ConstraintMatrix & constraints,
- MatrixFree<dim, number> &mf_data,
- Vector<number> & solution)
+sub_test(const DoFHandler<dim> & dof,
+ const AffineConstraints<double> &constraints,
+ MatrixFree<dim, number> & mf_data,
+ Vector<number> & solution)
{
deallog << "Test with fe_degree " << fe_degree
<< ", n_q_points_1d: " << (n_q_points_1d) << std::endl;
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
solution_dist(i) = entry;
}
- ConstraintMatrix constraints;
- MatrixFree<dim> mf_data;
+ AffineConstraints<double> constraints;
+ MatrixFree<dim> mf_data;
{
const QGauss<1> quad(fe_degree + 1);
typename MatrixFree<dim>::AdditionalData data;
solution_dist(i) = entry;
}
- ConstraintMatrix constraints;
- MatrixFree<dim> mf_data;
+ AffineConstraints<double> constraints;
+ MatrixFree<dim> mf_data;
{
const QGaussLobatto<1> quad(fe_degree + 1);
typename MatrixFree<dim>::AdditionalData data;
template <int dim, int fe_degree, typename number>
void
-do_test(const DoFHandler<dim> &dof, const ConstraintMatrix &constraints)
+do_test(const DoFHandler<dim> & dof,
+ const AffineConstraints<double> &constraints)
{
deallog << "Testing " << dof.get_fe().get_name() << std::endl;
// std::cout << "Number of cells: " <<
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
1,
// std::cout << "Number of cells: " << tria.n_active_cells() << std::endl;
// std::cout << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
dst[4].reinit(dst[0]);
dst[5].reinit(dst[0]);
- std::vector<const ConstraintMatrix *> constraints(2);
- ConstraintMatrix constraint0;
+ std::vector<const AffineConstraints<double> *> constraints(2);
+ AffineConstraints<double> constraint0;
DoFTools::make_hanging_node_constraints(*dof[0], constraint0);
constraint0.close();
constraints[0] = &constraint0;
- ConstraintMatrix constraint1;
+ AffineConstraints<double> constraint1;
DoFTools::make_hanging_node_constraints(*dof[1], constraint1);
constraint1.close();
constraints[1] = &constraint1;
dst[4].reinit(dst[0]);
dst[5].reinit(dst[0]);
- std::vector<const ConstraintMatrix *> constraints(2);
- ConstraintMatrix constraint0;
+ std::vector<const AffineConstraints<double> *> constraints(2);
+ AffineConstraints<double> constraint0;
constraint0.close();
constraints[0] = &constraint0;
- ConstraintMatrix constraint1;
+ AffineConstraints<double> constraint1;
DoFTools::make_hanging_node_constraints(*dof[1], constraint1);
constraint1.close();
constraints[1] = &constraint1;
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
do_test<dim, fe_degree, double>(dof, constraints);
}
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
do_test<dim, fe_degree, double>(dof, constraints);
}
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
do_test<dim, -1, double>(dof, constraints);
}
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
do_test<dim, fe_degree, double>(dof, constraints);
}
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
do_test<dim, fe_degree, double>(dof, constraints);
}
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
do_test<dim, -1, double>(dof, constraints);
}
template <int dim, int fe_degree, typename number>
void
-do_test(const DoFHandler<dim> &dof, const ConstraintMatrix &constraints)
+do_test(const DoFHandler<dim> & dof,
+ const AffineConstraints<double> &constraints)
{
deallog << "Testing " << dof.get_fe().get_name() << std::endl;
// use this for info on problem
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
do_test<dim, fe_degree, double>(dof, constraints);
}
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
do_test<dim, fe_degree, double>(dof, constraints);
}
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
do_test<dim, -1, double>(dof, constraints);
}
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
do_test<dim, fe_degree, double>(dof, constraints);
}
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
do_test<dim, fe_degree, double>(dof, constraints);
}
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
do_test<dim, -1, double>(dof, constraints);
}
DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
// constraints:
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
data.tasks_parallel_scheme =
MatrixFree<dim, number>::AdditionalData::partition_color;
data.tasks_block_size = 3;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
mf_data.reinit(mapping, dof, constraints, quad, data);
}
data.tasks_parallel_scheme =
MatrixFree<dim, number>::AdditionalData::partition_color;
data.tasks_block_size = 3;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
mf_data.reinit(dof, constraints, quad, data);
}
data.tasks_parallel_scheme =
MatrixFree<dim, number>::AdditionalData::partition_color;
data.tasks_block_size = 3;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
mf_data.reinit(mapping, dof, constraints, quad, data);
}
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints_0(relevant_set), constraints_1(relevant_set);
+ AffineConstraints<double> constraints_0(relevant_set),
+ constraints_1(relevant_set);
VectorTools::interpolate_boundary_values(dof,
0,
Functions::ZeroFunction<dim>(),
mf_data_0->reinit(dof, constraints_0, quad, data);
mf_data_1->reinit(dof, constraints_1, quad, data);
{
- std::vector<const DoFHandler<dim> *> dof_handlers(2, &dof);
- std::vector<const ConstraintMatrix *> constraint(2);
+ std::vector<const DoFHandler<dim> *> dof_handlers(2, &dof);
+ std::vector<const AffineConstraints<double> *> constraint(2);
constraint[0] = &constraints_0;
constraint[1] = &constraints_1;
mf_data_combined->reinit(dof_handlers, constraint, quad, data);
FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
do_test<dim, fe_degree, double, fe_degree + 1>(dof, constraints);
FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
VectorTools::interpolate_boundary_values(dof,
0,
Functions::ZeroFunction<dim>(),
FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
FE_DGQ<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
// there should not be any hanging nodes or
// boundary conditions for FE_DGQ as there are
// only interior DoFs on the elements, but try
FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
FE_DGP<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
do_test<dim, fe_degree, double, fe_degree + 1>(dof, constraints);
}
FE_DGP<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
do_test<dim, -1, double, fe_degree + 1>(dof, constraints);
}
FE_DGP<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
do_test<dim, fe_degree, double, fe_degree + 3>(dof, constraints);
}
class MatrixFreeTest
{
public:
- MatrixFreeTest(const DoFHandler<dim> & dof_handler,
- const ConstraintMatrix &constraints)
+ MatrixFreeTest(const DoFHandler<dim> & dof_handler,
+ const AffineConstraints<double> &constraints)
: dof_handler(dof_handler)
, constraints(constraints)
{}
};
private:
- const DoFHandler<dim> & dof_handler;
- const ConstraintMatrix &constraints;
+ const DoFHandler<dim> & dof_handler;
+ const AffineConstraints<double> &constraints;
};
template <int dim, int fe_degree, typename number>
void
-do_test(const DoFHandler<dim> & dof,
- const ConstraintMatrix &constraints,
- const unsigned int parallel_option = 0)
+do_test(const DoFHandler<dim> & dof,
+ const AffineConstraints<double> &constraints,
+ const unsigned int parallel_option = 0)
{
deallog << "Testing " << dof.get_fe().get_name() << std::endl;
if (parallel_option > 0)
FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
class MatrixFreeTest
{
public:
- MatrixFreeTest(const DoFHandler<dim> & dof_handler,
- const ConstraintMatrix &constraints)
+ MatrixFreeTest(const DoFHandler<dim> & dof_handler,
+ const AffineConstraints<double> &constraints)
: dof_handler(dof_handler)
, constraints(constraints)
{}
};
private:
- const DoFHandler<dim> & dof_handler;
- const ConstraintMatrix &constraints;
+ const DoFHandler<dim> & dof_handler;
+ const AffineConstraints<double> &constraints;
};
template <int dim, int fe_degree, typename number>
void
-do_test(const DoFHandler<dim> & dof,
- const ConstraintMatrix &constraints,
- const unsigned int parallel_option = 0)
+do_test(const DoFHandler<dim> & dof,
+ const AffineConstraints<double> &constraints,
+ const unsigned int parallel_option = 0)
{
deallog << "Testing " << dof.get_fe().get_name() << std::endl;
if (parallel_option > 0)
FESystem<dim> fe(FE_Q<dim>(degree), dim);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
FE_Q_DG0<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
template <int dim, int fe_degree, typename number>
void
-do_test(const DoFHandler<dim> & dof,
- const ConstraintMatrix &constraints,
- const unsigned int parallel_option = 0)
+do_test(const DoFHandler<dim> & dof,
+ const AffineConstraints<double> &constraints,
+ const unsigned int parallel_option = 0)
{
deallog << "Testing " << dof.get_fe().get_name() << std::endl;
if (parallel_option > 0)
FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
template <int dim, int fe_degree, typename number, int n_q_points_1d>
void
-do_test(const DoFHandler<dim> & dof,
- const ConstraintMatrix &constraints,
- const unsigned int parallel_option = 0)
+do_test(const DoFHandler<dim> & dof,
+ const AffineConstraints<double> &constraints,
+ const unsigned int parallel_option = 0)
{
deallog << "Testing " << dof.get_fe().get_name() << std::endl;
if (parallel_option > 0)
MatrixFree<dim, double> mf_data;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> system_matrix;
MatrixFree<dim, double> mf_data;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> system_matrix;
FE_DGQ<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
do_test<dim, fe_degree, fe_degree + 1, double>(dof, constraints, true);
FE_DGQ<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
// test with threads enabled as well
FE_DGQ<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
// also test with threads
FE_DGQ<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
// test with threads enabled as well
FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
// test with threads enabled as well
FE_DGQ<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
do_test<dim, fe_degree, fe_degree, double>(dof, constraints, true);
FE_DGQArbitraryNodes<dim> fe(QGauss<1>(fe_degree + 1));
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
// also test with threads
FE_DGQ<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
// also test with threads
FE_DGQ<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
deallog << "Testing " << dof.get_fe().get_name();
FE_DGQHermite<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
deallog << "Testing " << dof.get_fe().get_name();
FE_DGQHermite<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
deallog << "Testing " << dof.get_fe().get_name();
FE_DGQ<dim> fe(fe_degree);
DoFHandler<dim> dof(triangulation);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
// cannot test threads right now
FE_DGQHermite<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
deallog << "Testing " << dof.get_fe().get_name();
tria.refine_global(3 - dim);
- FE_DGQHermite<dim> fe(fe_degree);
- DoFHandler<dim> dof(tria);
- ConstraintMatrix constraints;
+ FE_DGQHermite<dim> fe(fe_degree);
+ DoFHandler<dim> dof(tria);
+ AffineConstraints<double> constraints;
constraints.close();
for (unsigned int test = 0; test < 2; ++test)
DoFHandler<dim> dof(tria);
dof_orig.distribute_dofs(fe);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
deallog << "Testing " << dof.get_fe().get_name();
FE_DGQ<mydim> fe(1);
DoFHandler<mydim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
deallog << "Testing " << dof.get_fe().get_name();
DoFHandler<dim> dof(tria);
dof_orig.distribute_dofs(fe);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
deallog << "Testing " << dof.get_fe().get_name();
DoFHandler<dim> dof(triangulation);
dof_orig.distribute_dofs(fe);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
deallog << "Testing " << dof.get_fe().get_name();
FE_DGQHermite<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
deallog << "Testing " << dof.get_fe().get_name();
tria.refine_global(3 - dim);
- FE_DGQHermite<dim> fe(fe_degree);
- FESystem<dim> fe_system(fe, dim);
- DoFHandler<dim> dof(tria);
- DoFHandler<dim> dof_system(tria);
- ConstraintMatrix constraints;
+ FE_DGQHermite<dim> fe(fe_degree);
+ FESystem<dim> fe_system(fe, dim);
+ DoFHandler<dim> dof(tria);
+ DoFHandler<dim> dof_system(tria);
+ AffineConstraints<double> constraints;
constraints.close();
for (unsigned int test = 0; test < 3; ++test)
tria.refine_global(3 - dim);
- FE_DGQHermite<dim> fe(fe_degree);
- FESystem<dim> fe_system(fe, dim);
- DoFHandler<dim> dof(tria);
- DoFHandler<dim> dof_system(tria);
- ConstraintMatrix constraints;
+ FE_DGQHermite<dim> fe(fe_degree);
+ FESystem<dim> fe_system(fe, dim);
+ DoFHandler<dim> dof(tria);
+ DoFHandler<dim> dof_system(tria);
+ AffineConstraints<double> constraints;
constraints.close();
for (unsigned int test = 0; test < 3; ++test)
tria.refine_global(3 - dim);
- FE_DGQ<dim> fe(fe_degree);
- FESystem<dim> fe_system(fe, dim);
- DoFHandler<dim> dof(tria);
- DoFHandler<dim> dof_system(tria);
- ConstraintMatrix constraints;
+ FE_DGQ<dim> fe(fe_degree);
+ FESystem<dim> fe_system(fe, dim);
+ DoFHandler<dim> dof(tria);
+ DoFHandler<dim> dof_system(tria);
+ AffineConstraints<double> constraints;
constraints.close();
for (unsigned int test = 0; test < 3; ++test)
tria.refine_global(3 - dim);
- FE_DGQ<dim> fe(fe_degree);
- FESystem<dim> fe_system(fe, dim);
- DoFHandler<dim> dof(tria);
- DoFHandler<dim> dof_system(tria);
- ConstraintMatrix constraints;
+ FE_DGQ<dim> fe(fe_degree);
+ FESystem<dim> fe_system(fe, dim);
+ DoFHandler<dim> dof(tria);
+ DoFHandler<dim> dof_system(tria);
+ AffineConstraints<double> constraints;
constraints.close();
for (unsigned int test = 0; test < 3; ++test)
template <int dim, int fe_degree, int n_q_points_1d, typename number>
void
-do_test(const DoFHandler<dim> & dof,
- const ConstraintMatrix &constraints,
- const bool also_test_parallel = false)
+do_test(const DoFHandler<dim> & dof,
+ const AffineConstraints<double> &constraints,
+ const bool also_test_parallel = false)
{
if (types_are_equal<number, float>::value == true)
deallog.push("float");
FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
// setup DoFs
dof.distribute_dofs(fe_collection);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
deallog << "Testing " << dof.get_fe().get_name() << std::endl;
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
dof.distribute_mg_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
VectorTools::interpolate_boundary_values(dof,
0,
Functions::ZeroFunction<dim>(),
system_matrix.reinit(sparsity);
// setup MG levels
- const unsigned int nlevels = tria.n_levels();
- typedef MatrixFree<dim> MatrixFreeTestType;
- MGLevelObject<MatrixFreeTestType> mg_matrices;
- MGLevelObject<ConstraintMatrix> mg_constraints;
- MGLevelObject<SparsityPattern> mg_sparsities;
- MGLevelObject<SparseMatrix<double>> mg_ref_matrices;
+ const unsigned int nlevels = tria.n_levels();
+ typedef MatrixFree<dim> MatrixFreeTestType;
+ MGLevelObject<MatrixFreeTestType> mg_matrices;
+ MGLevelObject<AffineConstraints<double>> mg_constraints;
+ MGLevelObject<SparsityPattern> mg_sparsities;
+ MGLevelObject<SparseMatrix<double>> mg_ref_matrices;
mg_matrices.resize(0, nlevels - 1);
mg_constraints.resize(0, nlevels - 1);
mg_sparsities.resize(0, nlevels - 1);
MatrixFree<dim, double> mf_data;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> system_matrix;
std::vector<const DoFHandler<dim> *> dofs;
dofs.push_back(&dof_handler_u);
dofs.push_back(&dof_handler_p);
- ConstraintMatrix dummy_constraints;
+ AffineConstraints<double> dummy_constraints;
dummy_constraints.close();
- std::vector<const ConstraintMatrix *> constraints;
+ std::vector<const AffineConstraints<double> *> constraints;
constraints.push_back(&dummy_constraints);
constraints.push_back(&dummy_constraints);
QGauss<1> quad(fe_degree + 2);
std::shared_ptr<MatrixFree<dim, double>> mf_data;
dof.distribute_dofs(fe);
- ConstraintMatrix constraints, constraints_u, constraints_p;
+ AffineConstraints<double> constraints, constraints_u, constraints_p;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> system_matrix;
std::vector<const DoFHandler<dim> *> dofs;
dofs.push_back(&dof_u);
dofs.push_back(&dof_p);
- std::vector<const ConstraintMatrix *> constraints;
+ std::vector<const AffineConstraints<double> *> constraints;
constraints.push_back(&constraints_u);
constraints.push_back(&constraints_p);
QGauss<1> quad(degree + 2);
MatrixFree<dim, double> mf_data;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> system_matrix;
MatrixFree<dim, double> mf_data;
- ConstraintMatrix constraints, constraints_u, constraints_p;
+ AffineConstraints<double> constraints, constraints_u, constraints_p;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> system_matrix;
std::vector<const DoFHandler<dim> *> dofs;
dofs.push_back(&dof_handler_u);
dofs.push_back(&dof_handler_p);
- std::vector<const ConstraintMatrix *> constraints;
+ std::vector<const AffineConstraints<double> *> constraints;
constraints.push_back(&constraints_u);
constraints.push_back(&constraints_p);
QGauss<1> quad(fe_degree + 2);
MatrixFree<dim, double> mf_data;
- ConstraintMatrix constraints, constraints_u, constraints_p;
+ AffineConstraints<double> constraints, constraints_u, constraints_p;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> system_matrix;
std::vector<const DoFHandler<dim> *> dofs;
dofs.push_back(&dof_handler_u);
dofs.push_back(&dof_handler_p);
- std::vector<const ConstraintMatrix *> constraints;
+ std::vector<const AffineConstraints<double> *> constraints;
constraints.push_back(&constraints_u);
constraints.push_back(&constraints_p);
QGauss<1> quad(fe_degree + 2);
MatrixFree<dim, double> mf_data;
- ConstraintMatrix constraints, constraints_u, constraints_p;
+ AffineConstraints<double> constraints, constraints_u, constraints_p;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
MatrixFree<dim, double> mf_data;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> system_matrix;
std::vector<const DoFHandler<dim> *> dofs;
dofs.push_back(&dof_handler_u);
dofs.push_back(&dof_handler_p);
- ConstraintMatrix dummy_constraints;
+ AffineConstraints<double> dummy_constraints;
dummy_constraints.close();
- std::vector<const ConstraintMatrix *> constraints;
+ std::vector<const AffineConstraints<double> *> constraints;
constraints.push_back(&dummy_constraints);
constraints.push_back(&dummy_constraints);
QGauss<1> quad(fe_degree + 2);
MatrixFree<dim, double> mf_data;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> system_matrix;
std::vector<const DoFHandler<dim> *> dofs;
dofs.push_back(&dof_handler_u);
dofs.push_back(&dof_handler_p);
- ConstraintMatrix dummy_constraints;
+ AffineConstraints<double> dummy_constraints;
dummy_constraints.close();
- std::vector<const ConstraintMatrix *> constraints;
+ std::vector<const AffineConstraints<double> *> constraints;
constraints.push_back(&dummy_constraints);
constraints.push_back(&dummy_constraints);
QGauss<1> quad(fe_degree + 2);
(update_gradients | update_JxW_values);
addit_data.mapping_update_flags_boundary_faces =
(update_gradients | update_JxW_values);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
data.reinit(mapping, dof_handler, constraints, quad, addit_data);
(update_gradients | update_JxW_values);
addit_data.mapping_update_flags_boundary_faces =
(update_gradients | update_JxW_values);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
data.reinit(mapping, dof_handler, constraints, quad, addit_data);
update_JxW_values | update_normal_vectors | update_jacobians;
addit_data.mapping_update_flags_faces_by_cells =
update_JxW_values | update_normal_vectors | update_jacobians;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
data.reinit(mapping, dof_handler, constraints, quad, addit_data);
template <int dim, int fe_degree, typename number>
void
-do_test(const DoFHandler<dim> &dof, const ConstraintMatrix &constraints)
+do_test(const DoFHandler<dim> & dof,
+ const AffineConstraints<double> &constraints)
{
// use this for info on problem
// std::cout << "Number of cells: " <<
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
addit_data.level_mg_handler = level;
// extract the constraints due to Dirichlet boundary conditions
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
Functions::ZeroFunction<dim> zero;
std::map<types::boundary_id, const Function<dim> *> functions;
for (std::set<types::boundary_id>::const_iterator it =
dirichlet_boundary[0] = &zero_function;
// fine-level constraints
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
MatrixFree<dim, number>::AdditionalData::none;
mg_additional_data.level_mg_handler = level;
- ConstraintMatrix level_constraints;
- IndexSet relevant_dofs;
+ AffineConstraints<double> level_constraints;
+ IndexSet relevant_dofs;
DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
level_constraints.reinit(relevant_dofs);
level_constraints.add_lines(
MatrixFree<dim, number>::AdditionalData::none;
addit_data.tasks_block_size = 3;
addit_data.level_mg_handler = level;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
if (level == numbers::invalid_unsigned_int)
{
IndexSet relevant_dofs;
deallog << std::endl;
deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
- ConstraintMatrix hanging_node_constraints;
- IndexSet locally_relevant_dofs;
+ AffineConstraints<double> hanging_node_constraints;
+ IndexSet locally_relevant_dofs;
DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
hanging_node_constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
dirichlet_boundary[0] = &zero_function;
// fine-level constraints
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
// set constant rhs vector
{
// this is to make it consistent with parallel_multigrid_adaptive.cc
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
hanging_node_constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
hanging_node_constraints.close();
mg_additional_data.tasks_block_size = 3;
mg_additional_data.level_mg_handler = level;
- ConstraintMatrix level_constraints;
- IndexSet relevant_dofs;
+ AffineConstraints<double> level_constraints;
+ IndexSet relevant_dofs;
DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
level_constraints.reinit(relevant_dofs);
level_constraints.add_lines(
MatrixFree<dim, number>::AdditionalData::none;
addit_data.tasks_block_size = 3;
addit_data.level_mg_handler = level;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
if (level == numbers::invalid_unsigned_int)
{
IndexSet relevant_dofs;
deallog << std::endl;
deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
- ConstraintMatrix hanging_node_constraints;
- IndexSet locally_relevant_dofs;
+ AffineConstraints<double> hanging_node_constraints;
+ IndexSet locally_relevant_dofs;
DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
hanging_node_constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
dirichlet_boundary[0] = &zero_function;
// fine-level constraints
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
// set constant rhs vector
{
// this is to make it consistent with parallel_multigrid_adaptive.cc
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
hanging_node_constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
hanging_node_constraints.close();
mg_additional_data.tasks_block_size = 3;
mg_additional_data.level_mg_handler = level;
- ConstraintMatrix level_constraints;
- IndexSet relevant_dofs;
+ AffineConstraints<double> level_constraints;
+ IndexSet relevant_dofs;
DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
level_constraints.reinit(relevant_dofs);
level_constraints.add_lines(
MatrixFree<dim, number>::AdditionalData::none;
addit_data.tasks_block_size = 3;
addit_data.level_mg_handler = level;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
if (level == numbers::invalid_unsigned_int)
{
IndexSet relevant_dofs;
deallog << std::endl;
deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
- ConstraintMatrix hanging_node_constraints;
- IndexSet locally_relevant_dofs;
+ AffineConstraints<double> hanging_node_constraints;
+ IndexSet locally_relevant_dofs;
DoFTools::extract_locally_relevant_dofs(dof, locally_relevant_dofs);
hanging_node_constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
dirichlet_boundary[0] = &zero_function;
// fine-level constraints
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
// set constant rhs vector
{
// this is to make it consistent with parallel_multigrid_adaptive.cc
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
hanging_node_constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
hanging_node_constraints.close();
mg_additional_data.tasks_block_size = 3;
mg_additional_data.level_mg_handler = level;
- ConstraintMatrix level_constraints;
- IndexSet relevant_dofs;
+ AffineConstraints<double> level_constraints;
+ IndexSet relevant_dofs;
DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
level_constraints.reinit(relevant_dofs);
level_constraints.add_lines(
dirichlet_boundary[0] = &zero_function;
// fine-level constraints
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
// set constant rhs vector
{
// this is to make it consistent with parallel_multigrid_adaptive.cc
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
hanging_node_constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof, hanging_node_constraints);
hanging_node_constraints.close();
mg_additional_data.tasks_block_size = 3;
mg_additional_data.level_mg_handler = level;
- ConstraintMatrix level_constraints;
- IndexSet relevant_dofs;
+ AffineConstraints<double> level_constraints;
+ IndexSet relevant_dofs;
DoFTools::extract_locally_relevant_level_dofs(dof, level, relevant_dofs);
level_constraints.reinit(relevant_dofs);
level_constraints.add_lines(
dirichlet_boundary[0] = &zero_function;
// fine-level constraints
- std::vector<ConstraintMatrix> constraints(dof.size());
- std::vector<const ConstraintMatrix *> constraints_ptrs(dof.size());
+ std::vector<AffineConstraints<double>> constraints(dof.size());
+ std::vector<const AffineConstraints<double> *> constraints_ptrs(dof.size());
for (unsigned int i = 0; i < dof.size(); ++i)
{
constraints[i].reinit(locally_relevant_dofs[i]);
for (unsigned int b = 0; b < nb; ++b)
{
// this is to make it consistent with parallel_multigrid_adaptive.cc
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
hanging_node_constraints.reinit(locally_relevant_dofs[b]);
DoFTools::make_hanging_node_constraints(*dof[b],
mg_additional_data.tasks_block_size = 3;
mg_additional_data.level_mg_handler = level;
- std::vector<ConstraintMatrix> level_constraints(dof.size());
- std::vector<const ConstraintMatrix *> level_constraints_ptrs(dof.size());
+ std::vector<AffineConstraints<double>> level_constraints(dof.size());
+ std::vector<const AffineConstraints<double> *> level_constraints_ptrs(
+ dof.size());
for (unsigned int i = 0; i < dof.size(); ++i)
{
IndexSet relevant_dofs;
addit_data.level_mg_handler = level;
// extract the constraints due to Dirichlet boundary conditions
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
Functions::ZeroFunction<dim> zero;
std::map<types::boundary_id, const Function<dim> *> functions;
for (std::set<types::boundary_id>::const_iterator it =
// std::cout << "Number of cells: " << tria.n_active_cells() << std::endl;
// std::cout << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
#else
Triangulation<dim> triangulation;
#endif
- FE_Q<dim> fe;
- DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
- IndexSet locally_relevant_dofs;
+ FE_Q<dim> fe;
+ DoFHandler<dim> dof_handler;
+ AffineConstraints<double> constraints;
+ IndexSet locally_relevant_dofs;
MatrixFree<dim, double> matrix_free_data;
void
output_norm();
- Triangulation<dim> triangulation;
- FE_Q<dim> fe;
- DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
- IndexSet locally_relevant_dofs;
+ Triangulation<dim> triangulation;
+ FE_Q<dim> fe;
+ DoFHandler<dim> dof_handler;
+ AffineConstraints<double> constraints;
+ IndexSet locally_relevant_dofs;
MatrixFree<dim, double> matrix_free_data;
#else
Triangulation<dim> triangulation;
#endif
- FE_Q<dim> fe;
- DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
- IndexSet locally_relevant_dofs;
+ FE_Q<dim> fe;
+ DoFHandler<dim> dof_handler;
+ AffineConstraints<double> constraints;
+ IndexSet locally_relevant_dofs;
MatrixFree<dim, double> matrix_free_data;
std::vector<IndexSet> owned_partitioning;
std::vector<IndexSet> relevant_partitioning;
- ConstraintMatrix constraints_u;
- ConstraintMatrix constraints_p;
+ AffineConstraints<double> constraints_u;
+ AffineConstraints<double> constraints_p;
block_vector_t solution;
block_vector_t system_rhs;
std::vector<const DoFHandler<dim> *> stokes_dofs;
stokes_dofs.push_back(&dof_handler_u);
stokes_dofs.push_back(&dof_handler_p);
- std::vector<const ConstraintMatrix *> stokes_constraints;
+ std::vector<const AffineConstraints<double> *> stokes_constraints;
stokes_constraints.push_back(&constraints_u);
stokes_constraints.push_back(&constraints_p);
DoFTools::extract_locally_relevant_level_dofs(dof_handler_u,
level,
relevant_dofs);
- ConstraintMatrix level_constraints;
+ AffineConstraints<double> level_constraints;
level_constraints.reinit(relevant_dofs);
level_constraints.add_lines(
mg_constrained_dofs.get_boundary_indices(level));
update_JxW_values | update_quadrature_points);
// Create constraints with no Dirchlet info
- ConstraintMatrix constraints_u_no_dirchlet;
- IndexSet locally_relevant_dofs_u;
+ AffineConstraints<double> constraints_u_no_dirchlet;
+ IndexSet locally_relevant_dofs_u;
DoFTools::extract_locally_relevant_dofs(dof_handler_u,
locally_relevant_dofs_u);
constraints_u_no_dirchlet.reinit(locally_relevant_dofs_u);
constraints_u_no_dirchlet);
constraints_u_no_dirchlet.close();
- std::vector<const ConstraintMatrix *> constraints_no_dirchlet;
+ std::vector<const AffineConstraints<double> *> constraints_no_dirchlet;
constraints_no_dirchlet.push_back(&constraints_u_no_dirchlet);
constraints_no_dirchlet.push_back(&constraints_p);
std::vector<const DoFHandler<dim> *> dofs;
tria.execute_coarsening_and_refinement();
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
tria.execute_coarsening_and_refinement();
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
// std::cout << "Number of cells: " <<
// setup DoFs
dof.distribute_dofs(fe_collection);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
deallog << "Testing " << dof.get_fe().get_name() << std::endl;
DoFHandler<dim> dof_handler;
MappingQ<dim> mapping;
- SparsityPattern sparsity_pattern;
- SparseMatrix<double> system_matrix;
- ConstraintMatrix constraints;
+ SparsityPattern sparsity_pattern;
+ SparseMatrix<double> system_matrix;
+ AffineConstraints<double> constraints;
Vector<double> solution;
Vector<double> system_rhs;
IndexSet locally_relevant_set;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
vector_t solution;
vector_t system_rhs;
void
LaplaceProblem<dim>::assemble_system_and_multigrid()
{
- std::vector<ConstraintMatrix> boundary_constraints(
+ std::vector<AffineConstraints<double>> boundary_constraints(
triangulation.n_global_levels());
for (unsigned int level = 0; level < triangulation.n_global_levels();
++level)
-// test ConstraintMatrix::condense(in, out)
+// test AffineConstraints<double>::condense(in, out)
#include <deal.II/base/tensor.h>
#include <deal.II/base/utilities.h>
-// check ConstraintMatrix::condense(Vector) for parallel vectors. this
+// check AffineConstraints<double>::condense(Vector) for parallel vectors. this
// function used to crash
//
// original test case by Daniel Arndt
-// ConstraintMatrix::add_line crashes in release mode (missing compress inside
-// ConstraintMatrix)
+// AffineConstraints<double>::add_line crashes in release mode (missing compress
+// inside AffineConstraints<double>)
#include <deal.II/dofs/dof_tools.h>
local_active_together.add_range(0, 3);
// local_active_together.compress();
- ConstraintMatrix cm(local_active_together);
+ AffineConstraints<double> cm(local_active_together);
cm.add_line(1);
cm.close();
deallog << "OK" << std::endl;
-// check ConstraintMatrix::set_zero(Vector) for parallel vectors.
+// check AffineConstraints<double>::set_zero(Vector) for parallel vectors.
// this documents a bug introduced in r29678 for block vectors
// that was fixed in 29940.
-// check ConstraintMatrix::set_zero(Vector) for parallel distributed vectors
+// check AffineConstraints<double>::set_zero(Vector) for parallel distributed
+// vectors
#include <deal.II/dofs/dof_tools.h>
local_active_together.add_range(myid, myid + 1);
local_active_together.add_range(numproc + myid * 2, numproc + myid * 2 + 2);
- ConstraintMatrix cm(local_active_together);
+ AffineConstraints<double> cm(local_active_together);
cm.add_line(numproc + myid * 2);
cm.close();
-// ConstraintMatrix.distribute() produces a different result when using a
-// Trilinos::Vector with ghost elements (e.g. owned vs. active), which is a
+// AffineConstraints<double>.distribute() produces a different result when using
+// a Trilinos::Vector with ghost elements (e.g. owned vs. active), which is a
// bug. Now distribute() throws an Exception when called with a Vector with
// ghost elements. check that this happens.
TrilinosWrappers::MPI::Vector x_rel;
x_rel.reinit(relevant_set, MPI_COMM_WORLD);
- ConstraintMatrix cm(relevant_set);
+ AffineConstraints<double> cm(relevant_set);
DoFTools::make_hanging_node_constraints(dofh, cm);
std::vector<bool> velocity_mask(dim + 1, true);
-// test ConstraintMatrix::is_consistent_in_parallel
+// test AffineConstraints<double>::is_consistent_in_parallel
#include <deal.II/base/utilities.h>
IndexSet locally_relevant_dofs;
DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.clear();
constraints.reinit(locally_relevant_dofs);
905: An error occurred in line <1898> of file
</scratch/deal-trunk/deal.II/include/deal.II/lac/affine_constraints.h> in
function 905: void
-dealii::ConstraintMatrix::add_line(dealii::ConstraintMatrix::size_type) 905: The
-violated condition was: 905: line != numbers::invalid_size_type 905: The
-name and call sequence of the exception was: 905: ExcInternalError() 905:
-Additional Information: 905: (none) 905:
+dealii::AffineConstraints<double>::add_line(dealii::AffineConstraints<double>::size_type)
+905: The violated condition was: 905: line != numbers::invalid_size_type
+905: The name and call sequence of the exception was: 905: ExcInternalError()
+905: Additional Information: 905: (none) 905:
--------------------------------------------------------
*/
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
IndexSet relevant_set;
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
IndexSet locally_owned_dofs;
IndexSet locally_relevant_dofs;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
PETScWrappers::MPI::Vector locally_relevant_solution;
};
std::unique_ptr<DoFHandler<dim>> dof1(make_dof_handler(*tria, fe1));
std::unique_ptr<DoFHandler<dim>> dof2(make_dof_handler(*tria, fe2));
- ConstraintMatrix cm1;
+ AffineConstraints<double> cm1;
DoFTools::make_hanging_node_constraints(*dof1, cm1);
cm1.close();
- ConstraintMatrix cm2;
+ AffineConstraints<double> cm2;
DoFTools::make_hanging_node_constraints(*dof2, cm2);
cm2.close();
std::unique_ptr<DoFHandler<dim>> dof1(make_dof_handler(*tria, fe1));
std::unique_ptr<DoFHandler<dim>> dof2(make_dof_handler(*tria, fe2));
- ConstraintMatrix cm1;
+ AffineConstraints<double> cm1;
DoFTools::make_hanging_node_constraints(*dof1, cm1);
cm1.close();
- ConstraintMatrix cm2;
+ AffineConstraints<double> cm2;
DoFTools::make_hanging_node_constraints(*dof2, cm2);
cm2.close();
IndexSet locally_owned_dofs;
IndexSet locally_relevant_dofs;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
PETScWrappers::MPI::SparseMatrix system_matrix;
PETScWrappers::MPI::Vector locally_relevant_solution;
FE_Q<dim> fe;
IndexSet locally_owned_dofs;
IndexSet locally_relevant_dofs;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TrilinosWrappers::SparseMatrix system_matrix;
TrilinosWrappers::MPI::Vector locally_relevant_solution;
TrilinosWrappers::MPI::Vector interpolated_locally_relevant_solution;
dofh.distribute_dofs(fe);
{
- ConstraintMatrix boundary_values;
+ AffineConstraints<double> boundary_values;
DoFTools::make_zero_boundary_constraints(dofh, boundary_values);
if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
boundary_values.print(deallog.get_file_stream());
{
IndexSet relevant_set(dofh.n_dofs());
DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
- ConstraintMatrix boundary_values(relevant_set);
+ AffineConstraints<double> boundary_values(relevant_set);
DoFTools::make_zero_boundary_constraints(dofh, boundary_values);
if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
boundary_values.print(deallog.get_file_stream());
FESystem<dim> fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
- std::vector<IndexSet> owned_partitioning;
- std::vector<IndexSet> relevant_partitioning;
+ AffineConstraints<double> constraints;
+ std::vector<IndexSet> owned_partitioning;
+ std::vector<IndexSet> relevant_partitioning;
TrilinosWrappers::BlockSparsityPattern sparsity_pattern;
TrilinosWrappers::BlockSparseMatrix system_matrix;
matrix_t system_matrix;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
vector_t solution;
vector_t system_rhs;
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values(n_q_points);
- std::vector<ConstraintMatrix> boundary_constraints(
+ std::vector<AffineConstraints<double>> boundary_constraints(
triangulation.n_levels());
- ConstraintMatrix empty_constraints;
+ AffineConstraints<double> empty_constraints;
for (unsigned int level = 0; level < triangulation.n_levels(); ++level)
{
boundary_constraints[level].add_lines(
matrix_t system_matrix;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
vector_t solution;
vector_t system_rhs;
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values(n_q_points);
- std::vector<ConstraintMatrix> boundary_constraints(
+ std::vector<AffineConstraints<double>> boundary_constraints(
triangulation.n_levels());
- std::vector<ConstraintMatrix> boundary_interface_constraints(
+ std::vector<AffineConstraints<double>> boundary_interface_constraints(
triangulation.n_levels());
for (unsigned int level = 0; level < triangulation.n_levels(); ++level)
{
-// check ConstraintMatrix for a distributed mesh on hyper shell with both
-// hanging nodes and no-normal-flux constraints on the outer boundary of the
-// shell.
+// check AffineConstraints<double> for a distributed mesh on hyper shell with
+// both hanging nodes and no-normal-flux constraints on the outer boundary of
+// the shell.
#include <deal.II/base/tensor.h>
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(relevant_set);
DoFTools::make_hanging_node_constraints(dofh, constraints);
std::set<types::boundary_id> no_normal_flux_boundaries;
-// check ConstraintMatrix for a distributed mesh on hyper shell with both
-// hanging nodes and no-normal-flux constraints on the outer boundary of the
-// shell.
-// Also see test renumber_z_order_02
+// check AffineConstraints<double> for a distributed mesh on hyper shell with
+// both hanging nodes and no-normal-flux constraints on the outer boundary of
+// the shell. Also see test renumber_z_order_02
#include <deal.II/base/tensor.h>
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(relevant_set);
DoFTools::make_hanging_node_constraints(dofh, constraints);
std::set<types::boundary_id> no_normal_flux_boundaries;
-// check that the ConstraintMatrix with hanging nodes and no-normal-flux
-// constraints on an adaptively refined hyper_cube are the same independet
-// of the number of CPUs
+// check that the AffineConstraints<double> with hanging nodes and
+// no-normal-flux constraints on an adaptively refined hyper_cube are the same
+// independet of the number of CPUs
#include <deal.II/base/tensor.h>
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(relevant_set);
DoFTools::make_hanging_node_constraints(dofh, constraints);
std::set<types::boundary_id> no_normal_flux_boundaries;
-// check ConstraintMatrix for a distributed mesh on hyper shell with both
-// hanging nodes and normal-flux constraints on the outer boundary of the
+// check AffineConstraints<double> for a distributed mesh on hyper shell with
+// both hanging nodes and normal-flux constraints on the outer boundary of the
// shell.
#include <deal.II/base/tensor.h>
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dofh, relevant_set);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(relevant_set);
DoFTools::make_hanging_node_constraints(dofh, constraints);
std::set<types::boundary_id> no_normal_flux_boundaries;
-// check ConstraintMatrix for a distributed mesh,
+// check AffineConstraints<double> for a distributed mesh,
// also compare with/without sparse line_cache via IndexSet.
// Simple mesh.
IndexSet dof_set;
DoFTools::extract_locally_relevant_dofs(dofh, dof_set);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_hanging_node_constraints(dofh, cm);
- ConstraintMatrix cm2(dof_set);
+ AffineConstraints<double> cm2(dof_set);
DoFTools::make_hanging_node_constraints(dofh, cm2);
{
-// check ConstraintMatrix for a distributed mesh,
+// check AffineConstraints<double> for a distributed mesh,
// also compare with/without sparse line_cache via IndexSet.
// Refine one corner.
IndexSet dof_set;
DoFTools::extract_locally_relevant_dofs(dofh, dof_set);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_hanging_node_constraints(dofh, cm);
- ConstraintMatrix cm2(dof_set);
+ AffineConstraints<double> cm2(dof_set);
DoFTools::make_hanging_node_constraints(dofh, cm2);
if (myid == 0)
-// check ConstraintMatrix.distribute() for a distributed mesh
+// check AffineConstraints<double>.distribute() for a distributed mesh
// with Trilinos
// Mesh: shell with random refinement
TrilinosWrappers::MPI::Vector x_rel;
x_rel.reinit(relevant_set, MPI_COMM_WORLD);
- ConstraintMatrix cm(relevant_set);
+ AffineConstraints<double> cm(relevant_set);
DoFTools::make_hanging_node_constraints(dofh, cm);
std::vector<bool> velocity_mask(dim + 1, true);
-// check ConstraintMatrix.distribute() for a distributed mesh
+// check AffineConstraints<double>.distribute() for a distributed mesh
// with Trilinos; manual check of the graphical output...
// Mesh: shell with random refinement
x_rel.reinit(relevant_set, MPI_COMM_WORLD);
- ConstraintMatrix cm(relevant_set);
+ AffineConstraints<double> cm(relevant_set);
DoFTools::make_hanging_node_constraints(dofh, cm);
/* std::vector<bool> velocity_mask (dim+1, true);
-// check that ConstraintMatrix.distribute() is not doing anything in a
+// check that AffineConstraints<double>.distribute() is not doing anything in a
// distributed computation for a vector that already has the entries set
// correctly
TrilinosWrappers::MPI::Vector x1(x_ref);
// we have interpolated values, so
- // ConstraintMatrix::distribute should not do
+ // AffineConstraints<double>::distribute should not do
// anything
x1 = x_ref;
- ConstraintMatrix cm(relevant_set);
+ AffineConstraints<double> cm(relevant_set);
DoFTools::make_hanging_node_constraints(dofh, cm);
cm.close();
cm.distribute(x1);
-// check ConstraintMatrix for a distributed mesh,
+// check AffineConstraints<double> for a distributed mesh,
// also compare with/without sparse line_cache via IndexSet.
// Mesh: 3d Random refinement.
IndexSet dof_set;
DoFTools::extract_locally_relevant_dofs(dofh, dof_set);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
DoFTools::make_hanging_node_constraints(dofh, cm);
- ConstraintMatrix cm2(dof_set);
+ AffineConstraints<double> cm2(dof_set);
DoFTools::make_hanging_node_constraints(dofh, cm2);
{
-// check ConstraintMatrix.distribute() for a distributed mesh
+// check AffineConstraints<double>.distribute() for a distributed mesh
// with Trilinos
#include <deal.II/base/tensor.h>
TrilinosWrappers::MPI::Vector x_rel;
x_rel.reinit(relevant_set, MPI_COMM_WORLD);
- ConstraintMatrix cm(relevant_set);
+ AffineConstraints<double> cm(relevant_set);
DoFTools::make_hanging_node_constraints(dofh, cm);
cm.close();
-// check ConstraintMatrix.distribute() for a distributed mesh
+// check AffineConstraints<double>.distribute() for a distributed mesh
// with Trilinos; manual check of the graphical output...
// Mesh: shell with random refinement
x_rel.reinit(relevant_set, MPI_COMM_WORLD);
- ConstraintMatrix cm(relevant_set);
+ AffineConstraints<double> cm(relevant_set);
DoFTools::make_hanging_node_constraints(dofh, cm);
/* std::vector<bool> velocity_mask (dim+1, true);
// build constraint matrix
IndexSet locally_relevant(dof.n_dofs());
DoFTools::extract_locally_relevant_dofs(dof, locally_relevant);
- ConstraintMatrix constraints(locally_relevant);
+ AffineConstraints<double> constraints(locally_relevant);
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
IndexSet relevant_set;
DoFTools::extract_locally_relevant_dofs(dof, relevant_set);
- ConstraintMatrix constraints(relevant_set);
+ AffineConstraints<double> constraints(relevant_set);
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
DoFHandler<dim> dof1(tria), dof2(tria);
dof1.distribute_dofs(fe1);
dof2.distribute_dofs(fe2);
- ConstraintMatrix c1, c2;
+ AffineConstraints<double> c1, c2;
DoFTools::make_hanging_node_constraints(dof1, c1);
c1.close();
DoFTools::make_hanging_node_constraints(dof2, c2);
IndexSet locally_owned_dofs;
IndexSet locally_relevant_dofs;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
PETScWrappers::MPI::SparseMatrix system_matrix;
PETScWrappers::MPI::Vector locally_relevant_solution;
FESystem<dim> fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
- std::vector<IndexSet> owned_partitioning;
- std::vector<IndexSet> relevant_partitioning;
+ AffineConstraints<double> constraints;
+ std::vector<IndexSet> owned_partitioning;
+ std::vector<IndexSet> relevant_partitioning;
TrilinosWrappers::BlockSparsityPattern sparsity_pattern;
TrilinosWrappers::BlockSparseMatrix system_matrix;
FESystem<dim> fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
- std::vector<IndexSet> owned_partitioning;
- std::vector<IndexSet> relevant_partitioning;
+ AffineConstraints<double> constraints;
+ std::vector<IndexSet> owned_partitioning;
+ std::vector<IndexSet> relevant_partitioning;
TrilinosWrappers::BlockSparseMatrix system_matrix;
DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
IndexSet locally_owned_dofs = dof_handler.locally_owned_dofs();
IndexSet locally_relevant_dofs;
-// check ConstraintMatrix.distribute() for a petsc vector
+// check AffineConstraints<double>.distribute() for a petsc vector
//
// we do this by creating a vector where each processor has 100
// elements but no ghost elements. then we add constraints on each
}
- // create a ConstraintMatrix with a range that exceeds the locally
+ // create a AffineConstraints<double> with a range that exceeds the locally
// owned range by 50 on each side
IndexSet locally_relevant_range(vec.size());
locally_relevant_range.add_range(
-// check ConstraintMatrix.distribute() for a petsc vector
+// check AffineConstraints<double>.distribute() for a petsc vector
//
// like _01, but for a block vector. this has the additional complication that
// (at a global level) the set of indices owned by this processor is not
}
- // create a ConstraintMatrix with a range that exceeds the locally
+ // create a AffineConstraints<double> with a range that exceeds the locally
// owned range by 50 on each side
IndexSet locally_relevant_range(vec.size());
locally_relevant_range.add_range(
-// check ConstraintMatrix.distribute() for a petsc vector
+// check AffineConstraints<double>.distribute() for a petsc vector
//
// like _01, but with an inhomogeneity
}
- // create a ConstraintMatrix with a range that exceeds the locally
+ // create a AffineConstraints<double> with a range that exceeds the locally
// owned range by 50 on each side
IndexSet locally_relevant_range(vec.size());
locally_relevant_range.add_range(
-// check ConstraintMatrix.distribute() for a petsc vector
+// check AffineConstraints<double>.distribute() for a petsc vector
//
// like _01, but for a block vector. this has the additional complication that
// (at a global level) the set of indices owned by this processor is not
TrilinosWrappers::MPI::Vector vector;
vector.reinit(dofh.locally_owned_dofs(), MPI_COMM_WORLD);
{
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
QGauss<dim> quadrature_formula(2);
FEValues<dim> fe_values(fe,
TrilinosWrappers::MPI::Vector vector;
vector.reinit(dofh.locally_owned_dofs(), MPI_COMM_WORLD);
{
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
QGauss<dim> quadrature_formula(2);
FEValues<dim> fe_values(fe,
std::shared_ptr<
MappingFEField<dim, dim, LinearAlgebra::distributed::Vector<double>>>
mapping;
- ConstraintMatrix constraints_euler;
+ AffineConstraints<double> constraints_euler;
LinearAlgebra::distributed::Vector<double> euler_positions;
IndexSet locally_relevant_dofs;
- ConstraintMatrix constraints;
- ConstraintMatrix non_homogeneous_constraints;
+ AffineConstraints<double> constraints;
+ AffineConstraints<double> non_homogeneous_constraints;
typedef MatrixFreeOperators::LaplaceOperator<
dim,
degree_finite_element,
DoFTools::extract_locally_relevant_level_dofs(dof_handler,
level,
relevant_dofs);
- ConstraintMatrix level_constraints;
+ AffineConstraints<double> level_constraints;
level_constraints.reinit(relevant_dofs);
level_constraints.add_lines(
mg_constrained_dofs.get_boundary_indices(level));
non_homogeneous_constraints.clear();
{
- ConstraintMatrix hanging_nodes_laplace_constraints;
+ AffineConstraints<double> hanging_nodes_laplace_constraints;
hanging_nodes_laplace_constraints.reinit(locally_relevant_dofs);
non_homogeneous_constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(
// make sure hanging nodes override Dirichlet
non_homogeneous_constraints.merge(
hanging_nodes_laplace_constraints,
- ConstraintMatrix::MergeConflictBehavior::right_object_wins);
+ AffineConstraints<double>::MergeConflictBehavior::right_object_wins);
non_homogeneous_constraints.close();
}
IndexSet locally_owned_dofs;
IndexSet locally_relevant_dofs;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
PETScWrappers::MPI::SparseMatrix system_matrix;
PETScWrappers::MPI::Vector locally_relevant_solution;
IndexSet locally_owned_dofs;
IndexSet locally_relevant_dofs;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
PETScWrappers::MPI::SparseMatrix system_matrix;
PETScWrappers::MPI::Vector locally_relevant_solution;
IndexSet locally_owned_dofs;
IndexSet locally_relevant_dofs;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
PETScWrappers::MPI::SparseMatrix system_matrix;
PETScWrappers::MPI::Vector locally_relevant_solution;
IndexSet locally_owned_dofs;
IndexSet locally_relevant_dofs;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
PETScWrappers::MPI::SparseMatrix system_matrix;
PETScWrappers::MPI::Vector locally_relevant_solution;
-// check ConstraintMatrix.distribute() for a trilinos vector
+// check AffineConstraints<double>.distribute() for a trilinos vector
//
// we do this by creating a vector where each processor has 100
// elements but no ghost elements. then we add constraints on each
}
- // create a ConstraintMatrix with a range that exceeds the locally
+ // create a AffineConstraints<double> with a range that exceeds the locally
// owned range by 50 on each side
IndexSet locally_relevant_range(vec.size());
locally_relevant_range.add_range(
std::max<int>(100 * myid - 50, 0),
std::min(static_cast<types::global_dof_index>(100 * myid + 150),
vec.size()));
- ConstraintMatrix cm(locally_relevant_range);
+ AffineConstraints<double> cm(locally_relevant_range);
// add constraints that constrain an element in the middle of the
// local range of each processor against an element outside, both in
-// check ConstraintMatrix.distribute() for a trilinos vector
+// check AffineConstraints<double>.distribute() for a trilinos vector
//
// like _01, but for a block vector. this has the additional complication that
// (at a global level) the set of indices owned by this processor is not
}
- // create a ConstraintMatrix with a range that exceeds the locally
+ // create a AffineConstraints<double> with a range that exceeds the locally
// owned range by 50 on each side
IndexSet locally_relevant_range(vec.size());
locally_relevant_range.add_range(
vec.block(0).size() +
std::min(static_cast<types::global_dof_index>(100 * myid + 150),
vec.block(0).size()));
- ConstraintMatrix cm(locally_relevant_range);
+ AffineConstraints<double> cm(locally_relevant_range);
// add constraints that constrain an element in the middle of the
// local range of each processor against an element outside, both in
-// check ConstraintMatrix.distribute() for a trilinos vector
+// check AffineConstraints<double>.distribute() for a trilinos vector
//
// like _01, but with an inhomogeneity
}
- // create a ConstraintMatrix with a range that exceeds the locally
+ // create a AffineConstraints<double> with a range that exceeds the locally
// owned range by 50 on each side
IndexSet locally_relevant_range(vec.size());
locally_relevant_range.add_range(
std::max<int>(100 * myid - 50, 0),
std::min(static_cast<types::global_dof_index>(100 * myid + 150),
vec.size()));
- ConstraintMatrix cm(locally_relevant_range);
+ AffineConstraints<double> cm(locally_relevant_range);
// add constraints that constrain an element in the middle of the
// local range of each processor against an element outside, both in
-// document bug in the new ConstraintMatrix::distribute() from r29593
+// document bug in the new AffineConstraints<double>::distribute() from r29593
// if one vector owns all DoFs, then distribute() hangs.
#include <deal.II/lac/affine_constraints.h>
vec(i) = i;
vec.compress(VectorOperation::insert);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
cm.distribute(vec);
-// document bug in the new ConstraintMatrix::distribute():
+// document bug in the new AffineConstraints<double>::distribute():
/*
--------------------------------------------------------
An error occurred in line <1028> of file
</scratch/deal-trunk/deal.II/include/deal.II/lac/constraint_matrix.templates.h>
-in function void dealii::ConstraintMatrix::distribute(VectorType&) const [with
-VectorType = dealii::TrilinosWrappers::MPI::Vector] The violated condition was:
- vec(it->line) == it->entries.size()
-The name and call sequence of the exception was:
- ExcIncorrectConstraint(it->line, it->entries.size())
+in function void dealii::AffineConstraints<double>::distribute(VectorType&)
+const [with VectorType = dealii::TrilinosWrappers::MPI::Vector] The violated
+condition was: vec(it->line) == it->entries.size() The name and call sequence of
+the exception was: ExcIncorrectConstraint(it->line, it->entries.size())
Additional Information:
While distributing the constraint for DoF 41, it turns out that one of the
processors who own the 2 degrees of freedom that x_41 is constrained against
does not know about the constraint on x_41. Did you not initialize the
-ConstraintMatrix with the appropriate locally_relevant set so that every
-processor who owns a DoF that constrains another DoF also knows about this
+AffineConstraints<double> with the appropriate locally_relevant set so that
+every processor who owns a DoF that constrains another DoF also knows about this
constraint?
--------------------------------------------------------
IndexSet locally_relevant_set;
DoFTools::extract_locally_relevant_dofs(dofh, locally_relevant_set);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.reinit(locally_relevant_set);
DoFTools::make_hanging_node_constraints(dofh, cm);
IndexSet locally_relevant_set;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
vector_t solution;
vector_t system_rhs;
std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
- std::vector<ConstraintMatrix> boundary_constraints(
+ std::vector<AffineConstraints<double>> boundary_constraints(
triangulation.n_global_levels());
- ConstraintMatrix empty_constraints;
+ AffineConstraints<double> empty_constraints;
for (unsigned int level = 0; level < triangulation.n_global_levels();
++level)
{
}
tria.execute_coarsening_and_refinement();
- FE_Q<dim> fe(2);
- DoFHandler<dim> mg_dof_handler(tria);
- IndexSet locally_relevant_set;
- ConstraintMatrix constraints;
- MGConstrainedDoFs mg_constrained_dofs;
+ FE_Q<dim> fe(2);
+ DoFHandler<dim> mg_dof_handler(tria);
+ IndexSet locally_relevant_set;
+ AffineConstraints<double> constraints;
+ MGConstrainedDoFs mg_constrained_dofs;
mg_dof_handler.distribute_dofs(fe);
mg_dof_handler.distribute_mg_dofs();
IndexSet locally_relevant_set;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
vector_t solution;
vector_t system_rhs;
const Coefficient<dim> coefficient(K);
std::vector<double> coefficient_values(n_q_points);
- std::vector<ConstraintMatrix> boundary_constraints(
+ std::vector<AffineConstraints<double>> boundary_constraints(
triangulation.n_global_levels());
- ConstraintMatrix empty_constraints;
+ AffineConstraints<double> empty_constraints;
for (unsigned int level = 0; level < triangulation.n_global_levels();
++level)
{
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
Vector<double> solution;
Vector<double> system_rhs;
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values(n_q_points);
- std::vector<ConstraintMatrix> boundary_constraints(
+ std::vector<AffineConstraints<double>> boundary_constraints(
triangulation.n_levels());
- std::vector<ConstraintMatrix> boundary_interface_constraints(
+ std::vector<AffineConstraints<double>> boundary_interface_constraints(
triangulation.n_levels());
for (unsigned int level = 0; level < triangulation.n_levels(); ++level)
{
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
Vector<double> solution;
Vector<double> system_rhs;
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values(n_q_points);
- std::vector<ConstraintMatrix> boundary_constraints(triangulation.n_levels());
- ConstraintMatrix empty_constraints;
+ std::vector<AffineConstraints<double>> boundary_constraints(
+ triangulation.n_levels());
+ AffineConstraints<double> empty_constraints;
for (unsigned int level = min_level; level < triangulation.n_levels();
++level)
{
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
LinearAlgebra::distributed::Vector<double> solution;
LinearAlgebra::distributed::Vector<double> system_rhs;
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values(n_q_points);
- std::vector<ConstraintMatrix> boundary_constraints(triangulation.n_levels());
- ConstraintMatrix empty_constraints;
+ std::vector<AffineConstraints<double>> boundary_constraints(
+ triangulation.n_levels());
+ AffineConstraints<double> empty_constraints;
for (unsigned int level = min_level; level < triangulation.n_levels();
++level)
{
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
- ConstraintMatrix hanging_node_constraints;
- ConstraintMatrix constraints;
+ AffineConstraints<double> hanging_node_constraints;
+ AffineConstraints<double> constraints;
LinearAlgebra::distributed::Vector<double> solution;
LinearAlgebra::distributed::Vector<double> system_rhs;
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values(n_q_points);
- std::vector<ConstraintMatrix> boundary_constraints(triangulation.n_levels());
- ConstraintMatrix empty_constraints;
+ std::vector<AffineConstraints<double>> boundary_constraints(
+ triangulation.n_levels());
+ AffineConstraints<double> empty_constraints;
for (unsigned int level = min_level; level < triangulation.n_levels();
++level)
{
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
- ConstraintMatrix hanging_node_constraints;
- ConstraintMatrix constraints;
+ AffineConstraints<double> hanging_node_constraints;
+ AffineConstraints<double> constraints;
LinearAlgebra::distributed::Vector<double> solution;
LinearAlgebra::distributed::Vector<double> system_rhs;
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values(n_q_points);
- std::vector<ConstraintMatrix> boundary_constraints(triangulation.n_levels());
- ConstraintMatrix empty_constraints;
+ std::vector<AffineConstraints<double>> boundary_constraints(
+ triangulation.n_levels());
+ AffineConstraints<double> empty_constraints;
for (unsigned int level = min_level; level < triangulation.n_levels();
++level)
{
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
Vector<double> solution;
Vector<double> system_rhs;
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values(n_q_points);
- std::vector<ConstraintMatrix> boundary_constraints(triangulation.n_levels());
- ConstraintMatrix empty_constraints;
+ std::vector<AffineConstraints<double>> boundary_constraints(
+ triangulation.n_levels());
+ AffineConstraints<double> empty_constraints;
for (unsigned int level = 0; level < triangulation.n_levels(); ++level)
{
boundary_constraints[level].add_lines(
IndexSet locally_relevant_set;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
vector_t solution;
vector_t system_rhs;
- std::vector<ConstraintMatrix> boundary_constraints(
+ std::vector<AffineConstraints<double>> boundary_constraints(
triangulation.n_global_levels());
- ConstraintMatrix empty_constraints;
+ AffineConstraints<double> empty_constraints;
for (unsigned int level = 0; level < triangulation.n_global_levels();
++level)
{
IndexSet locally_relevant_set;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
vector_t solution;
vector_t system_rhs;
- std::vector<ConstraintMatrix> boundary_constraints(
+ std::vector<AffineConstraints<double>> boundary_constraints(
triangulation.n_global_levels());
- ConstraintMatrix empty_constraints;
+ AffineConstraints<double> empty_constraints;
for (unsigned int level = 0; level < triangulation.n_global_levels();
++level)
{
IndexSet locally_relevant_set;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
vector_t solution;
vector_t system_rhs;
- std::vector<ConstraintMatrix> boundary_constraints(
+ std::vector<AffineConstraints<double>> boundary_constraints(
triangulation.n_global_levels());
- ConstraintMatrix empty_constraints;
+ AffineConstraints<double> empty_constraints;
for (unsigned int level = 0; level < triangulation.n_global_levels();
++level)
{
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
Vector<double> solution;
Vector<double> system_rhs;
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values(n_q_points);
- std::vector<ConstraintMatrix> boundary_constraints(triangulation.n_levels());
- ConstraintMatrix empty_constraints;
+ std::vector<AffineConstraints<double>> boundary_constraints(
+ triangulation.n_levels());
+ AffineConstraints<double> empty_constraints;
for (unsigned int level = 0; level < triangulation.n_levels(); ++level)
{
boundary_constraints[level].add_lines(
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
Vector<double> solution;
Vector<double> system_rhs;
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values(n_q_points);
- std::vector<ConstraintMatrix> boundary_constraints(
+ std::vector<AffineConstraints<double>> boundary_constraints(
triangulation.n_levels());
- ConstraintMatrix empty_constraints;
+ AffineConstraints<double> empty_constraints;
for (unsigned int level = 0; level < triangulation.n_levels(); ++level)
{
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
Vector<double> solution;
Vector<double> system_rhs;
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values(n_q_points);
- std::vector<ConstraintMatrix> boundary_constraints(triangulation.n_levels());
- ConstraintMatrix empty_constraints;
+ std::vector<AffineConstraints<double>> boundary_constraints(
+ triangulation.n_levels());
+ AffineConstraints<double> empty_constraints;
for (unsigned int level = 0; level < triangulation.n_levels(); ++level)
{
boundary_constraints[level].add_lines(
IndexSet locally_relevant_set;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
vector_t solution;
vector_t system_rhs;
const Coefficient<dim> coefficient(K);
std::vector<double> coefficient_values(n_q_points);
- std::vector<ConstraintMatrix> boundary_constraints(
+ std::vector<AffineConstraints<double>> boundary_constraints(
triangulation.n_global_levels());
- ConstraintMatrix empty_constraints;
+ AffineConstraints<double> empty_constraints;
for (unsigned int level = 0; level < triangulation.n_global_levels();
++level)
{
IndexSet locally_relevant_set;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
vector_t solution;
vector_t system_rhs;
- std::vector<ConstraintMatrix> boundary_constraints(
+ std::vector<AffineConstraints<double>> boundary_constraints(
triangulation.n_global_levels());
- ConstraintMatrix empty_constraints;
+ AffineConstraints<double> empty_constraints;
for (unsigned int level = 0; level < triangulation.n_global_levels();
++level)
{
MGConstrainedDoFs mg_constrained_dofs;
mg_constrained_dofs.initialize(dofh);
- ConstraintMatrix hanging_node_constraints;
- IndexSet locally_relevant_set;
+ AffineConstraints<double> hanging_node_constraints;
+ IndexSet locally_relevant_set;
DoFTools::extract_locally_relevant_dofs(dofh, locally_relevant_set);
hanging_node_constraints.reinit(locally_relevant_set);
DoFTools::make_hanging_node_constraints(dofh, hanging_node_constraints);
QGauss<dim> quad(3); // Quadrature for coupling
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
SparsityPattern sparsity;
{
QGauss<dim> quad(3); // Quadrature for coupling
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
SparsityPattern sparsity;
{
}
SparseMatrix<double> coupling(sparsity);
NonMatching::create_coupling_mass_matrix(
- space_dh, dh, quad, coupling, ConstraintMatrix());
+ space_dh, dh, quad, coupling, AffineConstraints<double>());
SparsityPattern mass_sparsity;
{
QGauss<dim> quad(4);
FEValues<dim, spacedim> fev(fe, quad, update_values | update_JxW_values);
std::vector<types::global_dof_index> dofs(fe.dofs_per_cell);
- FullMatrix<double> cell_matrix(fe.dofs_per_cell, fe.dofs_per_cell);
- ConstraintMatrix constraints;
+ FullMatrix<double> cell_matrix(fe.dofs_per_cell, fe.dofs_per_cell);
+ AffineConstraints<double> constraints;
for (auto cell : dh.active_cell_iterators())
if (cell->is_locally_owned())
QGauss<dim> quad(4);
FEValues<dim, spacedim> fev(fe, quad, update_values | update_JxW_values);
std::vector<types::global_dof_index> dofs(fe.dofs_per_cell);
- FullMatrix<double> cell_matrix(fe.dofs_per_cell, fe.dofs_per_cell);
- ConstraintMatrix constraints;
+ FullMatrix<double> cell_matrix(fe.dofs_per_cell, fe.dofs_per_cell);
+ AffineConstraints<double> constraints;
for (auto cell : dh.active_cell_iterators())
if (cell->is_locally_owned())
dh.distribute_dofs(fe);
space_dh.distribute_dofs(space_fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(space_dh, constraints);
constraints.close();
// this function tests that assembly of matrices in parallel works properly,
-// in particular the cache used in ConstraintMatrix that stores some scratch
-// data and is accessed by several threads at the same time.
+// in particular the cache used in AffineConstraints<double> that stores some
+// scratch data and is accessed by several threads at the same time.
#include <deal.II/base/function.h>
#include <deal.II/base/graph_coloring.h>
hp::QCollection<dim> quadrature_collection;
hp::QCollection<dim - 1> face_quadrature_collection;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> reference_matrix;
hp::QCollection<dim> quadrature_collection;
hp::QCollection<dim - 1> face_quadrature_collection;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> reference_matrix;
hp::QCollection<dim> quadrature_collection;
hp::QCollection<dim - 1> face_quadrature_collection;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> reference_matrix;
hp::QCollection<dim> quadrature_collection;
hp::QCollection<dim - 1> face_quadrature_collection;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> reference_matrix;
// not couple, so use pattern
SparsityPattern sparsity(dof.n_dofs(), dof.n_dofs());
DoFTools::make_sparsity_pattern(dof, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
// not couple, so use pattern
SparsityPattern sparsity(dof.n_dofs(), dof.n_dofs());
DoFTools::make_sparsity_pattern(dof, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
// not couple, so use pattern
SparsityPattern sparsity(dof.n_dofs(), dof.n_dofs());
DoFTools::make_sparsity_pattern(dof, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
// not couple, so use pattern
SparsityPattern sparsity(dof.n_dofs(), dof.n_dofs());
DoFTools::make_sparsity_pattern(dof, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
MappingQ<dim> mapping(3);
QGauss<dim> quadrature(6);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(
dof, 0, Functions::ConstantFunction<dim>(1, 1.), constraints);
MappingQ<dim> mapping(3);
QGauss<dim> quadrature(6);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(
dof, 0, Functions::ConstantFunction<dim>(1., 2), constraints);
MappingQ<dim> mapping(3);
QGauss<dim> quadrature(6);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
MappingQ<dim> mapping(3);
QGauss<dim> quadrature(6);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(
dof, 0, Functions::ConstantFunction<dim>(1, 1.), constraints);
MappingQ<dim> mapping(3);
QGauss<dim> quadrature(6);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(
dof, 0, Functions::ConstantFunction<dim>(1., 2), constraints);
// not couple, so use pattern
SparsityPattern sparsity(dof.n_dofs(), dof.n_dofs());
DoFTools::make_sparsity_pattern(dof, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
// not couple, so use pattern
SparsityPattern sparsity(dof.n_dofs(), dof.n_dofs());
DoFTools::make_sparsity_pattern(dof, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
// not couple, so use pattern
SparsityPattern sparsity(dof.n_dofs(), dof.n_dofs());
DoFTools::make_sparsity_pattern(dof, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
// not couple, so use pattern
SparsityPattern sparsity(dof.n_dofs(), dof.n_dofs());
DoFTools::make_sparsity_pattern(dof, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
mask(0, 0) = mask(1, 1) = DoFTools::always;
mask(0, 1) = mask(1, 0) = DoFTools::none;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
for (unsigned int j = 0; j < dim; ++j)
mask[dim + i][dim + j] = DoFTools::always;
DoFTools::make_sparsity_pattern(dof, mask, sparsity);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
constraints.close();
constraints.condense(sparsity);
MappingQ<dim> mapping(3);
QGauss<dim> quadrature(6);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(
dof, 0, Functions::ConstantFunction<dim>(1, 1.), constraints);
MappingQ<dim> mapping(3);
QGauss<dim> quadrature(6);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(
dof, 0, Functions::ConstantFunction<dim>(1., 2), constraints);
MappingQ<dim> mapping(3);
QGauss<dim> quadrature(6);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(dof,
0,
MappingQ<dim> mapping(3);
QGauss<dim> quadrature(6);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(
dof, 0, Functions::ConstantFunction<dim>(1, 1.), constraints);
MappingQ<dim> mapping(3);
QGauss<dim> quadrature(6);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
VectorTools::interpolate_boundary_values(
dof, 0, Functions::ConstantFunction<dim>(1., 2), constraints);
{
deallog << "NeumanBC case:" << std::endl;
deallog << "--------------" << std::endl;
- Triangulation<dim> triangulation;
- hp::DoFHandler<dim> dof_handler(triangulation);
- hp::FECollection<dim> fe_collection;
- hp::QCollection<dim> quadrature_formula;
- hp::QCollection<dim - 1> face_quadrature_formula;
- ConstraintMatrix constraints;
+ Triangulation<dim> triangulation;
+ hp::DoFHandler<dim> dof_handler(triangulation);
+ hp::FECollection<dim> fe_collection;
+ hp::QCollection<dim> quadrature_formula;
+ hp::QCollection<dim - 1> face_quadrature_formula;
+ AffineConstraints<double> constraints;
const unsigned int p = 3;
deallog << std::endl;
deallog << "Regular face:" << std::endl;
deallog << "-------------" << std::endl;
- Triangulation<dim> triangulation;
- hp::DoFHandler<dim> dof_handler(triangulation);
- hp::FECollection<dim> fe_collection;
- hp::QCollection<dim> quadrature_formula;
- hp::QCollection<dim - 1> face_quadrature_formula;
- ConstraintMatrix constraints;
+ Triangulation<dim> triangulation;
+ hp::DoFHandler<dim> dof_handler(triangulation);
+ hp::FECollection<dim> fe_collection;
+ hp::QCollection<dim> quadrature_formula;
+ hp::QCollection<dim - 1> face_quadrature_formula;
+ AffineConstraints<double> constraints;
const unsigned int p1 = 1;
const unsigned int p2 = 2;
deallog << std::endl;
deallog << "Irregular face:" << std::endl;
deallog << "---------------" << std::endl;
- Triangulation<dim> triangulation;
- hp::DoFHandler<dim> dof_handler(triangulation);
- hp::FECollection<dim> fe_collection;
- hp::QCollection<dim> quadrature_formula;
- hp::QCollection<dim - 1> face_quadrature_formula;
- ConstraintMatrix constraints;
+ Triangulation<dim> triangulation;
+ hp::DoFHandler<dim> dof_handler(triangulation);
+ hp::FECollection<dim> fe_collection;
+ hp::QCollection<dim> quadrature_formula;
+ hp::QCollection<dim - 1> face_quadrature_formula;
+ AffineConstraints<double> constraints;
const unsigned int p1 = 1;
const unsigned int p2 = 2;
deallog << "More complicated mesh:" << std::endl;
deallog << "----------------------" << std::endl;
- dealii::Triangulation<dim> triangulation;
- dealii::hp::DoFHandler<dim> dof_handler(triangulation);
- dealii::hp::FECollection<dim> fe_collection;
- dealii::hp::QCollection<dim> quadrature_formula;
- dealii::hp::QCollection<dim - 1> face_quadrature_formula;
- dealii::ConstraintMatrix constraints;
+ dealii::Triangulation<dim> triangulation;
+ dealii::hp::DoFHandler<dim> dof_handler(triangulation);
+ dealii::hp::FECollection<dim> fe_collection;
+ dealii::hp::QCollection<dim> quadrature_formula;
+ dealii::hp::QCollection<dim - 1> face_quadrature_formula;
+ dealii::AffineConstraints<double> constraints;
for (unsigned int p = 1; p <= 3; p++)
{
fe_collection.push_back(dealii::FE_Q<dim>(QIterated<1>(QTrapez<1>(), p)));
{
deallog << "NeumanBC case:" << std::endl;
deallog << "--------------" << std::endl;
- Triangulation<dim> triangulation;
- hp::DoFHandler<dim> dof_handler(triangulation);
- hp::FECollection<dim> fe_collection;
- hp::QCollection<dim> quadrature_formula;
- hp::QCollection<dim - 1> face_quadrature_formula;
- ConstraintMatrix constraints;
+ Triangulation<dim> triangulation;
+ hp::DoFHandler<dim> dof_handler(triangulation);
+ hp::FECollection<dim> fe_collection;
+ hp::QCollection<dim> quadrature_formula;
+ hp::QCollection<dim - 1> face_quadrature_formula;
+ AffineConstraints<double> constraints;
const unsigned int p = 3;
deallog << std::endl;
deallog << "Regular face:" << std::endl;
deallog << "-------------" << std::endl;
- Triangulation<dim> triangulation;
- hp::DoFHandler<dim> dof_handler(triangulation);
- hp::FECollection<dim> fe_collection;
- hp::QCollection<dim> quadrature_formula;
- hp::QCollection<dim - 1> face_quadrature_formula;
- ConstraintMatrix constraints;
+ Triangulation<dim> triangulation;
+ hp::DoFHandler<dim> dof_handler(triangulation);
+ hp::FECollection<dim> fe_collection;
+ hp::QCollection<dim> quadrature_formula;
+ hp::QCollection<dim - 1> face_quadrature_formula;
+ AffineConstraints<double> constraints;
const unsigned int p1 = 1;
const unsigned int p2 = 2;
deallog << std::endl;
deallog << "Irregular face:" << std::endl;
deallog << "---------------" << std::endl;
- Triangulation<dim> triangulation;
- hp::DoFHandler<dim> dof_handler(triangulation);
- hp::FECollection<dim> fe_collection;
- hp::QCollection<dim> quadrature_formula;
- hp::QCollection<dim - 1> face_quadrature_formula;
- ConstraintMatrix constraints;
+ Triangulation<dim> triangulation;
+ hp::DoFHandler<dim> dof_handler(triangulation);
+ hp::FECollection<dim> fe_collection;
+ hp::QCollection<dim> quadrature_formula;
+ hp::QCollection<dim - 1> face_quadrature_formula;
+ AffineConstraints<double> constraints;
const unsigned int p1 = 1;
const unsigned int p2 = 2;
deallog << "More complicated mesh:" << std::endl;
deallog << "----------------------" << std::endl;
- dealii::Triangulation<dim> triangulation;
- dealii::hp::DoFHandler<dim> dof_handler(triangulation);
- dealii::hp::FECollection<dim> fe_collection;
- dealii::hp::QCollection<dim> quadrature_formula;
- dealii::hp::QCollection<dim - 1> face_quadrature_formula;
- dealii::ConstraintMatrix constraints;
+ dealii::Triangulation<dim> triangulation;
+ dealii::hp::DoFHandler<dim> dof_handler(triangulation);
+ dealii::hp::FECollection<dim> fe_collection;
+ dealii::hp::QCollection<dim> quadrature_formula;
+ dealii::hp::QCollection<dim - 1> face_quadrature_formula;
+ dealii::AffineConstraints<double> constraints;
for (unsigned int p = 1; p <= 3; p++)
{
fe_collection.push_back(dealii::FE_Q<dim>(QIterated<1>(QTrapez<1>(), p)));
for (unsigned int j = 0; j <= i; ++j)
boundary_ids.insert(j);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::compute_no_normal_flux_constraints(dof, 0, boundary_ids, cm);
cm.print(deallog.get_file_stream());
for (unsigned int j = 0; j <= i; ++j)
boundary_ids.insert(j);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::compute_no_normal_flux_constraints(dof, 1, boundary_ids, cm);
cm.print(deallog.get_file_stream());
std::set<types::boundary_id> boundary_ids;
boundary_ids.insert(0);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::compute_no_normal_flux_constraints(dof, 0, boundary_ids, cm);
cm.print(deallog.get_file_stream());
std::set<types::boundary_id> boundary_ids;
boundary_ids.insert(0);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::compute_no_normal_flux_constraints(dof, 0, boundary_ids, cm);
cm.close();
for (unsigned int j = 0; j <= i; ++j)
boundary_ids.insert(j);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::compute_no_normal_flux_constraints(dof, 0, boundary_ids, cm);
cm.print(deallog.get_file_stream());
boundary_ids.insert(1);
boundary_ids.insert(3);
- ConstraintMatrix cm;
- const MappingQ<dim> mapping(4);
+ AffineConstraints<double> cm;
+ const MappingQ<dim> mapping(4);
VectorTools::compute_no_normal_flux_constraints(
dof, 0, boundary_ids, cm, mapping);
cm.close();
std::set<types::boundary_id> boundary_ids;
boundary_ids.insert(0);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::compute_no_normal_flux_constraints(dof, 0, boundary_ids, cm);
cm.print(deallog.get_file_stream());
// in function
// static void dealii::VectorTools::compute_no_normal_flux_constraints(const
// DoFHandlerType<dim, spacedim>&, unsigned int, const
-// std::set<types::boundary_id>&, dealii::ConstraintMatrix&, const
+// std::set<types::boundary_id>&, dealii::AffineConstraints<double>&, const
// dealii::Mapping<dim, spacedim>&) [with int dim = 3, DoFHandlerType =
// dealii::DoFHandler, int spacedim = 3]
// The violated condition was:
GridGenerator::half_hyper_shell(tr, Point<dim>(), 0.5, 1, 0);
tr.reset_manifold(0);
- ConstraintMatrix cm;
- MappingQ<dim> mapping(1);
+ AffineConstraints<double> cm;
+ MappingQ<dim> mapping(1);
FESystem<dim> fe(FE_Q<dim>(1), dim);
DoFHandler<dim> dofh(tr);
GridGenerator::quarter_hyper_shell(tr, Point<dim>(), 0.5, 1.0, 3, true);
tr.reset_manifold(0);
- ConstraintMatrix cm;
- MappingQ<dim> mapping(1);
+ AffineConstraints<double> cm;
+ MappingQ<dim> mapping(1);
FESystem<dim> fe(FE_Q<dim>(1), dim);
DoFHandler<dim> dofh(tr);
// --------------------------------------------------------
// An error occurred in line <304> of file <.../constraint_matrix.cc> in
// function
-// void dealii::ConstraintMatrix::close()
+// void dealii::AffineConstraints<double>::close()
// The violated condition was:
// dof_index != line->line
// The name and call sequence of the exception was:
void
run()
{
- Triangulation<dim> triangulation;
- FESystem<dim> fe(FE_Q<dim>(1), dim);
- DoFHandler<dim> dof_handler(triangulation);
- ConstraintMatrix constraints;
+ Triangulation<dim> triangulation;
+ FESystem<dim> fe(FE_Q<dim>(1), dim);
+ DoFHandler<dim> dof_handler(triangulation);
+ AffineConstraints<double> constraints;
sixty_deg_hyper_shell(triangulation, Point<dim>(), 0.5, 1.0);
GridTools::copy_boundary_to_manifold_id(triangulation);
DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
std::set<types::boundary_id> no_normal_flux_boundaries;
no_normal_flux_boundaries.insert(6);
VectorTools::compute_no_normal_flux_constraints(dof_handler,
in function 5: void
dealii::VectorTools::compute_no_normal_flux_constraints(const
DoFHandlerType<dim, spacedim>&, unsigned int, const
-std::set<types::boundary_id>&, dealii::ConstraintMatrix&, const
+std::set<types::boundary_id>&, dealii::AffineConstraints<double>&, const
dealii::Mapping<dim, spacedim>&) [with int dim = 3; DoFHandlerType =
dealii::DoFHandler; int spacedim = 3] 5: The violated condition was: 5:
contribution->second.size() == dim-1 5: The name and call sequence of the
DoFHandler<dim> dof_handler(tria);
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
std::set<types::boundary_id> no_normal_flux_boundaries;
no_normal_flux_boundaries.insert(0); // x=0
no_normal_flux_boundaries.insert(5); // z=1
DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(fe);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
std::set<types::boundary_id> no_normal_flux_boundaries;
no_normal_flux_boundaries.insert(1);
deal_II_exceptions::disable_abort_on_exception();
GridGenerator::quarter_hyper_shell(tr, Point<dim>(), 0.5, 1.0, 3, true);
tr.reset_manifold(0);
- ConstraintMatrix cm;
- MappingQ<dim> mapping(1);
+ AffineConstraints<double> cm;
+ MappingQ<dim> mapping(1);
FESystem<dim> fe(FE_Q<dim>(3), dim);
DoFHandler<dim> dofh(tr);
tria.set_all_manifold_ids(0);
tria.set_manifold(0, spherical);
- ConstraintMatrix cm;
- MappingQ<dim> mapping(4);
+ AffineConstraints<double> cm;
+ MappingQ<dim> mapping(4);
FESystem<dim> fe(FE_Q<dim>(2), dim);
DoFHandler<dim> dofh(tria);
for (unsigned int j = 0; j <= i; ++j)
boundary_ids.insert(j);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::compute_no_normal_flux_constraints(dof, 0, boundary_ids, cm);
cm.print(deallog.get_file_stream());
for (unsigned int j = 0; j <= i; ++j)
boundary_ids.insert(j);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::compute_no_normal_flux_constraints(dof, 1, boundary_ids, cm);
cm.print(deallog.get_file_stream());
std::set<types::boundary_id> boundary_ids;
boundary_ids.insert(0);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::compute_no_normal_flux_constraints(dof, 0, boundary_ids, cm);
cm.print(deallog.get_file_stream());
std::set<types::boundary_id> boundary_ids;
boundary_ids.insert(0);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::compute_no_normal_flux_constraints(dof, 0, boundary_ids, cm);
cm.close();
for (unsigned int j = 0; j <= i; ++j)
boundary_ids.insert(j);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::compute_no_normal_flux_constraints(dof, 0, boundary_ids, cm);
cm.print(deallog.get_file_stream());
for (unsigned int j = 0; j <= i; ++j)
boundary_ids.insert(j);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::compute_normal_flux_constraints(dof, 0, boundary_ids, cm);
cm.print(deallog.get_file_stream());
for (unsigned int j = 0; j <= i; ++j)
boundary_ids.insert(j);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::compute_normal_flux_constraints(dof, 1, boundary_ids, cm);
cm.print(deallog.get_file_stream());
std::set<types::boundary_id> boundary_ids;
boundary_ids.insert(0);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::compute_normal_flux_constraints(dof, 0, boundary_ids, cm);
cm.print(deallog.get_file_stream());
for (unsigned int j = 0; j <= i; ++j)
boundary_ids.insert(j);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::compute_normal_flux_constraints(dof, 0, boundary_ids, cm);
cm.print(deallog.get_file_stream());
for (unsigned int j = 0; j <= i; ++j)
boundary_ids.insert(j);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::compute_nonzero_normal_flux_constraints(
dof, 0, boundary_ids, function_map, cm);
Vector<double> v(dh.n_dofs());
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
VectorTools::project(dh, cm, QGauss<dim>(3), F<dim>(), v);
Vector<double> v(dh.n_dofs());
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
// use the implicit Q1 mapping. this will yield a zero solution
v.block(1).reinit(dh.n_dofs() - dh.n_dofs() / 2);
v.collect_sizes();
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
cm.close();
VectorTools::project(dh, cm, QGauss<dim>(3), F<dim>(), v);
const F<dim> approximated_function;
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::interpolate_boundary_values(dh, 0, approximated_function, cm);
cm.close();
dof_handler.distribute_dofs(fe);
- BoundaryFunction<dim> boundary_function;
- ConstraintMatrix constraints;
+ BoundaryFunction<dim> boundary_function;
+ AffineConstraints<double> constraints;
constraints.clear();
VectorTools::project_boundary_values_curl_conforming(
template <int dim>
void
-test_boundary_values(const FiniteElement<dim> &fe,
- ConstraintMatrix & constraints)
+test_boundary_values(const FiniteElement<dim> & fe,
+ AffineConstraints<double> &constraints)
{
Triangulation<dim> triangulation;
GridGenerator::subdivided_hyper_cube(triangulation, 2);
{
deallog << "dim:" << dim << " order:" << order << "\t";
- ConstraintMatrix constraints_fe, constraints_fes;
+ AffineConstraints<double> constraints_fe, constraints_fes;
{
FE_Nedelec<3> fe(order);
dof_handler.distribute_dofs(fe);
- BoundaryFunction<dim> boundary_function;
- ConstraintMatrix constraints;
+ BoundaryFunction<dim> boundary_function;
+ AffineConstraints<double> constraints;
constraints.clear();
VectorTools::project_boundary_values_div_conforming(
deallog << "n_dofs=" << dof_handler.n_dofs() << std::endl;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
IndexSet locally_relevant_dofs;
DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
IndexSet locally_relevant_dofs;
DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs);
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
deallog << "n_cells=" << triangulation.n_global_active_cells() << std::endl;
std::vector<std::shared_ptr<DoFHandler<dim>>> dof_handlers(fes.size());
- std::vector<IndexSet> locally_relevant_dofs(fes.size());
- std::vector<ConstraintMatrix> constraints(fes.size());
+ std::vector<IndexSet> locally_relevant_dofs(fes.size());
+ std::vector<AffineConstraints<double>> constraints(fes.size());
- std::vector<const DoFHandler<dim> *> dof_handlers_mf(fes.size());
- std::vector<const ConstraintMatrix *> constraints_mf(fes.size());
+ std::vector<const DoFHandler<dim> *> dof_handlers_mf(fes.size());
+ std::vector<const AffineConstraints<double> *> constraints_mf(fes.size());
for (unsigned int i = 0; i < fes.size(); ++i)
{
dof_handlers[i] = std::make_shared<DoFHandler<dim>>(triangulation);
for (unsigned int j = 0; j <= i; ++j)
boundary_ids.insert(j);
- ConstraintMatrix cm;
+ AffineConstraints<double> cm;
VectorTools::compute_nonzero_tangential_flux_constraints(
dof, 0, boundary_ids, function_map, cm);
// Check that all the functionality needed for calling
-// ConstraintMatrix::distribute_local_to_global on mutiple combinations of
-// PETScWrappers objects is correctly instantiated and works.
+// AffineConstraints<double>::distribute_local_to_global on mutiple combinations
+// of PETScWrappers objects is correctly instantiated and works.
#include <deal.II/lac/affine_constraints.h>
#include <deal.II/lac/full_matrix.h>
const types::global_dof_index n_local_dofs = locally_owned_dofs.n_elements();
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.reinit(locally_relevant_dofs);
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
constraints.close();
parallel::shared::Triangulation<dim> triangulation;
FESystem<dim> fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
const QGauss<dim> quadrature_formula;
std::vector<PointHistory<dim>> quadrature_point_history;
PETScWrappers::MPI::SparseMatrix system_matrix;
parallel::shared::Triangulation<dim> triangulation;
FESystem<dim> fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix hanging_node_constraints;
+ AffineConstraints<double> hanging_node_constraints;
const QGauss<dim> quadrature_formula;
std::vector<PointHistory<dim>> quadrature_point_history;
PETScWrappers::MPI::SparseMatrix system_matrix;
const QGauss<dim - 1> qf_face;
const unsigned int n_q_points;
const unsigned int n_q_points_f;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> tangent_matrix;
BlockVector<double> system_rhs;
make_grid();
system_setup();
{
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
const ComponentSelectFunction<dim> J_mask(J_component, n_components);
VectorTools::project(dof_handler_ref,
const QGauss<dim - 1> qf_face;
const unsigned int n_q_points;
const unsigned int n_q_points_f;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> tangent_matrix;
BlockVector<double> system_rhs;
make_grid();
system_setup();
{
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
const ComponentSelectFunction<dim> J_mask(J_component, n_components);
VectorTools::project(dof_handler_ref,
const QGauss<dim - 1> qf_face;
const unsigned int n_q_points;
const unsigned int n_q_points_f;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> tangent_matrix;
BlockVector<double> system_rhs;
make_grid();
system_setup();
{
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
constraints.close();
const ComponentSelectFunction<dim> J_mask(J_component, n_components);
VectorTools::project(dof_handler_ref,
PETScWrappers::SparseMatrix A;
PETScWrappers::MPI::Vector b, x;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TableHandler output_table;
};
PETScWrappers::SparseMatrix A, B;
std::vector<PETScWrappers::MPI::Vector> x;
std::vector<double> lambda;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TableHandler output_table;
};
TrilinosWrappers::SparseMatrix A;
TrilinosWrappers::MPI::Vector b, x;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TableHandler output_table;
};
DoFHandler<dim> dof_handler;
MappingQ<dim> mapping;
- SparsityPattern sparsity_pattern;
- SparseMatrix<double> system_matrix;
- ConstraintMatrix mean_value_constraints;
+ SparsityPattern sparsity_pattern;
+ SparseMatrix<double> system_matrix;
+ AffineConstraints<double> mean_value_constraints;
Vector<double> solution;
Vector<double> system_rhs;
dealii::Utilities::MPI::this_mpi_process(mpi_communicator);
- dealii::Triangulation<dim> triangulation;
- dealii::DoFHandler<dim> dof_handler(triangulation);
- dealii::FE_Q<dim> fe(1);
- dealii::ConstraintMatrix constraints;
- dealii::IndexSet locally_owned_dofs;
- dealii::IndexSet locally_relevant_dofs;
+ dealii::Triangulation<dim> triangulation;
+ dealii::DoFHandler<dim> dof_handler(triangulation);
+ dealii::FE_Q<dim> fe(1);
+ dealii::AffineConstraints<double> constraints;
+ dealii::IndexSet locally_owned_dofs;
+ dealii::IndexSet locally_relevant_dofs;
std::vector<dealii::PETScWrappers::MPI::Vector> eigenfunctions;
std::vector<PetscScalar> eigenvalues;
dealii::Utilities::MPI::this_mpi_process(mpi_communicator);
- dealii::Triangulation<dim> triangulation;
- dealii::DoFHandler<dim> dof_handler(triangulation);
- dealii::FE_Q<dim> fe(1);
- dealii::ConstraintMatrix constraints;
- dealii::IndexSet locally_owned_dofs;
- dealii::IndexSet locally_relevant_dofs;
+ dealii::Triangulation<dim> triangulation;
+ dealii::DoFHandler<dim> dof_handler(triangulation);
+ dealii::FE_Q<dim> fe(1);
+ dealii::AffineConstraints<double> constraints;
+ dealii::IndexSet locally_owned_dofs;
+ dealii::IndexSet locally_relevant_dofs;
std::vector<dealii::PETScWrappers::MPI::Vector> eigenfunctions;
std::vector<PetscScalar> eigenvalues;
dealii::Utilities::MPI::this_mpi_process(mpi_communicator);
- dealii::Triangulation<dim> triangulation;
- dealii::DoFHandler<dim> dof_handler(triangulation);
- dealii::FE_Q<dim> fe(1);
- dealii::ConstraintMatrix constraints;
- dealii::IndexSet locally_owned_dofs;
- dealii::IndexSet locally_relevant_dofs;
+ dealii::Triangulation<dim> triangulation;
+ dealii::DoFHandler<dim> dof_handler(triangulation);
+ dealii::FE_Q<dim> fe(1);
+ dealii::AffineConstraints<double> constraints;
+ dealii::IndexSet locally_owned_dofs;
+ dealii::IndexSet locally_relevant_dofs;
std::vector<dealii::PETScWrappers::MPI::Vector> eigenfunctions;
std::vector<PetscScalar> eigenvalues;
hp::QCollection<dim> quadrature_collection;
hp::QCollection<dim - 1> face_quadrature_collection;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TrilinosWrappers::SparseMatrix reference_matrix;
TrilinosWrappers::SparseMatrix test_matrix;
FE_Q<dim> fe;
QGauss<dim> quadrature;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TrilinosWrappers::SparseMatrix reference_matrix;
TrilinosWrappers::SparseMatrix test_matrix;
FE_Q<dim> fe;
QGauss<dim> quadrature;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TrilinosWrappers::SparseMatrix reference_matrix;
TrilinosWrappers::SparseMatrix test_matrix;
FESystem<dim> fe;
QGauss<dim> quadrature;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TrilinosWrappers::BlockSparseMatrix reference_matrix;
TrilinosWrappers::BlockSparseMatrix test_matrix;
FE_Q<dim> fe;
QGauss<dim> quadrature;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TrilinosWrappers::SparseMatrix reference_matrix;
TrilinosWrappers::SparseMatrix test_matrix;
FESystem<dim> fe;
QGauss<dim> quadrature;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TrilinosWrappers::BlockSparseMatrix reference_matrix;
TrilinosWrappers::BlockSparseMatrix test_matrix;
FE_Q<dim> fe;
QGauss<dim> quadrature;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TrilinosWrappers::SparseMatrix reference_matrix;
TrilinosWrappers::SparseMatrix test_matrix;
FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TrilinosWrappers::SparseMatrix system_matrix;
FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
- SparsityPattern sparsity_pattern;
+ AffineConstraints<double> constraints;
+ SparsityPattern sparsity_pattern;
TrilinosWrappers::SparseMatrix system_matrix;
FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
- SparsityPattern sparsity_pattern;
+ AffineConstraints<double> constraints;
+ SparsityPattern sparsity_pattern;
TrilinosWrappers::SparseMatrix system_matrix;
DoFTools::make_sparsity_pattern(dof_handler,
coupling,
sparsity,
- ConstraintMatrix(),
+ AffineConstraints<double>(),
false,
Utilities::MPI::this_mpi_process(
MPI_COMM_WORLD));
DoFTools::make_sparsity_pattern(dof_handler,
coupling,
sparsity,
- ConstraintMatrix(),
+ AffineConstraints<double>(),
false,
Utilities::MPI::this_mpi_process(
MPI_COMM_WORLD));
FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TrilinosWrappers::SparseMatrix system_matrix;
FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TrilinosWrappers::SparseMatrix system_matrix;
FE_Q_iso_Q1<dim> fe_precondition;
DoFHandler<dim> dof_handler_precondition;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TrilinosWrappers::SparseMatrix system_matrix;
TrilinosWrappers::SparseMatrix preconditioner_matrix;
FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TrilinosWrappers::SparseMatrix system_matrix;
FE_Q_iso_Q1<dim> fe_precondition;
DoFHandler<dim> dof_handler_precondition;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
TrilinosWrappers::SparseMatrix system_matrix;
TrilinosWrappers::SparseMatrix preconditioner_matrix;
FE_Q<2> fe;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
IndexSet locally_owned_dofs;
IndexSet locally_relevant_dofs;
IndexSet locally_owned_dofs;
IndexSet locally_relevant_dofs;
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
LA::MPI::SparseMatrix system_matrix;
LA::MPI::Vector locally_relevant_solution;
FESystem<dim> fe;
DoFHandler<dim> dof_handler;
- ConstraintMatrix constraints;
- std::vector<IndexSet> owned_partitioning;
- std::vector<IndexSet> relevant_partitioning;
+ AffineConstraints<double> constraints;
+ std::vector<IndexSet> owned_partitioning;
+ std::vector<IndexSet> relevant_partitioning;
};
locally_relevant_dofs.get_view(n_u, n_u + n_p));
}
- ConstraintMatrix new_constraints;
+ AffineConstraints<double> new_constraints;
new_constraints.close();
{
TrilinosWrappers::BlockSparsityPattern bsp(owned_partitioning,
DoFTools::extract_locally_relevant_dofs(dh, relevant_partitioning);
// generate empty constraints
- ConstraintMatrix constraints;
+ AffineConstraints<double> constraints;
// generate sparsity pattern
TrilinosWrappers::SparsityPattern sp(dh.locally_owned_dofs(),