deal.II version GIT relicensing-2289-g1e5549a87a 2024-12-21 21:30:00+00:00
|
#include <deal.II/non_matching/fe_values.h>
Public Types | |
using | AdditionalData = typename FaceQuadratureGenerator< dim >::AdditionalData |
Public Member Functions | |
template<typename Number > | |
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()) | |
template<typename Number > | |
FEInterfaceValues (const hp::MappingCollection< dim > &mapping_collection, const hp::FECollection< dim > &fe_collection, const hp::QCollection< dim - 1 > &q_collection, const hp::QCollection< 1 > &q_collection_1d, 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()) | |
template<typename CellIteratorType , typename CellNeighborIteratorType > | |
void | reinit (const CellIteratorType &cell, const unsigned int face_no, const unsigned int sub_face_no, const CellNeighborIteratorType &cell_neighbor, const unsigned int face_no_neighbor, const unsigned int sub_face_no_neighbor, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int) |
template<typename CellIteratorType > | |
void | reinit (const CellIteratorType &cell, const unsigned int face_no, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int) |
const std::optional<::FEInterfaceValues< dim > > & | get_inside_fe_values () const |
const std::optional<::FEInterfaceValues< dim > > & | get_outside_fe_values () const |
Private Member Functions | |
void | initialize (const hp::QCollection< dim - 1 > &q_collection) |
template<typename CellAccessorType > | |
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) |
Private Attributes | |
const ObserverPointer< const hp::MappingCollection< dim > > | mapping_collection |
const ObserverPointer< const hp::FECollection< dim > > | fe_collection |
const hp::QCollection< 1 > | q_collection_1D |
LocationToLevelSet | current_face_location |
const RegionUpdateFlags | region_update_flags |
const ObserverPointer< const MeshClassifier< dim > > | mesh_classifier |
std::optional<::FEInterfaceValues< dim > > | fe_values_inside_full_quadrature |
std::optional<::FEInterfaceValues< dim > > | fe_values_outside_full_quadrature |
std::optional<::FEInterfaceValues< dim > > | fe_values_inside |
std::optional<::FEInterfaceValues< dim > > | fe_values_outside |
DiscreteFaceQuadratureGenerator< dim > | face_quadrature_generator |
This class is intended to facilitate assembling interface terms on faces in immersed (in the sense of cut) finite element methods. These types of terms occur mainly in cut discontinuous Galerkin methods. This class works analogously to NonMatching::FEValues. The domain is assumed to be described by a level set function, \(\psi : \mathbb{R}^{dim} \to \mathbb{R}\), and this class assumes that we want to integrate over two different regions of each face, \(F\):
\[ N = \{x \in F : \psi(x) < 0 \}, \\ P = \{x \in F : \psi(x) > 0 \}, \]
which we as before refer to as the "inside" and "outside" regions of the face.
When calling one of the reinit functions of this class, this class will create quadrature rules over these regions in the background and set up FEInterfaceValues objects with these quadratures. These objects can then be accessed through one of the functions: get_inside_fe_values() or get_outside_fe_values(). For the same reason as described in NonMatching::FEValues, the returned the FEInterfaceValues objects that get_inside/outside_fe_values() returns is wrapped in a std::optional. Assembling using this class would then typically be done in the following way:
To reduce the amount of work, the reinit() function of this class uses the MeshClassifier passed to the constructor to check how the incoming cell relates to the level set function. The immersed quadrature rules are only generated if the cell is intersected. If the cell is completely inside or outside, it returns a cached FEInterfaceValues object created with a quadrature over the reference cell: \([0, 1]^{dim-1}\).
Definition at line 488 of file fe_values.h.
using NonMatching::FEInterfaceValues< dim >::AdditionalData = typename FaceQuadratureGenerator<dim>::AdditionalData |
Definition at line 491 of file fe_values.h.
FEInterfaceValues< dim >::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() |
||
) |
Constructor.
fe_collection | Collection of FiniteElements to be used. |
quadrature | 1-dimensional quadrature rule used to generate the immersed quadrature rules. See the QuadratureGenerator class. On the non intersected faces a tensor product of this quadrature will be used. |
mesh_classifier | Object used to determine when the immersed quadrature rules need to be generated. |
region_update_flags | Struct storing UpdateFlags for the inside/outside region of the cell. |
dof_handler | The DoFHandler associated with the discrete level set function. |
level_set | The degrees of freedom of the discrete level set function. |
additional_data | Additional data passed to the QuadratureGenerator class. |
fe_collection
, mesh_classifier
, dof_handler
, and level_set
are stored internally, so these need to have a longer life span than the instance of this class. Definition at line 339 of file fe_values.cc.
FEInterfaceValues< dim >::FEInterfaceValues | ( | const hp::MappingCollection< dim > & | mapping_collection, |
const hp::FECollection< dim > & | fe_collection, | ||
const hp::QCollection< dim - 1 > & | q_collection, | ||
const hp::QCollection< 1 > & | q_collection_1d, | ||
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() |
||
) |
Constructor.
mapping_collection | Collection of Mappings to be used. |
fe_collection | Collection of FiniteElements to be used. |
q_collection | Collection of Quadrature rules over \([0, 1]^{dim-1}\) that should be used when a face is not intersected and we do not need to generate immersed quadrature rules. |
q_collection_1d | Collection of 1-dimensional quadrature rules used to generate the immersed quadrature rules. See the QuadratureGenerator class. |
mesh_classifier | Object used to determine when the immersed quadrature rules need to be generated. |
region_update_flags | Struct storing UpdateFlags for the inside/outside region of the cell. |
dof_handler | The DoFHandler associated with the discrete level set function. |
level_set | The degrees of freedom of the discrete level set function. |
additional_data | Additional data passed to the QuadratureGenerator class. |
mapping_collection
, fe_collection
, mesh_classifier
, dof_handler
, and level_set
are stored internally, so these need to have a longer life span than the instance of this class. Definition at line 370 of file fe_values.cc.
void NonMatching::FEInterfaceValues< dim >::reinit | ( | const CellIteratorType & | cell, |
const unsigned int | face_no, | ||
const unsigned int | sub_face_no, | ||
const CellNeighborIteratorType & | cell_neighbor, | ||
const unsigned int | face_no_neighbor, | ||
const unsigned int | sub_face_no_neighbor, | ||
const unsigned int | q_index = numbers::invalid_unsigned_int , |
||
const unsigned int | mapping_index = numbers::invalid_unsigned_int , |
||
const unsigned int | fe_index = numbers::invalid_unsigned_int |
||
) |
Reinitialize on the shared face between two neighboring cells. After calling this function, an FEInterfaceValues object can be retrieved for each region using the functions get_inside_fe_values() or get_outside_fe_values().
cell
and cell_neighbor
need to have the same finite element associated with them.void NonMatching::FEInterfaceValues< dim >::reinit | ( | const CellIteratorType & | cell, |
const unsigned int | face_no, | ||
const unsigned int | q_index = numbers::invalid_unsigned_int , |
||
const unsigned int | mapping_index = numbers::invalid_unsigned_int , |
||
const unsigned int | fe_index = numbers::invalid_unsigned_int |
||
) |
Reinitialize on a face on the boundary of the domain, when there is no neighbor and a single face face_no
of the cell
. After calling this function, an FEInterfaceValues object can be retrieved for each region using the functions get_inside_fe_values() or get_outside_fe_values().
const std::optional<::FEInterfaceValues< dim > > & FEInterfaceValues< dim >::get_inside_fe_values | ( | ) | const |
Return an FEInterfaceValues object reinitialized with a quadrature for the inside region of the cell: \(\{x \in K : \psi(x) < 0 \}\).
Definition at line 537 of file fe_values.cc.
const std::optional<::FEInterfaceValues< dim > > & FEInterfaceValues< dim >::get_outside_fe_values | ( | ) | const |
Return an FEInterfaceValues object reinitialized with a quadrature for the outside region of the cell: \(\{x \in K : \psi(x) > 0 \}\).
Definition at line 549 of file fe_values.cc.
|
private |
Do work common to the constructors. The incoming QCollection should be quadratures integrating over \([0, 1]^{dim-1}\). These will be used on the non-intersected cells.
Definition at line 397 of file fe_values.cc.
|
private |
Do work that is common two the two reinit functions of the class. call_reinit
is a std::function that describes how we should call reinit on a single FEInterfaceValues object, which is what differs between the two reinit functions.
Definition at line 434 of file fe_values.cc.
|
private |
A pointer to the collection of mappings to be used.
Definition at line 653 of file fe_values.h.
|
private |
A pointer to the collection of finite elements to be used.
Definition at line 658 of file fe_values.h.
|
private |
Collection of 1-dimensional quadrature rules that are used by QuadratureGenerator as base for generating the immersed quadrature rules.
Definition at line 664 of file fe_values.h.
|
private |
Location of the last face that reinit was called with.
Definition at line 669 of file fe_values.h.
|
private |
The update flags passed to the constructor.
Definition at line 674 of file fe_values.h.
|
private |
Pointer to the MeshClassifier passed to the constructor.
Definition at line 679 of file fe_values.h.
|
private |
FEInterfaceValues corresponding to cells with LocationToLevelSet INSIDE (not needed to generate an immersed quadrature).
Definition at line 686 of file fe_values.h.
|
private |
FEInterfaceValues corresponding to cells with LocationToLevelSet OUTSIDE (not needed to generate an immersed quadrature).
Definition at line 693 of file fe_values.h.
|
private |
FEInterfaceValues object created with a quadrature rule integrating over the inside region, \(\{x \in B : \psi(x) < 0 \}\), that was generated in the last call to reinit(..). If the cell in the last call was not intersected or if 0 quadrature points were generated, this optional will not contain a value.
Definition at line 702 of file fe_values.h.
|
private |
FEInterfaceValues object created with a quadrature rule integrating over the outside region, \(\{x \in B : \psi(x) > 0 \}\), that was generated in the last call to reinit(..). If the cell in the last call was not intersected or if 0 quadrature points were generated, this optional will not contain a value.
Definition at line 711 of file fe_values.h.
|
private |
Object that generates the immersed quadrature rules.
Definition at line 716 of file fe_values.h.