From: Wolfgang Bangerth Date: Fri, 6 May 2022 16:27:09 +0000 (-0600) Subject: Simplify tests. X-Git-Tag: v9.4.0-rc1~269^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4398a50f52f3a9b7f7b6bbc4f4bb890790e1018;p=dealii.git Simplify tests. --- 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;