Reference documentation for deal.II version Git ca0b05a7a7 2020-12-01 11:49:21 -0500
FEInterfaceValues< dim, spacedim > Class Template Reference

#include <deal.II/fe/fe_interface_values.h>

## Public Member Functions

FEInterfaceValues (const Mapping< dim, spacedim > &mapping, const FiniteElement< dim, spacedim > &fe, const Quadrature< dim - 1 > &quadrature, const UpdateFlags update_flags)

FEInterfaceValues (const FiniteElement< dim, spacedim > &fe, const Quadrature< dim - 1 > &quadrature, const UpdateFlags update_flags)

template<class CellIteratorType >
void reinit (const CellIteratorType &cell, const unsigned int face_no, const unsigned int sub_face_no, const typename identity< CellIteratorType >::type &cell_neighbor, const unsigned int face_no_neighbor, const unsigned int sub_face_no_neighbor)

template<class CellIteratorType >
void reinit (const CellIteratorType &cell, const unsigned int face_no)

const FEFaceValuesBase< dim, spacedim > & get_fe_face_values (const unsigned int cell_index) const

const Mapping< dim, spacedim > & get_mapping () const

const FiniteElement< dim, spacedim > & get_fe () const

UpdateFlags get_update_flags () const

Functions to query information on a given interface
bool at_boundary () const

double JxW (const unsigned int quadrature_point) const

const std::vector< double > & get_JxW_values () const

const std::vector< Tensor< 1, spacedim > > & get_normal_vectors () const

const std::vector< Point< spacedim > > & get_quadrature_points () const

unsigned n_current_interface_dofs () const

std::vector< types::global_dof_indexget_interface_dof_indices () const

std::array< unsigned int, 2 > interface_dof_to_dof_indices (const unsigned int interface_dof_index) const

Tensor< 1, spacedim > normal (const unsigned int q_point_index) const

Functions to evaluate data of the shape functions
double shape_value (const bool here_or_there, const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const

double jump (const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const

double average (const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const

Tensor< 1, spacedim > average_gradient (const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const

Tensor< 2, spacedim > average_hessian (const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const

Tensor< 1, spacedim > jump_gradient (const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const

Tensor< 2, spacedim > jump_hessian (const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const

Tensor< 3, spacedim > jump_3rd_derivative (const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component=0) const

## Private Attributes

std::vector< types::global_dof_indexinterface_dof_indices

std::vector< std::array< unsigned int, 2 > > dofmap

FEFaceValues< dim, spacedim > internal_fe_face_values

FESubfaceValues< dim, spacedim > internal_fe_subface_values

FEFaceValues< dim, spacedim > internal_fe_face_values_neighbor

FESubfaceValues< dim, spacedim > internal_fe_subface_values_neighbor

FEFaceValuesBase< dim, spacedim > * fe_face_values

FEFaceValuesBase< dim, spacedim > * fe_face_values_neighbor

## Detailed Description

### template<int dim, int spacedim = dim> class FEInterfaceValues< dim, spacedim >

FEInterfaceValues is a data structure to access and assemble finite element data on interfaces between two cells of a mesh.

It provides a way to access averages, jump terms, and similar operations used in Discontinuous Galerkin methods on a face between two neighboring cells. This allows the computation of typical mesh-dependent linear or bilinear forms in a similar way as FEValues does for cells and FEFaceValues does for faces. In the literature, the faces between neighboring cells are called "inner interfaces" or "facets".

Internally, this class provides an abstraction for two FEFaceValues objects (or FESubfaceValues when using adaptive refinement). The class introduces a new "interface dof index" that walks over the union of the dof indices of the two FEFaceValues objects. Helper functions allow translating between the new "interface dof index" and the corresponding "cell index" (0 for the first cell, 1 for the second cell) and "dof index" within that cell.

The class is made to be used inside MeshWorker::mesh_loop(). It is intended to be a low level replacement for MeshWorker and LocalIntegrators and a higher level abstraction compared to assembling face terms manually.

Definition at line 51 of file fe_interface_values.h.

## ◆ FEInterfaceValues() [1/2]

template<int dim, int spacedim = dim>
 FEInterfaceValues< dim, spacedim >::FEInterfaceValues ( const Mapping< dim, spacedim > & mapping, const FiniteElement< dim, spacedim > & fe, const Quadrature< dim - 1 > & quadrature, const UpdateFlags update_flags )

Construct the FEInterfaceValues with a single FiniteElement (same on both sides of the facet). The FEFaceValues objects will be initialized with the given mapping, quadrature, and update_flags.

## ◆ FEInterfaceValues() [2/2]

template<int dim, int spacedim = dim>
 FEInterfaceValues< dim, spacedim >::FEInterfaceValues ( const FiniteElement< dim, spacedim > & fe, const Quadrature< dim - 1 > & quadrature, const UpdateFlags update_flags )

Construct the FEInterfaceValues with a single FiniteElement and a Q1 Mapping.

See the constructor above.

## ◆ reinit() [1/2]

template<int dim, int spacedim = dim>
template<class CellIteratorType >
 void FEInterfaceValues< dim, spacedim >::reinit ( const CellIteratorType & cell, const unsigned int face_no, const unsigned int sub_face_no, const typename identity< CellIteratorType >::type & cell_neighbor, const unsigned int face_no_neighbor, const unsigned int sub_face_no_neighbor )

Re-initialize this object to be used on a new interface given by two faces of two neighboring cells. The cell and cell_neighbor cells will be referred to through cell_index zero and one after this call in all places where one needs to identify the two cells adjacent to the interface.

Use numbers::invalid_unsigned_int for sub_face_no or sub_face_no_neighbor to indicate that you want to work on the entire face, not a sub-face.

The arguments (including their order) are identical to the face_worker arguments in MeshWorker::mesh_loop().

Parameters
 [in] cell An iterator to the first cell adjacent to the interface. [in] face_no An integer identifying which face of the first cell the interface is on. [in] sub_face_no An integer identifying the subface (child) of the face (identified by the previous two arguments) that the interface corresponds to. If equal to numbers::invalid_unsigned_int, then the interface is considered to be the entire face. [in] cell_neighbor An iterator to the second cell adjacent to the interface. The type of this iterator does not have to equal that of cell, but must be convertible to it. This allows using an active cell iterator for cell, and cell->neighbor(f) for cell_neighbor, since the return type of cell->neighbor(f) is simply a cell iterator (not necessarily an active cell iterator). [in] face_no_neighbor Like face_no, just for the neighboring cell. [in] sub_face_no_neighbor Like sub_face_no, just for the neighboring cell.

## ◆ reinit() [2/2]

template<int dim, int spacedim = dim>
template<class CellIteratorType >
 void FEInterfaceValues< dim, spacedim >::reinit ( const CellIteratorType & cell, const unsigned int face_no )

Re-initialize this object to be used on an interface given by a single face face_no of the cell cell. This is useful to use FEInterfaceValues on boundaries of the domain.

As a consequence, members like jump() will assume a value of zero for the values on the "other" side. Note that no sub_face_number is needed as a boundary face can not neighbor a finer cell.

After calling this function at_boundary() will return true.

## ◆ get_fe_face_values()

template<int dim, int spacedim = dim>
 const FEFaceValuesBase& FEInterfaceValues< dim, spacedim >::get_fe_face_values ( const unsigned int cell_index ) const

Return a reference to the FEFaceValues or FESubfaceValues object of the specified cell of the interface.

The cell_index is either 0 or 1 and corresponds to the cell index returned by interface_dof_to_cell_and_dof_index().

## ◆ get_mapping()

template<int dim, int spacedim = dim>
 const Mapping& FEInterfaceValues< dim, spacedim >::get_mapping ( ) const

Constant reference to the selected mapping object.

## ◆ get_fe()

template<int dim, int spacedim = dim>
 const FiniteElement& FEInterfaceValues< dim, spacedim >::get_fe ( ) const

Constant reference to the selected finite element object.

template<int dim, int spacedim = dim>

Return a reference to the quadrature object in use.

## ◆ get_update_flags()

template<int dim, int spacedim = dim>
 UpdateFlags FEInterfaceValues< dim, spacedim >::get_update_flags ( ) const

Return the update flags set.

## ◆ at_boundary()

template<int dim, int spacedim = dim>
 bool FEInterfaceValues< dim, spacedim >::at_boundary ( ) const

Return if the current interface is a boundary face or an internal face with two adjacent cells.

See the corresponding reinit() functions for details.

## ◆ JxW()

template<int dim, int spacedim = dim>
 double FEInterfaceValues< dim, spacedim >::JxW ( const unsigned int quadrature_point ) const

Mapped quadrature weight. This value equals the mapped surface element times the weight of the quadrature point.

You can think of the quantity returned by this function as the surface element $$ds$$ in the integral that we implement here by quadrature.

Note
For this function to work properly, the underlying FEValues, FEFaceValues, or FESubfaceValues object on which you call it must have computed the information you are requesting. To do so, the update_JxW_values flag must be an element of the list of UpdateFlags that you passed to the constructor of this object. See The interplay of UpdateFlags, Mapping, and FiniteElement in FEValues for more information.

## ◆ get_JxW_values()

template<int dim, int spacedim = dim>
 const std::vector& FEInterfaceValues< dim, spacedim >::get_JxW_values ( ) const

Return the vector of JxW values for each quadrature point.

Note
For this function to work properly, the underlying FEValues, FEFaceValues, or FESubfaceValues object on which you call it must have computed the information you are requesting. To do so, the update_JxW_values flag must be an element of the list of UpdateFlags that you passed to the constructor of this object. See The interplay of UpdateFlags, Mapping, and FiniteElement in FEValues for more information.

## ◆ get_normal_vectors()

template<int dim, int spacedim = dim>
 const std::vector >& FEInterfaceValues< dim, spacedim >::get_normal_vectors ( ) const

Return the normal vector of the interface in each quadrature point.

The return value is identical to get_fe_face_values(0).get_normal_vectors() and therefore, are outside normal vectors from the perspective of the first cell of this interface.

Note
For this function to work properly, the underlying FEValues, FEFaceValues, or FESubfaceValues object on which you call it must have computed the information you are requesting. To do so, the update_normal_vectors flag must be an element of the list of UpdateFlags that you passed to the constructor of this object. See The interplay of UpdateFlags, Mapping, and FiniteElement in FEValues for more information.

template<int dim, int spacedim = dim>
 const std::vector >& FEInterfaceValues< dim, spacedim >::get_quadrature_points ( ) const

Return a reference to the quadrature points in real space.

Note
For this function to work properly, the underlying FEValues, FEFaceValues, or FESubfaceValues object on which you call it must have computed the information you are requesting. To do so, the update_quadrature_points flag must be an element of the list of UpdateFlags that you passed to the constructor of this object. See The interplay of UpdateFlags, Mapping, and FiniteElement in FEValues for more information.

## ◆ n_current_interface_dofs()

template<int dim, int spacedim = dim>
 unsigned FEInterfaceValues< dim, spacedim >::n_current_interface_dofs ( ) const

Return the number of DoFs (or shape functions) on the current interface.

Note
This number is only available after a call to reinit() and can change from one call to reinit() to the next. For example, on a boundary interface it is equal to the number of dofs of the single FEFaceValues object, while it is twice that for an interior interface for a DG element. For a continuous element, it is slightly smaller because the two cells on the interface share some of the dofs.

## ◆ get_interface_dof_indices()

template<int dim, int spacedim = dim>
 std::vector FEInterfaceValues< dim, spacedim >::get_interface_dof_indices ( ) const

Return the set of joint DoF indices. This includes indices from both cells. If reinit was called with an active cell iterator, the indices are based on the active indices (returned by DoFCellAccessor::get_dof_indices() ), in case of level cell (that is, if is_level_cell() return true ) the mg dof indices are returned.

Note
This function is only available after a call to reinit() and can change from one call to reinit() to the next.

## ◆ interface_dof_to_dof_indices()

template<int dim, int spacedim = dim>
 std::array FEInterfaceValues< dim, spacedim >::interface_dof_to_dof_indices ( const unsigned int interface_dof_index ) const

Convert an interface dof index into the corresponding local DoF indices of the two cells. If an interface DoF is only active on one of the cells, the other index will be numbers::invalid_unsigned_int.

For discontinuous finite elements each interface dof will correspond to exactly one DoF index.

Note
This function is only available after a call to reinit() and can change from one call to reinit() to the next.

## ◆ normal()

template<int dim, int spacedim = dim>
 Tensor<1, spacedim> FEInterfaceValues< dim, spacedim >::normal ( const unsigned int q_point_index ) const

Return the normal in a given quadrature point.

The normal points in outwards direction as seen from the first cell of this interface.

Note
For this function to work properly, the underlying FEValues, FEFaceValues, or FESubfaceValues object on which you call it must have computed the information you are requesting. To do so, the update_normal_vectors flag must be an element of the list of UpdateFlags that you passed to the constructor of this object. See The interplay of UpdateFlags, Mapping, and FiniteElement in FEValues for more information.

## ◆ shape_value()

template<int dim, int spacedim = dim>
 double FEInterfaceValues< dim, spacedim >::shape_value ( const bool here_or_there, const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component = 0 ) const

Return component component of the value of the shape function with interface dof index interface_dof_index in quadrature point q_point.

The argument here_or_there selects between the value on cell 0 (here, true) and cell 1 (there, false). You can also interpret it as "upstream" (true) and "downstream" (false) as defined by the direction of the normal vector in this quadrature point. If here_or_there is true, the shape functions from the first cell of the interface is used.

In other words, this function returns the limit of the value of the shape function in the given quadrature point when approaching it from one of the two cells of the interface.

Note
This function is typically used to pick the upstream or downstream value based on a direction. This can be achieved by using (direction * normal)>0 as the first argument of this function.

## ◆ jump()

template<int dim, int spacedim = dim>
 double FEInterfaceValues< dim, spacedim >::jump ( const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component = 0 ) const

Return the jump $$\jump{u}=u_{\text{cell0}} - u_{\text{cell1}}$$ on the interface for the shape function interface_dof_index at the quadrature point q_point of component component.

Note that one can define the jump in different ways (the value "there" minus the value "here", or the other way around; both are used in the finite element literature). The definition here uses "value here minus value there", as seen from the first cell.

If this is a boundary face (at_boundary() returns true), then $$\jump{u}=u_{\text{cell0}}$$.

## ◆ average()

template<int dim, int spacedim = dim>
 double FEInterfaceValues< dim, spacedim >::average ( const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component = 0 ) const

Return the average $$\average{u}=\frac{1}{2}u_{\text{cell0}} + \frac{1}{2}u_{\text{cell1}}$$ on the interface for the shape function interface_dof_index at the quadrature point q_point of component component.

If this is a boundary face (at_boundary() returns true), then $$\average{u}=u_{\text{cell0}}$$.

template<int dim, int spacedim = dim>
 Tensor<1, spacedim> FEInterfaceValues< dim, spacedim >::average_gradient ( const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component = 0 ) const

Return the average of the gradient $$\average{\nabla u} = \frac{1}{2}\nabla u_{\text{cell0}} + \frac{1}{2} \nabla u_{\text{cell1}}$$ on the interface for the shape function interface_dof_index at the quadrature point q_point of component component.

If this is a boundary face (at_boundary() returns true), then $$\average{\nabla u}=\nabla u_{\text{cell0}}$$.

## ◆ average_hessian()

template<int dim, int spacedim = dim>
 Tensor<2, spacedim> FEInterfaceValues< dim, spacedim >::average_hessian ( const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component = 0 ) const

Return the average of the Hessian $$\average{\nabla^2 u} = \frac{1}{2}\nabla^2 u_{\text{cell0}} + \frac{1}{2} \nabla^2 u_{\text{cell1}}$$ on the interface for the shape function interface_dof_index at the quadrature point q_point of component component.

If this is a boundary face (at_boundary() returns true), then $$\average{\nabla^2 u}=\nabla^2 u_{\text{cell0}}$$.

template<int dim, int spacedim = dim>
 Tensor<1, spacedim> FEInterfaceValues< dim, spacedim >::jump_gradient ( const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component = 0 ) const

Return the jump in the gradient $$\jump{\nabla u}=\nabla u_{\text{cell0}} - \nabla u_{\text{cell1}}$$ on the interface for the shape function interface_dof_index at the quadrature point q_point of component component.

If this is a boundary face (at_boundary() returns true), then $$\jump{\nabla u}=\nabla u_{\text{cell0}}$$.

## ◆ jump_hessian()

template<int dim, int spacedim = dim>
 Tensor<2, spacedim> FEInterfaceValues< dim, spacedim >::jump_hessian ( const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component = 0 ) const

Return the jump in the Hessian $$\jump{\nabla^2 u} = \nabla^2 u_{\text{cell0}} - \nabla^2 u_{\text{cell1}}$$ on the interface for the shape function interface_dof_index at the quadrature point q_point of component component.

If this is a boundary face (at_boundary() returns true), then $$\jump{\nabla^2 u} = \nabla^2 u_{\text{cell0}}$$.

## ◆ jump_3rd_derivative()

template<int dim, int spacedim = dim>
 Tensor<3, spacedim> FEInterfaceValues< dim, spacedim >::jump_3rd_derivative ( const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component = 0 ) const

Return the jump in the third derivative $$\jump{\nabla^3 u} = \nabla^3 u_{\text{cell0}} - \nabla^3 u_{\text{cell1}}$$ on the interface for the shape function interface_dof_index at the quadrature point q_point of component component.

If this is a boundary face (at_boundary() returns true), then $$\jump{\nabla^3 u} = \nabla^3 u_{\text{cell0}}$$.

## Member Data Documentation

template<int dim, int spacedim = dim>
 const unsigned int FEInterfaceValues< dim, spacedim >::n_quadrature_points

Definition at line 57 of file fe_interface_values.h.

## ◆ interface_dof_indices

template<int dim, int spacedim = dim>
 std::vector FEInterfaceValues< dim, spacedim >::interface_dof_indices
private

The list of DoF indices for the current interface, filled in reinit().

Definition at line 426 of file fe_interface_values.h.

## ◆ dofmap

template<int dim, int spacedim = dim>
 std::vector > FEInterfaceValues< dim, spacedim >::dofmap
private

The mapping from interface dof to the two local dof indices of the FeFaceValues objects. If an interface DoF is only active on one of the cells, the other one will have numbers::invalid_unsigned_int.

Definition at line 433 of file fe_interface_values.h.

## ◆ internal_fe_face_values

template<int dim, int spacedim = dim>
 FEFaceValues FEInterfaceValues< dim, spacedim >::internal_fe_face_values
private

The FEFaceValues object for the current cell.

Definition at line 438 of file fe_interface_values.h.

## ◆ internal_fe_subface_values

template<int dim, int spacedim = dim>
 FESubfaceValues FEInterfaceValues< dim, spacedim >::internal_fe_subface_values
private

The FEFaceValues object for the current cell if the cell is refined.

Definition at line 443 of file fe_interface_values.h.

## ◆ internal_fe_face_values_neighbor

template<int dim, int spacedim = dim>
 FEFaceValues FEInterfaceValues< dim, spacedim >::internal_fe_face_values_neighbor
private

The FEFaceValues object for the neighboring cell.

Definition at line 448 of file fe_interface_values.h.

## ◆ internal_fe_subface_values_neighbor

template<int dim, int spacedim = dim>
 FESubfaceValues FEInterfaceValues< dim, spacedim >::internal_fe_subface_values_neighbor
private

The FEFaceValues object for the neighboring cell if the cell is refined.

Definition at line 453 of file fe_interface_values.h.

## ◆ fe_face_values

template<int dim, int spacedim = dim>
 FEFaceValuesBase* FEInterfaceValues< dim, spacedim >::fe_face_values
private

Pointer to internal_fe_face_values or internal_fe_subface_values, respectively as determined in reinit().

Definition at line 459 of file fe_interface_values.h.

## ◆ fe_face_values_neighbor

template<int dim, int spacedim = dim>
 FEFaceValuesBase* FEInterfaceValues< dim, spacedim >::fe_face_values_neighbor
private

Pointer to internal_fe_face_values_neighbor, internal_fe_subface_values_neighbor, or nullptr, respectively as determined in reinit().

Definition at line 466 of file fe_interface_values.h.

The documentation for this class was generated from the following file:
{"ft_lang_label":"__label__en","ft_lang_prob":0.56596124,"math_prob":0.95352334,"size":18607,"snap":"2020-45-2020-50","text_gpt3_token_len":4649,"char_repetition_ratio":0.22598505,"word_repetition_ratio":0.32110453,"special_character_ratio":0.24082334,"punctuation_ratio":0.13532032,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9782584,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-12-01T17:45:51Z\",\"WARC-Record-ID\":\"<urn:uuid:0c37c334-eec9-4ed1-804b-5f4838208950>\",\"Content-Length\":\"83744\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:32132310-4897-4e0b-84d4-7e2e3adacd9d>\",\"WARC-Concurrent-To\":\"<urn:uuid:6feb340f-8f43-4b92-bf0e-1cee4b980a9c>\",\"WARC-IP-Address\":\"129.206.107.243\",\"WARC-Target-URI\":\"https://www.dealii.org/developer/doxygen/deal.II/classFEInterfaceValues.html\",\"WARC-Payload-Digest\":\"sha1:5Y4SRAZ4RCM2C4J4U3EECRD5264PZ74O\",\"WARC-Block-Digest\":\"sha1:TOJHATD4Q4WBXZUSPNFZ7DT2KULQURA7\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-50/CC-MAIN-2020-50_segments_1606141681209.60_warc_CC-MAIN-20201201170219-20201201200219-00386.warc.gz\"}"}