From: Daniel Arndt Date: Sat, 13 Oct 2018 22:09:58 +0000 (+0200) Subject: Replace ConstraintMatrix by AffineConstraints in tests X-Git-Tag: v9.1.0-rc1~618^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3a19245c2c5758d53f3c508d6ca9dff51ff9742;p=dealii.git Replace ConstraintMatrix by AffineConstraints in tests --- diff --git a/tests/cuda/matrix_free_matrix_vector_01.cu b/tests/cuda/matrix_free_matrix_vector_01.cu index 3b81b7d431..4c9dbb4c7d 100644 --- a/tests/cuda/matrix_free_matrix_vector_01.cu +++ b/tests/cuda/matrix_free_matrix_vector_01.cu @@ -38,7 +38,7 @@ test() FE_Q fe(fe_degree); DoFHandler dof(tria); dof.distribute_dofs(fe); - ConstraintMatrix constraints; + AffineConstraints constraints; constraints.close(); do_test(dof, constraints); diff --git a/tests/cuda/matrix_free_matrix_vector_02.cu b/tests/cuda/matrix_free_matrix_vector_02.cu index e42e6fb7d4..97b6d04369 100644 --- a/tests/cuda/matrix_free_matrix_vector_02.cu +++ b/tests/cuda/matrix_free_matrix_vector_02.cu @@ -38,7 +38,7 @@ test() FE_Q fe(fe_degree); DoFHandler dof(tria); dof.distribute_dofs(fe); - ConstraintMatrix constraints; + AffineConstraints constraints; VectorTools::interpolate_boundary_values(dof, 0, Functions::ZeroFunction(), diff --git a/tests/cuda/matrix_free_matrix_vector_04.cu b/tests/cuda/matrix_free_matrix_vector_04.cu index f8edb227be..53db3bb6fc 100644 --- a/tests/cuda/matrix_free_matrix_vector_04.cu +++ b/tests/cuda/matrix_free_matrix_vector_04.cu @@ -41,7 +41,7 @@ test() FE_Q fe(fe_degree); DoFHandler dof(tria); dof.distribute_dofs(fe); - ConstraintMatrix constraints; + AffineConstraints constraints; constraints.close(); do_test(dof, constraints); diff --git a/tests/examples/step-56.cc b/tests/examples/step-56.cc index 12ede54112..959bbc2f30 100644 --- a/tests/examples/step-56.cc +++ b/tests/examples/step-56.cc @@ -441,7 +441,7 @@ namespace Step56 DoFHandler dof_handler; DoFHandler velocity_dof_handler; - ConstraintMatrix constraints; + AffineConstraints constraints; BlockSparsityPattern sparsity_pattern; BlockSparseMatrix system_matrix; @@ -746,9 +746,9 @@ namespace Step56 std::vector> symgrad_phi_u(dofs_per_cell); - std::vector boundary_constraints( + std::vector> boundary_constraints( triangulation.n_levels()); - std::vector boundary_interface_constraints( + std::vector> boundary_interface_constraints( triangulation.n_levels()); for (unsigned int level = 0; level < triangulation.n_levels(); ++level) { diff --git a/tests/fe/br_approximation_01.cc b/tests/fe/br_approximation_01.cc index 22a9532a64..0e4758d858 100644 --- a/tests/fe/br_approximation_01.cc +++ b/tests/fe/br_approximation_01.cc @@ -46,7 +46,6 @@ std::ofstream logfile("output"); #include #include -#include #include #include #include @@ -341,7 +340,7 @@ double TestProjection(Mapping<2> &mapping, DoFHandler<2> *dof_handler) TestPoly<2> pol(deg); // Project solution onto BR FE field - ConstraintMatrix hn_constraints; + AffineConstraints hn_constraints; hn_constraints.clear(); DoFTools::make_hanging_node_constraints(*dof_handler, hn_constraints); hn_constraints.close(); @@ -450,7 +449,7 @@ main() solution_q.reinit(dof_handler->n_dofs()); deformation.reinit(dof_handler_def->n_dofs()); - ConstraintMatrix hn_constraints_def; + AffineConstraints hn_constraints_def; hn_constraints_def.clear(); DoFTools::make_hanging_node_constraints(*dof_handler_def, hn_constraints_def); hn_constraints_def.close(); diff --git a/tests/fe/fe_br.cc b/tests/fe/fe_br.cc index 78e1ecf40b..784eccb4da 100644 --- a/tests/fe/fe_br.cc +++ b/tests/fe/fe_br.cc @@ -31,7 +31,6 @@ #include #include -#include #include diff --git a/tests/fe/fe_enriched_color_05.cc b/tests/fe/fe_enriched_color_05.cc index 493f97eee1..650462f4cb 100644 --- a/tests/fe/fe_enriched_color_05.cc +++ b/tests/fe/fe_enriched_color_05.cc @@ -99,7 +99,7 @@ plot_shape_function(hp::DoFHandler &dof_handler, unsigned int patches = 5) std::cout << "n_cells: " << dof_handler.get_triangulation().n_active_cells() << std::endl; - ConstraintMatrix constraints; + AffineConstraints constraints; constraints.clear(); dealii::DoFTools::make_hanging_node_constraints(dof_handler, constraints); constraints.close(); diff --git a/tests/fe/fe_enriched_color_07.cc b/tests/fe/fe_enriched_color_07.cc index 1159cea30a..fb7841d65a 100644 --- a/tests/fe/fe_enriched_color_07.cc +++ b/tests/fe/fe_enriched_color_07.cc @@ -927,7 +927,7 @@ plot_shape_function(hp::DoFHandler &dof_handler, unsigned int patches = 5) std::cout << "...start plotting shape function" << std::endl; std::cout << "Patches for output: " << patches << std::endl; - ConstraintMatrix constraints; + AffineConstraints constraints; constraints.clear(); dealii::DoFTools::make_hanging_node_constraints(dof_handler, constraints); constraints.close(); @@ -1098,7 +1098,7 @@ protected: Vector localized_solution; PETScWrappers::MPI::Vector system_rhs; - ConstraintMatrix constraints; + AffineConstraints constraints; MPI_Comm mpi_communicator; const unsigned int n_mpi_processes; diff --git a/tests/fe/fe_enriched_color_08.cc b/tests/fe/fe_enriched_color_08.cc index 945f6b9a11..8e5f849c07 100644 --- a/tests/fe/fe_enriched_color_08.cc +++ b/tests/fe/fe_enriched_color_08.cc @@ -57,7 +57,7 @@ plot_shape_function(hp::DoFHandler &dof_handler, unsigned int patches = 5) deallog << "...start plotting shape function" << std::endl; deallog << "Patches for output: " << patches << std::endl; - ConstraintMatrix constraints; + AffineConstraints constraints; constraints.clear(); dealii::DoFTools::make_hanging_node_constraints(dof_handler, constraints); constraints.close(); @@ -274,7 +274,7 @@ main(int argc, char **argv) dof_handler.distribute_dofs(fe_collection); - ConstraintMatrix constraints; + AffineConstraints constraints; DoFTools::make_hanging_node_constraints(dof_handler, constraints); constraints.close(); diff --git a/tests/integrators/assembler_simple_system_inhom_01.cc b/tests/integrators/assembler_simple_system_inhom_01.cc index 0ff5f528c5..98b163878d 100644 --- a/tests/integrators/assembler_simple_system_inhom_01.cc +++ b/tests/integrators/assembler_simple_system_inhom_01.cc @@ -483,11 +483,11 @@ RHSIntegrator::face(MeshWorker::DoFInfo &, * Main class */ template -class MeshWorkerConstraintMatrixTest +class MeshWorkerAffineConstraintsTest { public: - MeshWorkerConstraintMatrixTest(const FiniteElement &fe); - ~MeshWorkerConstraintMatrixTest(); + MeshWorkerAffineConstraintsTest(const FiniteElement &fe); + ~MeshWorkerAffineConstraintsTest(); void run(); @@ -523,7 +523,7 @@ private: template -MeshWorkerConstraintMatrixTest::MeshWorkerConstraintMatrixTest( +MeshWorkerAffineConstraintsTest::MeshWorkerAffineConstraintsTest( const FiniteElement &fe) : mapping() , dof_handler(triangulation) @@ -540,7 +540,7 @@ MeshWorkerConstraintMatrixTest::MeshWorkerConstraintMatrixTest( template -MeshWorkerConstraintMatrixTest::~MeshWorkerConstraintMatrixTest() +MeshWorkerAffineConstraintsTest::~MeshWorkerAffineConstraintsTest() { dof_handler.clear(); } @@ -548,7 +548,7 @@ MeshWorkerConstraintMatrixTest::~MeshWorkerConstraintMatrixTest() template void -MeshWorkerConstraintMatrixTest::setup_system() +MeshWorkerAffineConstraintsTest::setup_system() { dof_handler.distribute_dofs(fe); @@ -588,7 +588,7 @@ MeshWorkerConstraintMatrixTest::setup_system() */ template void -MeshWorkerConstraintMatrixTest::assemble_system_MeshWorker() +MeshWorkerAffineConstraintsTest::assemble_system_MeshWorker() { MeshWorker::IntegrationInfoBox info_box; @@ -624,7 +624,7 @@ MeshWorkerConstraintMatrixTest::assemble_system_MeshWorker() */ template void -MeshWorkerConstraintMatrixTest::assemble_MeshWorker() +MeshWorkerAffineConstraintsTest::assemble_MeshWorker() { MeshWorker::IntegrationInfoBox info_box; @@ -668,7 +668,7 @@ MeshWorkerConstraintMatrixTest::assemble_MeshWorker() template void -MeshWorkerConstraintMatrixTest::createInhomConstraints() +MeshWorkerAffineConstraintsTest::createInhomConstraints() { this->constraintsInhom.clear(); // boundary constraints @@ -702,7 +702,7 @@ MeshWorkerConstraintMatrixTest::createInhomConstraints() template void -MeshWorkerConstraintMatrixTest::run() +MeshWorkerAffineConstraintsTest::run() { setup_system(); createInhomConstraints(); @@ -743,13 +743,13 @@ main() FE_Q<2> fe(1); deallog.push(fe.get_name()); - MeshWorkerConstraintMatrixTest<2> test(fe); + MeshWorkerAffineConstraintsTest<2> test(fe); test.run(); deallog.pop(); FE_DGQ<2> fe2(1); deallog.push(fe2.get_name()); - MeshWorkerConstraintMatrixTest<2> test2(fe2); + MeshWorkerAffineConstraintsTest<2> test2(fe2); test2.run(); deallog.pop(); } diff --git a/tests/matrix_free/cell_categorization_02.cc b/tests/matrix_free/cell_categorization_02.cc index ff7c80f78f..d893c3cbf4 100644 --- a/tests/matrix_free/cell_categorization_02.cc +++ b/tests/matrix_free/cell_categorization_02.cc @@ -86,7 +86,7 @@ test() DoFHandler dof(tria); dof.distribute_dofs(fe); dof.distribute_mg_dofs(); - ConstraintMatrix constraints; + AffineConstraints constraints; constraints.close(); MGConstrainedDoFs mg_constrained_dofs; diff --git a/tests/mpi/hp_unify_dof_indices_07.cc b/tests/mpi/hp_unify_dof_indices_07.cc index 758170f388..8bd1d7b6fd 100644 --- a/tests/mpi/hp_unify_dof_indices_07.cc +++ b/tests/mpi/hp_unify_dof_indices_07.cc @@ -81,7 +81,7 @@ test() (++dof_handler.begin_active())->set_active_fe_index(1); dof_handler.distribute_dofs(fe); - ConstraintMatrix constraints; + AffineConstraints constraints; DoFTools::make_hanging_node_constraints(dof_handler, constraints); constraints.close(); diff --git a/tests/optimization/step-44.h b/tests/optimization/step-44.h index ec1e8a399b..3a454914d5 100644 --- a/tests/optimization/step-44.h +++ b/tests/optimization/step-44.h @@ -40,7 +40,6 @@ #include #include #include -#include #include #include