16 #include <deal.II/base/config.h> 18 #include <deal.II/base/qprojector.h> 19 #include <deal.II/base/quadrature_lib.h> 20 #include <deal.II/base/std_cxx14/memory.h> 21 #include <deal.II/base/tensor_product_polynomials.h> 23 #include <deal.II/fe/fe_nothing.h> 24 #include <deal.II/fe/fe_poly_face.h> 25 #include <deal.II/fe/fe_q.h> 26 #include <deal.II/fe/fe_tools.h> 27 #include <deal.II/fe/fe_trace.h> 33 DEAL_II_NAMESPACE_OPEN
37 template <
int dim,
int spacedim>
47 std::vector<bool>(1, true))
51 ExcMessage(
"FE_Trace can only be used for polynomial degrees " 52 "greater than zero"));
73 template <
int dim,
int spacedim>
74 std::unique_ptr<FiniteElement<dim, spacedim>>
77 return std_cxx14::make_unique<FE_TraceQ<dim, spacedim>>(this->degree);
82 template <
int dim,
int spacedim>
90 std::ostringstream namebuf;
92 << this->degree <<
")";
99 template <
int dim,
int spacedim>
102 const unsigned int shape_index,
103 const unsigned int face_index)
const 105 Assert(shape_index < this->dofs_per_cell,
115 return fe_q.has_support_on_face(shape_index, face_index);
120 template <
int dim,
int spacedim>
121 std::pair<Table<2, bool>, std::vector<unsigned int>>
125 for (
unsigned int i = 0; i < this->dofs_per_cell; ++i)
126 constant_modes(0, i) =
true;
127 return std::pair<Table<2, bool>, std::vector<unsigned int>>(
128 constant_modes, std::vector<unsigned int>(1, 0));
131 template <
int dim,
int spacedim>
136 std::vector<double> & nodal_values)
const 139 this->get_unit_support_points().size());
143 for (
unsigned int i = 0; i < this->dofs_per_cell; ++i)
147 nodal_values[i] = support_point_values[i](0);
152 template <
int dim,
int spacedim>
153 std::vector<unsigned int>
160 std::vector<unsigned int> dpo(dim + 1, 1U);
163 for (
unsigned int i = 1; i < dim; ++i)
164 dpo[i] = dpo[i - 1] * (deg - 1);
170 template <
int dim,
int spacedim>
174 return fe_q.hp_constraints_are_implemented();
178 template <
int dim,
int spacedim>
182 const unsigned int codim)
const 192 if (this->degree < fe_traceq_other->degree)
194 else if (this->degree == fe_traceq_other->degree)
202 if (fe_nothing->is_dominating())
217 template <
int dim,
int spacedim>
223 get_subface_interpolation_matrix(source_fe,
225 interpolation_matrix);
230 template <
int dim,
int spacedim>
234 const unsigned int subface,
238 Assert(interpolation_matrix.
n() == this->dofs_per_face,
248 fe_q.get_subface_interpolation_matrix(source_fe->fe_q,
250 interpolation_matrix);
252 else if (
dynamic_cast<const FE_Nothing<dim> *
>(&x_source_fe) !=
nullptr)
260 spacedim>::ExcInterpolationNotImplemented()));
265 template <
int spacedim>
272 template <
int spacedim>
279 std::ostringstream namebuf;
283 return namebuf.str();
289 #include "fe_trace.inst" 292 DEAL_II_NAMESPACE_CLOSE
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const override
static const unsigned int invalid_unsigned_int
#define AssertDimension(dim1, dim2)
FullMatrix< double > interface_constraints
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
FE_TraceQ(unsigned int p)
const unsigned int degree
void set_numbering(const std::vector< unsigned int > &renumber)
std::vector< Point< dim - 1 > > unit_face_support_points
#define AssertThrow(cond, exc)
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
std::vector< Point< dim > > unit_support_points
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const override
static ::ExceptionBase & ExcMessage(std::string arg1)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const override final
#define Assert(cond, exc)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
FE_Q< dim, spacedim > fe_q
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
std::string dim_string(const int dim, const int spacedim)
TensorProductPolynomials< dim - 1 > poly_space
const unsigned int dofs_per_cell
virtual bool hp_constraints_are_implemented() const override
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
const unsigned int dofs_per_face
static ::ExceptionBase & ExcNotImplemented()
static std::vector< unsigned int > get_dpo_vector(const unsigned int deg)
virtual std::string get_name() const override
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const override