#include "../tests.h"
+#include "../test_grids.h"
#include "hp_unify_dof_indices.h"
{
parallel::distributed::Triangulation<dim> triangulation(
MPI_COMM_WORLD, Triangulation<dim>::limit_level_difference_at_vertices);
-
- std::vector<unsigned int> reps(dim, 1U);
- reps[0] = 2;
- Point<dim> top_right;
- for (unsigned int d = 0; d < dim; ++d)
- top_right[d] = (d == 0 ? 2 : 1);
- GridGenerator::subdivided_hyper_rectangle(triangulation,
- reps,
- Point<dim>(),
- top_right);
- Assert(triangulation.n_global_active_cells() == 2, ExcInternalError());
+ TestGrids::hyper_line(triangulation, 2);
Assert(triangulation.n_active_cells() == 2, ExcInternalError());
hp::FECollection<dim> fe;
#include "../tests.h"
+#include "../test_grids.h"
+
template <int dim>
void
{
parallel::distributed::Triangulation<dim> triangulation(
MPI_COMM_WORLD, Triangulation<dim>::limit_level_difference_at_vertices);
-
- std::vector<unsigned int> reps(dim, 1U);
- reps[0] = 2;
- Point<dim> top_right;
- for (unsigned int d = 0; d < dim; ++d)
- top_right[d] = (d == 0 ? 2 : 1);
- GridGenerator::subdivided_hyper_rectangle(triangulation,
- reps,
- Point<dim>(),
- top_right);
- Assert(triangulation.n_global_active_cells() == 2, ExcInternalError());
+ TestGrids::hyper_line(triangulation, 2);
Assert(triangulation.n_active_cells() == 2, ExcInternalError());
hp::FECollection<dim> fe(FE_Q<dim>(2), FE_Q<dim>(2));
#include "../tests.h"
+#include "../test_grids.h"
#include "hp_unify_dof_indices.h"
{
parallel::distributed::Triangulation<dim> triangulation(
MPI_COMM_WORLD, Triangulation<dim>::limit_level_difference_at_vertices);
-
- std::vector<unsigned int> reps(dim, 1U);
- reps[0] = 2;
- Point<dim> top_right;
- for (unsigned int d = 0; d < dim; ++d)
- top_right[d] = (d == 0 ? 2 : 1);
- GridGenerator::subdivided_hyper_rectangle(triangulation,
- reps,
- Point<dim>(),
- top_right);
- Assert(triangulation.n_global_active_cells() == 2, ExcInternalError());
+ TestGrids::hyper_line(triangulation, 2);
Assert(triangulation.n_active_cells() == 2, ExcInternalError());
hp::FECollection<dim> fe;
*/
template <int dim, int spacedim>
void
- hyper_line(Triangulation<dim, spacedim> &tr, const int n_cells)
+ hyper_line(Triangulation<dim, spacedim> &tr, const unsigned int n_cells)
{
std::vector<unsigned int> repetitions(dim, 1);
repetitions[0] = n_cells;
p2[d] = (d == 0) ? n_cells : 1;
}
GridGenerator::subdivided_hyper_rectangle(tr, repetitions, p1, p2);
+ Assert(tr.n_global_active_cells() == n_cells, ExcInternalError());
}
} // namespace TestGrids