36 template <
int dim,
int spacedim>
38 const unsigned int degree)
49 std::vector<
bool>(1, true)))
50 , polynomial_space(
Polynomials::Legendre::generate_complete_basis(degree))
54 ref_case < RefinementCase<dim>::isotropic_refinement + 1;
63 const unsigned int nc =
65 for (
unsigned int i = 0; i < nc; ++i)
67 this->
prolongation[ref_case - 1][i].reinit(n_dofs, n_dofs);
70 for (
unsigned int j = 0; j < n_dofs; ++j)
106 template <
int dim,
int spacedim>
117 std::ostringstream namebuf;
119 <<
">(" << this->degree <<
")";
121 return namebuf.str();
126 template <
int dim,
int spacedim>
127 std::unique_ptr<FiniteElement<dim, spacedim>>
130 return std_cxx14::make_unique<FE_DGPNonparametric<dim, spacedim>>(*this);
135 template <
int dim,
int spacedim>
150 template <
int dim,
int spacedim>
153 const unsigned int i,
155 const unsigned int component)
const
169 template <
int dim,
int spacedim>
183 template <
int dim,
int spacedim>
186 const unsigned int i,
188 const unsigned int component)
const
202 template <
int dim,
int spacedim>
217 template <
int dim,
int spacedim>
220 const unsigned int i,
222 const unsigned int component)
const
240 template <
int dim,
int spacedim>
241 std::vector<unsigned int>
244 std::vector<unsigned int> dpo(dim + 1,
static_cast<unsigned int>(0));
246 for (
unsigned int i = 1; i < dim; ++i)
248 dpo[dim] *= deg + 1 + i;
256 template <
int dim,
int spacedim>
275 template <
int dim,
int spacedim>
276 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
286 auto data_ptr = std_cxx14::make_unique<
288 data_ptr->
update_each = requires_update_flags(update_flags);
302 template <
int dim,
int spacedim>
310 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
321 const unsigned int n_q_points = mapping_data.quadrature_points.size();
323 std::vector<double> values(
325 std::vector<Tensor<1, dim>> grads(
327 std::vector<Tensor<2, dim>> grad_grads(
329 std::vector<Tensor<3, dim>> empty_vector_of_3rd_order_tensors;
330 std::vector<Tensor<4, dim>> empty_vector_of_4th_order_tensors;
333 for (
unsigned int i = 0; i < n_q_points; ++i)
335 polynomial_space.evaluate(mapping_data.quadrature_points[i],
339 empty_vector_of_3rd_order_tensors,
340 empty_vector_of_4th_order_tensors);
343 for (
unsigned int k = 0; k < this->dofs_per_cell; ++k)
344 output_data.shape_values[k][i] = values[k];
347 for (
unsigned int k = 0; k < this->dofs_per_cell; ++k)
348 output_data.shape_gradients[k][i] = grads[k];
351 for (
unsigned int k = 0; k < this->dofs_per_cell; ++k)
352 output_data.shape_hessians[k][i] = grad_grads[k];
358 template <
int dim,
int spacedim>
366 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
377 const unsigned int n_q_points = mapping_data.quadrature_points.size();
379 std::vector<double> values(
381 std::vector<Tensor<1, dim>> grads(
383 std::vector<Tensor<2, dim>> grad_grads(
385 std::vector<Tensor<3, dim>> empty_vector_of_3rd_order_tensors;
386 std::vector<Tensor<4, dim>> empty_vector_of_4th_order_tensors;
389 for (
unsigned int i = 0; i < n_q_points; ++i)
391 polynomial_space.evaluate(mapping_data.quadrature_points[i],
395 empty_vector_of_3rd_order_tensors,
396 empty_vector_of_4th_order_tensors);
399 for (
unsigned int k = 0; k < this->dofs_per_cell; ++k)
400 output_data.shape_values[k][i] = values[k];
403 for (
unsigned int k = 0; k < this->dofs_per_cell; ++k)
404 output_data.shape_gradients[k][i] = grads[k];
407 for (
unsigned int k = 0; k < this->dofs_per_cell; ++k)
408 output_data.shape_hessians[k][i] = grad_grads[k];
414 template <
int dim,
int spacedim>
423 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
434 const unsigned int n_q_points = mapping_data.quadrature_points.size();
436 std::vector<double> values(
438 std::vector<Tensor<1, dim>> grads(
440 std::vector<Tensor<2, dim>> grad_grads(
442 std::vector<Tensor<3, dim>> empty_vector_of_3rd_order_tensors;
443 std::vector<Tensor<4, dim>> empty_vector_of_4th_order_tensors;
446 for (
unsigned int i = 0; i < n_q_points; ++i)
448 polynomial_space.evaluate(mapping_data.quadrature_points[i],
452 empty_vector_of_3rd_order_tensors,
453 empty_vector_of_4th_order_tensors);
456 for (
unsigned int k = 0; k < this->dofs_per_cell; ++k)
457 output_data.shape_values[k][i] = values[k];
460 for (
unsigned int k = 0; k < this->dofs_per_cell; ++k)
461 output_data.shape_gradients[k][i] = grads[k];
464 for (
unsigned int k = 0; k < this->dofs_per_cell; ++k)
465 output_data.shape_hessians[k][i] = grad_grads[k];
471 template <
int dim,
int spacedim>
483 (void)interpolation_matrix;
485 (x_source_fe.
get_name().find(
"FE_DGPNonparametric<") == 0) ||
490 Assert(interpolation_matrix.
m() == 0,
492 Assert(interpolation_matrix.
n() == 0,
498 template <
int dim,
int spacedim>
511 (void)interpolation_matrix;
513 (x_source_fe.
get_name().find(
"FE_DGPNonparametric<") == 0) ||
518 Assert(interpolation_matrix.
m() == 0,
520 Assert(interpolation_matrix.
n() == 0,
526 template <
int dim,
int spacedim>
535 template <
int dim,
int spacedim>
536 std::vector<std::pair<unsigned int, unsigned int>>
544 return std::vector<std::pair<unsigned int, unsigned int>>();
548 return std::vector<std::pair<unsigned int, unsigned int>>();
554 template <
int dim,
int spacedim>
555 std::vector<std::pair<unsigned int, unsigned int>>
563 return std::vector<std::pair<unsigned int, unsigned int>>();
567 return std::vector<std::pair<unsigned int, unsigned int>>();
573 template <
int dim,
int spacedim>
574 std::vector<std::pair<unsigned int, unsigned int>>
582 return std::vector<std::pair<unsigned int, unsigned int>>();
586 return std::vector<std::pair<unsigned int, unsigned int>>();
592 template <
int dim,
int spacedim>
596 const unsigned int codim)
const
613 if (this->degree < fe_nonparametric_other->degree)
615 else if (this->degree == fe_nonparametric_other->degree)
623 if (fe_nothing->is_dominating())
638 template <
int dim,
int spacedim>
642 const unsigned int)
const
649 template <
int dim,
int spacedim>
659 template <
int dim,
int spacedim>
669 #include "fe_dgp_nonparametric.inst"