Shamrock
2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shammodels
ramses
include
shammodels
ramses
modules
ConsToPrimGas.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 "
shamrock/solvergraph/IFieldSpan.hpp
"
21
#include "
shamrock/solvergraph/INode.hpp
"
22
#include "
shamrock/solvergraph/Indexes.hpp
"
23
24
#define NODE_EDGES(X_RO, X_RW) \
25
/* ------------------- inputs ------------------- */
\
26
X_RO(shamrock::solvergraph::Indexes<u32>, sizes) \
27
X_RO(shamrock::solvergraph::IFieldSpan<Tscal>, spans_rho) \
28
X_RO(shamrock::solvergraph::IFieldSpan<Tvec>, spans_rhov) \
29
X_RO(shamrock::solvergraph::IFieldSpan<Tscal>, spans_rhoe) \
30
\
31
/* ------------------- outputs ------------------- */
\
32
X_RW(shamrock::solvergraph::IFieldSpan<Tvec>, spans_vel) \
33
X_RW(shamrock::solvergraph::IFieldSpan<Tscal>, spans_P)
34
35
namespace
shammodels::basegodunov::modules
{
36
template
<
class
Tvec>
37
class
NodeConsToPrimGas :
public
shamrock::solvergraph::INode
{
38
using
Tscal = shambase::VecComponent<Tvec>;
39
u32
block_size;
40
Tscal gamma;
41
42
public
:
43
NodeConsToPrimGas(
u32
block_size, Tscal gamma) : block_size(block_size), gamma(gamma) {}
44
45
EXPAND_NODE_EDGES(NODE_EDGES)
46
47
void
_impl_evaluate_internal
();
48
49
inline
virtual
std::string
_impl_get_label
()
const
{
return
"ConsToPrimGas"
; };
50
51
virtual
std::string
_impl_get_tex
()
const
;
52
};
53
}
// namespace shammodels::basegodunov::modules
54
55
#undef NODE_EDGES
IFieldSpan.hpp
INode.hpp
Indexes.hpp
u32
std::uint32_t u32
32 bit unsigned integer
Definition
aliases_int.hpp:27
shammodels::basegodunov::modules::NodeConsToPrimGas::_impl_get_label
virtual std::string _impl_get_label() const
get the label of the node
Definition
ConsToPrimGas.hpp:49
shammodels::basegodunov::modules::NodeConsToPrimGas::_impl_get_tex
virtual std::string _impl_get_tex() const
get the tex of the node
Definition
ConsToPrimGas.cpp:98
shammodels::basegodunov::modules::NodeConsToPrimGas::_impl_evaluate_internal
void _impl_evaluate_internal()
evaluate the node
Definition
ConsToPrimGas.cpp:76
shamrock::solvergraph::INode
Inode is node between data edges, takes multiple inputs, multiple outputs.
Definition
INode.hpp:30
shammodels::basegodunov::modules
namespace for the basegodunov model modules
Definition
AMRCellInfos.hpp:20
vec.hpp
Generated on
for Shamrock by
1.15.0