#include <deal.II/fe/fe_interface_values.h>
#include <deal.II/fe/mapping_q.h>
-#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/tria.h>
#include "../tests.h"
+#include "../test_grids.h"
+
template <int dim>
void
}
-template <int dim>
-void
-make_2_cells(Triangulation<dim> &tria);
-
-template <>
-void
-make_2_cells<2>(Triangulation<2> &tria)
-{
- const unsigned int dim = 2;
- std::vector<unsigned int> repetitions = {2, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
-
-template <>
-void
-make_2_cells<3>(Triangulation<3> &tria)
-{
- const unsigned int dim = 3;
- std::vector<unsigned int> repetitions = {2, 1, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
-
template <int dim>
void
test()
{
Triangulation<dim> tria;
- make_2_cells(tria);
+ TestGrids::hyper_line(tria, 2);
DoFHandler<dim> dofh(tria);
FE_DGQ<dim> fe(1);
#include <deal.II/fe/fe_interface_values.h>
#include <deal.II/fe/mapping_q.h>
-#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/tria.h>
#include "../tests.h"
-template <int dim>
-void
-make_2_cells(Triangulation<dim> &tria);
-
-template <>
-void
-make_2_cells<2>(Triangulation<2> &tria)
-{
- const unsigned int dim = 2;
- std::vector<unsigned int> repetitions = {2, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
-
-template <>
-void
-make_2_cells<3>(Triangulation<3> &tria)
-{
- const unsigned int dim = 3;
- std::vector<unsigned int> repetitions = {2, 1, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
+#include "../test_grids.h"
template <int dim>
test(unsigned int fe_degree)
{
Triangulation<dim> tria;
- make_2_cells(tria);
+ TestGrids::hyper_line(tria, 2);
DoFHandler<dim> dofh(tria);
FE_DGQ<dim> fe(fe_degree);
#include <deal.II/fe/fe_interface_values.h>
#include <deal.II/fe/mapping_q.h>
-#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/tria.h>
#include "../tests.h"
-template <int dim>
-void
-make_2_cells(Triangulation<dim> &tria);
-
-template <>
-void
-make_2_cells<2>(Triangulation<2> &tria)
-{
- const unsigned int dim = 2;
- std::vector<unsigned int> repetitions = {2, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
-
-template <>
-void
-make_2_cells<3>(Triangulation<3> &tria)
-{
- const unsigned int dim = 3;
- std::vector<unsigned int> repetitions = {2, 1, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
+#include "../test_grids.h"
template <int dim>
test(unsigned int fe_degree)
{
Triangulation<dim> tria;
- make_2_cells(tria);
+ TestGrids::hyper_line(tria, 2);
+
tria.begin()->set_refine_flag();
tria.execute_coarsening_and_refinement();
#include <deal.II/fe/fe_q.h>
#include <deal.II/fe/mapping_q.h>
-#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/tria.h>
#include "../tests.h"
+#include "../test_grids.h"
+
template <int dim>
void
}
-template <int dim>
-void
-make_2_cells(Triangulation<dim> &tria);
-
-template <>
-void
-make_2_cells<2>(Triangulation<2> &tria)
-{
- const unsigned int dim = 2;
- std::vector<unsigned int> repetitions = {2, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
-
-template <>
-void
-make_2_cells<3>(Triangulation<3> &tria)
-{
- const unsigned int dim = 3;
- std::vector<unsigned int> repetitions = {2, 1, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
-
template <int dim>
void
test()
{
Triangulation<dim> tria;
- make_2_cells(tria);
+ TestGrids::hyper_line(tria, 2);
DoFHandler<dim> dofh(tria);
FE_Q<dim> fe(1);
#include <deal.II/fe/fe_q.h>
#include <deal.II/fe/mapping_q.h>
-#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/tria.h>
#include "../tests.h"
-template <int dim>
-void
-make_2_cells(Triangulation<dim> &tria);
-
-template <>
-void
-make_2_cells<2>(Triangulation<2> &tria)
-{
- const unsigned int dim = 2;
- std::vector<unsigned int> repetitions = {2, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
-
-template <>
-void
-make_2_cells<3>(Triangulation<3> &tria)
-{
- const unsigned int dim = 3;
- std::vector<unsigned int> repetitions = {2, 1, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
+#include "../test_grids.h"
template <int dim>
test(unsigned int fe_degree)
{
Triangulation<dim> tria;
- make_2_cells(tria);
+ TestGrids::hyper_line(tria, 2);
+
tria.begin()->set_refine_flag();
tria.execute_coarsening_and_refinement();
#include <deal.II/fe/fe_q.h>
#include <deal.II/fe/mapping_q.h>
-#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/tria.h>
#include "../tests.h"
-template <int dim>
-void
-make_2_cells(Triangulation<dim> &tria);
-
-template <>
-void
-make_2_cells<2>(Triangulation<2> &tria)
-{
- const unsigned int dim = 2;
- std::vector<unsigned int> repetitions = {2, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
-
-template <>
-void
-make_2_cells<3>(Triangulation<3> &tria)
-{
- const unsigned int dim = 3;
- std::vector<unsigned int> repetitions = {2, 1, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
+#include "../test_grids.h"
template <int dim>
test(unsigned int fe_degree)
{
Triangulation<dim> tria;
- make_2_cells(tria);
+ TestGrids::hyper_line(tria, 2);
DoFHandler<dim> dofh(tria);
FE_Q<dim> fe(fe_degree);
#include <deal.II/fe/fe_q.h>
#include <deal.II/fe/mapping_q.h>
-#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/tria.h>
#include "../tests.h"
-template <int dim>
-void
-make_2_cells(Triangulation<dim> &tria);
-
-template <>
-void
-make_2_cells<2>(Triangulation<2> &tria)
-{
- const unsigned int dim = 2;
- std::vector<unsigned int> repetitions = {2, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
-
-template <>
-void
-make_2_cells<3>(Triangulation<3> &tria)
-{
- const unsigned int dim = 3;
- std::vector<unsigned int> repetitions = {2, 1, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
+#include "../test_grids.h"
template <int dim>
test(const FiniteElement<dim> &fe)
{
Triangulation<dim> tria;
- make_2_cells(tria);
+ TestGrids::hyper_line(tria, 2);
DoFHandler<dim> dofh(tria);
deallog << fe.get_name() << std::endl;
#include <deal.II/fe/fe_q.h>
#include <deal.II/fe/mapping_q.h>
-#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/tria.h>
#include "../tests.h"
-template <int dim>
-void
-make_2_cells(Triangulation<dim> &tria);
-
-
-
-template <>
-void
-make_2_cells<2>(Triangulation<2> &tria)
-{
- const unsigned int dim = 2;
- std::vector<unsigned int> repetitions = {2, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
-
-
-
-template <>
-void
-make_2_cells<3>(Triangulation<3> &tria)
-{
- const unsigned int dim = 3;
- std::vector<unsigned int> repetitions = {2, 1, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
+#include "../test_grids.h"
test(const FiniteElement<dim> &fe)
{
Triangulation<dim> tria;
- make_2_cells(tria);
+ TestGrids::hyper_line(tria, 2);
DoFHandler<dim> dofh(tria);
deallog << fe.get_name() << std::endl;
#include <deal.II/fe/fe_interface_values.h>
#include <deal.II/fe/mapping_q.h>
-#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/tria.h>
#include "../tests.h"
+#include "../test_grids.h"
+
template <int dim>
void
}
-template <int dim>
-void
-make_2_cells(Triangulation<dim> &tria);
-
-template <>
-void
-make_2_cells<2>(Triangulation<2> &tria)
-{
- const unsigned int dim = 2;
- std::vector<unsigned int> repetitions = {2, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
-
-template <>
-void
-make_2_cells<3>(Triangulation<3> &tria)
-{
- const unsigned int dim = 3;
- std::vector<unsigned int> repetitions = {2, 1, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
-
template <int dim>
void
test(const unsigned int p)
{
Triangulation<dim> tria;
- make_2_cells(tria);
+ TestGrids::hyper_line(tria, 2);
DoFHandler<dim> dofh(tria);
hp::FECollection<dim> fe_collection;
#include <deal.II/fe/fe_interface_values.h>
#include <deal.II/fe/mapping_q.h>
-#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/tria.h>
#include "../tests.h"
-template <int dim>
-void
-make_2_cells(Triangulation<dim> &tria);
-
-template <>
-void
-make_2_cells<2>(Triangulation<2> &tria)
-{
- const unsigned int dim = 2;
- std::vector<unsigned int> repetitions = {2, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
-
-template <>
-void
-make_2_cells<3>(Triangulation<3> &tria)
-{
- const unsigned int dim = 3;
- std::vector<unsigned int> repetitions = {2, 1, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
+#include "../test_grids.h"
template <int dim>
test(const unsigned int fe_degree0, const unsigned int fe_degree1 = 0)
{
Triangulation<dim> tria;
- make_2_cells(tria);
+ TestGrids::hyper_line(tria, 2);
tria.begin()->set_refine_flag();
tria.execute_coarsening_and_refinement();
#include <deal.II/fe/fe_interface_values.h>
#include <deal.II/fe/mapping_q.h>
-#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_refinement.h>
#include <deal.II/grid/tria.h>
#include "../tests.h"
+#include "../test_grids.h"
+
template <int dim>
void
deallog << std::endl;
}
-void
-make_2_cells(Triangulation<2> &tria)
-{
- const unsigned int dim = 2;
- std::vector<unsigned int> repetitions = {2, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
-
-void
-make_2_cells(Triangulation<3> &tria)
-{
- const unsigned int dim = 3;
- std::vector<unsigned int> repetitions = {2, 1, 1};
- Point<dim> p1;
- Point<dim> p2(2.0, 1.0, 1.0);
-
- GridGenerator::subdivided_hyper_rectangle(tria, repetitions, p1, p2);
-}
template <int dim>
{
Triangulation<dim> tria(
Triangulation<dim>::limit_level_difference_at_vertices);
- make_2_cells(tria);
+ TestGrids::hyper_line(tria, 2);
tria.refine_global();