16 #ifndef dealii_fe_poly_tensor_h 17 #define dealii_fe_poly_tensor_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/lac/full_matrix.h> 22 #include <deal.II/fe/fe.h> 23 #include <deal.II/base/derivative_form.h> 24 #include <deal.II/base/quadrature.h> 25 #include <deal.II/base/std_cxx14/memory.h> 26 #include <deal.II/base/thread_management.h> 29 DEAL_II_NAMESPACE_OPEN
139 template <
class PolynomialType,
int dim,
int spacedim=dim>
171 const unsigned int component)
const;
185 const unsigned int component)
const;
199 const unsigned int component)
const;
212 std::unique_ptr<typename FiniteElement<dim,spacedim>::InternalDataBase>
220 auto data = std_cxx14::make_unique<InternalData>();
223 const unsigned int n_q_points = quadrature.
size();
226 std::vector<Tensor<1,dim> > values(0);
227 std::vector<Tensor<2,dim> > grads(0);
228 std::vector<Tensor<3,dim> > grad_grads(0);
229 std::vector<Tensor<4,dim> > third_derivatives(0);
230 std::vector<Tensor<5,dim> > fourth_derivatives(0);
243 data->transformed_shape_values.resize (n_q_points);
250 data->transformed_shape_grads.resize (n_q_points);
259 data->untransformed_shape_grads.resize(n_q_points);
265 data->shape_grad_grads.reinit (this->
dofs_per_cell, n_q_points);
266 data->transformed_shape_hessians.resize (n_q_points);
268 data->untransformed_shape_hessian_tensors.resize(n_q_points);
279 for (
unsigned int k=0; k<n_q_points; ++k)
282 values, grads, grad_grads,
290 data->shape_values[i][k] = values[i];
297 data->shape_values[i][k] = add_values;
305 data->shape_grads[i][k] = grads[i];
312 data->shape_grads[i][k] = add_grads;
320 data->shape_grad_grads[i][k] = grad_grads[i];
327 data->shape_grad_grads[i][k] = add_grad_grads;
332 return std::move(data);
342 const ::internal::FEValuesImplementation::MappingRelatedData<dim, spacedim> &mapping_data,
349 const unsigned int face_no,
353 const ::internal::FEValuesImplementation::MappingRelatedData<dim, spacedim> &mapping_data,
360 const unsigned int face_no,
361 const unsigned int sub_no,
365 const ::internal::FEValuesImplementation::MappingRelatedData<dim, spacedim> &mapping_data,
405 mutable std::vector<Tensor<1, spacedim> > transformed_shape_values;
407 mutable std::vector<Tensor<2, spacedim > > transformed_shape_grads;
408 mutable std::vector<Tensor<2, dim > > untransformed_shape_grads;
410 mutable std::vector<Tensor<3, spacedim > > transformed_shape_hessians;
411 mutable std::vector<Tensor<3, dim > > untransformed_shape_hessian_tensors;
464 DEAL_II_NAMESPACE_CLOSE
std::vector< Tensor< 2, dim > > cached_grads
Threads::Mutex cache_mutex
Point< dim > cached_point
virtual Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const
const unsigned int degree
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > get_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &, const Quadrature< dim > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &) const
FE_PolyTensor(const unsigned int degree, const FiniteElementData< dim > &fe_data, const std::vector< bool > &restriction_is_additive_flags, const std::vector< ComponentMask > &nonzero_components)
const Point< dim > & point(const unsigned int i) const
virtual Tensor< 2, dim > shape_grad_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
virtual double shape_value(const unsigned int i, const Point< dim > &p) const
PolynomialType poly_space
Table< 2, Tensor< 1, dim > > shape_values
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const
Abstract base class for mapping classes.
Table< 2, DerivativeForm< 2, dim, spacedim > > shape_grad_grads
std::vector< double > sign_change
Second derivatives of shape functions.
unsigned int size() const
const unsigned int dofs_per_cell
std::vector< Tensor< 1, dim > > cached_values
virtual Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const
std::vector< Tensor< 3, dim > > cached_grad_grads
Shape function gradients.
const std::vector< ComponentMask > nonzero_components
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
FullMatrix< double > inverse_node_matrix
Table< 2, DerivativeForm< 1, dim, spacedim > > shape_grads
const std::vector< bool > restriction_is_additive_flags