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