37 std::vector<unsigned int>
38 build_multiplicities(
const std::vector<std::vector<T>> &functions)
40 std::vector<unsigned int> multiplicities;
41 multiplicities.push_back(1);
42 for (
unsigned int i = 0; i < functions.size(); ++i)
43 multiplicities.push_back(functions[i].size());
45 return multiplicities;
52 template <
int dim,
int spacedim>
53 std::vector<const FiniteElement<dim, spacedim> *>
58 std::vector<const FiniteElement<dim, spacedim> *> fes;
59 fes.push_back(fe_base);
60 for (
unsigned int i = 0; i < fe_enriched.size(); ++i)
61 fes.push_back(fe_enriched[i]);
71 template <
int dim,
int spacedim>
75 const std::vector<unsigned int> &multiplicities,
77 const typename ::Triangulation<dim, spacedim>::cell_iterator
83 "FEs and multiplicities should have the same size"));
91 const unsigned int n_comp_base = fes[0]->n_components();
94 for (
unsigned int fe = 1; fe < fes.size(); ++fe)
102 "Only dominating FE_Nothing can be used in FE_Enriched"));
105 fes[fe]->n_components() == n_comp_base,
107 "All elements must have the same number of components"));
117 template <
int dim,
int spacedim>
123 for (
unsigned int fe = 1; fe < fes.size(); ++fe)
135template <
int dim,
int spacedim>
139 FE_Nothing<dim, spacedim>(fe_base.n_components(),
145template <
int dim,
int spacedim>
154 const typename
Triangulation<dim, spacedim>::cell_iterator &)>>>(
157 const typename
Triangulation<dim, spacedim>::cell_iterator &)>>(
159 [=](const typename
Triangulation<dim, spacedim>::cell_iterator &)
160 -> const
Function<spacedim> * {
return enrichment_function; })))
164template <
int dim,
int spacedim>
177template <
int dim,
int spacedim>
180 const std::vector<unsigned int> &multiplicities,
184 FETools::Compositing::multiply_dof_numbers(fes, multiplicities, false),
185 FETools::Compositing::compute_restriction_is_additive_flags(
188 FETools::Compositing::compute_nonzero_components(fes,
191 , enrichments(functions)
193 , fe_system(
std::make_unique<
FESystem<dim, spacedim>>(fes, multiplicities))
196 Assert(internal::FE_Enriched::consistency_check(fes,
206 for (
unsigned int fe = 1; fe < fes.size(); ++fe)
211 this->n_base_elements()));
214 for (
unsigned int system_index = 0; system_index < this->
n_dofs_per_cell();
217 const unsigned int base_no =
222 const unsigned int base_m =
227 "Size mismatch for base_no_mult_local_enriched_dofs: "
230 "; base_no = " + std::to_string(base_no) +
231 "; base_m = " + std::to_string(base_m) +
232 "; system_index = " + std::to_string(system_index)));
243 for (
unsigned int base_no = 1;
247 for (
unsigned int m = 0;
259template <
int dim,
int spacedim>
260std::vector<std::vector<std::function<const Function<spacedim> *(
268template <
int dim,
int spacedim>
276 "For enriched finite elements shape_value() can not be defined on the reference element."));
277 return fe_system->shape_value(i, p);
281template <
int dim,
int spacedim>
282std::unique_ptr<FiniteElement<dim, spacedim>>
285 std::vector<const FiniteElement<dim, spacedim> *> fes;
286 std::vector<unsigned int> multiplicities;
288 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
290 fes.push_back(&base_element(i));
291 multiplicities.push_back(this->element_multiplicity(i));
294 return std::unique_ptr<FE_Enriched<dim, spacedim>>(
299template <
int dim,
int spacedim>
303 UpdateFlags out = fe_system->requires_update_flags(flags);
322template <
int dim,
int spacedim>
324std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
332 auto update_each_flags = fes_data->update_each;
333 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
334 data_ptr = std::make_unique<InternalData>(std::move(fes_data));
341 data.enrichment.resize(this->n_base_elements());
343 const unsigned int n_q_points = quadrature.
size();
345 for (
unsigned int base = 0; base < this->n_base_elements(); ++base)
347 data.enrichment[base].resize(this->element_multiplicity(base));
348 for (
unsigned int m = 0; m < this->element_multiplicity(base); ++m)
351 data.enrichment[base][m].values.resize(n_q_points);
354 data.enrichment[base][m].gradients.resize(n_q_points);
357 data.enrichment[base][m].hessians.resize(n_q_points);
365template <
int dim,
int spacedim>
366std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
377 fe_system->get_face_data(update_flags, mapping, quadrature, output_data);
386template <
int dim,
int spacedim>
387std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
397 fe_system->
get_subface_data(update_flags, mapping, quadrature, output_data);
406template <
int dim,
int spacedim>
407std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
415 auto data = fe_system->
get_data(flags, mapping, quadrature, output_data);
424template <
int dim,
int spacedim>
428 const std::vector<unsigned int> &multiplicities)
430 Assert(fes.size() == multiplicities.size(),
435 this->base_to_block_indices.reinit(0, 0);
437 for (
unsigned int i = 0; i < fes.size(); ++i)
438 if (multiplicities[i] > 0)
439 this->base_to_block_indices.push_back(multiplicities[i]);
444 this->system_to_component_table.resize(this->n_dofs_per_cell());
447 this->system_to_component_table,
448 this->component_to_base_table,
452 this->face_system_to_component_table.resize(this->n_unique_faces());
454 for (
unsigned int face_no = 0; face_no < this->n_unique_faces(); ++face_no)
456 this->face_system_to_component_table[0].resize(
457 this->n_dofs_per_face(face_no));
461 this->face_system_to_base_table[face_no],
462 this->face_system_to_component_table[face_no],
473 this->interface_constraints = fe_system->interface_constraints;
482 this->unit_support_points = fe_system->unit_support_points;
483 this->unit_face_support_points = fe_system->unit_face_support_points;
488 this->adjust_line_dof_index_for_line_orientation_table =
489 fe_system->adjust_line_dof_index_for_line_orientation_table;
494template <
int dim,
int spacedim>
498 std::ostringstream namebuf;
501 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
503 namebuf << base_element(i).get_name();
504 if (this->element_multiplicity(i) != 1)
505 namebuf <<
'^' << this->element_multiplicity(i);
506 if (i != this->n_base_elements() - 1)
511 return namebuf.str();
515template <
int dim,
int spacedim>
523template <
int dim,
int spacedim>
542 fe_system->fill_fe_values(cell,
552 multiply_by_enrichment(
553 quadrature, fe_data, mapping_data, cell, output_data);
557template <
int dim,
int spacedim>
561 const unsigned int face_no,
578 fe_system->fill_fe_face_values(cell,
588 multiply_by_enrichment(
589 quadrature[0], fe_data, mapping_data, cell, output_data);
593template <
int dim,
int spacedim>
597 const unsigned int face_no,
598 const unsigned int sub_no,
613 fe_system->fill_fe_subface_values(cell,
624 multiply_by_enrichment(
625 quadrature, fe_data, mapping_data, cell, output_data);
629template <
int dim,
int spacedim>
651 const unsigned int n_q_points = quadrature.
size();
661 for (
unsigned int base_no = 1; base_no < this->n_base_elements(); ++base_no)
672 for (
unsigned int system_index = 0;
673 system_index < this->n_dofs_per_cell();
675 if (this->system_to_base_table[system_index].
first.first == base_no)
677 const unsigned int base_index =
678 this->system_to_base_table[system_index].second;
688 unsigned int out_index = 0;
689 for (
unsigned int i = 0; i < system_index; ++i)
690 out_index += this->n_nonzero_components(i);
691 unsigned int in_index = 0;
692 for (
unsigned int i = 0; i < base_index; ++i)
696 Assert(this->n_nonzero_components(system_index) ==
699 for (
unsigned int s = 0;
700 s < this->n_nonzero_components(system_index);
704 for (
unsigned int q = 0; q < n_q_points; ++q)
706 base_data.shape_values(in_index + s, q);
709 for (
unsigned int q = 0; q < n_q_points; ++q)
711 base_data.shape_gradients[in_index + s][q];
714 for (
unsigned int q = 0; q < n_q_points; ++q)
716 base_data.shape_hessians[in_index + s][q];
721 Assert(base_no_mult_local_enriched_dofs.size() == fe_data.
enrichment.size(),
725 for (
unsigned int base_no = 1; base_no < this->n_base_elements(); ++base_no)
728 base_no_mult_local_enriched_dofs[base_no].size() ==
732 for (
unsigned int m = 0;
733 m < base_no_mult_local_enriched_dofs[base_no].size();
739 if (base_no_mult_local_enriched_dofs[base_no][m].empty())
742 Assert(enrichments[base_no - 1][m](cell) !=
nullptr,
744 "The pointer to the enrichment function is not set"));
746 Assert(enrichments[base_no - 1][m](cell)->n_components == 1,
748 "Only scalar-valued enrichment functions are allowed"));
755 fe_data.
enrichment[base_no][m].hessians.size(),
757 for (
unsigned int q = 0; q < n_q_points; ++q)
759 enrichments[base_no - 1][m](cell)->hessian(
768 fe_data.
enrichment[base_no][m].gradients.size(),
770 for (
unsigned int q = 0; q < n_q_points; ++q)
772 enrichments[base_no - 1][m](cell)->gradient(
782 for (
unsigned int q = 0; q < n_q_points; ++q)
784 enrichments[base_no - 1][m](cell)->value(
798 for (
unsigned int base_no = 1; base_no < this->n_base_elements();
801 for (
unsigned int m = 0;
802 m < base_no_mult_local_enriched_dofs[base_no].size();
804 for (
unsigned int i = 0;
805 i < base_no_mult_local_enriched_dofs[base_no][m].size();
808 const unsigned int enriched_dof =
809 base_no_mult_local_enriched_dofs[base_no][m][i];
810 for (
unsigned int q = 0; q < n_q_points; ++q)
830 for (
unsigned int base_no = 1; base_no < this->n_base_elements(); ++base_no)
832 for (
unsigned int m = 0;
833 m < base_no_mult_local_enriched_dofs[base_no].size();
835 for (
unsigned int i = 0;
836 i < base_no_mult_local_enriched_dofs[base_no][m].size();
839 const unsigned int enriched_dof =
840 base_no_mult_local_enriched_dofs[base_no][m][i];
841 for (
unsigned int q = 0; q < n_q_points; ++q)
853 for (
unsigned int base_no = 1; base_no < this->n_base_elements(); ++base_no)
855 for (
unsigned int m = 0;
856 m < base_no_mult_local_enriched_dofs[base_no].size();
858 for (
unsigned int i = 0;
859 i < base_no_mult_local_enriched_dofs[base_no][m].size();
862 const unsigned int enriched_dof =
863 base_no_mult_local_enriched_dofs[base_no][m][i];
864 for (
unsigned int q = 0; q < n_q_points; ++q)
874template <
int dim,
int spacedim>
882template <
int dim,
int spacedim>
890template <
int dim,
int spacedim>
895 const unsigned int face_no)
const
900 fe_system->get_face_interpolation_matrix(fe_enr_other->get_fe_system(),
909 spacedim>::ExcInterpolationNotImplemented()));
914template <
int dim,
int spacedim>
918 const unsigned int subface,
920 const unsigned int face_no)
const
925 fe_system->get_subface_interpolation_matrix(fe_enr_other->get_fe_system(),
935 spacedim>::ExcInterpolationNotImplemented()));
940template <
int dim,
int spacedim>
941std::vector<std::pair<unsigned int, unsigned int>>
948 return fe_system->hp_vertex_dof_identities(fe_enr_other->get_fe_system());
953 return std::vector<std::pair<unsigned int, unsigned int>>();
958template <
int dim,
int spacedim>
959std::vector<std::pair<unsigned int, unsigned int>>
966 return fe_system->hp_line_dof_identities(fe_enr_other->get_fe_system());
971 return std::vector<std::pair<unsigned int, unsigned int>>();
976template <
int dim,
int spacedim>
977std::vector<std::pair<unsigned int, unsigned int>>
980 const unsigned int face_no)
const
985 return fe_system->hp_quad_dof_identities(fe_enr_other->get_fe_system(),
991 return std::vector<std::pair<unsigned int, unsigned int>>();
996template <
int dim,
int spacedim>
1000 const unsigned int codim)
const
1019 return fe_system->compare_for_domination(fe_enr_other->get_fe_system(),
1030template <
int dim,
int spacedim>
1033 const unsigned int child,
1036 return fe_system->get_prolongation_matrix(child, refinement_case);
1040template <
int dim,
int spacedim>
1043 const unsigned int child,
1046 return fe_system->get_restriction_matrix(child, refinement_case);
1053template <
int dim,
int spacedim>
1056 : fesystem_data(
std::move(fesystem_data))
1060template <
int dim,
int spacedim>
1063 const unsigned int base_no)
const
1065 return fesystem_data->get_fe_data(base_no);
1069template <
int dim,
int spacedim>
1072 const unsigned int base_no)
const
1074 return fesystem_data->get_fe_output_object(base_no);
1082 template <
int dim,
int spacedim>
1090 std::vector<bool> vertices_subdomain_1(
1095 if (predicate_1(cell))
1097 vertices_subdomain_1[cell->vertex_index(v)] =
true;
1101 if (predicate_2(cell))
1103 if (vertices_subdomain_1[cell->vertex_index(v)] ==
true)
1112 template <
int dim,
int spacedim>
1117 std::vector<unsigned int> &predicate_colors)
1119 const unsigned int num_indices = predicates.size();
1124 dsp.
reinit(num_indices, num_indices);
1131 for (
unsigned int i = 0; i < num_indices; ++i)
1132 for (
unsigned int j = i + 1; j < num_indices; ++j)
1133 if (internal::find_connection_between_subdomains(mesh,
1144 predicate_colors.resize(num_indices);
1152 template <
int dim,
int spacedim>
1157 const std::vector<unsigned int> &predicate_colors,
1158 std::map<
unsigned int, std::map<unsigned int, unsigned int>>
1159 &cellwise_color_predicate_map,
1160 std::vector<std::set<unsigned int>> &fe_sets)
1164 cellwise_color_predicate_map.clear();
1192 unsigned int map_index = 0;
1196 cell->set_active_fe_index(0);
1205 cell->set_material_id(map_index);
1206 std::set<unsigned int> color_list;
1214 std::map<unsigned int, unsigned int> &cell_map =
1215 cellwise_color_predicate_map[map_index];
1216 for (
unsigned int i = 0; i < predicates.size(); ++i)
1218 if (predicates[i](cell))
1224 auto ret = cell_map.insert(
1225 std::pair<unsigned int, unsigned int>(predicate_colors[i],
1230 "Only one enrichment function per color"));
1232 color_list.insert(predicate_colors[i]);
1249 if (!color_list.empty())
1252 std::find(fe_sets.begin(), fe_sets.end(), color_list);
1254 if (it == fe_sets.end())
1256 fe_sets.push_back(color_list);
1257 cell->set_active_fe_index(fe_sets.size() - 1);
1262 cell->set_active_fe_index(std::distance(fe_sets.begin(), it));
1309 const unsigned int fe_index = cell->active_fe_index();
1310 const std::set<unsigned int> fe_set = fe_sets.at(fe_index);
1317 if (!cell->at_boundary(face) &&
1318 cell->material_id() < cell->neighbor(face)->material_id())
1320 const auto nbr_fe_index =
1321 cell->neighbor(face)->active_fe_index();
1324 const auto nbr_fe_set = fe_sets.at(nbr_fe_index);
1327 std::set<unsigned int> intersection_set;
1328 std::set_intersection(
1333 std::inserter(intersection_set, intersection_set.begin()));
1336 if (!intersection_set.empty())
1338 const auto it = std::find(fe_sets.begin(),
1342 if (it == fe_sets.end())
1344 fe_sets.push_back(intersection_set);
1354 template <
int dim,
int spacedim>
1357 const unsigned int n_colors,
1359 const std::map<
unsigned int, std::map<unsigned int, unsigned int>>
1360 &cellwise_color_predicate_map,
1365 color_enrichments.clear();
1381 color_enrichments.resize(n_colors);
1382 for (
unsigned int i = 0; i < n_colors; ++i)
1384 color_enrichments[i] =
1387 const unsigned int id = cell->material_id();
1394 return enrichments[cellwise_color_predicate_map.at(
id).at(i + 1)]
1402 template <
int dim,
int spacedim>
1405 const unsigned int n_colors,
1406 const std::vector<std::set<unsigned int>> &fe_sets,
1416 const std::function<const Function<spacedim> *(
1422 ExcMessage(
"Called enrichment function for FE_Nothing"));
1430 for (
const auto &fe_set : fe_sets)
1432 std::vector<const FiniteElement<dim, spacedim> *> vec_fe_enriched(
1433 n_colors, &fe_nothing);
1434 std::vector<std::vector<std::function<const Function<spacedim> *(
1436 functions(n_colors, {dummy_function});
1438 for (
const unsigned int color_id : fe_set)
1443 const unsigned int ind = color_id - 1;
1453 vec_fe_enriched[ind] = &fe_enriched;
1457 functions[ind][0] = color_enrichments[ind];
1472 template <
int dim,
int spacedim>
1479 , fe_enriched(fe_enriched)
1480 , fe_nothing(fe_base.n_components(), true)
1481 , predicates(predicates)
1482 , enrichments(enrichments)
1483 , n_colors(
numbers::invalid_unsigned_int)
1488 ExcMessage(
"Number of predicates should be positive"));
1493 template <
int dim,
int spacedim>
1507 cellwise_color_predicate_map,
1512 n_colors, enrichments, cellwise_color_predicate_map, color_enrichments);
1523 return fe_collection;
1529#include "fe_enriched.inst"
const Triangulation< dim, spacedim > & get_triangulation() const
void reinit(const size_type m, const size_type n, const IndexSet &rowset=IndexSet())
void add(const size_type i, const size_type j)
std::vector< std::vector< EnrichmentValues > > enrichment
internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > & get_fe_output_object(const unsigned int base_no) const
InternalData(std::unique_ptr< typename FESystem< dim, spacedim >::InternalData > fesystem_data)
FiniteElement< dim, spacedim >::InternalDataBase & get_fe_data(const unsigned int base_no) const
std::unique_ptr< typename FESystem< dim, spacedim >::InternalData > fesystem_data
virtual std::string get_name() const override
std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > setup_data(std::unique_ptr< typename FESystem< dim, spacedim >::InternalData > fes_data, const UpdateFlags flags, const Quadrature< dim_1 > &quadrature) const
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other, const unsigned int face_no=0) const override
virtual void fill_fe_subface_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const Quadrature< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
std::vector< std::vector< std::vector< unsigned int > > > base_no_mult_local_enriched_dofs
void multiply_by_enrichment(const Quadrature< dim_1 > &quadrature, const InternalData &fe_data, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename Triangulation< dim, spacedim >::cell_iterator &cell, internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > get_data(const UpdateFlags flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > get_face_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const hp::QCollection< dim - 1 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual void fill_fe_face_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const hp::QCollection< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const override final
virtual double shape_value(const unsigned int i, const Point< dim > &p) const override
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
virtual bool hp_constraints_are_implemented() const override
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > get_subface_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim - 1 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
void initialize(const std::vector< const FiniteElement< dim, spacedim > * > &fes, const std::vector< unsigned int > &multiplicities)
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
const FESystem< dim, spacedim > & get_fe_system() const
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
virtual void fill_fe_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature< dim > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix, const unsigned int face_no=0) const override
FE_Enriched(const FiniteElement< dim, spacedim > &fe_base, const FiniteElement< dim, spacedim > &fe_enriched, const Function< spacedim > *enrichment_function)
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix, const unsigned int face_no=0) const override
bool is_dominating() const
unsigned int n_dofs_per_cell() const
unsigned int n_components() const
virtual std::unique_ptr< InternalDataBase > get_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
virtual std::unique_ptr< InternalDataBase > get_subface_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim - 1 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > system_to_base_table
unsigned int n_nonzero_components(const unsigned int i) const
Abstract base class for mapping classes.
unsigned int size() const
void copy_from(const size_type n_rows, const size_type n_cols, const ForwardIterator begin, const ForwardIterator end)
unsigned int n_vertices() const
unsigned int size() const
void push_back(const FiniteElement< dim, spacedim > &new_fe)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
IteratorRange< active_cell_iterator > active_cell_iterators() const
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
@ update_hessians
Second derivatives of shape functions.
@ update_values
Shape function values.
@ update_3rd_derivatives
Third derivatives of shape functions.
@ update_gradients
Shape function gradients.
@ update_quadrature_points
Transformed quadrature points.
#define DEAL_II_NOT_IMPLEMENTED()
void set_cellwise_color_set_and_fe_index(DoFHandler< dim, spacedim > &dof_handler, const std::vector< predicate_function< dim, spacedim > > &predicates, const std::vector< unsigned int > &predicate_colors, std::map< unsigned int, std::map< unsigned int, unsigned int > > &cellwise_color_predicate_map, std::vector< std::set< unsigned int > > &fe_sets)
unsigned int color_predicates(const DoFHandler< dim, spacedim > &mesh, const std::vector< predicate_function< dim, spacedim > > &predicates, std::vector< unsigned int > &predicate_colors)
void make_colorwise_enrichment_functions(const unsigned int n_colors, const std::vector< std::shared_ptr< Function< spacedim > > > &enrichments, const std::map< unsigned int, std::map< unsigned int, unsigned int > > &cellwise_color_predicate_map, std::vector< std::function< const Function< spacedim > *(const typename Triangulation< dim, spacedim >::cell_iterator &)> > &color_enrichments)
bool find_connection_between_subdomains(const DoFHandler< dim, spacedim > &dof_handler, const predicate_function< dim, spacedim > &predicate_1, const predicate_function< dim, spacedim > &predicate_2)
void make_fe_collection_from_colored_enrichments(const unsigned int n_colors, const std::vector< std::set< unsigned int > > &fe_sets, const std::vector< std::function< const Function< spacedim > *(const typename Triangulation< dim, spacedim >::cell_iterator &)> > &color_enrichments, const FiniteElement< dim, spacedim > &fe_base, const FiniteElement< dim, spacedim > &fe_enriched, const FE_Nothing< dim, spacedim > &fe_nothing, hp::FECollection< dim, spacedim > &fe_collection)
std::function< bool( const typename Triangulation< dim, spacedim >::cell_iterator &)> predicate_function
@ neither_element_dominates
std::string dim_string(const int dim, const int spacedim)
std::unique_ptr< To > dynamic_unique_cast(std::unique_ptr< From > &&p)
const hp::FECollection< dim, spacedim > & build_fe_collection(DoFHandler< dim, spacedim > &dof_handler)
const FiniteElement< dim, spacedim > & fe_enriched
const std::vector< predicate_function< dim, spacedim > > predicates
const std::vector< std::shared_ptr< Function< spacedim > > > enrichments
const FiniteElement< dim, spacedim > & fe_base
static std_cxx20::ranges::iota_view< unsigned int, unsigned int > face_indices()
static std_cxx20::ranges::iota_view< unsigned int, unsigned int > vertex_indices()
DEAL_II_HOST constexpr SymmetricTensor< 2, dim, Number > symmetrize(const Tensor< 2, dim, Number > &t)
DEAL_II_HOST constexpr SymmetricTensor< 4, dim, Number > outer_product(const SymmetricTensor< 2, dim, Number > &t1, const SymmetricTensor< 2, dim, Number > &t2)