17 #include <deal.II/base/quadrature.h> 18 #include <deal.II/grid/tria.h> 19 #include <deal.II/grid/tria_iterator.h> 20 #include <deal.II/dofs/dof_accessor.h> 21 #include <deal.II/fe/fe.h> 22 #include <deal.II/fe/mapping.h> 23 #include <deal.II/fe/fe_dgp_nonparametric.h> 24 #include <deal.II/fe/fe_values.h> 28 DEAL_II_NAMESPACE_OPEN
30 template <
int dim,
int spacedim>
40 std::vector<bool>(1,true))),
41 polynomial_space (
Polynomials::Legendre::generate_complete_basis(degree))
45 ref_case<RefinementCase<dim>::isotropic_refinement+1; ++ref_case)
54 for (
unsigned int i=0; i<nc; ++i)
56 this->
prolongation[ref_case-1][i].reinit (n_dofs, n_dofs);
59 for (
unsigned int j=0; j<n_dofs; ++j)
95 template <
int dim,
int spacedim>
106 std::ostringstream namebuf;
107 namebuf <<
"FE_DGPNonparametric<" 109 <<
">(" << this->degree <<
")";
111 return namebuf.str();
116 template <
int dim,
int spacedim>
125 template <
int dim,
int spacedim>
139 template <
int dim,
int spacedim>
143 const unsigned int component)
const 156 template <
int dim,
int spacedim>
169 template <
int dim,
int spacedim>
173 const unsigned int component)
const 186 template <
int dim,
int spacedim>
200 template <
int dim,
int spacedim>
204 const unsigned int component)
const 221 template <
int dim,
int spacedim>
222 std::vector<unsigned int>
225 std::vector<unsigned int> dpo(dim+1, static_cast<unsigned int>(0));
227 for (
unsigned int i=1; i<dim; ++i)
237 template <
int dim,
int spacedim>
255 template <
int dim,
int spacedim>
266 data->
update_each = requires_update_flags(update_flags);
280 template <
int dim,
int spacedim>
288 const ::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
294 const unsigned int n_q_points = mapping_data.quadrature_points.size();
299 std::vector<Tensor<3,dim> > empty_vector_of_3rd_order_tensors;
300 std::vector<Tensor<4,dim> > empty_vector_of_4th_order_tensors;
303 for (
unsigned int i=0; i<n_q_points; ++i)
305 polynomial_space.compute(mapping_data.quadrature_points[i],
306 values, grads, grad_grads,
307 empty_vector_of_3rd_order_tensors,
308 empty_vector_of_4th_order_tensors);
311 for (
unsigned int k=0; k<this->dofs_per_cell; ++k)
315 for (
unsigned int k=0; k<this->dofs_per_cell; ++k)
319 for (
unsigned int k=0; k<this->dofs_per_cell; ++k)
326 template <
int dim,
int spacedim>
334 const ::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
340 const unsigned int n_q_points = mapping_data.quadrature_points.size();
345 std::vector<Tensor<3,dim> > empty_vector_of_3rd_order_tensors;
346 std::vector<Tensor<4,dim> > empty_vector_of_4th_order_tensors;
349 for (
unsigned int i=0; i<n_q_points; ++i)
351 polynomial_space.compute(mapping_data.quadrature_points[i],
352 values, grads, grad_grads,
353 empty_vector_of_3rd_order_tensors,
354 empty_vector_of_4th_order_tensors);
357 for (
unsigned int k=0; k<this->dofs_per_cell; ++k)
361 for (
unsigned int k=0; k<this->dofs_per_cell; ++k)
365 for (
unsigned int k=0; k<this->dofs_per_cell; ++k)
372 template <
int dim,
int spacedim>
381 const ::internal::FEValues::MappingRelatedData<dim, spacedim> &mapping_data,
387 const unsigned int n_q_points = mapping_data.quadrature_points.size();
392 std::vector<Tensor<3,dim> > empty_vector_of_3rd_order_tensors;
393 std::vector<Tensor<4,dim> > empty_vector_of_4th_order_tensors;
396 for (
unsigned int i=0; i<n_q_points; ++i)
398 polynomial_space.compute(mapping_data.quadrature_points[i],
399 values, grads, grad_grads,
400 empty_vector_of_3rd_order_tensors,
401 empty_vector_of_4th_order_tensors);
404 for (
unsigned int k=0; k<this->dofs_per_cell; ++k)
408 for (
unsigned int k=0; k<this->dofs_per_cell; ++k)
412 for (
unsigned int k=0; k<this->dofs_per_cell; ++k)
419 template <
int dim,
int spacedim>
431 (void)interpolation_matrix;
437 ExcInterpolationNotImplemented());
439 Assert (interpolation_matrix.
m() == 0,
442 Assert (interpolation_matrix.
n() == 0,
449 template <
int dim,
int spacedim>
462 (void)interpolation_matrix;
468 ExcInterpolationNotImplemented());
470 Assert (interpolation_matrix.
m() == 0,
473 Assert (interpolation_matrix.
n() == 0,
480 template <
int dim,
int spacedim>
489 template <
int dim,
int spacedim>
490 std::vector<std::pair<unsigned int, unsigned int> >
498 std::vector<std::pair<unsigned int, unsigned int> > ();
502 return std::vector<std::pair<unsigned int, unsigned int> > ();
508 template <
int dim,
int spacedim>
509 std::vector<std::pair<unsigned int, unsigned int> >
517 std::vector<std::pair<unsigned int, unsigned int> > ();
521 return std::vector<std::pair<unsigned int, unsigned int> > ();
527 template <
int dim,
int spacedim>
528 std::vector<std::pair<unsigned int, unsigned int> >
536 std::vector<std::pair<unsigned int, unsigned int> > ();
540 return std::vector<std::pair<unsigned int, unsigned int> > ();
546 template <
int dim,
int spacedim>
563 template <
int dim,
int spacedim>
566 const unsigned int)
const 573 template <
int dim,
int spacedim>
583 template <
int dim,
int spacedim>
593 #include "fe_dgp_nonparametric.inst" 596 DEAL_II_NAMESPACE_CLOSE
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
virtual FiniteElementDomination::Domination compare_for_face_domination(const FiniteElement< dim, spacedim > &fe_other) const
virtual FiniteElement< dim, spacedim >::InternalDataBase * get_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim > &quadrature, ::internal::FEValues::FiniteElementRelatedData< dim, spacedim > &output_data) const
friend class FE_DGPNonparametric
virtual std::size_t memory_consumption() const
Transformed quadrature points.
virtual bool hp_constraints_are_implemented() const
#define AssertThrow(cond, exc)
virtual FiniteElement< dim, spacedim > * clone() const
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
virtual Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const
static unsigned int n_children(const RefinementCase< dim > &refinement_case)
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
unsigned int get_degree() const
std::vector< std::vector< FullMatrix< double > > > prolongation
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
#define Assert(cond, exc)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
Abstract base class for mapping classes.
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
virtual std::string get_name() const =0
Second derivatives of shape functions.
std::string dim_string(const int dim, const int spacedim)
const unsigned int dofs_per_cell
Shape function gradients.
virtual Tensor< 2, dim > shape_grad_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
static ::ExceptionBase & ExcNotImplemented()
virtual Tensor< 1, dim > shape_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
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const
static ::ExceptionBase & ExcInternalError()
virtual std::string get_name() const