Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shammodels::basegodunov::modules::BarotropicEnergyReset< Tvec, TgridVec > Class Template Reference

Overwrite the gas internal energy by the barotropic one (CoolingConfig::InstantBarotropic). More...

#include <shammodels/ramses/include/shammodels/ramses/modules/BarotropicEnergyReset.hpp>

Collaboration diagram for shammodels::basegodunov::modules::BarotropicEnergyReset< Tvec, TgridVec >:

Public Types

using Tscal = shambase::VecComponent<Tvec>
using Config = SolverConfig<Tvec, TgridVec>
using Storage = SolverStorage<Tvec, TgridVec, u64>
using AMRBlock = typename Config::AMRBlock

Public Member Functions

 BarotropicEnergyReset (ShamrockCtx &context, Config &solver_config, Storage &storage)
void reset_energy ()
 Apply the reset, does nothing if the cooling is not CoolingConfig::InstantBarotropic.

Public Attributes

ShamrockCtx & context
Config & solver_config
Storage & storage

Detailed Description

template<class Tvec, class TgridVec>
class shammodels::basegodunov::modules::BarotropicEnergyReset< Tvec, TgridVec >

Overwrite the gas internal energy by the barotropic one (CoolingConfig::InstantBarotropic).

For every cell, in place in the patch data, keeping rho and rhovel:

\[ \rho e_{\rm tot} \leftarrow \frac{P_{\rm baro}(\rho)}{\gamma - 1} + \frac{1}{2} \frac{(\rho \mathbf{v})^2}{\rho} \]

with \( \gamma \) the adiabatic index of the equation of state (hydro step).

Definition at line 37 of file BarotropicEnergyReset.hpp.

Member Typedef Documentation

◆ AMRBlock

template<class Tvec, class TgridVec>
using shammodels::basegodunov::modules::BarotropicEnergyReset< Tvec, TgridVec >::AMRBlock = typename Config::AMRBlock

Definition at line 44 of file BarotropicEnergyReset.hpp.

◆ Config

template<class Tvec, class TgridVec>
using shammodels::basegodunov::modules::BarotropicEnergyReset< Tvec, TgridVec >::Config = SolverConfig<Tvec, TgridVec>

Definition at line 42 of file BarotropicEnergyReset.hpp.

◆ Storage

template<class Tvec, class TgridVec>
using shammodels::basegodunov::modules::BarotropicEnergyReset< Tvec, TgridVec >::Storage = SolverStorage<Tvec, TgridVec, u64>

Definition at line 43 of file BarotropicEnergyReset.hpp.

◆ Tscal

template<class Tvec, class TgridVec>
using shammodels::basegodunov::modules::BarotropicEnergyReset< Tvec, TgridVec >::Tscal = shambase::VecComponent<Tvec>

Definition at line 40 of file BarotropicEnergyReset.hpp.

Constructor & Destructor Documentation

◆ BarotropicEnergyReset()

template<class Tvec, class TgridVec>
shammodels::basegodunov::modules::BarotropicEnergyReset< Tvec, TgridVec >::BarotropicEnergyReset ( ShamrockCtx & context,
Config & solver_config,
Storage & storage )
inline

Definition at line 50 of file BarotropicEnergyReset.hpp.

Member Function Documentation

◆ reset_energy()

template<class Tvec, class TgridVec>
void shammodels::basegodunov::modules::BarotropicEnergyReset< Tvec, TgridVec >::reset_energy ( )

Apply the reset, does nothing if the cooling is not CoolingConfig::InstantBarotropic.

Definition at line 22 of file BarotropicEnergyReset.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ context

template<class Tvec, class TgridVec>
ShamrockCtx& shammodels::basegodunov::modules::BarotropicEnergyReset< Tvec, TgridVec >::context

Definition at line 46 of file BarotropicEnergyReset.hpp.

◆ solver_config

template<class Tvec, class TgridVec>
Config& shammodels::basegodunov::modules::BarotropicEnergyReset< Tvec, TgridVec >::solver_config

Definition at line 47 of file BarotropicEnergyReset.hpp.

◆ storage

template<class Tvec, class TgridVec>
Storage& shammodels::basegodunov::modules::BarotropicEnergyReset< Tvec, TgridVec >::storage

Definition at line 48 of file BarotropicEnergyReset.hpp.


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