15#ifndef dealii_fe_enriched_h
16#define dealii_fe_enriched_h
174template <
int dim,
int spacedim = dim>
264 const std::vector<unsigned int> &multiplicities,
270 virtual std::unique_ptr<FiniteElement<dim, spacedim>>
271 clone()
const override;
315 const unsigned int child,
327 const unsigned int child,
362 const unsigned int face_no = 0)
const override;
379 const unsigned int subface,
381 const unsigned int face_no = 0)
const override;
398 virtual std::vector<std::pair<unsigned int, unsigned int>>
406 virtual std::vector<std::pair<unsigned int, unsigned int>>
414 virtual std::vector<std::pair<unsigned int, unsigned int>>
416 const unsigned int face_no = 0)
const override;
423 const unsigned int codim = 0)
const override final;
431 std::vector<std::vector<std::function<const Function<spacedim> *(
458 std::vector<SymmetricTensor<2, spacedim>>
hessians;
493 std::unique_ptr<typename FESystem<dim, spacedim>::InternalData>
511 mutable std::vector<std::vector<EnrichmentValues>>
enrichment;
520 std::vector<std::vector<std::vector<unsigned int>>>
530 const std::vector<std::vector<std::function<const Function<spacedim> *(
556 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
568 virtual std::unique_ptr<
576 &output_data)
const override;
580 virtual std::unique_ptr<
588 &output_data)
const override;
590 virtual std::unique_ptr<
598 &output_data)
const override;
612 &output_data)
const override;
619 const unsigned int face_no,
628 &output_data)
const override;
633 const unsigned int face_no,
634 const unsigned int sub_no,
643 &output_data)
const override;
652 const std::vector<unsigned int> &multiplicities);
657 const std::unique_ptr<const FESystem<dim, spacedim>>
fe_system;
697 template <
int dim,
int spacedim = dim>
750 template <
int dim,
int spacedim>
769 template <
int dim,
int spacedim>
774 std::vector<unsigned int> &predicate_colors);
816 template <
int dim,
int spacedim>
821 const std::vector<unsigned int> &predicate_colors,
822 std::map<
unsigned int, std::map<unsigned int, unsigned int>>
823 &cellwise_color_predicate_map,
824 std::vector<std::set<unsigned int>> &fe_sets);
849 template <
int dim,
int spacedim>
852 const unsigned int n_colors,
854 const std::map<
unsigned int, std::map<unsigned int, unsigned int>>
855 &cellwise_color_predicate_map,
875 template <
int dim,
int spacedim>
878 const unsigned int n_colors,
879 const std::vector<std::set<unsigned int>>
1060 template <
int dim,
int spacedim = dim>
1170 std::map<unsigned int, std::map<unsigned int, unsigned int>>
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
std::vector< std::vector< std::function< const Function< spacedim > *(const typename Triangulation< dim, spacedim >::cell_iterator &)> > > get_enrichments() 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
const std::vector< std::vector< std::function< const Function< spacedim > *(const typename Triangulation< dim, spacedim >::cell_iterator &)> > > enrichments
const std::unique_ptr< const FESystem< dim, spacedim > > fe_system
friend class InternalDataBase
Abstract base class for mapping classes.
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
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
hp::FECollection< dim, spacedim > fe_collection
std::map< unsigned int, std::map< unsigned int, unsigned int > > cellwise_color_predicate_map
const hp::FECollection< dim, spacedim > & build_fe_collection(DoFHandler< dim, spacedim > &dof_handler)
std::vector< std::set< unsigned int > > fe_sets
const FiniteElement< dim, spacedim > & fe_enriched
std::vector< unsigned int > predicate_colors
const std::vector< predicate_function< dim, spacedim > > predicates
const FE_Nothing< dim, spacedim > fe_nothing
Helper(const FiniteElement< dim, spacedim > &fe_base, const FiniteElement< dim, spacedim > &fe_enriched, const std::vector< predicate_function< dim, spacedim > > &predicates, const std::vector< std::shared_ptr< Function< spacedim > > > &enrichments)
std::function< const Function< spacedim > *( const typename Triangulation< dim, spacedim >::cell_iterator &)> cell_iterator_function
const std::vector< std::shared_ptr< Function< spacedim > > > enrichments
const FiniteElement< dim, spacedim > & fe_base
std::vector< cell_iterator_function > color_enrichments
std::vector< SymmetricTensor< 2, spacedim > > hessians
std::vector< Tensor< 1, spacedim > > gradients
std::vector< double > values