17 #include <deal.II/base/exceptions.h> 18 #include <deal.II/base/tensor_product_polynomials_const.h> 20 DEAL_II_NAMESPACE_OPEN
32 const unsigned int max_indices = this->n_tensor_pols;
60 const unsigned int max_indices = this->n_tensor_pols;
76 const unsigned int max_indices = this->n_tensor_pols;
91 std::vector<double> & values,
97 Assert(values.size() == this->n_tensor_pols + 1 || values.size() == 0,
99 Assert(grads.size() == this->n_tensor_pols + 1 || grads.size() == 0,
101 Assert(grad_grads.size() == this->n_tensor_pols + 1 || grad_grads.size() == 0,
103 Assert(third_derivatives.size() == this->n_tensor_pols + 1 ||
104 third_derivatives.size() == 0,
106 this->n_tensor_pols + 1,
108 Assert(fourth_derivatives.size() == this->n_tensor_pols + 1 ||
109 fourth_derivatives.size() == 0,
111 this->n_tensor_pols + 1,
116 bool do_values =
false, do_grads =
false, do_grad_grads =
false;
117 bool do_3rd_derivatives =
false, do_4th_derivatives =
false;
118 if (values.empty() ==
false)
123 if (grads.empty() ==
false)
128 if (grad_grads.empty() ==
false)
130 grad_grads.pop_back();
131 do_grad_grads =
true;
133 if (third_derivatives.empty() ==
false)
135 third_derivatives.resize(this->n_tensor_pols);
136 do_3rd_derivatives =
true;
138 if (fourth_derivatives.empty() ==
false)
140 fourth_derivatives.resize(this->n_tensor_pols);
141 do_4th_derivatives =
true;
145 p, values, grads, grad_grads, third_derivatives, fourth_derivatives);
150 values.push_back(1.);
152 grads.emplace_back();
154 grad_grads.emplace_back();
155 if (do_3rd_derivatives)
156 third_derivatives.emplace_back();
157 if (do_4th_derivatives)
158 fourth_derivatives.emplace_back();
167 DEAL_II_NAMESPACE_CLOSE
Tensor< 1, dim > compute_grad(const unsigned int i, const Point< dim > &p) const
double compute_value(const unsigned int i, const Point< dim > &p) const
Tensor< 1, dim > compute_grad(const unsigned int i, const Point< dim > &p) const
static ::ExceptionBase & ExcDimensionMismatch2(int arg1, int arg2, int arg3)
void compute(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
Tensor< 2, dim > compute_grad_grad(const unsigned int i, const Point< dim > &p) const
void compute(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
#define Assert(cond, exc)
static ::ExceptionBase & ExcNotImplemented()
Tensor< 2, dim > compute_grad_grad(const unsigned int i, const Point< dim > &p) const
double compute_value(const unsigned int i, const Point< dim > &p) const
static ::ExceptionBase & ExcInternalError()