16 #ifndef dealii_fe_poly_tensor_h 17 #define dealii_fe_poly_tensor_h 20 #include <deal.II/base/config.h> 22 #include <deal.II/base/derivative_form.h> 23 #include <deal.II/base/quadrature.h> 24 #include <deal.II/base/std_cxx14/memory.h> 25 #include <deal.II/base/thread_management.h> 27 #include <deal.II/fe/fe.h> 29 #include <deal.II/lac/full_matrix.h> 32 DEAL_II_NAMESPACE_OPEN
143 template <
class PolynomialType,
int dim,
int spacedim = dim>
175 const unsigned int component)
const override;
190 const unsigned int component)
const override;
205 const unsigned int component)
const override;
218 virtual std::unique_ptr<
230 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
231 data_ptr = std_cxx14::make_unique<InternalData>();
232 auto &data =
dynamic_cast<InternalData &
>(*data_ptr);
235 const unsigned int n_q_points = quadrature.
size();
238 std::vector<Tensor<1, dim>> values(0);
239 std::vector<Tensor<2, dim>> grads(0);
240 std::vector<Tensor<3, dim>> grad_grads(0);
241 std::vector<Tensor<4, dim>> third_derivatives(0);
242 std::vector<Tensor<5, dim>> fourth_derivatives(0);
255 data.transformed_shape_values.resize(n_q_points);
262 data.transformed_shape_grads.resize(n_q_points);
268 data.untransformed_shape_grads.resize(n_q_points);
274 data.shape_grad_grads.reinit(this->
dofs_per_cell, n_q_points);
275 data.transformed_shape_hessians.resize(n_q_points);
277 data.untransformed_shape_hessian_tensors.resize(n_q_points);
288 for (
unsigned int k = 0; k < n_q_points; ++k)
301 data.shape_values[i][k] = values[i];
308 data.shape_values[i][k] = add_values;
316 data.shape_grads[i][k] = grads[i];
323 data.shape_grads[i][k] = add_grads;
331 data.shape_grad_grads[i][k] = grad_grads[i];
339 data.shape_grad_grads[i][k] = add_grad_grads;
353 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
359 &output_data)
const override;
364 const unsigned int face_no,
368 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
374 &output_data)
const override;
377 fill_fe_subface_values(
379 const unsigned int face_no,
380 const unsigned int sub_no,
384 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
390 &output_data)
const override;
428 mutable std::vector<Tensor<1, spacedim>> transformed_shape_values;
430 mutable std::vector<Tensor<2, spacedim>> transformed_shape_grads;
431 mutable std::vector<Tensor<2, dim>> untransformed_shape_grads;
433 mutable std::vector<Tensor<3, spacedim>> transformed_shape_hessians;
434 mutable std::vector<Tensor<3, dim>> untransformed_shape_hessian_tensors;
487 DEAL_II_NAMESPACE_CLOSE
Threads::Mutex cache_mutex
Point< dim > cached_point
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 override
const unsigned int degree
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
std::vector< Tensor< 1, dim > > cached_values
std::vector< Tensor< 2, dim > > cached_grads
PolynomialType poly_space
virtual Tensor< 2, dim > shape_grad_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const override
virtual Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
Abstract base class for mapping classes.
virtual double shape_value(const unsigned int i, const Point< dim > &p) const override
virtual Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const override
std::vector< double > sign_change
std::vector< Tensor< 3, dim > > cached_grad_grads
Second derivatives of shape functions.
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
unsigned int size() const
const unsigned int dofs_per_cell
Table< 2, Tensor< 1, dim > > shape_values
Shape function gradients.
const std::vector< ComponentMask > nonzero_components
Table< 2, DerivativeForm< 1, dim, spacedim > > shape_grads
FullMatrix< double > inverse_node_matrix
const std::vector< bool > restriction_is_additive_flags
Table< 2, DerivativeForm< 2, dim, spacedim > > shape_grad_grads