35 std::vector<unsigned int>
83 std::vector<Point<dim>>
86 std::vector<Point<dim>> unit_points;
90 unit_points.emplace_back();
94 const auto reference_cell = ReferenceCells::get_simplex<dim>();
108 for (
const auto &
line_no : reference_cell.line_indices())
111 reference_cell.line_to_cell_vertices(
line_no, 0));
113 reference_cell.line_to_cell_vertices(
line_no, 1));
114 unit_points.emplace_back((
v0 +
v1) / 2.0);
125 std::vector<std::vector<
Point<dim - 1>>>
127 const unsigned int degree,
169 const unsigned int dim = 2;
194 unsigned int n_dofs_per_face = degree + 1;
201 for (
unsigned int j = 0;
j < n_dofs_per_face; ++
j)
203 interface_constraints(i,
j) =
210 if (std::fabs(interface_constraints(i,
j)) < 1e-13)
211 interface_constraints(i,
j) = 0;
213 return interface_constraints;
222 std::vector<unsigned int>
228 std::vector<unsigned int>
dpo(dim + 1, 0U);
275template <
int dim,
int spacedim>
279 const std::vector<
Point<dim>> & unit_support_points,
280 const std::vector<std::vector<
Point<dim - 1>>> unit_face_support_points,
285 std::vector<
bool>(fe_data.dofs_per_cell),
296template <
int dim,
int spacedim>
297std::pair<Table<2, bool>, std::vector<unsigned int>>
301 constant_modes.fill(
true);
302 return std::pair<Table<2, bool>, std::vector<unsigned int>>(
303 constant_modes, std::vector<unsigned int>(1, 0));
308template <
int dim,
int spacedim>
311 const unsigned int child,
319 if (this->prolongation[refinement_case - 1][child].n() == 0)
321 std::lock_guard<std::mutex> lock(this->mutex);
324 if (this->prolongation[refinement_case - 1][child].n() ==
325 this->n_dofs_per_cell())
326 return this->prolongation[refinement_case - 1][child];
345 return this->prolongation[refinement_case - 1][child];
350template <
int dim,
int spacedim>
353 const unsigned int child,
361 if (this->restriction[refinement_case - 1][child].n() == 0)
363 std::lock_guard<std::mutex> lock(this->mutex);
366 if (this->restriction[refinement_case - 1][child].n() ==
367 this->n_dofs_per_cell())
368 return this->restriction[refinement_case - 1][child];
387 return this->restriction[refinement_case - 1][child];
392template <
int dim,
int spacedim>
397 const unsigned int face_no)
const
411 const double eps = 2e-13 * this->degree * (dim - 1);
420 for (
unsigned int j = 0;
j < this->n_dofs_per_face(
face_no); ++
j)
423 this->shape_value(this->face_to_cell_index(
j, 0),
442 for (
unsigned int i = 0; i < this->n_dofs_per_face(
face_no); ++i)
457 spacedim>::ExcInterpolationNotImplemented()));
462template <
int dim,
int spacedim>
466 const unsigned int subface,
468 const unsigned int face_no)
const
482 const double eps = 2e-13 * this->degree * (dim - 1);
493 for (
unsigned int j = 0;
j < this->n_dofs_per_face(
face_no); ++
j)
496 this->shape_value(this->face_to_cell_index(
j, 0),
515 for (
unsigned int i = 0; i < this->n_dofs_per_face(
face_no); ++i)
530 spacedim>::ExcInterpolationNotImplemented()));
535template <
int dim,
int spacedim>
544template <
int dim,
int spacedim>
552 this->get_unit_support_points().
size());
556 for (
unsigned int i = 0; i < this->dofs_per_cell; ++i)
566template <
int dim,
int spacedim>
582template <
int dim,
int spacedim>
583std::unique_ptr<FiniteElement<dim, spacedim>>
586 return std::make_unique<FE_SimplexP<dim, spacedim>>(*this);
591template <
int dim,
int spacedim>
596 namebuf <<
"FE_SimplexP<" << dim <<
">(" << this->degree <<
")";
603template <
int dim,
int spacedim>
607 const unsigned int codim)
const
648 if (fe_nothing->is_dominating())
663template <
int dim,
int spacedim>
664std::vector<std::pair<unsigned int, unsigned int>>
688 else if (
fe_other.n_unique_faces() == 1 &&
fe_other.n_dofs_per_face(0) == 0)
708template <
int dim,
int spacedim>
709std::vector<std::pair<unsigned int, unsigned int>>
725 std::vector<std::pair<unsigned int, unsigned int>>
identities;
727 for (
unsigned int i = 0; i < this->degree - 1; ++i)
729 if (std::fabs(this->unit_support_points[i + 3][0] -
730 fe_p_other->unit_support_points[i + 3][0]) < 1e-14)
760 fe_q_other->get_poly_space_numbering_inverse();
762 std::vector<std::pair<unsigned int, unsigned int>>
identities;
764 for (
unsigned int i = 0; i < this->degree - 1; ++i)
766 if (std::fabs(this->unit_support_points[i + 3][0] -
792 else if (
fe_other.n_unique_faces() == 1 &&
fe_other.n_dofs_per_face(0) == 0)
812template <
int dim,
int spacedim>
828template <
int dim,
int spacedim>
829std::unique_ptr<FiniteElement<dim, spacedim>>
832 return std::make_unique<FE_SimplexDGP<dim, spacedim>>(*this);
837template <
int dim,
int spacedim>
842 namebuf <<
"FE_SimplexDGP<" << dim <<
">(" << this->degree <<
")";
848template <
int dim,
int spacedim>
852 const unsigned int codim)
const
889 if (fe_nothing->is_dominating())
904template <
int dim,
int spacedim>
905std::vector<std::pair<unsigned int, unsigned int>>
916template <
int dim,
int spacedim>
917std::vector<std::pair<unsigned int, unsigned int>>
927#include "fe_simplex_p.inst"
static BarycentricPolynomials< dim > get_fe_p_basis(const unsigned int degree)
FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim) const override
std::string get_name() const override
std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
FE_SimplexDGP(const unsigned int degree)
std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
FE_SimplexP(const unsigned int degree)
std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim) const override
std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
std::string get_name() const override
std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const override
void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &x_source_fe, const unsigned int subface, FullMatrix< double > &interpolation_matrix, const unsigned int face_no) const override
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
virtual void convert_generalized_support_point_values_to_dof_values(const std::vector< Vector< double > > &support_point_values, std::vector< double > &nodal_values) const override
bool hp_constraints_are_implemented() const override
FE_SimplexPoly(const BarycentricPolynomials< dim > polynomials, const FiniteElementData< dim > &fe_data, const std::vector< Point< dim > > &unit_support_points, const std::vector< std::vector< Point< dim - 1 > > > unit_face_support_points, const FullMatrix< double > &interface_constraints)
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source_fe, FullMatrix< double > &interpolation_matrix, const unsigned int face_no) const override
std::vector< std::vector< Point< dim - 1 > > > unit_face_support_points
std::vector< Point< dim > > unit_support_points
FullMatrix< double > interface_constraints
static void project_to_subface(const ReferenceCell &reference_cell, const SubQuadrature &quadrature, const unsigned int face_no, const unsigned int subface_no, std::vector< Point< dim > > &q_points, const RefinementCase< dim - 1 > &ref_case=RefinementCase< dim - 1 >::isotropic_refinement)
static void project_to_face(const ReferenceCell &reference_cell, const SubQuadrature &quadrature, const unsigned int face_no, std::vector< Point< dim > > &q_points)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
#define AssertDimension(dim1, dim2)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
#define AssertThrow(cond, exc)
@ either_element_can_dominate
@ other_element_dominates
@ neither_element_dominates
constexpr const ReferenceCell Tetrahedron
constexpr const ReferenceCell Triangle
constexpr const ReferenceCell Line
constexpr const ReferenceCell & get_simplex()