Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shammodels::basegodunov::ExtForceConfig< Tvec > Struct Template Reference

List of the external forces applied to the gas. More...

#include <shammodels/ramses/include/shammodels/ramses/config/ExtForceConfig.hpp>

Collaboration diagram for shammodels::basegodunov::ExtForceConfig< Tvec >:

Classes

struct  ConstantGravity
 Constant gravitational acceleration g. More...
struct  PointMassGravity

Public Types

using Tscal = shambase::VecComponent<Tvec>
using Variant = std::variant<ConstantGravity, PointMassGravity>

Public Member Functions

void set_coupling (ExtForceCoupling mode)
void add_constant_gravity (Tvec g)
void add_point_mass_gravity (Tscal mass, Tvec pos, Tscal epsilon_soft)
bool is_coordinates_needed () const
bool has_ext_forces () const

Public Attributes

std::vector< Variant > ext_forces
ExtForceCoupling coupling = ExtForceCoupling::Midpoint
 Time quadrature of the external forces source term.

Detailed Description

template<class Tvec>
struct shammodels::basegodunov::ExtForceConfig< Tvec >

List of the external forces applied to the gas.

The accelerations of all the forces are summed (in the order of the list) before being applied to the conservative state, with the time quadrature selected by coupling.

Definition at line 42 of file ExtForceConfig.hpp.

Member Typedef Documentation

◆ Tscal

template<class Tvec>
using shammodels::basegodunov::ExtForceConfig< Tvec >::Tscal = shambase::VecComponent<Tvec>

Definition at line 43 of file ExtForceConfig.hpp.

◆ Variant

template<class Tvec>
using shammodels::basegodunov::ExtForceConfig< Tvec >::Variant = std::variant<ConstantGravity, PointMassGravity>

Definition at line 57 of file ExtForceConfig.hpp.

Member Function Documentation

◆ add_constant_gravity()

template<class Tvec>
void shammodels::basegodunov::ExtForceConfig< Tvec >::add_constant_gravity ( Tvec g)
inline

Definition at line 66 of file ExtForceConfig.hpp.

◆ add_point_mass_gravity()

template<class Tvec>
void shammodels::basegodunov::ExtForceConfig< Tvec >::add_point_mass_gravity ( Tscal mass,
Tvec pos,
Tscal epsilon_soft )
inline

Definition at line 67 of file ExtForceConfig.hpp.

◆ has_ext_forces()

template<class Tvec>
bool shammodels::basegodunov::ExtForceConfig< Tvec >::has_ext_forces ( ) const
inline

Definition at line 81 of file ExtForceConfig.hpp.

◆ is_coordinates_needed()

template<class Tvec>
bool shammodels::basegodunov::ExtForceConfig< Tvec >::is_coordinates_needed ( ) const
inline

Definition at line 75 of file ExtForceConfig.hpp.

◆ set_coupling()

template<class Tvec>
void shammodels::basegodunov::ExtForceConfig< Tvec >::set_coupling ( ExtForceCoupling mode)
inline

Definition at line 64 of file ExtForceConfig.hpp.

Member Data Documentation

◆ coupling

Time quadrature of the external forces source term.

Definition at line 62 of file ExtForceConfig.hpp.

◆ ext_forces

template<class Tvec>
std::vector<Variant> shammodels::basegodunov::ExtForceConfig< Tvec >::ext_forces

Definition at line 59 of file ExtForceConfig.hpp.


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