24 compute_n_polynomials_pyramid(
const unsigned int dim,
25 const unsigned int degree)
43 const unsigned int degree)
45 compute_n_polynomials_pyramid(dim, degree))
57 const double Q14 = 0.25;
60 const double r = p[0];
61 const double s = p[1];
62 const double t = p[2];
64 if (fabs(t - 1.0) > 1.0e-14)
66 ration = (r * s * t) / (1.0 - t);
74 return Q14 * ((1.0 - r) * (1.0 - s) - t + ration);
76 return Q14 * ((1.0 + r) * (1.0 - s) - t - ration);
78 return Q14 * ((1.0 - r) * (1.0 + s) - t - ration);
80 return Q14 * ((1.0 + r) * (1.0 + s) - t + ration);
97 if (this->degree() == 1)
99 const double Q14 = 0.25;
101 const double r = p[0];
102 const double s = p[1];
103 const double t = p[2];
109 if (fabs(t - 1.0) > 1.0e-14)
111 rationdr = s * t / (1.0 - t);
112 rationds = r * t / (1.0 - t);
113 rationdt = r * s / ((1.0 - t) * (1.0 - t));
125 grad[0] = Q14 * (-1.0 * (1.0 - s) + rationdr);
126 grad[1] = Q14 * (-1.0 * (1.0 - r) + rationds);
127 grad[2] = Q14 * (rationdt - 1.0);
131 grad[0] = Q14 * (1.0 * (1.0 - s) - rationdr);
132 grad[1] = Q14 * (-1.0 * (1.0 + r) - rationds);
133 grad[2] = Q14 * (-1.0 * rationdt - 1.0);
137 grad[0] = Q14 * (-1.0 * (1.0 + s) - rationdr);
138 grad[1] = Q14 * (1.0 * (1.0 - r) - rationds);
139 grad[2] = Q14 * (-1.0 * rationdt - 1.0);
143 grad[0] = Q14 * (1.0 * (1.0 + s) + rationdr);
144 grad[1] = Q14 * (1.0 * (1.0 + r) + rationds);
145 grad[2] = Q14 * (rationdt - 1.0);
167 const unsigned int i,
183 std::vector<double> &values,
191 (void)third_derivatives;
192 (void)fourth_derivatives;
194 if (values.size() == this->n())
195 for (
unsigned int i = 0; i < this->n(); ++i)
196 values[i] = compute_value(i, unit_point);
198 if (grads.size() == this->n())
199 for (
unsigned int i = 0; i < this->n(); ++i)
200 grads[i] = compute_grad(i, unit_point);
208 const unsigned int i,
211 return compute_grad(i, p);
219 const unsigned int i,
235 const unsigned int i,
251 const unsigned int i,
268 return "ScalarLagrangePolynomialPyramid";
274std::unique_ptr<ScalarPolynomialsBase<dim>>
277 return std::make_unique<ScalarLagrangePolynomialPyramid<dim>>(*this);
Tensor< 2, dim > compute_grad_grad(const unsigned int i, const Point< dim > &p) const override
ScalarLagrangePolynomialPyramid(const unsigned int degree)
Tensor< 4, dim > compute_4th_derivative(const unsigned int i, const Point< dim > &p) const override
Tensor< 1, dim > compute_grad(const unsigned int i, const Point< dim > &p) const override
Tensor< 1, dim > compute_1st_derivative(const unsigned int i, const Point< dim > &p) const override
Tensor< 3, dim > compute_3rd_derivative(const unsigned int i, const Point< dim > &p) const override
double compute_value(const unsigned int i, const Point< dim > &p) const override
virtual std::unique_ptr< ScalarPolynomialsBase< dim > > clone() const override
Tensor< 2, dim > compute_2nd_derivative(const unsigned int i, const Point< dim > &p) const override
std::string name() const override
void evaluate(const Point< dim > &unit_point, std::vector< double > &values, std::vector< Tensor< 1, dim > > &grads, std::vector< Tensor< 2, dim > > &grad_grads, std::vector< Tensor< 3, dim > > &third_derivatives, std::vector< Tensor< 4, dim > > &fourth_derivatives) const override
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
#define DEAL_II_NOT_IMPLEMENTED()