JumpIndicator< dim, number, n_mf_components, n_relevant_components > Class Template Reference

Developer Documentation: MeltPoolDG::AMR::JumpIndicator< dim, number, n_mf_components, n_relevant_components > Class Template Reference
Developer Documentation
MeltPoolDG::AMR::JumpIndicator< dim, number, n_mf_components, n_relevant_components > Class Template Reference

#include <amr_indicators.hpp>

Inheritance diagram for MeltPoolDG::AMR::JumpIndicator< dim, number, n_mf_components, n_relevant_components >:
[legend]
Collaboration diagram for MeltPoolDG::AMR::JumpIndicator< dim, number, n_mf_components, n_relevant_components >:
[legend]

Public Types

using VectorizedArrayType = dealii::VectorizedArray< number >
 
using VectorType = dealii::LinearAlgebra::distributed::Vector< number >
 
using ExtractIndicatorDofValuesFunction = std::function< dealii::Tensor< 1, n_relevant_components, VectorizedArrayType >(const dealii::Tensor< 1, n_mf_components, VectorizedArrayType > &)>
 

Public Member Functions

 JumpIndicator (const MatrixFreeContext< dim, number > matrix_free_context, const VectorType &solution, const ExtractIndicatorDofValuesFunction extract_indicator_dof_values, const unsigned fe_index=0)
 
dealii::Vector< number > compute_indicator (const dealii::Triangulation< dim > &tria) override
 
- Public Member Functions inherited from MeltPoolDG::AMR::AMRIndicatorBase< dim, number >
virtual ~AMRIndicatorBase ()=default
 

Protected Member Functions

void local_apply_face (const dealii::MatrixFree< dim, number > &, dealii::AlignedVector< VectorizedArrayType > &dst, const VectorType &src, const std::pair< unsigned, unsigned > &face_range) const
 

Private Attributes

const MatrixFreeContext< dim, number > matrix_free_context
 Matrix free object used to compute the solution.
 
const VectorTypesolution
 Reference to the solution of the field of interest.
 
ExtractIndicatorDofValuesFunction extract_indicator_dof_values
 
const unsigned fe_index
 Relevant fe index for the fe object of the dof handler in the matrix free object.
 

Detailed Description

template<int dim, typename number, int n_mf_components = dim, int n_relevant_components = dim>
class MeltPoolDG::AMR::JumpIndicator< dim, number, n_mf_components, n_relevant_components >

Jump indicator based on the description in

F. Basile et al, A high-order h-adaptive discontinuous Galerkin method for unstructured grids based on a posteriori error estimation. https://arc.aiaa.org/doi/10.2514/6.2021-1696

Assuming a continuous exact solution, the idea is to express the error in terms of the jump between elements normalized by the corresponding face area.

Template Parameters
dimSpatial dimension of the problem.
numberScalar type of the solution vector and underlying matrix-free data structures (e.g., float, double).
n_dof_componentsNumber of field components provided by the finite element at each point. This must match the number of components returned by dealii::FEEvaluation::get_value() for the matrix-free object passed to the constructor.
n_indicator_componentsNumber of components (out of the n_dof_components available) that are used in the indicator computation. A custom extraction function maps the full set of DoF values to these selected components.
Note
Indicator can only be used for DG.

Member Typedef Documentation

◆ ExtractIndicatorDofValuesFunction

template<int dim, typename number , int n_mf_components = dim, int n_relevant_components = dim>
using MeltPoolDG::AMR::JumpIndicator< dim, number, n_mf_components, n_relevant_components >::ExtractIndicatorDofValuesFunction = std::function<dealii::Tensor<1, n_relevant_components, VectorizedArrayType>( const dealii::Tensor<1, n_mf_components, VectorizedArrayType> &)>

◆ VectorizedArrayType

template<int dim, typename number , int n_mf_components = dim, int n_relevant_components = dim>
using MeltPoolDG::AMR::JumpIndicator< dim, number, n_mf_components, n_relevant_components >::VectorizedArrayType = dealii::VectorizedArray<number>

◆ VectorType

template<int dim, typename number , int n_mf_components = dim, int n_relevant_components = dim>
using MeltPoolDG::AMR::JumpIndicator< dim, number, n_mf_components, n_relevant_components >::VectorType = dealii::LinearAlgebra::distributed::Vector<number>

Constructor & Destructor Documentation

◆ JumpIndicator()

template<int dim, typename number , int n_dof_components, int n_indicator_components>
MeltPoolDG::AMR::JumpIndicator< dim, number, n_dof_components, n_indicator_components >::JumpIndicator ( const MatrixFreeContext< dim, number >  matrix_free_context,
const VectorType solution,
const ExtractIndicatorDofValuesFunction  extract_indicator_dof_values,
const unsigned  fe_index = 0 
)

Constructor.

Initializes the indicator by storing references to the provided data.

Parameters
matrix_free_contextMatrix-free context associated with the provided solution vector.
solutionSolution vector from which the indicator is computed.
extract_indicator_dof_valuesA function object used to extract the subset of DoF values relevant for the indicator. The function receives, for each vectorized set of quadrature points, the full n_dof_components tensor of values from dealii::FEEvaluation::get_value(), and must return the n_indicator_components values to be used by the indicator. The function may also modify or combine the values if needed.
fe_indexIndex of the finite element associated with the matrix-free context.
fe_degreePolynomial degree of the finite element shape functions.

Member Function Documentation

◆ compute_indicator()

template<int dim, typename number , int n_dof_components, int n_indicator_components>
dealii::Vector< number > MeltPoolDG::AMR::JumpIndicator< dim, number, n_dof_components, n_indicator_components >::compute_indicator ( const dealii::Triangulation< dim > &  tria)
overridevirtual

Computes the indicator as discussed in the class description.

Parameters
triaTriangulation for which the indicator is computed.

Implements MeltPoolDG::AMR::AMRIndicatorBase< dim, number >.

◆ local_apply_face()

template<int dim, typename number , int n_dof_components, int n_indicator_components>
void MeltPoolDG::AMR::JumpIndicator< dim, number, n_dof_components, n_indicator_components >::local_apply_face ( const dealii::MatrixFree< dim, number > &  ,
dealii::AlignedVector< VectorizedArrayType > &  dst,
const VectorType src,
const std::pair< unsigned, unsigned > &  face_range 
) const
protected

The actual logic of the jump indicator performed in each cell in a matrix free loop.

Note
This is protected such that a combined indicator with additional cell or boundary face loop can be directly derived from this class.

Member Data Documentation

◆ extract_indicator_dof_values

template<int dim, typename number , int n_mf_components = dim, int n_relevant_components = dim>
ExtractIndicatorDofValuesFunction MeltPoolDG::AMR::JumpIndicator< dim, number, n_mf_components, n_relevant_components >::extract_indicator_dof_values
private

Function type used to extract or manipulate the subset of DoF values needed by the indicator. This function needs to be provided by the user.

◆ fe_index

template<int dim, typename number , int n_mf_components = dim, int n_relevant_components = dim>
const unsigned MeltPoolDG::AMR::JumpIndicator< dim, number, n_mf_components, n_relevant_components >::fe_index
private

Relevant fe index for the fe object of the dof handler in the matrix free object.

◆ matrix_free_context

template<int dim, typename number , int n_mf_components = dim, int n_relevant_components = dim>
const MatrixFreeContext<dim, number> MeltPoolDG::AMR::JumpIndicator< dim, number, n_mf_components, n_relevant_components >::matrix_free_context
private

Matrix free object used to compute the solution.

◆ solution

template<int dim, typename number , int n_mf_components = dim, int n_relevant_components = dim>
const VectorType& MeltPoolDG::AMR::JumpIndicator< dim, number, n_mf_components, n_relevant_components >::solution
private

Reference to the solution of the field of interest.


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