SSEDIndicator< dim, number, n_dof_components, n_indicator_components > Class Template Reference

Developer Documentation: MeltPoolDG::AMR::SSEDIndicator< dim, number, n_dof_components, n_indicator_components > Class Template Reference
Developer Documentation
MeltPoolDG::AMR::SSEDIndicator< dim, number, n_dof_components, n_indicator_components > Class Template Reference

#include <amr_indicators.hpp>

Inheritance diagram for MeltPoolDG::AMR::SSEDIndicator< dim, number, n_dof_components, n_indicator_components >:
[legend]
Collaboration diagram for MeltPoolDG::AMR::SSEDIndicator< dim, number, n_dof_components, n_indicator_components >:
[legend]

Public Member Functions

 SSEDIndicator (const MatrixFreeContext< dim, number > matrix_free_context, const VectorType &solution, const ExtractIndicatorDofValuesFunction extract_indicator_dof_values, const unsigned fe_index, const unsigned fe_degree)
 
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_cell (const dealii::MatrixFree< dim, number > &, dealii::AlignedVector< VectorizedArrayType > &dst, const VectorType &src, const std::pair< unsigned, unsigned > &cell_range)
 

Private Types

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

Private Attributes

const MatrixFreeContext< dim, number > matrix_free_context
 Matrix free context 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.
 
dealii::AlignedVector< VectorizedArrayTypelinearized_matrix
 

Detailed Description

template<int dim, typename number, int n_dof_components, int n_indicator_components>
class MeltPoolDG::AMR::SSEDIndicator< dim, number, n_dof_components, n_indicator_components >

SSED 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

The idea is that one estimates the error with the largest mode in the solution. The largest mode is isolated and used as an error indicator normalized by the volume of the cell.

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 fe degree > 1.

Member Typedef Documentation

◆ ExtractIndicatorDofValuesFunction

template<int dim, typename number , int n_dof_components, int n_indicator_components>
using MeltPoolDG::AMR::SSEDIndicator< dim, number, n_dof_components, n_indicator_components >::ExtractIndicatorDofValuesFunction = std::function<dealii::Tensor<1, n_indicator_components, VectorizedArrayType>( const dealii::Tensor<1, n_dof_components, VectorizedArrayType> &)>
private

◆ VectorizedArrayType

template<int dim, typename number , int n_dof_components, int n_indicator_components>
using MeltPoolDG::AMR::SSEDIndicator< dim, number, n_dof_components, n_indicator_components >::VectorizedArrayType = dealii::VectorizedArray<number>
private

◆ VectorType

template<int dim, typename number , int n_dof_components, int n_indicator_components>
using MeltPoolDG::AMR::SSEDIndicator< dim, number, n_dof_components, n_indicator_components >::VectorType = dealii::LinearAlgebra::distributed::Vector<number>
private

Constructor & Destructor Documentation

◆ SSEDIndicator()

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

Constructor.

Sets up the SSED indicator by storing references to the matrix-free context and solution vector, as well as the extraction function that specifies which components of the solution should be considered in the indicator calculation. Also initializes the internal element transformation matrix.

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::SSEDIndicator< 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_cell()

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

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

Note
This is protected such that a combined indicator with additional face and/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_dof_components, int n_indicator_components>
ExtractIndicatorDofValuesFunction MeltPoolDG::AMR::SSEDIndicator< dim, number, n_dof_components, n_indicator_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_dof_components, int n_indicator_components>
const unsigned MeltPoolDG::AMR::SSEDIndicator< dim, number, n_dof_components, n_indicator_components >::fe_index
private

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

◆ linearized_matrix

template<int dim, typename number , int n_dof_components, int n_indicator_components>
dealii::AlignedVector<VectorizedArrayType> MeltPoolDG::AMR::SSEDIndicator< dim, number, n_dof_components, n_indicator_components >::linearized_matrix
private

◆ matrix_free_context

template<int dim, typename number , int n_dof_components, int n_indicator_components>
const MatrixFreeContext<dim, number> MeltPoolDG::AMR::SSEDIndicator< dim, number, n_dof_components, n_indicator_components >::matrix_free_context
private

Matrix free context used to compute the solution.

◆ solution

template<int dim, typename number , int n_dof_components, int n_indicator_components>
const VectorType& MeltPoolDG::AMR::SSEDIndicator< dim, number, n_dof_components, n_indicator_components >::solution
private

Reference to the solution of the field of interest.


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