57 return std::vector<Point<1>>(1,
Point<1>(0.5));
65template <
int dim,
int spacedim>
99template <
int dim,
int spacedim>
106 polynomials.size() - 1,
109 polynomials.size() - 1),
111 polynomials.size() - 1)
117 polynomials.size() - 1)
131template <
int dim,
int spacedim>
141 << this->degree <<
")";
147template <
int dim,
int spacedim>
154 this->get_unit_support_points().
size());
158 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
168template <
int dim,
int spacedim>
169std::unique_ptr<FiniteElement<dim, spacedim>>
172 return std::make_unique<FE_DGQ<dim, spacedim>>(*this);
181template <
int dim,
int spacedim>
182std::vector<unsigned int>
185 std::vector<unsigned int>
dpo(dim + 1, 0U);
187 for (
unsigned int i = 1; i < dim; ++i)
194template <
int dim,
int spacedim>
197 const char direction)
const
199 const unsigned int n = this->degree + 1;
201 for (
unsigned int i = 1; i < dim; ++i)
210 for (
unsigned int i = n; i > 0;)
220 for (
unsigned int iz = 0;
iz < ((dim > 2) ? n : 1); ++
iz)
221 for (
unsigned int j = 0;
j < n; ++
j)
222 for (
unsigned int i = 0; i < n; ++i)
224 unsigned int k = n * i -
j + n - 1 + n * n *
iz;
231 for (
unsigned int iz = 0;
iz < ((dim > 2) ? n : 1); ++
iz)
232 for (
unsigned int iy = 0;
iy < n; ++
iy)
233 for (
unsigned int ix = 0;
ix < n; ++
ix)
235 unsigned int k = n *
ix -
iy + n - 1 + n * n *
iz;
243 for (
unsigned int iz = 0;
iz < n; ++
iz)
244 for (
unsigned int iy = 0;
iy < n; ++
iy)
245 for (
unsigned int ix = 0;
ix < n; ++
ix)
247 unsigned int k = n * (n *
iy -
iz + n - 1) +
ix;
255 for (
unsigned int iz = 0;
iz < n; ++
iz)
256 for (
unsigned int iy = 0;
iy < n; ++
iy)
257 for (
unsigned int ix = 0;
ix < n; ++
ix)
259 unsigned int k = n * (n *
iy -
iz + n - 1) +
ix;
271template <
int dim,
int spacedim>
283 typename FE::ExcInterpolationNotImplemented());
303 this->n_dofs_per_cell());
307 for (
unsigned int j = 0;
j < this->n_dofs_per_cell(); ++
j)
313 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
316 for (
unsigned int i = 0; i <
source_fe.n_dofs_per_cell(); ++i)
328 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
329 for (
unsigned int j = 0;
j <
source_fe.n_dofs_per_cell(); ++
j)
339 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
342 for (
unsigned int j = 0;
j <
source_fe.n_dofs_per_cell(); ++
j)
345 Assert(std::fabs(sum - 1) < 5e-14 *
std::max(this->degree, 1U) * dim,
353template <
int dim,
int spacedim>
358 const unsigned int)
const
370 typename FE::ExcInterpolationNotImplemented());
380template <
int dim,
int spacedim>
386 const unsigned int)
const
398 typename FE::ExcInterpolationNotImplemented());
408template <
int dim,
int spacedim>
411 const unsigned int child,
418 "Prolongation matrices are only available for refined cells!"));
422 if (this->prolongation[refinement_case - 1][child].n() == 0)
424 std::lock_guard<std::mutex> lock(this->mutex);
427 if (this->prolongation[refinement_case - 1][child].n() ==
428 this->n_dofs_per_cell())
429 return this->prolongation[refinement_case - 1][child];
442 this->n_dofs_per_cell()));
459 this_nonconst.reinit_restriction_and_prolongation_matrices();
479 return this->prolongation[refinement_case - 1][child];
484template <
int dim,
int spacedim>
487 const unsigned int child,
494 "Restriction matrices are only available for refined cells!"));
498 if (this->restriction[refinement_case - 1][child].n() == 0)
500 std::lock_guard<std::mutex> lock(this->mutex);
503 if (this->restriction[refinement_case - 1][child].n() ==
504 this->n_dofs_per_cell())
505 return this->restriction[refinement_case - 1][child];
518 this->n_dofs_per_cell()));
535 this_nonconst.reinit_restriction_and_prolongation_matrices();
555 return this->restriction[refinement_case - 1][child];
560template <
int dim,
int spacedim>
569template <
int dim,
int spacedim>
570std::vector<std::pair<unsigned int, unsigned int>>
578 return std::vector<std::pair<unsigned int, unsigned int>>();
583template <
int dim,
int spacedim>
584std::vector<std::pair<unsigned int, unsigned int>>
592 return std::vector<std::pair<unsigned int, unsigned int>>();
597template <
int dim,
int spacedim>
598std::vector<std::pair<unsigned int, unsigned int>>
601 const unsigned int)
const
607 return std::vector<std::pair<unsigned int, unsigned int>>();
612template <
int dim,
int spacedim>
616 const unsigned int codim)
const
716 if (fe_nothing->is_dominating())
731template <
int dim,
int spacedim>
734 const unsigned int face_index)
const
739 unsigned int n = this->degree + 1;
744 if (this->unit_support_points.empty())
751 for (
unsigned int d = 0; d < dim; ++d)
752 if (
std::abs(this->unit_support_points[0][d]) > 1e-13)
754 for (
unsigned int d = 0; d < dim; ++d)
755 if (
std::abs(this->unit_support_points.back()[d] - 1.) > 1e-13)
760 unsigned int n2 = n * n;
772 return (((
shape_index == 0) && (face_index == 0)) ||
773 ((
shape_index == this->degree) && (face_index == 1)));
780 if (face_index == 1 && (
shape_index % n) == this->degree)
784 if (face_index == 3 &&
shape_index >= this->n_dofs_per_cell() - n)
800 if (face_index == 2 &&
in2 < n)
803 if (face_index == 3 &&
in2 >=
n2 - n)
809 if (face_index == 5 &&
shape_index >= this->n_dofs_per_cell() -
n2)
822template <
int dim,
int spacedim>
823std::pair<Table<2, bool>, std::vector<unsigned int>>
827 constant_modes.fill(
true);
828 return std::pair<Table<2, bool>, std::vector<unsigned int>>(
829 constant_modes, std::vector<unsigned int>(1, 0));
836template <
int dim,
int spacedim>
840 Polynomials::generate_complete_Lagrange_basis(points.get_points()))
849template <
int dim,
int spacedim>
857 std::vector<double> points(this->degree + 1);
859 auto *
const polynomial_space =
863 polynomial_space->get_numbering_inverse();
864 for (
unsigned int j = 0;
j <= this->degree; ++
j)
868 for (
unsigned int j = 0;
j <= this->degree; ++
j)
869 if (
std::abs(points[
j] -
static_cast<double>(
j) / this->degree) > 1e-15)
874 if (this->degree == 0 &&
std::abs(points[0] - 0.5) < 1e-15)
879 if (this->degree > 2)
880 namebuf <<
"FE_DGQArbitraryNodes<"
882 <<
">(QIterated(QTrapezoid()," << this->degree <<
"))";
885 << this->degree <<
")";
892 for (
unsigned int j = 0;
j <= this->degree; ++
j)
902 << this->degree <<
")";
909 for (
unsigned int j = 0;
j <= this->degree; ++
j)
919 <<
">(QGauss(" << this->degree + 1 <<
"))";
926 for (
unsigned int j = 0;
j <= this->degree; ++
j)
936 <<
">(QGaussLog(" << this->degree + 1 <<
"))";
942 <<
">(QUnknownNodes(" << this->degree + 1 <<
"))";
948template <
int dim,
int spacedim>
956 this->get_unit_support_points().
size());
960 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
970template <
int dim,
int spacedim>
971std::unique_ptr<FiniteElement<dim, spacedim>>
975 std::vector<Point<1>>
qpoints(this->degree + 1);
976 auto *
const polynomial_space =
980 polynomial_space->get_numbering_inverse();
981 for (
unsigned int i = 0; i <= this->degree; ++i)
985 return std::make_unique<FE_DGQArbitraryNodes<dim, spacedim>>(
pquadrature);
992template <
int dim,
int spacedim>
995 Polynomials::Legendre::generate_complete_basis(degree))
1000template <
int dim,
int spacedim>
1001std::pair<Table<2, bool>, std::vector<unsigned int>>
1007 constant_modes(0, 0) =
true;
1008 return std::pair<Table<2, bool>, std::vector<unsigned int>>(
1009 constant_modes, std::vector<unsigned int>(1, 0));
1014template <
int dim,
int spacedim>
1024template <
int dim,
int spacedim>
1025std::unique_ptr<FiniteElement<dim, spacedim>>
1028 return std::make_unique<FE_DGQLegendre<dim, spacedim>>(this->degree);
1035template <
int dim,
int spacedim>
1038 Polynomials::HermiteLikeInterpolation::generate_complete_basis(degree))
1043template <
int dim,
int spacedim>
1053template <
int dim,
int spacedim>
1054std::unique_ptr<FiniteElement<dim, spacedim>>
1057 return std::make_unique<FE_DGQHermite<dim, spacedim>>(this->degree);
1063#include "fe_dgq.inst"
virtual std::string get_name() const override
FE_DGQArbitraryNodes(const Quadrature< 1 > &points)
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
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
virtual std::string get_name() const override
FE_DGQHermite(const unsigned int degree)
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const override
FE_DGQLegendre(const unsigned int degree)
virtual std::string get_name() const override
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
virtual bool hp_constraints_are_implemented() const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other, const unsigned int face_no=0) const override
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() 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 get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix, const unsigned int face_no=0) const override
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const override final
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
virtual std::string get_name() const override
void rotate_indices(std::vector< unsigned int > &indices, const char direction) const
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) 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
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix, const unsigned int face_no=0) const override
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const override
const unsigned int degree
std::vector< Point< dim > > unit_support_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)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
@ either_element_can_dominate
@ other_element_dominates
@ neither_element_dominates
Tensor< 2, dim, Number > l(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
std::string dim_string(const int dim, const int spacedim)
std::string int_to_string(const unsigned int value, const unsigned int digits=numbers::invalid_unsigned_int)
::VectorizedArray< Number, width > max(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)