29 template <
int dim,
int q_dim,
class FEValuesType>
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(),
45 , update_flags(update_flags)
49 template <
int dim,
int q_dim,
class FEValuesType>
54 : fe_collection(&fe_collection)
58 , q_collection(q_collection)
59 , fe_values_table(fe_collection.size(), 1, q_collection.size())
63 , update_flags(update_flags)
68 template <
int dim,
int q_dim,
class FEValuesType>
71 : fe_collection(other.fe_collection)
72 , mapping_collection(other.mapping_collection)
73 , q_collection(other.q_collection)
74 , fe_values_table(fe_collection->size(),
75 mapping_collection->size(),
77 , present_fe_values_index(other.present_fe_values_index)
84 for (
unsigned int fe_index = 0; fe_index < fe_collection->size();
86 for (
unsigned int m_index = 0; m_index < mapping_collection->size();
88 for (
unsigned int q_index = 0; q_index < q_collection.size(); ++q_index)
92 fe_values_table[fe_index][m_index][q_index] =
93 std_cxx14::make_unique<FEValuesType>(
94 (*mapping_collection)[m_index],
95 (*fe_collection)[fe_index],
96 q_collection[q_index],
105 template <
int dim,
int q_dim,
class FEValuesType>
108 const unsigned int fe_index,
109 const unsigned int mapping_index,
110 const unsigned int q_index)
119 present_fe_values_index =
TableIndices<3>(fe_index, mapping_index, q_index);
125 if (fe_values_table(present_fe_values_index).get() ==
nullptr)
126 fe_values_table(present_fe_values_index) =
127 std_cxx14::make_unique<FEValuesType>(
128 (*mapping_collection)[mapping_index],
129 (*fe_collection)[fe_index],
130 q_collection[q_index],
134 return *fe_values_table(present_fe_values_index);
139 template <
int dim,
int q_dim,
class FEValuesType>
142 const std::vector<unsigned int> &fe_indices,
143 const std::vector<unsigned int> &mapping_indices,
144 const std::vector<unsigned int> &q_indices)
150 for (
unsigned int i = 0; i < fe_indices.size(); ++i)
152 const unsigned int fe_index = fe_indices[i],
153 mapping_index = mapping_indices[i],
154 q_index = q_indices[i];
163 std_cxx14::make_unique<FEValuesType>(
164 (*mapping_collection)[mapping_index],
165 (*fe_collection)[fe_index],
166 q_collection[q_index],
171 task_group.join_all();
176 template <
int dim,
int q_dim,
class FEValuesType>
180 const unsigned int size = fe_collection->size();
181 std::vector<unsigned int> indices(size);
182 std::iota(indices.begin(), indices.end(), 0);
184 precalculate_fe_values(indices,
186 (mapping_collection->size() > 1) ?
188 std::vector<unsigned int>(size, 0),
190 (q_collection.size() > 1) ?
192 std::vector<unsigned int>(size, 0));
202 template <
int dim,
int spacedim>
215 template <
int dim,
int spacedim>
226 template <
int dim,
int spacedim>
227 template <
typename DoFHandlerType,
bool lda>
231 const unsigned int q_index,
232 const unsigned int mapping_index,
233 const unsigned int fe_index)
237 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
238 real_fe_index = fe_index;
243 real_q_index = cell->active_fe_index();
251 real_mapping_index = cell->active_fe_index();
253 real_mapping_index = 0;
257 real_fe_index = cell->active_fe_index();
273 template <
int dim,
int spacedim>
277 const unsigned int q_index,
278 const unsigned int mapping_index,
279 const unsigned int fe_index)
283 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
284 real_fe_index = fe_index;
290 real_mapping_index = 0;
311 template <
int dim,
int spacedim>
325 template <
int dim,
int spacedim>
337 template <
int dim,
int spacedim>
338 template <
typename DoFHandlerType,
bool lda>
342 const unsigned int face_no,
343 const unsigned int q_index,
344 const unsigned int mapping_index,
345 const unsigned int fe_index)
349 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
350 real_fe_index = fe_index;
355 real_q_index = cell->active_fe_index();
363 real_mapping_index = cell->active_fe_index();
365 real_mapping_index = 0;
369 real_fe_index = cell->active_fe_index();
380 .reinit(cell, face_no);
385 template <
int dim,
int spacedim>
389 const unsigned int face_no,
390 const unsigned int q_index,
391 const unsigned int mapping_index,
392 const unsigned int fe_index)
396 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
397 real_fe_index = fe_index;
403 real_mapping_index = 0;
417 .reinit(cell, face_no);
424 template <
int dim,
int spacedim>
438 template <
int dim,
int spacedim>
450 template <
int dim,
int spacedim>
451 template <
typename DoFHandlerType,
bool lda>
455 const unsigned int face_no,
456 const unsigned int subface_no,
457 const unsigned int q_index,
458 const unsigned int mapping_index,
459 const unsigned int fe_index)
463 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
464 real_fe_index = fe_index;
468 if (this->q_collection.size() > 1)
469 real_q_index = cell->active_fe_index();
476 if (this->mapping_collection->size() > 1)
477 real_mapping_index = cell->active_fe_index();
479 real_mapping_index = 0;
483 real_fe_index = cell->active_fe_index();
493 this->select_fe_values(real_fe_index, real_mapping_index, real_q_index)
494 .reinit(cell, face_no, subface_no);
499 template <
int dim,
int spacedim>
503 const unsigned int face_no,
504 const unsigned int subface_no,
505 const unsigned int q_index,
506 const unsigned int mapping_index,
507 const unsigned int fe_index)
511 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
512 real_fe_index = fe_index;
518 real_mapping_index = 0;
531 this->select_fe_values(real_fe_index, real_mapping_index, real_q_index)
532 .reinit(cell, face_no, subface_no);
538 #include "fe_values.inst" static const unsigned int invalid_unsigned_int
#define AssertDimension(dim1, dim2)
FEValues(const MappingCollection< dim, spacedim > &mapping_collection, const FECollection< dim, spacedim > &fe_collection, const QCollection< dim > &q_collection, const UpdateFlags update_flags)
const QCollection< q_dim > q_collection
Task< RT > new_task(const std::function< RT()> &function)
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)
#define AssertIndexRange(index, range)
const SmartPointer< const MappingCollection< dim, ::FEValues< dim, spacedim > ::space_dimension >, FEValuesBase< dim, q_dim, ::FEValues< dim, spacedim > > > mapping_collection
static const unsigned int space_dimension
const SmartPointer< const Mapping< dim, spacedim >, FEValuesBase< dim, spacedim > > mapping
const UpdateFlags update_flags
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)
unsigned int size() const
#define DEAL_II_NAMESPACE_CLOSE
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)
const SmartPointer< const FECollection< dim, ::FEValues< dim, spacedim > ::space_dimension >, FEValuesBase< dim, q_dim, ::FEValues< dim, spacedim > > > fe_collection
::FEValues< dim, spacedim > & select_fe_values(const unsigned int fe_index, const unsigned int mapping_index, const unsigned int q_index)
#define DEAL_II_NAMESPACE_OPEN
Table< 3, std::unique_ptr< FEValuesType > > fe_values_table
FEValuesBase(const MappingCollection< dim, FEValuesType::space_dimension > &mapping_collection, const FECollection< dim, FEValuesType::space_dimension > &fe_collection, const QCollection< q_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)