16 #ifndef dealii_fe_poly_h
17 #define dealii_fe_poly_h
20 #include <deal.II/base/quadrature.h>
21 #include <deal.II/base/std_cxx14/memory.h>
23 #include <deal.II/fe/fe.h>
25 DEAL_II_NAMESPACE_OPEN
69 template <
class PolynomialType,
70 int dim = PolynomialType::dimension,
99 std::vector<unsigned int>
106 std::vector<unsigned int>
130 const unsigned int component)
const override;
153 const unsigned int component)
const override;
176 const unsigned int component)
const override;
200 const unsigned int component)
const override;
224 const unsigned int component)
const override;
234 virtual std::unique_ptr<
237 const UpdateFlags update_flags,
242 &output_data)
const override
246 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
247 data_ptr = std_cxx14::make_unique<InternalData>();
248 auto &data = dynamic_cast<InternalData &>(*data_ptr);
251 const unsigned int n_q_points = quadrature.
size();
256 std::vector<double> values(
258 std::vector<Tensor<1, dim>> grads(
259 update_flags & update_gradients ? this->dofs_per_cell : 0);
260 std::vector<Tensor<2, dim>> grad_grads(
261 update_flags & update_hessians ? this->dofs_per_cell : 0);
262 std::vector<Tensor<3, dim>> third_derivatives(
263 update_flags & update_3rd_derivatives ? this->dofs_per_cell : 0);
264 std::vector<Tensor<4, dim>>
283 if ((update_flags & update_values) &&
284 !((output_data.shape_values.n_rows() > 0) &&
285 (output_data.shape_values.n_cols() == n_q_points)))
286 data.shape_values.reinit(this->dofs_per_cell, n_q_points);
288 if (update_flags & update_gradients)
289 data.shape_gradients.reinit(this->dofs_per_cell, n_q_points);
291 if (update_flags & update_hessians)
292 data.shape_hessians.reinit(this->dofs_per_cell, n_q_points);
294 if (update_flags & update_3rd_derivatives)
295 data.shape_3rd_derivatives.reinit(this->dofs_per_cell, n_q_points);
300 if (update_flags & (update_values | update_gradients | update_hessians |
301 update_3rd_derivatives))
302 for (
unsigned int i = 0; i < n_q_points; ++i)
318 if (update_flags & update_values)
319 if (output_data.shape_values.n_rows() > 0)
321 if (output_data.shape_values.n_cols() == n_q_points)
323 output_data.shape_values[k][i] = values[k];
326 data.shape_values[k][i] = values[k];
332 if (update_flags & update_gradients)
334 data.shape_gradients[k][i] = grads[k];
336 if (update_flags & update_hessians)
338 data.shape_hessians[k][i] = grad_grads[k];
340 if (update_flags & update_3rd_derivatives)
342 data.shape_3rd_derivatives[k][i] = third_derivatives[k];
354 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
360 &output_data)
const override;
365 const unsigned int face_no,
369 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
375 &output_data)
const override;
378 fill_fe_subface_values(
380 const unsigned int face_no,
381 const unsigned int sub_no,
385 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
391 &output_data)
const override;
475 const unsigned int n_q_points,
476 const unsigned int dof)
const;
487 DEAL_II_NAMESPACE_CLOSE