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++)
100 fe_nothing->is_dominating(),
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,
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: "
243 for (
unsigned int base_no = 1;
247 for (
unsigned int m = 0;
259template <
int dim,
int spacedim>
260const std::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));
338 data.update_each = update_each_flags;
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;
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>
531 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
543 fe_system->fill_fe_values(cell,
553 multiply_by_enrichment(
554 quadrature, fe_data, mapping_data, cell, output_data);
558template <
int dim,
int spacedim>
562 const unsigned int face_no,
566 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
580 fe_system->fill_fe_face_values(cell,
590 multiply_by_enrichment(
591 quadrature[0], fe_data, mapping_data, cell, output_data);
595template <
int dim,
int spacedim>
599 const unsigned int face_no,
600 const unsigned int sub_no,
604 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
616 fe_system->fill_fe_subface_values(cell,
627 multiply_by_enrichment(
628 quadrature, fe_data, mapping_data, cell, output_data);
632template <
int dim,
int spacedim>
654 const unsigned int n_q_points = quadrature.
size();
664 for (
unsigned int base_no = 1; base_no < this->n_base_elements(); base_no++)
673 const UpdateFlags base_flags = base_fe_data.update_each;
675 for (
unsigned int system_index = 0;
676 system_index < this->n_dofs_per_cell();
678 if (this->system_to_base_table[system_index].
first.first == base_no)
680 const unsigned int base_index =
681 this->system_to_base_table[system_index].second;
691 unsigned int out_index = 0;
692 for (
unsigned int i = 0; i < system_index; ++i)
693 out_index += this->n_nonzero_components(i);
694 unsigned int in_index = 0;
695 for (
unsigned int i = 0; i < base_index; ++i)
699 Assert(this->n_nonzero_components(system_index) ==
702 for (
unsigned int s = 0;
703 s < this->n_nonzero_components(system_index);
707 for (
unsigned int q = 0; q < n_q_points; ++q)
709 base_data.shape_values(in_index + s, q);
712 for (
unsigned int q = 0; q < n_q_points; ++q)
714 base_data.shape_gradients[in_index + s][q];
717 for (
unsigned int q = 0; q < n_q_points; ++q)
719 base_data.shape_hessians[in_index + s][q];
724 Assert(base_no_mult_local_enriched_dofs.size() == fe_data.
enrichment.size(),
728 for (
unsigned int base_no = 1; base_no < this->n_base_elements(); base_no++)
731 base_no_mult_local_enriched_dofs[base_no].size() ==
735 for (
unsigned int m = 0;
736 m < base_no_mult_local_enriched_dofs[base_no].size();
742 if (base_no_mult_local_enriched_dofs[base_no][m].size() == 0)
745 Assert(enrichments[base_no - 1][m](cell) !=
nullptr,
747 "The pointer to the enrichment function is not set"));
749 Assert(enrichments[base_no - 1][m](cell)->n_components == 1,
751 "Only scalar-valued enrichment functions are allowed"));
758 fe_data.
enrichment[base_no][m].hessians.size(),
760 for (
unsigned int q = 0; q < n_q_points; q++)
762 enrichments[base_no - 1][m](cell)->hessian(
771 fe_data.
enrichment[base_no][m].gradients.size(),
773 for (
unsigned int q = 0; q < n_q_points; q++)
775 enrichments[base_no - 1][m](cell)->gradient(
785 for (
unsigned int q = 0; q < n_q_points; q++)
787 enrichments[base_no - 1][m](cell)->value(
801 for (
unsigned int base_no = 1; base_no < this->n_base_elements();
804 for (
unsigned int m = 0;
805 m < base_no_mult_local_enriched_dofs[base_no].size();
807 for (
unsigned int i = 0;
808 i < base_no_mult_local_enriched_dofs[base_no][m].size();
811 const unsigned int enriched_dof =
812 base_no_mult_local_enriched_dofs[base_no][m][i];
813 for (
unsigned int q = 0; q < n_q_points; ++q)
833 for (
unsigned int base_no = 1; base_no < this->n_base_elements(); base_no++)
835 for (
unsigned int m = 0;
836 m < base_no_mult_local_enriched_dofs[base_no].size();
838 for (
unsigned int i = 0;
839 i < base_no_mult_local_enriched_dofs[base_no][m].size();
842 const unsigned int enriched_dof =
843 base_no_mult_local_enriched_dofs[base_no][m][i];
844 for (
unsigned int q = 0; q < n_q_points; ++q)
856 for (
unsigned int base_no = 1; base_no < this->n_base_elements(); base_no++)
858 for (
unsigned int m = 0;
859 m < base_no_mult_local_enriched_dofs[base_no].size();
861 for (
unsigned int i = 0;
862 i < base_no_mult_local_enriched_dofs[base_no][m].size();
865 const unsigned int enriched_dof =
866 base_no_mult_local_enriched_dofs[base_no][m][i];
867 for (
unsigned int q = 0; q < n_q_points; ++q)
877template <
int dim,
int spacedim>
885template <
int dim,
int spacedim>
893template <
int dim,
int spacedim>
898 const unsigned int face_no)
const
903 fe_system->get_face_interpolation_matrix(fe_enr_other->get_fe_system(),
912 spacedim>::ExcInterpolationNotImplemented()));
917template <
int dim,
int spacedim>
921 const unsigned int subface,
923 const unsigned int face_no)
const
928 fe_system->get_subface_interpolation_matrix(fe_enr_other->get_fe_system(),
938 spacedim>::ExcInterpolationNotImplemented()));
943template <
int dim,
int spacedim>
944std::vector<std::pair<unsigned int, unsigned int>>
951 return fe_system->hp_vertex_dof_identities(fe_enr_other->get_fe_system());
956 return std::vector<std::pair<unsigned int, unsigned int>>();
961template <
int dim,
int spacedim>
962std::vector<std::pair<unsigned int, unsigned int>>
969 return fe_system->hp_line_dof_identities(fe_enr_other->get_fe_system());
974 return std::vector<std::pair<unsigned int, unsigned int>>();
979template <
int dim,
int spacedim>
980std::vector<std::pair<unsigned int, unsigned int>>
983 const unsigned int face_no)
const
988 return fe_system->hp_quad_dof_identities(fe_enr_other->get_fe_system(),
994 return std::vector<std::pair<unsigned int, unsigned int>>();
999template <
int dim,
int spacedim>
1003 const unsigned int codim)
const
1022 return fe_system->compare_for_domination(fe_enr_other->get_fe_system(),
1033template <
int dim,
int spacedim>
1036 const unsigned int child,
1039 return fe_system->get_prolongation_matrix(child, refinement_case);
1043template <
int dim,
int spacedim>
1046 const unsigned int child,
1049 return fe_system->get_restriction_matrix(child, refinement_case);
1056template <
int dim,
int spacedim>
1059 : fesystem_data(
std::move(fesystem_data))
1063template <
int dim,
int spacedim>
1066 const unsigned int base_no)
const
1068 return fesystem_data->get_fe_data(base_no);
1072template <
int dim,
int spacedim>
1075 const unsigned int base_no)
const
1077 return fesystem_data->get_fe_output_object(base_no);
1085 template <
int dim,
int spacedim>
1093 std::vector<bool> vertices_subdomain_1(
1098 if (predicate_1(cell))
1100 vertices_subdomain_1[cell->vertex_index(v)] =
true;
1104 if (predicate_2(cell))
1106 if (vertices_subdomain_1[cell->vertex_index(v)] ==
true)
1115 template <
int dim,
int spacedim>
1120 std::vector<unsigned int> & predicate_colors)
1122 const unsigned int num_indices = predicates.size();
1127 dsp.
reinit(num_indices, num_indices);
1134 for (
unsigned int i = 0; i < num_indices; ++i)
1135 for (
unsigned int j = i + 1; j < num_indices; ++j)
1147 predicate_colors.resize(num_indices);
1155 template <
int dim,
int spacedim>
1160 const std::vector<unsigned int> & predicate_colors,
1161 std::map<
unsigned int, std::map<unsigned int, unsigned int>>
1162 & cellwise_color_predicate_map,
1163 std::vector<std::set<unsigned int>> &fe_sets)
1167 cellwise_color_predicate_map.clear();
1195 unsigned int map_index = 0;
1199 cell->set_active_fe_index(0);
1208 cell->set_material_id(map_index);
1209 std::set<unsigned int> color_list;
1217 std::map<unsigned int, unsigned int> &cell_map =
1218 cellwise_color_predicate_map[map_index];
1219 for (
unsigned int i = 0; i < predicates.size(); ++i)
1221 if (predicates[i](cell))
1227 auto ret = cell_map.insert(
1228 std::pair<unsigned int, unsigned int>(predicate_colors[i],
1233 "Only one enrichment function per color"));
1235 color_list.insert(predicate_colors[i]);
1252 if (!color_list.empty())
1255 std::find(fe_sets.begin(), fe_sets.end(), color_list);
1257 if (it == fe_sets.end())
1259 fe_sets.push_back(color_list);
1260 cell->set_active_fe_index(fe_sets.size() - 1);
1265 cell->set_active_fe_index(std::distance(fe_sets.begin(), it));
1312 const unsigned int fe_index = cell->active_fe_index();
1313 const std::set<unsigned int> fe_set = fe_sets.at(fe_index);
1320 if (!cell->at_boundary(face) &&
1321 cell->material_id() < cell->neighbor(face)->material_id())
1323 const auto nbr_fe_index =
1324 cell->neighbor(face)->active_fe_index();
1327 const auto nbr_fe_set = fe_sets.at(nbr_fe_index);
1330 std::set<unsigned int> intersection_set;
1331 std::set_intersection(
1336 std::inserter(intersection_set, intersection_set.begin()));
1339 if (!intersection_set.empty())
1341 const auto it = std::find(fe_sets.begin(),
1345 if (it == fe_sets.end())
1347 fe_sets.push_back(intersection_set);
1357 template <
int dim,
int spacedim>
1360 const unsigned int n_colors,
1362 const std::map<
unsigned int, std::map<unsigned int, unsigned int>>
1363 &cellwise_color_predicate_map,
1368 color_enrichments.clear();
1384 color_enrichments.resize(n_colors);
1385 for (
unsigned int i = 0; i < n_colors; ++i)
1387 color_enrichments[i] =
1390 const unsigned int id = cell->material_id();
1397 return enrichments[cellwise_color_predicate_map.at(
id).at(i + 1)]
1405 template <
int dim,
int spacedim>
1408 const unsigned int n_colors,
1409 const std::vector<std::set<unsigned int>> &fe_sets,
1412 & color_enrichments,
1419 const std::function<const Function<spacedim> *(
1425 ExcMessage(
"Called enrichment function for FE_Nothing"));
1433 for (
const auto &fe_set : fe_sets)
1435 std::vector<const FiniteElement<dim, spacedim> *> vec_fe_enriched(
1436 n_colors, &fe_nothing);
1437 std::vector<std::vector<std::function<const Function<spacedim> *(
1441 for (
const unsigned int color_id : fe_set)
1446 const unsigned int ind = color_id - 1;
1456 vec_fe_enriched[ind] = &fe_enriched;
1460 functions[ind][0] = color_enrichments[ind];
1475 template <
int dim,
int spacedim>
1482 , fe_enriched(fe_enriched)
1484 , predicates(predicates)
1491 ExcMessage(
"Number of predicates should be positive"));
1496 template <
int dim,
int spacedim>
1510 cellwise_color_predicate_map,
1514 internal::make_colorwise_enrichment_functions<dim, spacedim>(
1515 n_colors, enrichments, cellwise_color_predicate_map, color_enrichments);
1526 return fe_collection;
1532#include "fe_enriched.inst"
const Triangulation< dim, spacedim > & get_triangulation() const
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_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
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 FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const override final
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
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
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
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 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
const std::vector< std::vector< std::function< const Function< spacedim > *(const typename Triangulation< dim, spacedim >::cell_iterator &)> > > enrichments
unsigned int n_dofs_per_cell() const
unsigned int n_components() const
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) 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
unsigned int size() const
constexpr SymmetricTensor< 2, dim, Number > symmetrize(const Tensor< 2, dim, Number > &t)
constexpr SymmetricTensor< 4, dim, Number > outer_product(const SymmetricTensor< 2, dim, Number > &t1, const SymmetricTensor< 2, dim, Number > &t2)
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
@ 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.
IteratorRange< active_cell_iterator > active_cell_iterators() const
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
std::string to_string(const T &t)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
#define AssertDimension(dim1, dim2)
void copy_from(const size_type n_rows, const size_type n_cols, const ForwardIterator begin, const ForwardIterator end)
#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)
void reinit(const size_type m, const size_type n, const IndexSet &rowset=IndexSet())
void add(const size_type i, const size_type j)
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
@ matrix
Contents is actually a matrix.
std::string dim_string(const int dim, const int spacedim)
std::unique_ptr< To > dynamic_unique_cast(std::unique_ptr< From > &&p)
std::vector< Point< dim > > unit_support_points(const std::vector< Point< 1 > > &line_support_points, const std::vector< unsigned int > &renumbering)
int(&) functions(const void *v1, const void *v2)
static const unsigned int invalid_unsigned_int
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