25 compute_n_polynomials_pyramid(
const unsigned int dim,
26 const unsigned int degree)
44 const unsigned int degree)
46 compute_n_polynomials_pyramid(dim, degree))
58 const double Q14 = 0.25;
61 const double r = p[0];
62 const double s = p[1];
63 const double t = p[2];
65 if (fabs(t - 1.0) > 1.0e-14)
67 ration = (r * s * t) / (1.0 - t);
75 return Q14 * ((1.0 - r) * (1.0 - s) - t + ration);
77 return Q14 * ((1.0 + r) * (1.0 - s) - t - ration);
79 return Q14 * ((1.0 - r) * (1.0 + s) - t - ration);
81 return Q14 * ((1.0 + r) * (1.0 + s) - t + ration);
98 if (this->degree() == 1)
100 const double Q14 = 0.25;
102 const double r = p[0];
103 const double s = p[1];
104 const double t = p[2];
110 if (fabs(t - 1.0) > 1.0e-14)
112 rationdr = s * t / (1.0 - t);
113 rationds = r * t / (1.0 - t);
114 rationdt = r * s / ((1.0 - t) * (1.0 - t));
126 grad[0] = Q14 * (-1.0 * (1.0 - s) + rationdr);
127 grad[1] = Q14 * (-1.0 * (1.0 - r) + rationds);
128 grad[2] = Q14 * (rationdt - 1.0);
132 grad[0] = Q14 * (1.0 * (1.0 - s) - rationdr);
133 grad[1] = Q14 * (-1.0 * (1.0 + r) - rationds);
134 grad[2] = Q14 * (-1.0 * rationdt - 1.0);
138 grad[0] = Q14 * (-1.0 * (1.0 + s) - rationdr);
139 grad[1] = Q14 * (1.0 * (1.0 - r) - rationds);
140 grad[2] = Q14 * (-1.0 * rationdt - 1.0);
144 grad[0] = Q14 * (1.0 * (1.0 + s) + rationdr);
145 grad[1] = Q14 * (1.0 * (1.0 + r) + rationds);
146 grad[2] = Q14 * (rationdt - 1.0);
168 const unsigned int i,
184 std::vector<double> & values,
192 (void)third_derivatives;
193 (void)fourth_derivatives;
195 if (values.size() == this->n())
196 for (
unsigned int i = 0; i < this->n(); ++i)
197 values[i] = compute_value(i, unit_point);
199 if (grads.size() == this->n())
200 for (
unsigned int i = 0; i < this->n(); ++i)
201 grads[i] = compute_grad(i, unit_point);
209 const unsigned int i,
212 return compute_grad(i, p);
220 const unsigned int i,
236 const unsigned int i,
252 const unsigned int i,
269 return "ScalarLagrangePolynomialPyramid";
275std::unique_ptr<ScalarPolynomialsBase<dim>>
278 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
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)