Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
shammodels::sph::AVConfig< Tvec > Struct Template Reference

Configuration for the Artificial Viscosity (AV) More...

Public Types

using Tscal = shambase::VecComponent< Tvec >
 Type of the components of the vector of coordinates.
 
using None = AVConfig_None< Tscal >
 
using Constant = AVConfig_Constant< Tscal >
 
using VaryingMM97 = AVConfig_VaryingMM97< Tscal >
 
using VaryingCD10 = AVConfig_VaryingCD10< Tscal >
 
using ConstantDisc = AVConfig_ConstantDisc< Tscal >
 
using Variant = std::variant< None, Constant, VaryingMM97, VaryingCD10, ConstantDisc >
 Variant of all types of artificial viscosity possible.
 

Public Member Functions

void set (Variant v)
 Set the configuration.
 
void set_varying_cd10 (Tscal alpha_min, Tscal alpha_max, Tscal sigma_decay, Tscal alpha_u, Tscal beta_AV)
 Sets the configuration to use a varying Cullen & Dehnen 2010 artificial viscosity.
 
bool has_alphaAV_field ()
 Checks if the current configuration has an alpha artificial viscosity field.
 
bool has_divv_field ()
 Checks if the current configuration need the divergence of the velocity field.
 
bool has_curlv_field ()
 Checks if the current configuration need the curl of the velocity field.
 
bool has_dtdivv_field ()
 Checks if the current configuration has a dtdivv field.
 
bool has_field_soundspeed ()
 Checks if the current configuration requires the soundspeed field.
 
void print_status ()
 Prints the status of the artificial viscosity configuration.
 
std::optional< Tscalget_alpha_u ()
 

Public Attributes

Variant config = Constant{}
 The actual configuration (default to constant viscosity)
 

Static Public Attributes

static constexpr u32 dim = shambase::VectorProperties<Tvec>::dimension
 Number of dimensions of the problem.
 

Detailed Description

template<class Tvec>
struct shammodels::sph::AVConfig< Tvec >

Configuration for the Artificial Viscosity (AV)

This struct contains the information needed to configure the Artificial Viscosity in the SPH algorithm. It is a variant of two possible types of artificial viscosity:

Template Parameters
Tvectype of the vector of coordinates

Definition at line 189 of file AVConfig.hpp.

Member Typedef Documentation

◆ Constant

template<class Tvec >
using shammodels::sph::AVConfig< Tvec >::Constant = AVConfig_Constant<Tscal>

Definition at line 197 of file AVConfig.hpp.

◆ ConstantDisc

template<class Tvec >
using shammodels::sph::AVConfig< Tvec >::ConstantDisc = AVConfig_ConstantDisc<Tscal>

Definition at line 200 of file AVConfig.hpp.

◆ None

template<class Tvec >
using shammodels::sph::AVConfig< Tvec >::None = AVConfig_None<Tscal>

Definition at line 196 of file AVConfig.hpp.

◆ Tscal

template<class Tvec >
using shammodels::sph::AVConfig< Tvec >::Tscal = shambase::VecComponent<Tvec>

Type of the components of the vector of coordinates.

Definition at line 192 of file AVConfig.hpp.

◆ Variant

template<class Tvec >
using shammodels::sph::AVConfig< Tvec >::Variant = std::variant<None, Constant, VaryingMM97, VaryingCD10, ConstantDisc>

Variant of all types of artificial viscosity possible.

Definition at line 203 of file AVConfig.hpp.

◆ VaryingCD10

template<class Tvec >
using shammodels::sph::AVConfig< Tvec >::VaryingCD10 = AVConfig_VaryingCD10<Tscal>

Definition at line 199 of file AVConfig.hpp.

◆ VaryingMM97

template<class Tvec >
using shammodels::sph::AVConfig< Tvec >::VaryingMM97 = AVConfig_VaryingMM97<Tscal>

Definition at line 198 of file AVConfig.hpp.

Member Function Documentation

◆ get_alpha_u()

template<class Tvec >
std::optional< Tscal > shammodels::sph::AVConfig< Tvec >::get_alpha_u ( )
inline

Definition at line 328 of file AVConfig.hpp.

◆ has_alphaAV_field()

template<class Tvec >
bool shammodels::sph::AVConfig< Tvec >::has_alphaAV_field ( )
inline

Checks if the current configuration has an alpha artificial viscosity field.

Returns
true if the configuration has an alpha artificial viscosity field, false otherwise

Definition at line 230 of file AVConfig.hpp.

◆ has_curlv_field()

template<class Tvec >
bool shammodels::sph::AVConfig< Tvec >::has_curlv_field ( )
inline

Checks if the current configuration need the curl of the velocity field.

Returns
true if the current configuration need the curl of the velocity field, false otherwise

Definition at line 254 of file AVConfig.hpp.

◆ has_divv_field()

template<class Tvec >
bool shammodels::sph::AVConfig< Tvec >::has_divv_field ( )
inline

Checks if the current configuration need the divergence of the velocity field.

Returns
true if the current configuration need the divergence of the velocity field, false otherwise

Definition at line 242 of file AVConfig.hpp.

◆ has_dtdivv_field()

template<class Tvec >
bool shammodels::sph::AVConfig< Tvec >::has_dtdivv_field ( )
inline

Checks if the current configuration has a dtdivv field.

Returns
true if the configuration has a dtdivv field, false otherwise

Definition at line 264 of file AVConfig.hpp.

◆ has_field_soundspeed()

template<class Tvec >
bool shammodels::sph::AVConfig< Tvec >::has_field_soundspeed ( )
inline

Checks if the current configuration requires the soundspeed field.

Returns
true if the configuration requires the soundspeed field, false otherwise.

Definition at line 274 of file AVConfig.hpp.

◆ print_status()

template<class Tvec >
void shammodels::sph::AVConfig< Tvec >::print_status ( )
inline

Prints the status of the artificial viscosity configuration.

Definition at line 290 of file AVConfig.hpp.

+ Here is the call graph for this function:

◆ set()

template<class Tvec >
void shammodels::sph::AVConfig< Tvec >::set ( Variant  v)
inline

Set the configuration.

Definition at line 209 of file AVConfig.hpp.

◆ set_varying_cd10()

template<class Tvec >
void shammodels::sph::AVConfig< Tvec >::set_varying_cd10 ( Tscal  alpha_min,
Tscal  alpha_max,
Tscal  sigma_decay,
Tscal  alpha_u,
Tscal  beta_AV 
)
inline

Sets the configuration to use a varying Cullen & Dehnen 2010 artificial viscosity.

Parameters
alpha_minthe minimum value of alpha
alpha_maxthe maximum value of alpha
sigma_decaythe decay rate of sigma
alpha_uthe value of alpha_u
beta_AVthe value of beta_AV

Definition at line 220 of file AVConfig.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ config

template<class Tvec >
Variant shammodels::sph::AVConfig< Tvec >::config = Constant{}

The actual configuration (default to constant viscosity)

Definition at line 206 of file AVConfig.hpp.

◆ dim

template<class Tvec >
constexpr u32 shammodels::sph::AVConfig< Tvec >::dim = shambase::VectorProperties<Tvec>::dimension
staticconstexpr

Number of dimensions of the problem.

Definition at line 194 of file AVConfig.hpp.


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