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<
221 const UpdateFlags update_flags,
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);
244 if (update_flags & (update_values | update_gradients | update_hessians))
250 if (update_flags & update_values)
255 data.transformed_shape_values.resize(n_q_points);
258 if (update_flags & update_gradients)
262 data.transformed_shape_grads.resize(n_q_points);
268 data.untransformed_shape_grads.resize(n_q_points);
271 if (update_flags & update_hessians)
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);
287 if (update_flags & (update_values | update_gradients))
288 for (
unsigned int k = 0; k < n_q_points; ++k)
297 if (update_flags & update_values)
301 data.shape_values[i][k] = values[i];
308 data.shape_values[i][k] = add_values;
312 if (update_flags & update_gradients)
316 data.shape_grads[i][k] = grads[i];
323 data.shape_grads[i][k] = add_grads;
327 if (update_flags & update_hessians)
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