35 template <
int dim,
int spacedim>
45 get_riaf_vector(degree))
48 ExcMessage(
"This element can only be used for polynomial degrees "
49 "greater than zero"));
55 for (
unsigned int d = 0;
d < dim; ++
d)
63 template <
int dim,
int spacedim>
72 get_riaf_vector(points.size() - 1))
78 ExcMessage(
"This element can only be used for polynomial degrees "
85 for (
unsigned int d = 0;
d < dim; ++
d)
93 template <
int dim,
int spacedim>
101 std::ostringstream namebuf;
103 const unsigned int n_points = this->degree + 1;
104 std::vector<double> points(n_points);
105 const unsigned int dofs_per_cell = this->dofs_per_cell;
106 const std::vector<Point<dim>> &unit_support_points =
107 this->unit_support_points;
108 unsigned int index = 0;
111 for (
unsigned int j = 0; j < dofs_per_cell; j++)
113 if ((dim > 1) ? (unit_support_points[j](1) == 0 &&
114 ((dim > 2) ? unit_support_points[j](2) == 0 :
true)) :
118 points[index] = unit_support_points[j](0);
120 points[n_points - 1] = unit_support_points[j](0);
122 points[index - 1] = unit_support_points[j](0);
128 Assert(index == n_points || (dim == 1 && index == n_points + 1),
130 "Could not decode support points in one coordinate direction."));
133 for (
unsigned int j = 0; j < n_points; j++)
134 if (
std::fabs(points[j] -
static_cast<double>(j) / this->degree) > 1
e-15)
142 if (this->degree > 2)
144 <<
">(QIterated(QTrapez()," << this->degree <<
"))";
147 << this->degree <<
")";
154 for (
unsigned int j = 0; j < n_points; j++)
155 if (points[j] != points_gl.
point(j)(0))
162 << this->degree <<
")";
165 <<
">(QUnknownNodes(" << this->degree <<
"))";
167 return namebuf.str();
172 template <
int dim,
int spacedim>
173 std::unique_ptr<FiniteElement<dim, spacedim>>
176 return std_cxx14::make_unique<FE_Q_DG0<dim, spacedim>>(*this);
181 template <
int dim,
int spacedim>
185 std::vector<double> & nodal_dofs)
const
187 Assert(support_point_values.size() == this->unit_support_points.size(),
189 this->unit_support_points.size()));
190 Assert(nodal_dofs.size() == this->dofs_per_cell,
196 for (
unsigned int i = 0; i < this->dofs_per_cell - 1; ++i)
198 const std::pair<unsigned int, unsigned int> index =
199 this->system_to_component_index(i);
200 nodal_dofs[i] = support_point_values[i](index.first);
204 nodal_dofs[nodal_dofs.size() - 1] = 0.;
209 template <
int dim,
int spacedim>
219 (x_source_fe.
get_name().find(
"FE_Q_DG0<") == 0) ||
220 (
dynamic_cast<const FEQDG0 *
>(&x_source_fe) !=
nullptr),
223 Assert(interpolation_matrix.
m() == this->dofs_per_cell,
235 template <
int dim,
int spacedim>
239 std::vector<bool> riaf(Utilities::fixed_power<dim>(deg + 1) + 1,
false);
240 riaf[riaf.size() - 1] =
true;
246 template <
int dim,
int spacedim>
247 std::vector<unsigned int>
250 std::vector<unsigned int> dpo(dim + 1, 1
U);
251 for (
unsigned int i = 1; i < dpo.size(); ++i)
252 dpo[i] = dpo[i - 1] * (deg - 1);
260 template <
int dim,
int spacedim>
263 const unsigned int shape_index,
264 const unsigned int face_index)
const
267 if (shape_index == this->dofs_per_cell - 1)
271 has_support_on_face(shape_index, face_index);
276 template <
int dim,
int spacedim>
277 std::pair<Table<2, bool>, std::vector<unsigned int>>
283 for (
unsigned int i = 0; i < this->dofs_per_cell - 1; ++i)
284 constant_modes(0, i) =
true;
287 constant_modes(1, this->dofs_per_cell - 1) =
true;
289 return std::pair<Table<2, bool>, std::vector<unsigned int>>(
290 constant_modes, std::vector<unsigned int>(2, 0));
295 template <
int dim,
int spacedim>
299 const unsigned int codim)
const
318 if (this->degree < fe_dg0_other->degree)
320 else if (this->degree == fe_dg0_other->degree)
328 if (fe_nothing->is_dominating())
343 #include "fe_q_dg0.inst"