42 return (0.75 - 2.5 * p(0) + 1.5 * p(1) +
43 1.5 * (p(0) * p(0) - p(1) * p(1)));
47 return (-0.25 - 0.5 * p(0) + 1.5 * p(1) +
48 1.5 * (p(0) * p(0) - p(1) * p(1)));
52 return (0.75 + 1.5 * p(0) - 2.5 * p(1) -
53 1.5 * (p(0) * p(0) - p(1) * p(1)));
57 return (-0.25 + 1.5 * p(0) - 0.5 * p(1) -
58 1.5 * (p(0) * p(0) - p(1) * p(1)));
76 grad[0] = -2.5 + 3 * p(0);
77 grad[1] = 1.5 - 3 * p(1);
81 grad[0] = -0.5 + 3.0 * p(0);
82 grad[1] = 1.5 - 3.0 * p(1);
86 grad[0] = 1.5 - 3.0 * p(0);
87 grad[1] = -2.5 + 3.0 * p(1);
91 grad[0] = 1.5 - 3.0 * p(0);
92 grad[1] = -0.5 + 3.0 * p(1);
107 const unsigned int i,
117 grad_grad[1][1] = -3;
124 grad_grad[1][1] = -3;
128 grad_grad[0][0] = -3;
135 grad_grad[0][0] = -3;
149 std::vector<double> &
values,
155 const unsigned int n_pols = this->n();
158 Assert(grads.size() == n_pols || grads.size() == 0,
160 Assert(grad_grads.size() == n_pols || grad_grads.size() == 0,
162 Assert(third_derivatives.size() == n_pols || third_derivatives.size() == 0,
164 Assert(fourth_derivatives.size() == n_pols || fourth_derivatives.size() == 0,
167 for (
unsigned int i = 0; i < n_pols; ++i)
171 values[i] = compute_value(i, unit_point);
173 if (grads.size() != 0)
175 grads[i] = compute_grad(i, unit_point);
177 if (grad_grads.size() != 0)
179 grad_grads[i] = compute_grad_grad(i, unit_point);
181 if (third_derivatives.size() != 0)
183 third_derivatives[i] = compute_derivative<3>(i, unit_point);
185 if (fourth_derivatives.size() != 0)
187 fourth_derivatives[i] = compute_derivative<4>(i, unit_point);
195std::unique_ptr<ScalarPolynomialsBase<dim>>
198 return std::make_unique<PolynomialsRannacherTurek<dim>>(*this);
203#include "polynomials_rannacher_turek.inst"
virtual std::unique_ptr< ScalarPolynomialsBase< dim > > clone() 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
Tensor< 2, dim > compute_grad_grad(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
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)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)