53 , fe_collection(&fe_collection)
54 , q_collection_1D(quadrature)
55 , region_update_flags(region_update_flags)
56 , mesh_classifier(&mesh_classifier)
57 , quadrature_generator(q_collection_1D,
84 : mapping_collection(&mapping_collection)
85 , fe_collection(&fe_collection)
86 , q_collection_1D(q_collection_1D)
87 , region_update_flags(region_update_flags)
88 , mesh_classifier(&mesh_classifier)
89 , quadrature_generator(q_collection_1D,
106 Assert(fe_collection->size() > 0,
107 ExcMessage(
"Incoming hp::FECollection can not be empty."));
108 Assert(mapping_collection->size() == fe_collection->size() ||
109 mapping_collection->size() == 1,
110 ExcMessage(
"Size of hp::MappingCollection must be "
111 "the same as hp::FECollection or 1."));
112 Assert(q_collection.
size() == fe_collection->size() ||
113 q_collection.
size() == 1,
114 ExcMessage(
"Size of hp::QCollection<dim> must be the "
115 "same as hp::FECollection or 1."));
116 Assert(q_collection_1D.size() == fe_collection->size() ||
117 q_collection_1D.size() == 1,
118 ExcMessage(
"Size of hp::QCollection<1> must be the "
119 "same as hp::FECollection or 1."));
123 fe_values_inside_full_quadrature.resize(fe_collection->size());
124 fe_values_outside_full_quadrature.resize(fe_collection->size());
125 for (
unsigned int fe_index = 0; fe_index < fe_collection->size();
128 const unsigned int mapping_index =
129 mapping_collection->size() > 1 ? fe_index : 0;
130 const unsigned int q_index = q_collection.
size() > 1 ? fe_index : 0;
132 fe_values_inside_full_quadrature[fe_index].emplace(
133 (*mapping_collection)[mapping_index],
134 (*fe_collection)[fe_index],
135 q_collection[q_index],
136 region_update_flags.inside);
137 fe_values_outside_full_quadrature[fe_index].emplace(
138 (*mapping_collection)[mapping_index],
139 (*fe_collection)[fe_index],
140 q_collection[q_index],
141 region_update_flags.outside);
179 const unsigned int q_index_in,
180 const unsigned int mapping_index_in,
181 const unsigned int fe_index_in)
183 current_cell_location = mesh_classifier->location_to_level_set(cell);
186 this->active_fe_index = 0;
188 this->active_fe_index = fe_index_in;
190 unsigned int mapping_index = mapping_index_in;
191 unsigned int q_index = q_index_in;
192 unsigned int q_index_1D = q_index_in;
196 if (mapping_collection->size() > 1)
197 mapping_index = active_fe_index;
204 if (fe_values_inside_full_quadrature.size() > 1)
205 q_index = active_fe_index;
212 if (q_collection_1D.size() > 1)
213 q_index_1D = active_fe_index;
220 fe_values_inside.reset();
221 fe_values_surface.reset();
222 fe_values_outside.reset();
224 switch (current_cell_location)
228 Assert((active_fe_index == mapping_index) ||
229 ((mapping_collection->size() == 1) &&
230 (mapping_index == 0)),
234 fe_values_inside_full_quadrature.at(q_index)->reinit(cell);
239 Assert((active_fe_index == mapping_index) ||
240 ((mapping_collection->size() == 1) &&
241 (mapping_index == 0)),
245 fe_values_outside_full_quadrature.at(q_index)->reinit(cell);
250 quadrature_generator.set_1D_quadrature(q_index_1D);
251 quadrature_generator.generate(cell);
254 quadrature_generator.get_inside_quadrature();
256 quadrature_generator.get_outside_quadrature();
258 quadrature_generator.get_surface_quadrature();
263 if (inside_quadrature.
size() > 0)
265 fe_values_inside.emplace((*mapping_collection)[mapping_index],
266 (*fe_collection)[active_fe_index],
268 region_update_flags.inside);
270 fe_values_inside->reinit(cell);
273 if (outside_quadrature.
size() > 0)
275 fe_values_outside.emplace((*mapping_collection)[mapping_index],
276 (*fe_collection)[active_fe_index],
278 region_update_flags.outside);
280 fe_values_outside->reinit(cell);
283 if (surface_quadrature.size() > 0)
285 fe_values_surface.emplace((*mapping_collection)[mapping_index],
286 (*fe_collection)[active_fe_index],
288 region_update_flags.surface);
289 fe_values_surface->reinit(cell);
348 , fe_collection(&fe_collection)
349 , q_collection_1D(quadrature)
350 , region_update_flags(region_update_flags)
351 , mesh_classifier(&mesh_classifier)
352 , face_quadrature_generator(q_collection_1D,
380 : mapping_collection(&mapping_collection)
381 , fe_collection(&fe_collection)
382 , q_collection_1D(q_collection_1D)
383 , region_update_flags(region_update_flags)
384 , mesh_classifier(&mesh_classifier)
385 , face_quadrature_generator(q_collection_1D,
402 Assert(fe_collection->size() > 0,
403 ExcMessage(
"Incoming hp::FECollection can not be empty."));
405 mapping_collection->size() == fe_collection->size() ||
406 mapping_collection->size() == 1,
408 "Size of hp::MappingCollection must be the same as hp::FECollection or 1."));
410 q_collection.
size() == fe_collection->size() || q_collection.
size() == 1,
412 "Size of hp::QCollection<dim> must be the same as hp::FECollection or 1."));
414 q_collection_1D.size() == fe_collection->size() ||
415 q_collection_1D.size() == 1,
417 "Size of hp::QCollection<1> must be the same as hp::FECollection or 1."));
419 fe_values_inside_full_quadrature.emplace(*mapping_collection,
422 region_update_flags.inside);
423 fe_values_outside_full_quadrature.emplace(*mapping_collection,
426 region_update_flags.outside);
436 const unsigned int face_no,
437 const unsigned int q_index_in,
438 const unsigned int active_fe_index_in,
440 const unsigned int)> &call_reinit)
442 current_face_location =
443 mesh_classifier->location_to_level_set(cell, face_no);
447 fe_values_inside.reset();
448 fe_values_outside.reset();
450 switch (current_face_location)
454 call_reinit(*fe_values_inside_full_quadrature, q_index_in);
459 call_reinit(*fe_values_outside_full_quadrature, q_index_in);
464 unsigned int q_index = q_index_in;
468 unsigned int active_fe_index = active_fe_index_in;
472 if constexpr (std::is_same_v<
478 active_fe_index = cell->active_fe_index();
483 if (q_collection_1D.size() > 1)
484 q_index = active_fe_index;
491 face_quadrature_generator.set_1D_quadrature(q_index);
492 face_quadrature_generator.generate(cell, face_no);
494 const Quadrature<dim - 1> &inside_quadrature =
495 face_quadrature_generator.get_inside_quadrature();
496 const Quadrature<dim - 1> &outside_quadrature =
497 face_quadrature_generator.get_outside_quadrature();
502 if (inside_quadrature.size() > 0)
504 fe_values_inside.emplace(*mapping_collection,
508 region_update_flags.inside);
510 call_reinit(*fe_values_inside, 0);
513 if (outside_quadrature.size() > 0)
515 fe_values_outside.emplace(*mapping_collection,
519 region_update_flags.outside);
521 call_reinit(*fe_values_outside, 0);
void do_reinit(const TriaIterator< CellAccessorType > &cell, const unsigned int face_no, const unsigned int q_index, const unsigned int active_fe_index, const std::function< void(::FEInterfaceValues< dim > &, const unsigned int)> &call_reinit)
FEInterfaceValues(const hp::FECollection< dim > &fe_collection, const Quadrature< 1 > &quadrature, const RegionUpdateFlags region_update_flags, const MeshClassifier< dim > &mesh_classifier, const DoFHandler< dim > &dof_handler, const ReadVector< Number > &level_set, const AdditionalData &additional_data=AdditionalData())
void reinit(const TriaIterator< DoFCellAccessor< dim, dim, level_dof_access > > &cell, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int)
FEValues(const hp::FECollection< dim > &fe_collection, const Quadrature< 1 > &quadrature, const RegionUpdateFlags region_update_flags, const MeshClassifier< dim > &mesh_classifier, const DoFHandler< dim > &dof_handler, const ReadVector< Number > &level_set, const AdditionalData &additional_data=AdditionalData())