17 #include <deal.II/base/tensor_product_polynomials_const.h> 18 #include <deal.II/base/exceptions.h> 19 #include <deal.II/base/table.h> 21 DEAL_II_NAMESPACE_OPEN
33 const unsigned int max_indices = this->n_tensor_pols;
34 Assert (i<=max_indices, ExcInternalError());
51 Assert (
false, ExcNotImplemented());
61 const unsigned int max_indices = this->n_tensor_pols;
62 Assert (i<=max_indices, ExcInternalError());
77 const unsigned int max_indices = this->n_tensor_pols;
78 Assert (i<=max_indices, ExcInternalError());
92 std::vector<double> &values,
98 Assert (values.size()==this->n_tensor_pols+1 || values.size()==0,
99 ExcDimensionMismatch2(values.size(), this->n_tensor_pols+1, 0));
100 Assert (grads.size()==this->n_tensor_pols+1 || grads.size()==0,
101 ExcDimensionMismatch2(grads.size(), this->n_tensor_pols+1, 0));
102 Assert (grad_grads.size()==this->n_tensor_pols+1 || grad_grads.size()==0,
103 ExcDimensionMismatch2(grad_grads.size(), this->n_tensor_pols+1, 0));
104 Assert (third_derivatives.size()==this->n_tensor_pols+1 || third_derivatives.size()==0,
105 ExcDimensionMismatch2(third_derivatives.size(), this->n_tensor_pols+1, 0));
106 Assert (fourth_derivatives.size()==this->n_tensor_pols+1 || fourth_derivatives.size()==0,
107 ExcDimensionMismatch2(fourth_derivatives.size(), this->n_tensor_pols+1, 0));
111 bool do_values =
false, do_grads =
false, do_grad_grads =
false;
112 bool do_3rd_derivatives =
false, do_4th_derivatives =
false;
113 if (values.empty() ==
false)
118 if (grads.empty() ==
false)
123 if (grad_grads.empty() ==
false)
125 grad_grads.pop_back();
126 do_grad_grads =
true;
128 if (third_derivatives.empty() ==
false)
130 third_derivatives.resize(this->n_tensor_pols);
131 do_3rd_derivatives =
true;
133 if (fourth_derivatives.empty() ==
false)
135 fourth_derivatives.resize(this->n_tensor_pols);
136 do_4th_derivatives =
true;
143 values.push_back(1.);
148 if (do_3rd_derivatives)
150 if (do_4th_derivatives)
160 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
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
#define Assert(cond, exc)
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
double compute_value(const unsigned int i, const Point< dim > &p) const