35 std::vector<QCollection<q_dim>>
36 translate(
const QCollection<q_dim> &q_collection)
38 std::vector<QCollection<q_dim>> q_collections;
40 for (
unsigned int q = 0; q < q_collection.size(); ++q)
41 q_collections.emplace_back(q_collection[q]);
52 translate(
const std::vector<QCollection<q_dim>> &q_collections)
54 QCollection<q_dim> result;
56 for (
unsigned int q = 0; q < q_collections.size(); ++q)
57 result.push_back(q_collections[q][0]);
65 template <
int dim,
int q_dim,
class FEValuesType>
72 : fe_collection(&fe_collection)
73 , mapping_collection(&mapping_collection)
74 , q_collection(q_collection)
75 , q_collections(translate(q_collection))
76 , fe_values_table(fe_collection.size(),
77 mapping_collection.size(),
82 , update_flags(update_flags)
85 template <
int dim,
int q_dim,
class FEValuesType>
92 : fe_collection(&fe_collection)
93 , mapping_collection(&mapping_collection)
94 , q_collection(translate(q_collections))
95 , q_collections(q_collections)
96 , fe_values_table(fe_collection.size(),
97 mapping_collection.size(),
102 , update_flags(update_flags)
106 template <
int dim,
int q_dim,
class FEValuesType>
120 template <
int dim,
int q_dim,
class FEValuesType>
135 template <
int dim,
int q_dim,
class FEValuesType>
138 : fe_collection(other.fe_collection)
139 , mapping_collection(other.mapping_collection)
140 , q_collection(other.q_collection)
141 , q_collections(other.q_collections)
142 , fe_values_table(other.fe_values_table.size(0),
143 other.fe_values_table.size(1),
144 other.fe_values_table.size(2))
145 , present_fe_values_index(other.present_fe_values_index)
146 , update_flags(other.update_flags)
152 for (
unsigned int fe_index = 0; fe_index < other.
fe_values_table.size(0);
156 for (
unsigned int q_index = 0; q_index < other.
fe_values_table.size(2);
161 fe_values_table[fe_index][m_index][q_index] =
162 std::make_unique<FEValuesType>((*mapping_collection)[m_index],
163 (*fe_collection)[fe_index],
164 q_collections[q_index],
173 template <
int dim,
int q_dim,
class FEValuesType>
176 const unsigned int fe_index,
177 const unsigned int mapping_index,
178 const unsigned int q_index)
186 present_fe_values_index = {fe_index, mapping_index, q_index};
190 if (fe_values_table(present_fe_values_index).get() ==
nullptr)
191 fe_values_table(present_fe_values_index) =
192 std::make_unique<FEValuesType>((*mapping_collection)[mapping_index],
193 (*fe_collection)[fe_index],
194 q_collections[q_index],
198 return *fe_values_table(present_fe_values_index);
203 template <
int dim,
int q_dim,
class FEValuesType>
206 const std::vector<unsigned int> &fe_indices,
207 const std::vector<unsigned int> &mapping_indices,
208 const std::vector<unsigned int> &q_indices)
214 for (
unsigned int i = 0; i < fe_indices.size(); ++i)
216 const unsigned int fe_index = fe_indices[i],
217 mapping_index = mapping_indices[i],
218 q_index = q_indices[i];
226 fe_values_table[fe_index][mapping_index][q_index] =
227 std::make_unique<FEValuesType>(
228 (*mapping_collection)[mapping_index],
229 (*fe_collection)[fe_index],
230 q_collections[q_index],
240 template <
int dim,
int q_dim,
class FEValuesType>
244 const unsigned int size = fe_collection->size();
245 std::vector<unsigned int> indices(size);
246 std::iota(indices.begin(), indices.end(), 0);
248 precalculate_fe_values(indices,
250 (mapping_collection->size() > 1) ?
252 std::vector<unsigned int>(size, 0),
254 (q_collections.size() > 1) ?
256 std::vector<unsigned int>(size, 0));
266 template <
int dim,
int spacedim>
279 template <
int dim,
int spacedim>
290 template <
int dim,
int spacedim>
295 const unsigned int q_index,
296 const unsigned int mapping_index,
297 const unsigned int fe_index)
300 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
301 real_fe_index = fe_index;
305 if (this->q_collections.size() > 1)
306 real_q_index = cell->active_fe_index();
313 if (this->mapping_collection->size() > 1)
314 real_mapping_index = cell->active_fe_index();
316 real_mapping_index = 0;
320 real_fe_index = cell->active_fe_index();
328 this->select_fe_values(real_fe_index, real_mapping_index, real_q_index)
334 template <
int dim,
int spacedim>
338 const unsigned int q_index,
339 const unsigned int mapping_index,
340 const unsigned int fe_index)
343 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
344 real_fe_index = fe_index;
350 real_mapping_index = 0;
361 this->select_fe_values(real_fe_index, real_mapping_index, real_q_index)
369 template <
int dim,
int spacedim>
382 template <
int dim,
int spacedim>
396 template <
int dim,
int spacedim>
408 template <
int dim,
int spacedim>
420 template <
int dim,
int spacedim>
425 const unsigned int face_no,
426 const unsigned int q_index,
427 const unsigned int mapping_index,
428 const unsigned int fe_index)
432 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
433 real_fe_index = fe_index;
437 if (this->q_collections.size() > 1)
438 real_q_index = cell->active_fe_index();
445 if (this->mapping_collection->size() > 1)
446 real_mapping_index = cell->active_fe_index();
448 real_mapping_index = 0;
452 real_fe_index = cell->active_fe_index();
460 this->select_fe_values(real_fe_index, real_mapping_index, real_q_index)
461 .reinit(cell, face_no);
466 template <
int dim,
int spacedim>
472 const unsigned int q_index,
473 const unsigned int mapping_index,
474 const unsigned int fe_index)
476 const auto face_n = cell->face_iterator_to_index(face);
477 reinit(cell, face_n, q_index, mapping_index, fe_index);
482 template <
int dim,
int spacedim>
486 const unsigned int face_no,
487 const unsigned int q_index,
488 const unsigned int mapping_index,
489 const unsigned int fe_index)
493 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
494 real_fe_index = fe_index;
500 real_mapping_index = 0;
511 this->select_fe_values(real_fe_index, real_mapping_index, real_q_index)
512 .reinit(cell, face_no);
517 template <
int dim,
int spacedim>
522 const unsigned int q_index,
523 const unsigned int mapping_index,
524 const unsigned int fe_index)
526 const auto face_n = cell->face_iterator_to_index(face);
527 reinit(cell, face_n, q_index, mapping_index, fe_index);
534 template <
int dim,
int spacedim>
548 template <
int dim,
int spacedim>
560 template <
int dim,
int spacedim>
565 const unsigned int face_no,
566 const unsigned int subface_no,
567 const unsigned int q_index,
568 const unsigned int mapping_index,
569 const unsigned int fe_index)
572 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
573 real_fe_index = fe_index;
577 if (this->q_collections.size() > 1)
578 real_q_index = cell->active_fe_index();
585 if (this->mapping_collection->size() > 1)
586 real_mapping_index = cell->active_fe_index();
588 real_mapping_index = 0;
592 real_fe_index = cell->active_fe_index();
600 this->select_fe_values(real_fe_index, real_mapping_index, real_q_index)
601 .reinit(cell, face_no, subface_no);
606 template <
int dim,
int spacedim>
610 const unsigned int face_no,
611 const unsigned int subface_no,
612 const unsigned int q_index,
613 const unsigned int mapping_index,
614 const unsigned int fe_index)
617 unsigned int real_q_index = q_index, real_mapping_index = mapping_index,
618 real_fe_index = fe_index;
624 real_mapping_index = 0;
635 this->select_fe_values(real_fe_index, real_mapping_index, real_q_index)
636 .reinit(cell, face_no, subface_no);
642#include "fe_values.inst"
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)
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, 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)
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< dim, spacedim, 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)
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)
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)
Table< 3, std::unique_ptr< FEValuesType > > fe_values_table
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, 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 MappingCollection< dim, spacedim > &mapping_collection, const FECollection< dim, spacedim > &fe_collection, const QCollection< dim > &q_collection, const UpdateFlags update_flags)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
Task< RT > new_task(const std::function< RT()> &function)
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)
static const unsigned int invalid_unsigned_int