From c4398a50f52f3a9b7f7b6bbc4f4bb890790e1018 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 6 May 2022 10:27:09 -0600 Subject: [PATCH] Simplify tests. --- tests/grid/reference_cell_type_02.cc | 25 +++---------------------- tests/grid/reference_cell_type_03.cc | 27 +++------------------------ 2 files changed, 6 insertions(+), 46 deletions(-) diff --git a/tests/grid/reference_cell_type_02.cc b/tests/grid/reference_cell_type_02.cc index ebfd0e8bae..867912feda 100644 --- a/tests/grid/reference_cell_type_02.cc +++ b/tests/grid/reference_cell_type_02.cc @@ -18,13 +18,8 @@ #include -#include -#include -#include -#include -#include +#include #include -#include #include #include @@ -56,24 +51,10 @@ test(const ReferenceCell &reference_cell) else if (reference_cell == ReferenceCells::Hexahedron) q = std::make_unique>(2); - std::unique_ptr> fe; - if (reference_cell == ReferenceCells::Line) - fe = std::make_unique>(1); - else if (reference_cell == ReferenceCells::Triangle) - fe = std::make_unique>(1); - else if (reference_cell == ReferenceCells::Quadrilateral) - fe = std::make_unique>(1); - else if (reference_cell == ReferenceCells::Tetrahedron) - fe = std::make_unique>(1); - else if (reference_cell == ReferenceCells::Wedge) - fe = std::make_unique>(1); - else if (reference_cell == ReferenceCells::Pyramid) - fe = std::make_unique>(1); - else if (reference_cell == ReferenceCells::Hexahedron) - fe = std::make_unique>(1); + FE_Nothing fe(reference_cell); // Set up the objects to compute an integral on the reference cell - FEValues fe_values(*fe, *q, update_JxW_values); + FEValues fe_values(fe, *q, update_JxW_values); fe_values.reinit(triangulation.begin_active()); double volume = 0; diff --git a/tests/grid/reference_cell_type_03.cc b/tests/grid/reference_cell_type_03.cc index aa821e0587..1b4f3a7f5f 100644 --- a/tests/grid/reference_cell_type_03.cc +++ b/tests/grid/reference_cell_type_03.cc @@ -18,13 +18,8 @@ #include -#include -#include -#include -#include -#include +#include #include -#include #include #include @@ -56,26 +51,10 @@ test(const ReferenceCell &reference_cell) else if (reference_cell == ReferenceCells::Hexahedron) q = std::make_unique>(2); - std::unique_ptr> fe; - if (reference_cell == ReferenceCells::Line) - fe = std::make_unique>(1); - else if (reference_cell == ReferenceCells::Triangle) - fe = std::make_unique>(1); - else if (reference_cell == ReferenceCells::Quadrilateral) - fe = std::make_unique>(1); - else if (reference_cell == ReferenceCells::Tetrahedron) - fe = std::make_unique>(1); - else if (reference_cell == ReferenceCells::Wedge) - fe = std::make_unique>(1); - else if (reference_cell == ReferenceCells::Pyramid) - fe = std::make_unique>(1); - else if (reference_cell == ReferenceCells::Hexahedron) - fe = std::make_unique>(1); + FE_Nothing fe(reference_cell); // Set up the objects to compute an integral on the reference cell - FEValues fe_values(*fe, - *q, - update_JxW_values | update_quadrature_points); + FEValues fe_values(fe, *q, update_JxW_values | update_quadrature_points); fe_values.reinit(triangulation.begin_active()); double volume = 0; -- 2.39.5