Documentation 6b54b78464
Loading...
Searching...
No Matches
CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ > Class Template Reference

Upwind convection and diffusion of a transported scalar, accumulated into one residual, each term contributing or not according to the options. More...

#include <scalar_edge_flux.hpp>

Inheritance diagram for CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >:
[legend]

Public Types

using Double = Double_
 
using Int = typename CLaneTraits< Double_ >::Int
 

Public Member Functions

 CUpwScalarBase (const CConfig &config, size_t nEqn_=nVar_)
 Constructor, inherited by the model with using Base::Base.
 
template<class VariableType >
EdgeResidual< Double, nVar > ComputeFlux (const ScalarFluxOptions &opt, Int iPoint, const EdgeSide< VariableType > &side_i, Int jPoint, const EdgeSide< VariableType > &side_j, const Vector< Double, nDim > &normal, const Double &massFlux) const
 
template<class VariableType >
void ComputeFlux (const ScalarFluxOptions &opt, Int iEdge, Int iPoint, const EdgeSide< VariableType > &side_i, Int jPoint, const EdgeSide< VariableType > &side_j, const Vector< Double, nDim > &normal, const Double &massFlux, UpdateType updateType, Double updateMask, CSysVector< su2double > &vector, CSysVector< su2double > &vectorDiff, SparseMatrixType &matrix) const
 Compute the flux of an edge and write it to the linear system.
 

Static Public Attributes

static constexpr int nDim = nDim_
 
static constexpr size_t nVar = nVar_
 
static constexpr size_t Size = EdgeResidual<Double_, nVar_>::Size
 Backing size, for the model to size the containers its coefficients() returns; nVar itself is Dynamic for a runtime model and never usable as a container size.
 
static constexpr bool DiffusionReadsDensity = false
 Whether the model's diffusion coefficients read the density, beyond the reading that Conservative already implies. A model that declares neither never gathers it.
 

Protected Types

using Base = CUpwScalarFlux< Double_, Derived, FlowIndices, nDim_, nVar_ >
 
- Protected Types inherited from CUpwScalarFlux< Double_, Derived, FlowIndices, nDim_, nVar_ >
using Int = typename CLaneTraits< Double_ >::Int
 
- Protected Types inherited from CAvgGradScalarBase< Double, Derived, FlowIndices, nDim, nVar >
using Int = typename CLaneTraits< Double >::Int
 

Protected Attributes

const FlowIndices idx
 
const size_t nEqn
 Equations of the model, which a dynamic one gives to its base.
 
const su2double kappa
 MUSCL reconstruction parameters, read from CConfig once per construction (i.e. once per nonlinear iteration, see CScalarSolver::EdgeFluxResidual) instead of per edge; this is also where the scalar limiter's freezing (GetLimiterIter) is resolved, by collapsing its type to NONE once frozen. The flow limiter is not frozen this way: once the flow solver stops recomputing it, it keeps applying the last values it has.
 
const su2double umusclRamp
 
const su2double kappaFlow
 
const LIMITER limiterType
 
const LIMITER limiterTypeFlow
 
const bool musclFlow
 

Additional Inherited Members

- Protected Member Functions inherited from CUpwScalarFlux< Double_, Derived, FlowIndices, nDim_, nVar_ >
 CUpwScalarFlux (const CConfig &)
 
void finalizeFlux (const FlowIndices &, const ScalarFluxOptions &opt, Int, const EdgeSide< VariableType > &, Int, const EdgeSide< VariableType > &, const Double_ &a0, const Double_ &a1, const CPair< Double_ > &rho, const CPair< CScalarValues< Double_, Size > > &phi, EdgeResidual< Double_, nVar > &res) const
 Upwind convection of the transported variable, weighted by the density for a conservative model.
 
- Protected Member Functions inherited from CAvgGradScalarBase< Double, Derived, FlowIndices, nDim, nVar >
template<class VariableType >
void diffusionTerms (const FlowIndices &idx, const ScalarFluxOptions &opt, Int iPoint, const EdgeSide< VariableType > &side_i, Int jPoint, const EdgeSide< VariableType > &side_j, const CPair< Double > &rho, const Vector< Double, nDim > &normal, const Vector< Double, nDim > &vector_ij, EdgeResidual< Double, nVar > &res) const
 
template<class... Ts>
void coefficientJacobians (Ts &&...) const
 Contribution of the derivatives of the coefficients themselves.
 
template<class... Ts>
void extraDiffusionTerms (Ts &&...) const
 Diffusion of a model that transports more than one gradient, of states it synthesises from its own containers.
 

Detailed Description

template<class Double_, class Derived, class FlowIndices, int nDim_, size_t nVar_>
class CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >

Upwind convection and diffusion of a transported scalar, accumulated into one residual, each term contributing or not according to the options.

Member Typedef Documentation

◆ Base

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
using CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::Base = CUpwScalarFlux<Double_, Derived, FlowIndices, nDim_, nVar_>
protected

◆ Double

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
using CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::Double = Double_

◆ Int

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
using CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::Int = typename CLaneTraits<Double_>::Int

Constructor & Destructor Documentation

◆ CUpwScalarBase()

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::CUpwScalarBase ( const CConfig &  config,
size_t  nEqn_ = nVar_ 
)
inlineexplicit

Constructor, inherited by the model with using Base::Base.

Note
Public, not protected: a using-declaration that inherits a constructor keeps the base's own access, so the solver that builds the concrete model needs this public to build it at all.

Member Function Documentation

◆ ComputeFlux() [1/2]

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
template<class VariableType >
void CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::ComputeFlux ( const ScalarFluxOptions &  opt,
Int  iEdge,
Int  iPoint,
const EdgeSide< VariableType > &  side_i,
Int  jPoint,
const EdgeSide< VariableType > &  side_j,
const Vector< Double, nDim > &  normal,
const Double &  massFlux,
UpdateType  updateType,
Double  updateMask,
CSysVector< su2double > &  vector,
CSysVector< su2double > &  vectorDiff,
SparseMatrixType &  matrix 
) const
inline

Compute the flux of an edge and write it to the linear system.

◆ ComputeFlux() [2/2]

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
template<class VariableType >
EdgeResidual< Double, nVar > CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::ComputeFlux ( const ScalarFluxOptions &  opt,
Int  iPoint,
const EdgeSide< VariableType > &  side_i,
Int  jPoint,
const EdgeSide< VariableType > &  side_j,
const Vector< Double, nDim > &  normal,
const Double &  massFlux 
) const
inline

Member Data Documentation

◆ DiffusionReadsDensity

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
constexpr bool CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::DiffusionReadsDensity = false
staticconstexpr

Whether the model's diffusion coefficients read the density, beyond the reading that Conservative already implies. A model that declares neither never gathers it.

◆ idx

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
const FlowIndices CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::idx
protected

◆ kappa

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
const su2double CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::kappa
protected

MUSCL reconstruction parameters, read from CConfig once per construction (i.e. once per nonlinear iteration, see CScalarSolver::EdgeFluxResidual) instead of per edge; this is also where the scalar limiter's freezing (GetLimiterIter) is resolved, by collapsing its type to NONE once frozen. The flow limiter is not frozen this way: once the flow solver stops recomputing it, it keeps applying the last values it has.

◆ kappaFlow

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
const su2double CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::kappaFlow
protected

◆ limiterType

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
const LIMITER CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::limiterType
protected

◆ limiterTypeFlow

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
const LIMITER CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::limiterTypeFlow
protected

◆ musclFlow

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
const bool CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::musclFlow
protected

◆ nDim

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
constexpr int CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::nDim = nDim_
staticconstexpr

◆ nEqn

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
const size_t CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::nEqn
protected

Equations of the model, which a dynamic one gives to its base.

◆ nVar

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
constexpr size_t CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::nVar = nVar_
staticconstexpr

◆ Size

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
constexpr size_t CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::Size = EdgeResidual<Double_, nVar_>::Size
staticconstexpr

Backing size, for the model to size the containers its coefficients() returns; nVar itself is Dynamic for a runtime model and never usable as a container size.

◆ umusclRamp

template<class Double_ , class Derived , class FlowIndices , int nDim_, size_t nVar_>
const su2double CUpwScalarBase< Double_, Derived, FlowIndices, nDim_, nVar_ >::umusclRamp
protected

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