TVDReconstructor< dim_, Limiter, NumberType > Class Template Reference#

DiFfRG: DiFfRG::def::TVDReconstructor< dim_, Limiter, NumberType > Class Template Reference
DiFfRG
Discretization Framework for functional Renormalization Group flows
DiFfRG::def::TVDReconstructor< dim_, Limiter, NumberType > Class Template Reference

TVD gradient reconstructor parameterised by a slope limiter. More...

#include <tvd_reconstructor.hh>

Public Types

using LimiterType = Limiter
 

Static Public Member Functions

template<int n_components>
static GradientType< dim, NumberType, n_components > compute_gradient (const dealii::Point< dim > &center_pos, const std::array< NumberType, n_components > &u_center, const std::array< dealii::Point< dim >, n_faces > &x_n, const std::array< std::array< NumberType, n_components >, n_faces > &u_n)
 Compute the gradient of u using the injected slope limiter.
 
template<int n_components>
static GradientType< dim, NumberType, n_components > compute_gradient_at_point (const dealii::Point< dim > &center_pos, const dealii::Point< dim > &x, const std::array< NumberType, n_components > &u_center, const std::array< dealii::Point< dim >, n_faces > &x_n, const std::array< std::array< NumberType, n_components >, n_faces > &u_n)
 
template<int n_components>
static GradientType< dim, NumberType, n_components > compute_gradient_derivative (const dealii::Point< dim > &center_pos, const std::array< ADNumberType, n_components > &u_center, const std::array< dealii::Point< dim >, n_faces > &x_n, const std::array< std::array< ADNumberType, n_components >, n_faces > &u_n)
 Compute the derivative of the limited gradient w.r.t. a single stencil DOF.
 
template<int n_components>
static GradientType< dim, NumberType, n_components > compute_gradient_at_point_derivative (const dealii::Point< dim > &center_pos, const dealii::Point< dim > &x, const std::array< ADNumberType, n_components > &u_center, const std::array< dealii::Point< dim >, n_faces > &x_n, const std::array< std::array< ADNumberType, n_components >, n_faces > &u_n)
 
template<int n_components>
static ThirdDerivativeType< dim, NumberType, n_components > compute_third_derivatives_at_face (const std::array< dealii::Point< dim >, 4 > &x_stencil, const std::array< std::array< NumberType, n_components >, 4 > &u_stencil)
 
template<int n_components>
static ThirdDerivativeType< dim, NumberType, n_components > compute_third_derivatives_at_face_derivative (const std::array< dealii::Point< dim >, 4 > &x_stencil, const std::array< std::array< ADNumberType, n_components >, 4 > &u_stencil)
 

Static Public Attributes

static constexpr int dim = dim_
 
static constexpr int n_faces = 2 * dim
 
static constexpr int jacobian_stencil_radius = 2
 

Private Types

using ADNumberType = autodiff::Real<1, NumberType>
 

Detailed Description

template<int dim_, HasSlopeLimiter Limiter, typename NumberType>
class DiFfRG::def::TVDReconstructor< dim_, Limiter, NumberType >

TVD gradient reconstructor parameterised by a slope limiter.

Computes piecewise-linear cell gradients on a rectangular mesh using two one-sided finite-difference slopes per dimension, each pair limited by the injected Limiter.

When the limiter satisfies the TVD property (e.g. MinModLimiter), the resulting reconstruction is Total Variation Diminishing.

Template Parameters
dimThe spatial dimension of the reconstruction.
LimiterA type satisfying the HasSlopeLimiter concept (e.g. MinModLimiter).
NumberTypeThe numeric type used for computations (e.g. double, float).

Usage with the KT assembler:

Definition KurganovTadmor.hh:645
TVD gradient reconstructor parameterised by a slope limiter.
Definition tvd_reconstructor.hh:46

Member Typedef Documentation

◆ ADNumberType

template<int dim_, HasSlopeLimiter Limiter, typename NumberType >
using DiFfRG::def::TVDReconstructor< dim_, Limiter, NumberType >::ADNumberType = autodiff::Real<1, NumberType>
private

◆ LimiterType

template<int dim_, HasSlopeLimiter Limiter, typename NumberType >
using DiFfRG::def::TVDReconstructor< dim_, Limiter, NumberType >::LimiterType = Limiter

Member Function Documentation

◆ compute_gradient()

template<int dim_, HasSlopeLimiter Limiter, typename NumberType >
template<int n_components>
static GradientType< dim, NumberType, n_components > DiFfRG::def::TVDReconstructor< dim_, Limiter, NumberType >::compute_gradient ( const dealii::Point< dim > & center_pos,
const std::array< NumberType, n_components > & u_center,
const std::array< dealii::Point< dim >, n_faces > & x_n,
const std::array< std::array< NumberType, n_components >, n_faces > & u_n )
inlinestatic

Compute the gradient of u using the injected slope limiter.

For every component and every spatial dimension the method computes two one-sided slopes from the cell centre to its axis-aligned neighbours and returns the limiter-processed gradient.

Template Parameters
n_componentsthe number of components in u
Parameters
center_posposition of the cell centre
u_centersolution values at the cell centre
x_npositions of the def::n_faces<dim> neighbouring cell centres, ordered as pairs (left, right) for dim 0, then dim 1, …
u_nsolution values at those neighbours
Returns
per-component gradient vector

◆ compute_gradient_at_point()

template<int dim_, HasSlopeLimiter Limiter, typename NumberType >
template<int n_components>
static GradientType< dim, NumberType, n_components > DiFfRG::def::TVDReconstructor< dim_, Limiter, NumberType >::compute_gradient_at_point ( const dealii::Point< dim > & center_pos,
const dealii::Point< dim > & x,
const std::array< NumberType, n_components > & u_center,
const std::array< dealii::Point< dim >, n_faces > & x_n,
const std::array< std::array< NumberType, n_components >, n_faces > & u_n )
inlinestatic

◆ compute_gradient_at_point_derivative()

template<int dim_, HasSlopeLimiter Limiter, typename NumberType >
template<int n_components>
static GradientType< dim, NumberType, n_components > DiFfRG::def::TVDReconstructor< dim_, Limiter, NumberType >::compute_gradient_at_point_derivative ( const dealii::Point< dim > & center_pos,
const dealii::Point< dim > & x,
const std::array< ADNumberType, n_components > & u_center,
const std::array< dealii::Point< dim >, n_faces > & x_n,
const std::array< std::array< ADNumberType, n_components >, n_faces > & u_n )
inlinestatic

◆ compute_gradient_derivative()

template<int dim_, HasSlopeLimiter Limiter, typename NumberType >
template<int n_components>
static GradientType< dim, NumberType, n_components > DiFfRG::def::TVDReconstructor< dim_, Limiter, NumberType >::compute_gradient_derivative ( const dealii::Point< dim > & center_pos,
const std::array< ADNumberType, n_components > & u_center,
const std::array< dealii::Point< dim >, n_faces > & x_n,
const std::array< std::array< ADNumberType, n_components >, n_faces > & u_n )
inlinestatic

Compute the derivative of the limited gradient w.r.t. a single stencil DOF.

The inputs are already seeded autodiff::Real<1,NumberType> values; exactly one entry across u_center and u_n should have a non-zero derivative part (set via seed()).

Unlike compute_gradient, this method does not evaluate the reconstruction at a face point — it returns the per-component derivative of the gradient itself.

Template Parameters
n_componentsthe number of solution components
Parameters
center_posposition of the cell centre
u_centercell-centre values as seeded AD types
x_npositions of the def::n_faces<dim> neighbouring cell centres
u_nneighbour values as seeded AD types
Returns
per-component gradient-derivative tensor d(grad u_c) / d(u_target)

◆ compute_third_derivatives_at_face()

template<int dim_, HasSlopeLimiter Limiter, typename NumberType >
template<int n_components>
static ThirdDerivativeType< dim, NumberType, n_components > DiFfRG::def::TVDReconstructor< dim_, Limiter, NumberType >::compute_third_derivatives_at_face ( const std::array< dealii::Point< dim >, 4 > & x_stencil,
const std::array< std::array< NumberType, n_components >, 4 > & u_stencil )
inlinestatic

◆ compute_third_derivatives_at_face_derivative()

template<int dim_, HasSlopeLimiter Limiter, typename NumberType >
template<int n_components>
static ThirdDerivativeType< dim, NumberType, n_components > DiFfRG::def::TVDReconstructor< dim_, Limiter, NumberType >::compute_third_derivatives_at_face_derivative ( const std::array< dealii::Point< dim >, 4 > & x_stencil,
const std::array< std::array< ADNumberType, n_components >, 4 > & u_stencil )
inlinestatic

Member Data Documentation

◆ dim

template<int dim_, HasSlopeLimiter Limiter, typename NumberType >
int DiFfRG::def::TVDReconstructor< dim_, Limiter, NumberType >::dim = dim_
staticconstexpr

◆ jacobian_stencil_radius

template<int dim_, HasSlopeLimiter Limiter, typename NumberType >
int DiFfRG::def::TVDReconstructor< dim_, Limiter, NumberType >::jacobian_stencil_radius = 2
staticconstexpr

◆ n_faces

template<int dim_, HasSlopeLimiter Limiter, typename NumberType >
int DiFfRG::def::TVDReconstructor< dim_, Limiter, NumberType >::n_faces = 2 * dim
staticconstexpr

The documentation for this class was generated from the following file:
  • /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/FV/reconstructor/advection/tvd_reconstructor.hh