16 #include <deal.II/base/config.h> 17 #include <deal.II/base/tensor_product_polynomials.h> 18 #include <deal.II/base/quadrature_lib.h> 19 #include <deal.II/base/qprojector.h> 20 #include <deal.II/fe/fe_poly_face.h> 21 #include <deal.II/fe/fe_q.h> 22 #include <deal.II/fe/fe_nothing.h> 23 #include <deal.II/fe/fe_tools.h> 24 #include <deal.II/fe/fe_trace.h> 29 #include <deal.II/base/std_cxx14/memory.h> 31 DEAL_II_NAMESPACE_OPEN
35 template <
int dim,
int spacedim>
41 std::vector<bool>(1,true)),
45 ExcMessage (
"FE_Trace can only be used for polynomial degrees " 46 "greater than zero"));
67 template <
int dim,
int spacedim>
68 std::unique_ptr<FiniteElement<dim,spacedim> >
71 return std_cxx14::make_unique<FE_TraceQ<dim,spacedim>>(this->degree);
76 template <
int dim,
int spacedim>
84 std::ostringstream namebuf;
85 namebuf <<
"FE_TraceQ<" 87 <<
">(" << this->degree <<
")";
94 template <
int dim,
int spacedim>
97 const unsigned int face_index)
const 99 Assert (shape_index < this->dofs_per_cell,
109 return fe_q.has_support_on_face (shape_index, face_index);
114 template <
int dim,
int spacedim>
115 std::pair<Table<2,bool>, std::vector<unsigned int> >
119 for (
unsigned int i=0; i<this->dofs_per_cell; ++i)
120 constant_modes(0,i) =
true;
121 return std::pair<Table<2,bool>, std::vector<unsigned int> >
122 (constant_modes, std::vector<unsigned int>(1, 0));
125 template <
int dim,
int spacedim>
129 std::vector<double> &nodal_values)
const 132 this->get_unit_support_points().size());
134 nodal_values.size());
136 nodal_values.size());
138 for (
unsigned int i=0; i<this->dofs_per_cell; ++i)
142 nodal_values[i] = support_point_values[i](0);
147 template <
int dim,
int spacedim>
148 std::vector<unsigned int>
155 std::vector<unsigned int> dpo(dim+1, 1U);
158 for (
unsigned int i=1; i<dim; ++i)
159 dpo[i] = dpo[i-1]*(deg-1);
165 template <
int dim,
int spacedim>
169 return fe_q.hp_constraints_are_implemented ();
173 template <
int dim,
int spacedim>
181 if (this->degree < fe_q_other->degree)
183 else if (this->degree == fe_q_other->degree)
190 if (fe_nothing->is_dominating())
208 template <
int dim,
int spacedim>
215 interpolation_matrix);
220 template <
int dim,
int spacedim>
224 const unsigned int subface,
228 Assert (interpolation_matrix.
n() == this->dofs_per_face,
230 this->dofs_per_face));
239 fe_q.get_subface_interpolation_matrix (source_fe->fe_q, subface, interpolation_matrix);
241 else if (
dynamic_cast<const FE_Nothing<dim> *
>(&x_source_fe) !=
nullptr)
247 ExcInterpolationNotImplemented()));
252 template <
int spacedim>
260 template <
int spacedim>
267 std::ostringstream namebuf;
268 namebuf <<
"FE_TraceQ<" 270 <<
">(" << this->
degree <<
")";
272 return namebuf.str();
278 #include "fe_trace.inst" 281 DEAL_II_NAMESPACE_CLOSE
static const unsigned int invalid_unsigned_int
#define AssertDimension(dim1, dim2)
FullMatrix< double > interface_constraints
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const
virtual void convert_generalized_support_point_values_to_dof_values(const std::vector< Vector< double > > &support_point_values, std::vector< double > &nodal_values) const
FE_TraceQ(unsigned int p)
const unsigned int degree
void set_numbering(const std::vector< unsigned int > &renumber)
#define AssertThrow(cond, exc)
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const
std::vector< Point< dim > > unit_support_points
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
static ::ExceptionBase & ExcMessage(std::string arg1)
#define Assert(cond, exc)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
std::vector< Point< dim-1 > > unit_face_support_points
FE_Q< dim, spacedim > fe_q
virtual bool hp_constraints_are_implemented() const
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
std::string dim_string(const int dim, const int spacedim)
TensorProductPolynomials< dim-1 > poly_space
const unsigned int dofs_per_cell
virtual FiniteElementDomination::Domination compare_for_face_domination(const FiniteElement< dim, spacedim > &fe_other) const
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const
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