31#include <Kokkos_Macros.hpp>
50 std::vector<Point<dim>>
51 get_pyramid_vertices()
53 if constexpr (dim == 3)
76 "This constructor only works for linear elements."));
84 const unsigned int n_dofs,
91 this->
reinit(support_points);
100 const unsigned int j,
101 const unsigned int k,
108 const double x = p[0];
109 const double y = p[1];
110 const double z = p[2];
112 const unsigned int max_ij =
std::max(i, j);
122 if (std::fabs(z - 1.0) < 1e-14)
125 const double ratio = 1.0 / (1.0 - z);
133 if (std::fabs(phi) < 1e-14)
144 const unsigned int i,
152 for (
unsigned int j = 0, counter = 0; j <= this->
degree(); ++j)
153 for (
unsigned int k = 0; k <= this->
degree(); ++k)
169 const unsigned int j,
170 const unsigned int k,
179 const double x = p[0];
180 const double y = p[1];
181 const double z = p[2];
184 if (i == 0 && j == 0)
188 if constexpr (dim > 1)
190 if constexpr (dim > 2)
196 else if (i == 0 && j == 1)
199 if constexpr (dim > 1)
202 if constexpr (dim > 2)
209 else if (i == 1 && j == 0)
212 if constexpr (dim > 1)
214 if constexpr (dim > 2)
221 else if (
std::abs(p[2] - 1.0) < 1e-14)
224 if (i == 1 && j == 1)
226 for (
unsigned int d = 0; d < dim; ++d)
233 const unsigned int max_ij =
std::max(i, j);
234 const double ratio = 1.0 / (1.0 - z);
238 i, 0, 0, x * ratio,
false) *
243 if constexpr (dim > 1)
247 j, 0, 0, y * ratio,
false) *
248 ratio *
std::pow((1.0 - z), max_ij) *
250 k, 2 * max_ij + 2, 0, z,
true);
251 if constexpr (dim > 2)
254 i, 0, 0, x * ratio,
false) *
257 j, 0, 0, y * ratio,
false) *
260 k, 2 * max_ij + 2, 0, z,
true) +
263 j, 0, 0, y * ratio,
false) *
264 y * ratio * ratio *
std::pow((1.0 - z), max_ij) *
266 k, 2 * max_ij + 2, 0, z,
true) +
269 j, 0, 0, y * ratio,
false) *
270 (-1.0) * max_ij *
std::pow((1.0 - z), max_ij - 1) *
272 k, 2 * max_ij + 2, 0, z,
true) +
275 j, 0, 0, y * ratio,
false) *
278 k, 2 * max_ij + 2, 0, 2.0 * z - 1.0,
false) *
281 for (
unsigned int d = 0; d < dim; ++d)
282 if (std::fabs(grad[d]) < 1e-14)
293 const unsigned int i,
299 for (
unsigned int j = 0, counter = 0; j <= this->
degree(); ++j)
300 for (
unsigned int k = 0; k <= this->
degree(); ++k)
315 return "ScalarLagrangePolynomialPyramid";
321std::unique_ptr<ScalarPolynomialsBase<dim>>
324 return std::make_unique<ScalarLagrangePolynomialPyramid<dim>>(*this);
Tensor< 1, dim > evaluate_orthogonal_basis_derivative(const unsigned int i, const Point< dim > &p) const override
ScalarLagrangePolynomialPyramid(const unsigned int degree)
double evaluate_orthogonal_basis_function_by_degree(const unsigned int i, const unsigned int j, const unsigned int k, const Point< dim > &p) const override
double evaluate_orthogonal_basis_function(const unsigned int i, const Point< dim > &p) const override
Tensor< 1, dim > evaluate_orthogonal_basis_derivative_by_degree(const unsigned int i, const unsigned int j, const unsigned int k, const Point< dim > &p) const override
virtual std::unique_ptr< ScalarPolynomialsBase< dim > > clone() const override
std::string name() const override
virtual unsigned int degree() const
void reinit(const std::vector< Point< dim > > &support_points)
ScalarPolynomialsVandermondeBase(const unsigned int degree, const unsigned int n_dofs)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_ASSERT_UNREACHABLE()
static ::ExceptionBase & ExcNotImplemented()
#define AssertIndexRange(index, range)
#define AssertThrow(cond, exc)
Number jacobi_polynomial_derivative(const unsigned int degree, const int alpha, const int beta, const Number x, const bool rescale_to_dealii_unit_interval)
Number jacobi_polynomial_value(const unsigned int degree, const int alpha, const int beta, const Number x, const bool rescale_to_dealii_unit_interval=true)
constexpr ReferenceCell< 3 > Pyramid
::VectorizedArray< Number, width > max(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > pow(const ::VectorizedArray< Number, width > &, const Number p)
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)