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)
78 , update_flags(other.update_flags)
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],
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;
242 if (this->q_collection.size() > 1)
243 real_q_index = cell->active_fe_index();
250 if (this->mapping_collection->size() > 1)
251 real_mapping_index = cell->active_fe_index();
253 real_mapping_index = 0;
257 real_fe_index = cell->active_fe_index();
267 this->select_fe_values(real_fe_index, real_mapping_index, real_q_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;
303 this->select_fe_values(real_fe_index, real_mapping_index, real_q_index)
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;
354 if (this->q_collection.size() > 1)
355 real_q_index = cell->active_fe_index();
362 if (this->mapping_collection->size() > 1)
363 real_mapping_index = cell->active_fe_index();
365 real_mapping_index = 0;
369 real_fe_index = cell->active_fe_index();
379 this->select_fe_values(real_fe_index, real_mapping_index, real_q_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;
416 this->select_fe_values(real_fe_index, real_mapping_index, real_q_index)
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"