Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shammodels::basegodunov Namespace Reference

namespace for the basegodunov model More...

Namespaces

namespace  modules
 namespace for the basegodunov model modules

Classes

struct  AMRStencilCache
class  GhostZonesData
 Class to hold information related to ghost zones. More...
class  Model
class  SolverStorage
class  Solver
struct  DragConfig
 alphas is the dust collision rate (the inverse of the stopping time) More...
struct  DustConfig
struct  PassiveScalarGasConfig
 Npscal_gas is the number of gas passive scalars. More...
struct  GravityConfig
struct  AMRMode
struct  BCConfig
struct  SolverConfig

Typedefs

using Direction = shammodels::basegodunov::modules::Direction
template<class T>
using Component = shambase::StorageComponent<T>

Enumerations

enum  DragSolverMode { NoDrag = 0 , IRK1 = 1 , IRK2 = 2 , EXPO = 3 }
enum  DustRiemannSolverMode { NoDust = 0 , DHLL = 1 , HB = 2 }
 Dust Riemann solver mode enum. More...
enum  GravityMode {
  NoGravity = 0 , CG = 1 , PCG = 2 , BICGSTAB = 3 ,
  MULTIGRID = 4
}
enum  RiemannSolverMode { Rusanov = 0 , HLL = 1 , HLLC = 2 }
enum  SlopeMode {
  None = 0 , VanLeer_f = 1 , VanLeer_std = 2 , VanLeer_sym = 3 ,
  Minmod = 4
}
 Slope limiter modes. More...

Functions

 SHAMROCK_JSON_SERIALIZE_ENUM (DragSolverMode, {{DragSolverMode::NoDrag, "no_drag"}, {DragSolverMode::IRK1, "irk1"}, {DragSolverMode::IRK2, "irk2"}, {DragSolverMode::EXPO, "expo"}})
 SHAMROCK_JSON_SERIALIZE_ENUM (DustRiemannSolverMode, {{DustRiemannSolverMode::NoDust, "no_dust"}, {DustRiemannSolverMode::DHLL, "dhll"}, {DustRiemannSolverMode::HB, "hb"}})
 SHAMROCK_JSON_SERIALIZE_ENUM (GravityMode, {{GravityMode::NoGravity, "no_gravity"}, {GravityMode::CG, "cg"}, {GravityMode::PCG, "pcg"}, {GravityMode::BICGSTAB, "bicgstab"}, {GravityMode::MULTIGRID, "multigrid"}})
 SHAMROCK_JSON_SERIALIZE_ENUM (RiemannSolverMode, {{RiemannSolverMode::Rusanov, "rusanov"}, {RiemannSolverMode::HLL, "hll"}, {RiemannSolverMode::HLLC, "hllc"}})
 SHAMROCK_JSON_SERIALIZE_ENUM (SlopeMode, {{SlopeMode::None, "none"}, {SlopeMode::VanLeer_f, "vanleer_f"}, {SlopeMode::VanLeer_std, "vanleer_std"}, {SlopeMode::VanLeer_sym, "vanleer_sym"}, {SlopeMode::Minmod, "minmod"}})
template<class T, class Tvec, class ACCField>
laplacian_7pt (const u32 cell_global_id, const shambase::VecComponent< Tvec > delta_cell, const AMRGraphLinkiterator &graph_iter_xp, const AMRGraphLinkiterator &graph_iter_xm, const AMRGraphLinkiterator &graph_iter_yp, const AMRGraphLinkiterator &graph_iter_ym, const AMRGraphLinkiterator &graph_iter_zp, const AMRGraphLinkiterator &graph_iter_zm, ACCField &&field_access)
 Get the discretized laplacian.
void to_json (nlohmann::json &j, const BCConfig::GhostType &e)
void from_json (const nlohmann::json &j, BCConfig::GhostType &e)
void to_json (nlohmann::json &j, const BCConfig &p)
void from_json (const nlohmann::json &j, BCConfig &p)
void to_json (nlohmann::json &j, const DragConfig &p)
void from_json (const nlohmann::json &j, DragConfig &p)
template<class Tvec, class TgridVec>
void amr_config_to_json (nlohmann::json &j, const AMRMode< Tvec, TgridVec > &p)
template<class Tvec, class TgridVec>
void amr_config_from_json (const nlohmann::json &j, AMRMode< Tvec, TgridVec > &p)
template<class Tvec, class TgridVec>
void to_json (nlohmann::json &j, const AMRMode< Tvec, TgridVec > &p)
template<class Tvec, class TgridVec>
void from_json (const nlohmann::json &j, AMRMode< Tvec, TgridVec > &p)
template<class Tvec, class TgridVec>
void to_json (nlohmann::json &j, const SolverConfig< Tvec, TgridVec > &p)
 Serialize a SolverConfig to a JSON object.
template<class Tvec, class TgridVec>
void from_json (const nlohmann::json &j, SolverConfig< Tvec, TgridVec > &p)
 Deserializes a SolverConfig object from a JSON object.
template<class Tvec, class TgridVec>
void add_instance (py::module &m, std::string name_config, std::string name_model)
template void to_json< f64_3, i64_3 > (nlohmann::json &j, const SolverConfig< f64_3, i64_3 > &p)
template void from_json< f64_3, i64_3 > (const nlohmann::json &j, SolverConfig< f64_3, i64_3 > &p)

Detailed Description

namespace for the basegodunov model

Typedef Documentation

◆ Component

template<class T>
using shammodels::basegodunov::Component = shambase::StorageComponent<T>

Definition at line 57 of file SolverStorage.hpp.

◆ Direction

using shammodels::basegodunov::Direction = shammodels::basegodunov::modules::Direction

Definition at line 27 of file CGLaplacianStencil.hpp.

Enumeration Type Documentation

◆ DragSolverMode

enum shammodels::basegodunov::DragSolverMode

Definition at line 26 of file enum_DragSolverMode.hpp.

◆ DustRiemannSolverMode

Dust Riemann solver mode enum.

Enumerator
NoDust 

No dust, so no Riemann solver is used.

DHLL 

Dust HLL. This is merely the HLL solver for dust. It's then a Rusanov like.

HB 

Huang and Bai. Pressureless Riemann solver by Huang and Bai (2022) in Athena++.

Definition at line 27 of file enum_DustRiemannSolverMode.hpp.

◆ GravityMode

enum shammodels::basegodunov::GravityMode

Definition at line 25 of file enum_GravityMode.hpp.

◆ RiemannSolverMode

enum shammodels::basegodunov::RiemannSolverMode

Definition at line 25 of file enum_RiemannSolverMode.hpp.

◆ SlopeMode

Slope limiter modes.

Definition at line 25 of file enum_SlopeMode.hpp.

Function Documentation

◆ add_instance()

template<class Tvec, class TgridVec>
void shammodels::basegodunov::add_instance ( py::module & m,
std::string name_config,
std::string name_model )

Definition at line 33 of file pyRamsesModel.cpp.

◆ amr_config_from_json()

template<class Tvec, class TgridVec>
void shammodels::basegodunov::amr_config_from_json ( const nlohmann::json & j,
AMRMode< Tvec, TgridVec > & p )
inline

Definition at line 387 of file SolverConfig.hpp.

◆ amr_config_to_json()

template<class Tvec, class TgridVec>
void shammodels::basegodunov::amr_config_to_json ( nlohmann::json & j,
const AMRMode< Tvec, TgridVec > & p )
inline

Definition at line 365 of file SolverConfig.hpp.

◆ from_json() [1/5]

template<class Tvec, class TgridVec>
void shammodels::basegodunov::from_json ( const nlohmann::json & j,
AMRMode< Tvec, TgridVec > & p )
inline

Definition at line 415 of file SolverConfig.hpp.

◆ from_json() [2/5]

void shammodels::basegodunov::from_json ( const nlohmann::json & j,
BCConfig & p )
inline

Definition at line 345 of file SolverConfig.hpp.

◆ from_json() [3/5]

void shammodels::basegodunov::from_json ( const nlohmann::json & j,
BCConfig::GhostType & e )
inline

Definition at line 324 of file SolverConfig.hpp.

◆ from_json() [4/5]

void shammodels::basegodunov::from_json ( const nlohmann::json & j,
DragConfig & p )
inline

Definition at line 358 of file SolverConfig.hpp.

◆ from_json() [5/5]

template<class Tvec, class TgridVec>
void shammodels::basegodunov::from_json ( const nlohmann::json & j,
SolverConfig< Tvec, TgridVec > & p )

Deserializes a SolverConfig object from a JSON object.

Parameters
jThe JSON object to deserialize from.
pThe SolverConfig object to populate.

Definition at line 80 of file SolverConfig.cpp.

Here is the call graph for this function:

◆ laplacian_7pt()

template<class T, class Tvec, class ACCField>
T shammodels::basegodunov::laplacian_7pt ( const u32 cell_global_id,
const shambase::VecComponent< Tvec > delta_cell,
const AMRGraphLinkiterator & graph_iter_xp,
const AMRGraphLinkiterator & graph_iter_xm,
const AMRGraphLinkiterator & graph_iter_yp,
const AMRGraphLinkiterator & graph_iter_ym,
const AMRGraphLinkiterator & graph_iter_zp,
const AMRGraphLinkiterator & graph_iter_zm,
ACCField && field_access )
inline

Get the discretized laplacian.

Template Parameters
T
Tvec
ACCField
Parameters
cell_global_id
delta_cell
graph_iter_xp
graph_iter_xm
graph_iter_yp
graph_iter_ym
graph_iter_zp
graph_iter_zm
field_access
Returns
T

Definition at line 47 of file CGLaplacianStencil.hpp.

◆ to_json() [1/5]

template<class Tvec, class TgridVec>
void shammodels::basegodunov::to_json ( nlohmann::json & j,
const AMRMode< Tvec, TgridVec > & p )
inline

Definition at line 408 of file SolverConfig.hpp.

◆ to_json() [2/5]

void shammodels::basegodunov::to_json ( nlohmann::json & j,
const BCConfig & p )
inline

Definition at line 338 of file SolverConfig.hpp.

◆ to_json() [3/5]

void shammodels::basegodunov::to_json ( nlohmann::json & j,
const BCConfig::GhostType & e )
inline

Definition at line 313 of file SolverConfig.hpp.

◆ to_json() [4/5]

void shammodels::basegodunov::to_json ( nlohmann::json & j,
const DragConfig & p )
inline

Definition at line 351 of file SolverConfig.hpp.

◆ to_json() [5/5]

template<class Tvec, class TgridVec>
void shammodels::basegodunov::to_json ( nlohmann::json & j,
const SolverConfig< Tvec, TgridVec > & p )

Serialize a SolverConfig to a JSON object.

Parameters
[out]jThe JSON object to write to
[in]pThe SolverConfig to serialize

Definition at line 56 of file SolverConfig.cpp.