FESubcellFaceEvaluation< dim, n_components, number > Class Template Reference

Developer Documentation: MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number > Class Template Reference
Developer Documentation
MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number > Class Template Reference

#include <fe_subcell_face_evaluation.hpp>

Public Types

using value_type = dealii::FEFaceEvaluation< dim, -1, 0, n_components, number, VectorizedArrayType >::value_type
 The type of the values on the subcells.
 
using gradient_type = dealii::FEFaceEvaluation< dim, -1, 0, n_components, number, VectorizedArrayType >::gradient_type
 The type of the gradients on the subcells.
 

Public Member Functions

 FESubcellFaceEvaluation (const dealii::MatrixFree< dim, number > &matrix_free, const bool is_interior_face, const unsigned int dof_no, const unsigned int quad_no)
 
void reinit (const unsigned int face_batch_index)
 
void read_dof_values (const dealii::LinearAlgebra::distributed::Vector< number > &src_vector, const std::bitset< n_lanes > &mask=std::bitset< n_lanes >().flip())
 
void evaluate (const dealii::EvaluationFlags::EvaluationFlags evaluation_flags)
 
void gather_evaluate (const dealii::LinearAlgebra::distributed::Vector< number > &input_vector, const dealii::EvaluationFlags::EvaluationFlags evaluation_flags, const std::bitset< n_lanes > &mask=std::bitset< n_lanes >().flip())
 
value_type get_value (const unsigned int subcell_index) const
 
void submit_flux (const unsigned int subcell_index, const value_type &normal_flux)
 
void integrate ()
 
void distribute_local_to_global (dealii::LinearAlgebra::distributed::Vector< number > &dst_vector, const std::bitset< n_lanes > &mask=std::bitset< n_lanes >().flip())
 
void integrate_scatter (dealii::LinearAlgebra::distributed::Vector< number > &dst_vector, const std::bitset< n_lanes > &mask=std::bitset< n_lanes >().flip())
 
std::ranges::iota_view< unsigned int, unsigned int > subcell_face_indices () const
 
VectorizedArrayType subcell_face_size (const unsigned int subcell_index) const
 
dealii::Point< dim, VectorizedArrayType > subcell_location (const unsigned int subcell_index) const
 
unsigned int n_subcell_faces () const
 
dealii::Tensor< 1, dim, VectorizedArrayType > normal_vector (const unsigned int subcell_index) const
 
bool at_boundary () const
 
dealii::types::boundary_id boundary_id () const
 
VectorizedArrayType subcell_size (const unsigned int subcell_index) const
 

Private Types

using VectorizedArrayType = dealii::VectorizedArray< number >
 

Private Member Functions

unsigned int layer_index (const unsigned int subcell_index) const
 
unsigned int face_to_cell_quadrature_index (const unsigned int face_no, const unsigned int q_face, const dealii::internal::MatrixFreeFunctions::ShapeInfo< number > &shape_info) const
 
void determine_subcell_face_sizes ()
 
void determine_subcell_face_normals ()
 
void determine_subcell_sizes ()
 
void determine_subcell_locations ()
 
void setup_internal_data_structures ()
 
void project_dof_values_to_subcell_values (const dealii::EvaluationFlags::EvaluationFlags evaluation_flags)
 

Private Attributes

unsigned int n_subcells_1d = dealii::numbers::invalid_unsigned_int
 Number of subcells per direction of the adjacent cells.
 
unsigned int n_subcells_face = dealii::numbers::invalid_unsigned_int
 Number of subcell faces per DG face,.
 
unsigned int face_batch_index = dealii::numbers::invalid_unsigned_int
 Index of the face batch the object is currently reinitialized on.
 
const dealii::MatrixFree< dim, number > & matrix_free
 The MatrixFree object providing the face information and the cell data.
 
const bool is_interior_face
 
unsigned int face_no = dealii::numbers::invalid_unsigned_int
 
std::vector< value_type > layer_values
 
std::vector< value_type > submitted_fluxes
 Fluxes submitted with submit_flux(), indexed by the subcell face index.
 
std::vector< VectorizedArrayType > subcell_face_sizes
 Sizes of the subcell faces, indexed by the subcell face index.
 
std::vector< VectorizedArrayType > subcell_sizes
 
std::vector< dealii::Tensor< 1, dim, VectorizedArrayType > > subcell_face_normals
 
std::vector< dealii::Point< dim, VectorizedArrayType > > subcell_locations
 
std::vector< VectorizedArrayType > integrated_subcell_values_buffer
 Scratch buffer for integrate() holding one value per component and subcell.
 
bool is_reinitialized = false
 
bool dof_values_initialized = false
 
bool subcell_values_initialized = false
 
bool subcell_fluxes_submitted = false
 
bool is_boundary_face = false
 A flag indicating whether the current face batch is a boundary face batch.
 
dealii::FEEvaluation< dim, -1, 0, n_components, number, VectorizedArrayType > fe_cell_evaluator
 
dealii::FEFaceEvaluation< dim, -1, 0, n_components, number, VectorizedArrayType > fe_face_evaluator
 Finite element evaluator for the face.
 

Static Private Attributes

static constexpr unsigned int n_lanes = VectorizedArrayType::size()
 

Detailed Description

template<int dim, int n_components, typename number>
class MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >

This class evaluates finite volume subcell fluxes across the faces of a DG cell, i.e. across those subcell faces that lie on a face of a DG cell. It is the face counterpart of FESubcellEvaluation and uses the same subcells: with the same MatrixFree object, DoF index and quadrature index, both classes see identical subcell values, sizes and locations. Fluxes between subcells inside a cell can therefore be applied in the cell loop with FESubcellEvaluation, and fluxes across DG faces in the face and boundary loops with this class. The interface mirrors dealii::FEFaceEvaluation, with subcell faces taking the place of face quadrature points.

One side of a face

Like dealii::FEFaceEvaluation, an object represents one side of a DG face, selected by the constructor argument is_interior_face. Inner faces need two objects, one for the interior and one for the exterior side. Boundary faces only have an interior side.

Each DG face is split into n_subcell_faces() subcell faces. The subcell face with index s is shared by exactly one subcell of the interior cell and one subcell of the exterior cell. The following picture shows a two-dimensional face with four subcell faces. The numbers mark the subcells adjacent to the subcell face with the same index:

*          exterior cell            interior cell
*     +----+----+----+----#----+----+----+----+
*     |    |    |    | 3  # 3  |    |    |    |
*     +----+----+----+----#----+----+----+----+
*     |    |    |    | 2  # 2  |    |    |    |
*     +----+----+----+----#----+----+----+----+
*     |    |    |    | 1  # 1  |    |    |    |
*     +----+----+----+----#----+----+----+----+
*     |    |    |    | 0  # 0  |    |    |    |
*     +----+----+----+----#----+----+----+----+
*                       n <--
*
*     #  DG face           n  normal vector
* 

The subcell faces are numbered lexicographically in the face coordinates of the interior cell, i.e. in the same order as the face quadrature points of dealii::FEFaceEvaluation. The same index s refers to the same subcell face on the interior and the exterior object. Thus, phi_m.get_value(s) and phi_p.get_value(s) are the two subcell values on either side of subcell face s. As for FESubcellEvaluation, the subcell widths are in general not equidistant.

Values and geometry

After gather_evaluate() (or read_dof_values() followed by a call to evaluate()), get_value(s) returns the value of the subcell adjacent to subcell face s on this object's side. The geometry is available directly after reinit(), without evaluating any values:

  • normal_vector(s): the unit normal vector of the subcell face. It points out of the interior cell on both the interior and the exterior object, as in dealii::FEFaceEvaluation.
  • subcell_face_size(s): the area of the subcell face (its length in 2D).
  • subcell_size(s): the volume of the adjacent subcell on this object's side (its area in 2D).
  • subcell_location(s): the location of the adjacent subcell on this object's side, see FESubcellEvaluation::subcell_location(). Note that this is not a point on the face.

Submitting fluxes

submit_flux(s, flux) stores a flux for subcell face s, and integrate_scatter() adds the resulting update to the destination vector. The update changes the value of the subcell adjacent to subcell face s by

\[ \Delta u_s = \mathrm{flux}_s \, \frac{A_s}{|V_s|}, \]

where \(A_s\) is subcell_face_size(s) and \(|V_s|\) is subcell_size(s). All other subcells of the cell remain unchanged. The flux is added exactly as submitted, so choosing its sign is the caller's job: for a finite volume update \(\partial_t u_s = -\frac{1}{|V_s|} \sum \hat{F} \cdot n \, A\) with the normal pointing out of the interior cell, submit \(-\hat{F} \cdot n\) on the interior side and \(+\hat{F} \cdot n\) on the exterior side. Submitting the same flux with opposite signs on both sides of a face is conservative.

Example

The following face loop applies a numerical flux numerical_flux(u_m, u_p, n) across all inner faces. The flux is meant in the direction of n, which points out of the interior cell.

for (unsigned int face = face_range.first; face < face_range.second; ++face)
{
phi_m.reinit(face);
phi_p.reinit(face);
phi_m.gather_evaluate(src, dealii::EvaluationFlags::values);
phi_p.gather_evaluate(src, dealii::EvaluationFlags::values);
for (const unsigned int q : phi_m.subcell_face_indices())
{
const auto flux =
numerical_flux(phi_m.get_value(q), phi_p.get_value(q), phi_m.normal_vector(q));
phi_m.submit_flux(q, -flux);
phi_p.submit_flux(q, flux);
}
phi_m.integrate_scatter(dst);
phi_p.integrate_scatter(dst);
}
Definition fe_subcell_face_evaluation.hpp:119
std::ranges::iota_view< unsigned int, unsigned int > subcell_face_indices() const
Definition fe_subcell_face_evaluation.templates.hpp:163
const dealii::MatrixFree< dim, number > & matrix_free
The MatrixFree object providing the face information and the cell data.
Definition fe_subcell_face_evaluation.hpp:356

In the boundary face loop, only the interior object is used. The exterior state is taken from the boundary condition, selected via boundary_id().

Current limitations

  • Only values can be evaluated, gradients are not supported yet.
  • Hanging faces are not supported.
  • In 3D, only faces in standard orientation are supported.

Member Typedef Documentation

◆ gradient_type

template<int dim, int n_components, typename number >
using MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::gradient_type = dealii:: FEFaceEvaluation<dim, -1, 0, n_components, number, VectorizedArrayType>::gradient_type

The type of the gradients on the subcells.

◆ value_type

template<int dim, int n_components, typename number >
using MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::value_type = dealii::FEFaceEvaluation<dim, -1, 0, n_components, number, VectorizedArrayType>::value_type

The type of the values on the subcells.

◆ VectorizedArrayType

template<int dim, int n_components, typename number >
using MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::VectorizedArrayType = dealii::VectorizedArray<number>
private

Constructor & Destructor Documentation

◆ FESubcellFaceEvaluation()

template<int dim, int n_components, typename number >
MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::FESubcellFaceEvaluation ( const dealii::MatrixFree< dim, number > &  matrix_free,
const bool  is_interior_face,
const unsigned int  dof_no,
const unsigned int  quad_no 
)

Constructor. Allocates required memory and sets up internal data structures. The object is not yet reinitialized for a face.

Parameters
matrix_freeThe MatrixFree object for the DG cell loop.
is_interior_faceWhether this object represents the interior side of a face.
dof_noThe DoF index of the finite element field to evaluate.
quad_noThe quadrature index of the finite element field to evaluate.

Member Function Documentation

◆ at_boundary()

template<int dim, int n_components, typename number >
bool MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::at_boundary ( ) const

Return whether the current face batch is a boundary face batch.

◆ boundary_id()

template<int dim, int n_components, typename number >
dealii::types::boundary_id MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::boundary_id ( ) const

Return the boundary id of the current face batch.

Exceptions
Throwsan exception if at_boundary() returns false.

◆ determine_subcell_face_normals()

template<int dim, int n_components, typename number >
void MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::determine_subcell_face_normals ( )
private

Compute the subcell face normals and store them in the corresponding member variable. The normals are the face quadrature point normal vectors, which correspond to the subcell faces. Note that the normals point out of the interior cell on both the interior and the exterior object, as in dealii::FEFaceEvaluation.

◆ determine_subcell_face_sizes()

template<int dim, int n_components, typename number >
void MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::determine_subcell_face_sizes ( )
private

Compute the subcell face sizes and store them in the corresponding member variable. The sizes are the face quadrature point JxW values, which correspond to the subcell faces.

◆ determine_subcell_locations()

template<int dim, int n_components, typename number >
void MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::determine_subcell_locations ( )
private

Compute the subcell locations and store them in the corresponding member variable. The locations are the cell quadrature points adjacent to the face, which correspond to the subcells adjacent to the subcell faces.

◆ determine_subcell_sizes()

template<int dim, int n_components, typename number >
void MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::determine_subcell_sizes ( )
private

Compute the subcell sizes and store them in the corresponding member variable. The sizes are the cell quadrature point JxW values adjacent to the face, which correspond to the subcells adjacent to the subcell faces.

◆ distribute_local_to_global()

template<int dim, int n_components, typename number >
void MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::distribute_local_to_global ( dealii::LinearAlgebra::distributed::Vector< number > &  dst_vector,
const std::bitset< n_lanes > &  mask = std::bitset<n_lanes>().flip() 
)

Add the DoF values currently stored for the cell on this object's side to the given vector. After a call to integrate(), these are the DG coefficients resulting from the submitted fluxes, otherwise the DoF values read with read_dof_values().

Parameters
dst_vectorThe vector to which the DoF values are added.
maskA bitset indicating which vectorization lanes are active and therefore which DoF values are added. If a lane is inactive, the corresponding DoF values are not added to the vector.

◆ evaluate()

template<int dim, int n_components, typename number >
void MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::evaluate ( const dealii::EvaluationFlags::EvaluationFlags  evaluation_flags)

Evaluate the values of the subcells adjacent to the face from the DoF values read with read_dof_values(). Afterwards, the values can be accessed with get_value().

Parameters
evaluation_flagsWhich quantities to compute. Only dealii::EvaluationFlags::values is supported, gradients are not available yet.

◆ face_to_cell_quadrature_index()

template<int dim, int n_components, typename number >
unsigned int MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::face_to_cell_quadrature_index ( const unsigned int  face_no,
const unsigned int  q_face,
const dealii::internal::MatrixFreeFunctions::ShapeInfo< number > &  shape_info 
) const
private

This function returns the index of the cell quadrature point adjacent to the face quadrature point q_face on face face_no of the cell, i.e. the subcell adjacent to the subcell face q_face. It is assumed that the underlying quadrature is a tensor-product quadrature with lexicographic numbering on the cell and on the face.

Parameters
face_noThe face number within the cell according to the standard numbering in deal.II.
q_faceThe index of the face quadrature point.
shape_infoThe shape info of the cell evaluator.

◆ gather_evaluate()

template<int dim, int n_components, typename number >
void MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::gather_evaluate ( const dealii::LinearAlgebra::distributed::Vector< number > &  input_vector,
const dealii::EvaluationFlags::EvaluationFlags  evaluation_flags,
const std::bitset< n_lanes > &  mask = std::bitset<n_lanes>().flip() 
)

Read the DoF values of the cell on this object's side of the face from the given vector and evaluate the values of the subcells adjacent to the face. Afterwards, the values can be accessed with get_value().

Parameters
input_vectorThe vector from which the DoF values are read.
evaluation_flagsWhich quantities to compute. Only dealii::EvaluationFlags::values is supported, gradients are not available yet.
maskA bitset indicating which vectorization lanes are active and therefore which DoF values are read. If a lane is inactive, the corresponding DoF values are not read from the vector.
Note
This function is equivalent to calling read_dof_values() followed by evaluate().

◆ get_value()

template<int dim, int n_components, typename number >
auto MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::get_value ( const unsigned int  subcell_index) const

Return the value of the subcell on this object's side that is adjacent to the subcell face subcell_index. The value is the same as FESubcellEvaluation::get_value() returns for this subcell. A call to this function requires that evaluate() or gather_evaluate() has been called with dealii::EvaluationFlags::values for the current face batch.

Parameters
subcell_indexThe index of the subcell face.

◆ integrate()

template<int dim, int n_components, typename number >
void MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::integrate ( )

This function turns the submitted fluxes into the DG coefficients of the update and store them as the DoF values of the cell evaluator. At the cell quadrature points adjacent to the face, the values are set to the submitted flux times the subcell face size divided by the subcell size, at all other quadrature points to zero. These values are transformed to DG coefficients with the inverse mass matrix, which yields a DG function attaining exactly these values at the quadrature points, i.e. on the subcells.

Note
Overwrites the DoF values read with read_dof_values().

◆ integrate_scatter()

template<int dim, int n_components, typename number >
void MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::integrate_scatter ( dealii::LinearAlgebra::distributed::Vector< number > &  dst_vector,
const std::bitset< n_lanes > &  mask = std::bitset<n_lanes>().flip() 
)

Apply the fluxes submitted with submit_flux() to the cell on this object's side and add the result to the given vector. For that the submitted fluxes are projected to the FE solution space.

Parameters
dst_vectorThe vector to which the DG coefficients of the update are added.
maskA bitset indicating which vectorization lanes are active and therefore which values are added. If a lane is inactive, the corresponding values are not added to the vector.
Note
The call to integrate_scatter() is equivalent to calling integrate() followed by distribute_local_to_global().

◆ layer_index()

template<int dim, int n_components, typename number >
unsigned int MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::layer_index ( const unsigned int  subcell_index) const
private

Returns the position of the face subcell subcell_index within the padded layer layer_values. The face subcells are numbered lexicographically in the tangential directions without the halo, i.e. subcell_index runs from 0 to n_subcells_face - 1. Each tangential index is shifted by one to skip the halo subcell in front of it, and the row stride is taken from the padded layer.

Example for dim == 3 and n_subcells_1d == 2, i.e. a padded layer of 4x4 entries:

*   subcell_index:   layer index:
*                     12 13 14 15
*       2  3          8  [2][3] 11
*       0  1          4  [0][1]  7
*                     0  1  2  3
* 

yields the mapping 0 -> 5, 1 -> 6, 2 -> 9, 3 -> 10.

◆ n_subcell_faces()

template<int dim, int n_components, typename number >
unsigned MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::n_subcell_faces ( ) const

Return the number of subcell faces per DG face, i.e. n_subcells_1d^(dim-1) with n_subcells_1d the number of subcells per direction of FESubcellEvaluation.

◆ normal_vector()

template<int dim, int n_components, typename number >
auto MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::normal_vector ( const unsigned int  subcell_index) const

Return the unit normal vector of the subcell face subcell_index. As for dealii::FEFaceEvaluation, the normal vector points out of the interior cell, also on the exterior object.

Parameters
subcell_indexThe index of the subcell face.

◆ project_dof_values_to_subcell_values()

template<int dim, int n_components, typename number >
void MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::project_dof_values_to_subcell_values ( const dealii::EvaluationFlags::EvaluationFlags  evaluation_flags)
private

Evaluate the cell evaluator at the cell quadrature points and copy the values at the points adjacent to the face into layer_values. The halo of layer_values is not filled.

Parameters
evaluation_flagsWhich quantities to compute.
Exceptions
Throwsan exception if dealii::EvaluationFlags::gradients is set, since gradients are not supported yet.

◆ read_dof_values()

template<int dim, int n_components, typename number >
void MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::read_dof_values ( const dealii::LinearAlgebra::distributed::Vector< number > &  src_vector,
const std::bitset< n_lanes > &  mask = std::bitset<n_lanes>().flip() 
)

Read the DoF values of the cell on this object's side of the face, i.e. the interior or the exterior cell, from the given vector. The values can then be evaluated on the subcells using evaluate().

Parameters
src_vectorThe vector from which the DoF values are read.
maskA bitset indicating which vectorization lanes are active and therefore which DoF values are read. If a lane is inactive, the corresponding DoF values are not read from the vector.

◆ reinit()

template<int dim, int n_components, typename number >
void MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::reinit ( const unsigned int  face_batch_index)

Reinitialize the object for the face batch with index face_batch_index. This function must be called before any other function using specific face batch information is called.

The geometry of the subcell faces, e.g. normal_vector(), subcell_face_size(), subcell_size() and subcell_location(), is available directly after this call. In order to read subcell values, these first need to be evaluated with gather_evaluate() or read_dof_values() followed by evaluate().

Parameters
face_batch_indexThe index of the face batch in the dealii::MatrixFree object.
Note
Hanging faces are not supported yet.

◆ setup_internal_data_structures()

template<int dim, int n_components, typename number >
void MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::setup_internal_data_structures ( )
private

Allocate internal buffers and set up the cell and face evaluators.

◆ subcell_face_indices()

template<int dim, int n_components, typename number >
std::ranges::iota_view< unsigned int, unsigned int > MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::subcell_face_indices ( ) const

Return the range of all subcell face indices of a face, i.e. 0 to n_subcell_faces() - 1. The subcell faces are numbered lexicographically in the face coordinates of the interior cell, in the same order as the face quadrature points of dealii::FEFaceEvaluation. The same index refers to the same subcell face on the interior and the exterior object. The intention of this function is to provide a convenient way to iterate over all subcell faces, e.g. in a range-based for loop.

◆ subcell_face_size()

template<int dim, int n_components, typename number >
auto MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::subcell_face_size ( const unsigned int  subcell_index) const

Return the size of the subcell face subcell_index, i.e. its area in 3D, its length in 2D, and one in 1D.

Parameters
subcell_indexThe index of the subcell face.

◆ subcell_location()

template<int dim, int n_components, typename number >
auto MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::subcell_location ( const unsigned int  subcell_index) const

Return the location in real space of the subcell on this object's side that is adjacent to the subcell face subcell_index.

Parameters
subcell_indexThe index of the subcell face.

◆ subcell_size()

template<int dim, int n_components, typename number >
auto MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::subcell_size ( const unsigned int  subcell_index) const

Return the size of the subcell on this object's side that is adjacent to the subcell face subcell_index, i.e. its volume in 3D, its area in 2D, and its length in 1D.

Parameters
subcell_indexThe index of the subcell face.

◆ submit_flux()

template<int dim, int n_components, typename number >
void MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::submit_flux ( const unsigned int  subcell_index,
const value_type &  normal_flux 
)

Submit a flux for the subcell face subcell_index. The flux is applied to the subcell on this object's side that is adjacent to the subcell face when calling integrate_scatter(): the value of this subcell changes by

\[ \Delta u = \mathrm{flux} \, \frac{A}{|V|}, \]

where \(A\) is subcell_face_size() and \(|V|\) is subcell_size().

Parameters
subcell_indexThe index of the subcell face.
normal_fluxThe flux across the subcell face.

Member Data Documentation

◆ dof_values_initialized

template<int dim, int n_components, typename number >
bool MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::dof_values_initialized = false
private

A flag indicating whether the DoF values have been read with since the last reinit(). Used for debug information.

◆ face_batch_index

template<int dim, int n_components, typename number >
unsigned int MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::face_batch_index = dealii::numbers::invalid_unsigned_int
private

Index of the face batch the object is currently reinitialized on.

◆ face_no

template<int dim, int n_components, typename number >
unsigned int MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::face_no = dealii::numbers::invalid_unsigned_int
private

Face number of the current face within the adjacent cell on this object's side, i.e. the interior or exterior face number of the face batch.

◆ fe_cell_evaluator

template<int dim, int n_components, typename number >
dealii::FEEvaluation<dim, -1, 0, n_components, number, VectorizedArrayType> MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::fe_cell_evaluator
private

Finite element evaluator for the adjacent cell on this object's side, i.e. the interior or the exterior cell of the face batch.

◆ fe_face_evaluator

template<int dim, int n_components, typename number >
dealii::FEFaceEvaluation<dim, -1, 0, n_components, number, VectorizedArrayType> MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::fe_face_evaluator
private

Finite element evaluator for the face.

◆ integrated_subcell_values_buffer

template<int dim, int n_components, typename number >
std::vector<VectorizedArrayType> MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::integrated_subcell_values_buffer
private

Scratch buffer for integrate() holding one value per component and subcell.

◆ is_boundary_face

template<int dim, int n_components, typename number >
bool MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::is_boundary_face = false
private

A flag indicating whether the current face batch is a boundary face batch.

◆ is_interior_face

template<int dim, int n_components, typename number >
const bool MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::is_interior_face
private

Whether this object represents the interior (true) or the exterior (false) side of the face.

◆ is_reinitialized

template<int dim, int n_components, typename number >
bool MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::is_reinitialized = false
private

A flag indicating whether the object has been reinitialized for a face batch. Used for debug information.

◆ layer_values

template<int dim, int n_components, typename number >
std::vector<value_type> MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::layer_values
private

Values of the subcells adjacent to the face on this object's side, i.e. one layer of subcells. Filled in evaluate() and accessed via layer_index(). To allow tangential stencils at the boundary of the face, the layer is padded by one halo subcell beyond the face boundary in every tangential direction. The layout is the same on both sides and independent of the dimension: with n = n_subcells_1d, the layer holds (n + 2)^(dim - 1) values, numbered lexicographically in the tangential directions with the first direction varying fastest. Tangential indices run from -1 to n, where -1 and n denote the halo.

The two-dimensional case for the left face of the interior cell with n == 4 is shown below. The layer of the interior object consists of the subcells i, the layer of the exterior object of the subcells e, and the halo of the subcells h.

*        exterior side | interior side       index
*
*        ----+----+----+----+----+----
*            |    | h  | h  |    |              4
*        ====+====+====o====+====+====
*            |    | e  # i  |    |              3
*        ----+----+----#----+----+----
*            |    | e  # i  |    |              2
*        ----+----+----#----+----+----
*            |    | e  # i  |    |              1
*        ----+----+----#----+----+----
*            |    | e  # i  |    |              0
*        ====+====+====o====+====+====
*            |    | h  | h  |    |             -1
*        ----+----+----+----+----+----
*
*     #  cell face        o  face vertex        ==  further cell boundaries
* 

In three dimensions, a layer is the same picture viewed onto the face. The face subcells f are surrounded by the halo subcells h beyond the face edges and the corner subcells c beyond the face vertices:

*              -1    0    1    2    3    4    <- first tangential index
*            +----+----+----+----+----+----+
*         4  | c  | h  | h  | h  | h  | c  |
*            +----o====+====+====+====o----+
*         3  | h  # f  | f  | f  | f  # h  |
*            +----#----+----+----+----#----+
*         2  | h  # f  | f  | f  | f  # h  |
*            +----#----+----+----+----#----+
*         1  | h  # f  | f  | f  | f  # h  |
*            +----#----+----+----+----#----+
*         0  | h  # f  | f  | f  | f  # h  |
*            +----o====+====+====+====o----+
*        -1  | c  | h  | h  | h  | h  | c  |
*            +----+----+----+----+----+----+
*         ^
*         second tangential index
*
*     #, ==  face edges        o  face vertices
* 
Note
The halo and corner subcells are currently not filled but already allocated to allow for future extensions with tangential stencils.

◆ matrix_free

template<int dim, int n_components, typename number >
const dealii::MatrixFree<dim, number>& MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::matrix_free
private

The MatrixFree object providing the face information and the cell data.

◆ n_lanes

template<int dim, int n_components, typename number >
constexpr unsigned int MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::n_lanes = VectorizedArrayType::size()
staticconstexprprivate

◆ n_subcells_1d

template<int dim, int n_components, typename number >
unsigned int MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::n_subcells_1d = dealii::numbers::invalid_unsigned_int
private

Number of subcells per direction of the adjacent cells.

◆ n_subcells_face

template<int dim, int n_components, typename number >
unsigned int MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::n_subcells_face = dealii::numbers::invalid_unsigned_int
private

Number of subcell faces per DG face,.

◆ subcell_face_normals

template<int dim, int n_components, typename number >
std::vector<dealii::Tensor<1, dim, VectorizedArrayType> > MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::subcell_face_normals
private

Unit normal vectors of the subcell faces, pointing out of the interior cell, indexed by the subcell face index.

◆ subcell_face_sizes

template<int dim, int n_components, typename number >
std::vector<VectorizedArrayType> MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::subcell_face_sizes
private

Sizes of the subcell faces, indexed by the subcell face index.

◆ subcell_fluxes_submitted

template<int dim, int n_components, typename number >
bool MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::subcell_fluxes_submitted = false
private

A flag indicating whether at least one flux has been submitted with submit_flux() since the last reinit(). Used for debug information.

◆ subcell_locations

template<int dim, int n_components, typename number >
std::vector<dealii::Point<dim, VectorizedArrayType> > MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::subcell_locations
private

Locations of the subcells adjacent to the face on this object's side, indexed by the subcell face index.

◆ subcell_sizes

template<int dim, int n_components, typename number >
std::vector<VectorizedArrayType> MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::subcell_sizes
private

Sizes of the subcells adjacent to the face on this object's side, indexed by the subcell face index.

◆ subcell_values_initialized

template<int dim, int n_components, typename number >
bool MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::subcell_values_initialized = false
private

A flag indicating whether the subcell values have been evaluated since the last reinit(). Used for debug information.

◆ submitted_fluxes

template<int dim, int n_components, typename number >
std::vector<value_type> MeltPoolDG::FESubcellFaceEvaluation< dim, n_components, number >::submitted_fluxes
private

Fluxes submitted with submit_flux(), indexed by the subcell face index.


The documentation for this class was generated from the following files: