14#ifndef dealii_polynomials_rannacher_turek_h
15#define dealii_polynomials_rannacher_turek_h
116 std::vector<double> &values,
126 name()
const override;
131 virtual std::unique_ptr<ScalarPolynomialsBase<dim>>
132 clone()
const override;
138 namespace PolynomialsRannacherTurekImplementation
140 template <
int order,
int dim>
153 const unsigned int dim = 2;
155 if constexpr (order == 1)
160 derivative[0] = -2.5 + 3 * p[0];
161 derivative[1] = 1.5 - 3 * p[1];
165 derivative[0] = -0.5 + 3.0 * p[0];
166 derivative[1] = 1.5 - 3.0 * p[1];
170 derivative[0] = 1.5 - 3.0 * p[0];
171 derivative[1] = -2.5 + 3.0 * p[1];
175 derivative[0] = 1.5 - 3.0 * p[0];
176 derivative[1] = -0.5 + 3.0 * p[1];
184 else if constexpr (order == 2)
189 derivative[0][0] = 3;
190 derivative[0][1] = 0;
191 derivative[1][0] = 0;
192 derivative[1][1] = -3;
196 derivative[0][0] = 3;
197 derivative[0][1] = 0;
198 derivative[1][0] = 0;
199 derivative[1][1] = -3;
203 derivative[0][0] = -3;
204 derivative[0][1] = 0;
205 derivative[1][0] = 0;
206 derivative[1][1] = 3;
210 derivative[0][0] = -3;
211 derivative[0][1] = 0;
212 derivative[1][0] = 0;
213 derivative[1][1] = 3;
248 const unsigned int i,
251 return compute_derivative<1>(i, p);
259 const unsigned int i,
262 return compute_derivative<2>(i, p);
270 const unsigned int i,
273 return compute_derivative<3>(i, p);
281 const unsigned int i,
284 return compute_derivative<4>(i, p);
293 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
#define DEAL_II_NOT_IMPLEMENTED()
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
Tensor< order, dim > compute_derivative(const unsigned int, const Point< dim > &)