16 #include <deal.II/fe/mapping_q1.h> 18 #include <deal.II/hp/fe_values.h> 20 DEAL_II_NAMESPACE_OPEN
28 template <
int dim,
int q_dim,
class FEValuesType>
30 const ::hp::MappingCollection<dim, FEValuesType::space_dimension>
32 const ::hp::FECollection<dim, FEValuesType::space_dimension>
34 const ::hp::QCollection<q_dim> &q_collection,
36 : fe_collection(&fe_collection)
37 , mapping_collection(&mapping_collection)
38 , q_collection(q_collection)
39 , fe_values_table(fe_collection.size(),
40 mapping_collection.size(),
42 , present_fe_values_index(
numbers::invalid_unsigned_int,
45 , update_flags(update_flags)
49 template <
int dim,
int q_dim,
class FEValuesType>
51 const ::hp::FECollection<dim, FEValuesType::space_dimension>
53 const ::hp::QCollection<q_dim> &q_collection,
55 : fe_collection(&fe_collection)
59 , q_collection(q_collection)
60 , fe_values_table(fe_collection.size(), 1, q_collection.size())
61 , present_fe_values_index(
numbers::invalid_unsigned_int,
64 , update_flags(update_flags)
69 template <
int dim,
int q_dim,
class FEValuesType>
72 const unsigned int fe_index,
73 const unsigned int mapping_index,
74 const unsigned int q_index)
76 Assert(fe_index < fe_collection->size(),
78 Assert(mapping_index < mapping_collection->size(),
80 Assert(q_index < q_collection.size(),
86 present_fe_values_index =
93 if (fe_values_table(present_fe_values_index).get() ==
nullptr)
94 fe_values_table(present_fe_values_index) =
95 std::make_shared<FEValuesType>((*mapping_collection)[mapping_index],
96 (*fe_collection)[fe_index],
97 q_collection[q_index],
101 return *fe_values_table(present_fe_values_index);
113 template <
int dim,
int spacedim>
127 template <
int dim,
int spacedim>
139 template <
int dim,
int spacedim>
140 template <
typename DoFHandlerType,
bool lda>
144 const unsigned int q_index,
145 const unsigned int mapping_index,
146 const unsigned int fe_index)
150 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
151 real_fe_index = fe_index;
155 if (this->q_collection.size() > 1)
156 real_q_index = cell->active_fe_index();
163 if (this->mapping_collection->size() > 1)
164 real_mapping_index = cell->active_fe_index();
166 real_mapping_index = 0;
170 real_fe_index = cell->active_fe_index();
173 Assert(real_q_index < this->q_collection.size(),
175 Assert(real_mapping_index < this->mapping_collection->size(),
178 this->mapping_collection->size()));
179 Assert(real_fe_index < this->fe_collection->size(),
180 ExcIndexRange(real_fe_index, 0, this->fe_collection->size()));
185 this->select_fe_values(real_fe_index, real_mapping_index, real_q_index)
191 template <
int dim,
int spacedim>
195 const unsigned int q_index,
196 const unsigned int mapping_index,
197 const unsigned int fe_index)
201 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
202 real_fe_index = fe_index;
208 real_mapping_index = 0;
214 Assert(real_q_index < this->q_collection.size(),
216 Assert(real_mapping_index < this->mapping_collection->size(),
219 this->mapping_collection->size()));
220 Assert(real_fe_index < this->fe_collection->size(),
221 ExcIndexRange(real_fe_index, 0, this->fe_collection->size()));
226 this->select_fe_values(real_fe_index, real_mapping_index, real_q_index)
234 template <
int dim,
int spacedim>
249 template <
int dim,
int spacedim>
262 template <
int dim,
int spacedim>
263 template <
typename DoFHandlerType,
bool lda>
267 const unsigned int face_no,
268 const unsigned int q_index,
269 const unsigned int mapping_index,
270 const unsigned int fe_index)
274 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
275 real_fe_index = fe_index;
279 if (this->q_collection.size() > 1)
280 real_q_index = cell->active_fe_index();
287 if (this->mapping_collection->size() > 1)
288 real_mapping_index = cell->active_fe_index();
290 real_mapping_index = 0;
294 real_fe_index = cell->active_fe_index();
297 Assert(real_q_index < this->q_collection.size(),
299 Assert(real_mapping_index < this->mapping_collection->size(),
302 this->mapping_collection->size()));
303 Assert(real_fe_index < this->fe_collection->size(),
304 ExcIndexRange(real_fe_index, 0, this->fe_collection->size()));
309 this->select_fe_values(real_fe_index, real_mapping_index, real_q_index)
310 .reinit(cell, face_no);
315 template <
int dim,
int spacedim>
319 const unsigned int face_no,
320 const unsigned int q_index,
321 const unsigned int mapping_index,
322 const unsigned int fe_index)
326 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
327 real_fe_index = fe_index;
333 real_mapping_index = 0;
339 Assert(real_q_index < this->q_collection.size(),
341 Assert(real_mapping_index < this->mapping_collection->size(),
344 this->mapping_collection->size()));
345 Assert(real_fe_index < this->fe_collection->size(),
346 ExcIndexRange(real_fe_index, 0, this->fe_collection->size()));
351 this->select_fe_values(real_fe_index, real_mapping_index, real_q_index)
352 .reinit(cell, face_no);
359 template <
int dim,
int spacedim>
374 template <
int dim,
int spacedim>
387 template <
int dim,
int spacedim>
388 template <
typename DoFHandlerType,
bool lda>
392 const unsigned int face_no,
393 const unsigned int subface_no,
394 const unsigned int q_index,
395 const unsigned int mapping_index,
396 const unsigned int fe_index)
400 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
401 real_fe_index = fe_index;
405 if (this->q_collection.size() > 1)
406 real_q_index = cell->active_fe_index();
413 if (this->mapping_collection->size() > 1)
414 real_mapping_index = cell->active_fe_index();
416 real_mapping_index = 0;
420 real_fe_index = cell->active_fe_index();
423 Assert(real_q_index < this->q_collection.size(),
425 Assert(real_mapping_index < this->mapping_collection->size(),
428 this->mapping_collection->size()));
429 Assert(real_fe_index < this->fe_collection->size(),
430 ExcIndexRange(real_fe_index, 0, this->fe_collection->size()));
435 this->select_fe_values(real_fe_index, real_mapping_index, real_q_index)
436 .reinit(cell, face_no, subface_no);
441 template <
int dim,
int spacedim>
445 const unsigned int face_no,
446 const unsigned int subface_no,
447 const unsigned int q_index,
448 const unsigned int mapping_index,
449 const unsigned int fe_index)
453 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
454 real_fe_index = fe_index;
460 real_mapping_index = 0;
466 Assert(real_q_index < this->q_collection.size(),
468 Assert(real_mapping_index < this->mapping_collection->size(),
471 this->mapping_collection->size()));
472 Assert(real_fe_index < this->fe_collection->size(),
473 ExcIndexRange(real_fe_index, 0, this->fe_collection->size()));
478 this->select_fe_values(real_fe_index, real_mapping_index, real_q_index)
479 .reinit(cell, face_no, subface_no);
485 #include "fe_values.inst" 488 DEAL_II_NAMESPACE_CLOSE
static const unsigned int invalid_unsigned_int
FEValuesType & select_fe_values(const unsigned int fe_index, const unsigned int mapping_index, const unsigned int q_index)
void reinit(const TriaIterator< DoFCellAccessor< DoFHandlerType, lda >> cell, const unsigned int face_no, const unsigned int subface_no, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int)
FEValuesBase(const unsigned int n_q_points, const unsigned int dofs_per_cell, const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const FiniteElement< dim, spacedim > &fe)
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
FEValuesBase(const ::hp::MappingCollection< dim, FEValuesType::space_dimension > &mapping_collection, const ::hp::FECollection< dim, FEValuesType::space_dimension > &fe_collection, const ::hp::QCollection< q_dim > &q_collection, const ::UpdateFlags update_flags)
#define Assert(cond, exc)
FEFaceValues(const hp::MappingCollection< dim, spacedim > &mapping_collection, const hp::FECollection< dim, spacedim > &fe_collection, const hp::QCollection< dim - 1 > &q_collection, const UpdateFlags update_flags)
void reinit(const TriaIterator< DoFCellAccessor< DoFHandlerType, lda >> cell, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int)
FEValues(const ::hp::MappingCollection< dim, spacedim > &mapping_collection, const ::hp::FECollection< dim, spacedim > &fe_collection, const ::hp::QCollection< dim > &q_collection, const UpdateFlags update_flags)
FEValues(const Mapping< dim, spacedim > &mapping, const FiniteElement< dim, spacedim > &fe, const Quadrature< dim > &quadrature, const UpdateFlags update_flags)
FESubfaceValues(const hp::MappingCollection< dim, spacedim > &mapping_collection, const hp::FECollection< dim, spacedim > &fe_collection, const hp::QCollection< dim - 1 > &q_collection, const UpdateFlags update_flags)
void reinit(const TriaIterator< DoFCellAccessor< DoFHandlerType, lda >> cell, const unsigned int face_no, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int)