if (dynamic_cast<const Simplex::FE_P<dim, dim> *>(&fe) != nullptr ||
dynamic_cast<const Simplex::FE_DGP<dim, dim> *>(&fe) != nullptr ||
- dynamic_cast<const Simplex::FE_WedgeP<dim, dim> *>(&fe) != nullptr)
+ dynamic_cast<const Simplex::FE_WedgeP<dim, dim> *>(&fe) != nullptr ||
+ dynamic_cast<const Simplex::FE_PyramidP<dim, dim> *>(&fe) != nullptr)
{
scalar_lexicographic.resize(fe.n_dofs_per_cell());
for (unsigned int i = 0; i < scalar_lexicographic.size(); ++i)
// indicative of their support
if (dynamic_cast<const Simplex::FE_P<dim> *>(fe_poly_ptr) ||
dynamic_cast<const Simplex::FE_DGP<dim> *>(fe_poly_ptr) ||
- dynamic_cast<const Simplex::FE_WedgeP<dim> *>(fe_poly_ptr))
+ dynamic_cast<const Simplex::FE_WedgeP<dim> *>(fe_poly_ptr) ||
+ dynamic_cast<const Simplex::FE_PyramidP<dim> *>(fe_poly_ptr))
return true;
#endif
dynamic_cast<const Simplex::FE_DGP<dim> *>(
&fe_in.base_element(base_element_number)) ||
dynamic_cast<const Simplex::FE_WedgeP<dim> *>(
+ &fe_in.base_element(base_element_number)) ||
+ dynamic_cast<const Simplex::FE_PyramidP<dim> *>(
&fe_in.base_element(base_element_number)))
{
// specialization for arbitrary finite elements and quadrature rules
quad = std::make_shared<Simplex::QGaussWedge<dim>>(degree + 1);
fe_mapping = std::make_shared<Simplex::FE_WedgeP<dim>>(1);
}
+ else if (v == 2)
+ {
+ GridGenerator::subdivided_hyper_cube_with_pyramids(tria,
+ dim == 2 ? 16 : 8);
+ fe = std::make_shared<Simplex::FE_PyramidP<dim>>(degree);
+ quad = std::make_shared<Simplex::QGaussPyramid<dim>>(degree + 1);
+ fe_mapping = std::make_shared<Simplex::FE_PyramidP<dim>>(1);
+ }
else
Assert(false, ExcNotImplemented());
Utilities::MPI::MPI_InitFinalize mpi(argc, argv, 1);
- for (unsigned int i = 0; i < 2; ++i)
+ for (unsigned int i = 0; i <= 2; ++i)
{
if (i == 0)
deallog.push("SIMPLEX");
else if (i == 1)
deallog.push("WEDGE ");
+ else if (i == 2)
+ deallog.push("PYRAMID");
else
Assert(false, ExcNotImplemented());
- if (i == 0)
+ if (i == 0) // 2D makes only sense for simplex
{
test<2>(i, /*degree=*/1, /*do_helmholtz*/ false);
test<2>(i, /*degree=*/1, /*do_helmholtz*/ true);
test<3>(i, /*degree=*/1, /*do_helmholtz*/ false);
test<3>(i, /*degree=*/1, /*do_helmholtz*/ true);
- test<3>(i, /*degree=*/2, /*do_helmholtz*/ false);
- test<3>(i, /*degree=*/2, /*do_helmholtz*/ true);
+
+ if (i !=
+ 2) // for pyramids no quadratic elements have been implemented yet
+ {
+ test<3>(i, /*degree=*/2, /*do_helmholtz*/ false);
+ test<3>(i, /*degree=*/2, /*do_helmholtz*/ true);
+ }
deallog.pop();
}
DEAL:WEDGE ::dim=3 degree=1 Type=Helmholtz : Convergence step 7 value 0.000211401.
DEAL:WEDGE ::dim=3 degree=2 Type=Possion : Convergence step 20 value 0.000133408.
DEAL:WEDGE ::dim=3 degree=2 Type=Helmholtz : Convergence step 20 value 0.000125844.
+DEAL:PYRAMID::dim=3 degree=1 Type=Possion : Convergence step 10 value 0.000197898.
+DEAL:PYRAMID::dim=3 degree=1 Type=Helmholtz : Convergence step 10 value 0.000186534.
+ template <int dim, int spacedim>
+ void
+ subdivided_hyper_cube_with_pyramids(Triangulation<dim, spacedim> &tria,
+ const unsigned int repetitions,
+ const double p1 = 0.0,
+ const double p2 = 1.0,
+ const bool colorize = false)
+ {
+ if (dim == 3)
+ {
+ subdivided_hyper_rectangle_with_pyramids(
+ tria,
+ {{repetitions, repetitions, repetitions}},
+ {p1, p1, p1},
+ {p2, p2, p2},
+ colorize);
+ }
+ else
+ {
+ AssertThrow(false, ExcNotImplemented())
+ }
+ }
+
+
+
template <int dim, int spacedim>
void
subdivided_hyper_rectangle_with_simplices_mix(