Shamrock
2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shammodels
ramses
include
shammodels
ramses
modules
BarotropicEnergyReset.hpp
Go to the documentation of this file.
1
// -------------------------------------------------------//
2
//
3
// SHAMROCK code for hydrodynamics
4
// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5
// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6
// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7
//
8
// -------------------------------------------------------//
9
10
#pragma once
11
18
19
#include "
shambackends/vec.hpp
"
20
#include "
shammodels/ramses/Solver.hpp
"
21
#include "
shammodels/ramses/modules/SolverStorage.hpp
"
22
23
namespace
shammodels::basegodunov::modules
{
24
36
template
<
class
Tvec,
class
Tgr
id
Vec>
37
class
BarotropicEnergyReset {
38
39
public
:
40
using
Tscal = shambase::VecComponent<Tvec>;
41
42
using
Config =
SolverConfig<Tvec, TgridVec>
;
43
using
Storage =
SolverStorage<Tvec, TgridVec, u64>
;
44
using
AMRBlock =
typename
Config::AMRBlock;
45
46
ShamrockCtx
&context;
47
Config &solver_config;
48
Storage &storage;
49
50
BarotropicEnergyReset(
ShamrockCtx
&context, Config &solver_config, Storage &storage)
51
: context(context), solver_config(solver_config), storage(storage) {}
52
54
void
reset_energy
();
55
56
private
:
57
inline
PatchScheduler
&scheduler() {
return
shambase::get_check_ref
(context.sched); }
58
};
59
60
}
// namespace shammodels::basegodunov::modules
PatchScheduler
The MPI scheduler.
Definition
PatchScheduler.hpp:86
ShamrockCtx
Definition
ShamrockCtx.hpp:42
shammodels::basegodunov::SolverStorage
Definition
SolverStorage.hpp:62
shammodels::basegodunov::modules::BarotropicEnergyReset::reset_energy
void reset_energy()
Apply the reset, does nothing if the cooling is not CoolingConfig::InstantBarotropic.
Definition
BarotropicEnergyReset.cpp:22
shambase::get_check_ref
T & get_check_ref(const std::unique_ptr< T > &ptr, SourceLocation loc=SourceLocation())
Takes a std::unique_ptr and returns a reference to the object it holds. It throws a std::runtime_erro...
Definition
memory.hpp:112
shammodels::basegodunov::modules
namespace for the basegodunov model modules
Definition
AMRCellInfos.hpp:20
Solver.hpp
SolverStorage.hpp
shammodels::basegodunov::SolverConfig
Definition
SolverConfig.hpp:221
vec.hpp
Generated on
for Shamrock by
1.15.0