16 #ifndef dealii_fe_enriched_h 17 #define dealii_fe_enriched_h 19 #include <deal.II/base/config.h> 21 #include <deal.II/base/function.h> 22 #include <deal.II/base/quadrature.h> 25 #include <deal.II/fe/fe.h> 26 #include <deal.II/fe/fe_nothing.h> 27 #include <deal.II/fe/fe_q.h> 28 #include <deal.II/fe/fe_system.h> 29 #include <deal.II/fe/fe_update_flags.h> 31 #include <deal.II/hp/dof_handler.h> 32 #include <deal.II/hp/fe_collection.h> 39 DEAL_II_NAMESPACE_OPEN
215 template <
int dim,
int spacedim = dim>
305 const std::vector<unsigned int> & multiplicities,
311 virtual std::unique_ptr<FiniteElement<dim, spacedim>>
312 clone()
const override;
356 const unsigned int child,
368 const unsigned int child,
418 const unsigned int subface,
436 virtual std::vector<std::pair<unsigned int, unsigned int>>
444 virtual std::vector<std::pair<unsigned int, unsigned int>>
452 virtual std::vector<std::pair<unsigned int, unsigned int>>
461 const unsigned int codim = 0)
const override final;
469 const std::vector<std::vector<std::function<const Function<spacedim> *(
494 std::vector<double> values;
495 std::vector<Tensor<1, spacedim>> gradients;
496 std::vector<SymmetricTensor<2, spacedim>> hessians;
531 std::unique_ptr<typename FESystem<dim, spacedim>::InternalData>
549 mutable std::vector<std::vector<EnrichmentValues>>
enrichment;
558 std::vector<std::vector<std::vector<unsigned int>>>
568 const std::vector<std::vector<std::function<const Function<spacedim> *(
594 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
606 virtual std::unique_ptr<
614 &output_data)
const override;
616 virtual std::unique_ptr<
624 &output_data)
const override;
626 virtual std::unique_ptr<
634 &output_data)
const override;
643 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
649 &output_data)
const override;
654 const unsigned int face_no,
658 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
664 &output_data)
const override;
667 fill_fe_subface_values(
669 const unsigned int face_no,
670 const unsigned int sub_no,
674 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
680 &output_data)
const override;
689 const std::vector<unsigned int> &multiplicities);
694 const std::unique_ptr<const FESystem<dim, spacedim>>
fe_system;
734 template <
int dim,
int spacedim = dim>
786 template <
int dim,
int spacedim>
788 find_connection_between_subdomains(
805 template <
int dim,
int spacedim>
810 std::vector<unsigned int> & predicate_colors);
852 template <
int dim,
int spacedim>
854 set_cellwise_color_set_and_fe_index(
857 const std::vector<unsigned int> & predicate_colors,
858 std::map<
unsigned int, std::map<unsigned int, unsigned int>>
859 & cellwise_color_predicate_map,
860 std::vector<std::set<unsigned int>> &fe_sets);
885 template <
int dim,
int spacedim>
887 make_colorwise_enrichment_functions(
888 const unsigned int n_colors,
890 const std::map<
unsigned int, std::map<unsigned int, unsigned int>>
891 &cellwise_color_predicate_map,
911 template <
int dim,
int spacedim>
913 make_fe_collection_from_colored_enrichments(
914 const unsigned int n_colors,
915 const std::vector<std::set<unsigned int>>
1097 template <
int dim,
int spacedim = dim>
1207 std::map<unsigned int, std::map<unsigned int, unsigned int>>
1218 DEAL_II_NAMESPACE_CLOSE
1220 #endif // dealii_fe_enriched_h virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const override final
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const override
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_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const override
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
InternalData(std::unique_ptr< typename FESystem< dim, spacedim >::InternalData > fesystem_data)
FE_Enriched(const FiniteElement< dim, spacedim > &fe_base, const FiniteElement< dim, spacedim > &fe_enriched, const Function< spacedim > *enrichment_function)
void initialize(const std::vector< const FiniteElement< dim, spacedim > *> &fes, const std::vector< unsigned int > &multiplicities)
const FiniteElement< dim, spacedim > & fe_enriched
internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > & get_fe_output_object(const unsigned int base_no) const
const hp::FECollection< dim, spacedim > & build_fe_collection(hp::DoFHandler< dim, spacedim > &dof_handler)
std::vector< std::vector< EnrichmentValues > > enrichment
std::function< bool(const typename Triangulation< dim, spacedim >::cell_iterator &)> predicate_function
hp::FECollection< dim, spacedim > fe_collection
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::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
virtual std::string get_name() const override
const std::vector< std::vector< std::function< const Function< spacedim > *(const typename Triangulation< dim, spacedim >::cell_iterator &)> > > enrichments
const FESystem< dim, spacedim > & get_fe_system() const
std::unique_ptr< typename FESystem< dim, spacedim >::InternalData > fesystem_data
const std::unique_ptr< const FESystem< dim, spacedim > > fe_system
FiniteElement< dim, spacedim >::InternalDataBase & get_fe_data(const unsigned int base_no) const
Abstract base class for mapping classes.
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::vector< std::set< unsigned int > > fe_sets
std::vector< unsigned int > predicate_colors
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
virtual double shape_value(const unsigned int i, const Point< dim > &p) const override
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
const FiniteElement< dim, spacedim > & fe_base
const std::vector< predicate_function< dim, spacedim > > predicates
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_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const override
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
std::vector< std::vector< std::vector< unsigned int > > > base_no_mult_local_enriched_dofs
std::vector< cell_iterator_function > color_enrichments
std::function< const Function< spacedim > *(const typename Triangulation< dim, spacedim >::cell_iterator &)> cell_iterator_function
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::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
std::map< unsigned int, std::map< unsigned int, unsigned int > > cellwise_color_predicate_map
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
const std::vector< std::shared_ptr< Function< spacedim > > > enrichments
const FE_Nothing< dim, spacedim > fe_nothing
virtual bool hp_constraints_are_implemented() const override
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > get_face_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim - 1 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override