16#ifndef dealii_polynomials_rannacher_turek_h
17#define dealii_polynomials_rannacher_turek_h
117 std::vector<double> &values,
127 name()
const override;
132 virtual std::unique_ptr<ScalarPolynomialsBase<dim>>
133 clone()
const override;
139 namespace PolynomialsRannacherTurekImplementation
141 template <
int order,
int dim>
154 const unsigned int dim = 2;
156 if constexpr (order == 1)
161 derivative[0] = -2.5 + 3 * p[0];
162 derivative[1] = 1.5 - 3 * p[1];
166 derivative[0] = -0.5 + 3.0 * p[0];
167 derivative[1] = 1.5 - 3.0 * p[1];
171 derivative[0] = 1.5 - 3.0 * p[0];
172 derivative[1] = -2.5 + 3.0 * p[1];
176 derivative[0] = 1.5 - 3.0 * p[0];
177 derivative[1] = -0.5 + 3.0 * p[1];
185 else if constexpr (order == 2)
190 derivative[0][0] = 3;
191 derivative[0][1] = 0;
192 derivative[1][0] = 0;
193 derivative[1][1] = -3;
197 derivative[0][0] = 3;
198 derivative[0][1] = 0;
199 derivative[1][0] = 0;
200 derivative[1][1] = -3;
204 derivative[0][0] = -3;
205 derivative[0][1] = 0;
206 derivative[1][0] = 0;
207 derivative[1][1] = 3;
211 derivative[0][0] = -3;
212 derivative[0][1] = 0;
213 derivative[1][0] = 0;
214 derivative[1][1] = 3;
249 const unsigned int i,
252 return compute_derivative<1>(i, p);
260 const unsigned int i,
263 return compute_derivative<2>(i, p);
271 const unsigned int i,
274 return compute_derivative<3>(i, p);
282 const unsigned int i,
285 return compute_derivative<4>(i, p);
294 return "RannacherTurek";
virtual Tensor< 3, dim > compute_3rd_derivative(const unsigned int i, const Point< dim > &p) const override
virtual Tensor< 1, dim > compute_1st_derivative(const unsigned int i, const Point< dim > &p) const override
virtual std::unique_ptr< ScalarPolynomialsBase< dim > > clone() const override
Tensor< order, dim > compute_derivative(const unsigned int i, const Point< dim > &p) const
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
std::string name() const override
Tensor< 2, dim > compute_grad_grad(const unsigned int i, const Point< dim > &p) const override
virtual 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
virtual Tensor< 2, dim > compute_2nd_derivative(const unsigned int i, const Point< dim > &p) const override
static constexpr unsigned int dimension
PolynomialsRannacherTurek()
double compute_value(const unsigned int i, const Point< dim > &p) const override
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
#define DEAL_II_NOT_IMPLEMENTED()
Tensor< order, dim > compute_derivative(const unsigned int, const Point< dim > &)