Shamrock
2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shammodels
ramses
include
shammodels
ramses
modules
NodeSelfGravityAcceleration.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
20
21
#include "
shambase/aliases_int.hpp
"
22
#include "
shambackends/vec.hpp
"
23
#include "
shammodels/ramses/solvegraph/OrientedAMRGraphEdge.hpp
"
24
#include "
shamrock/solvergraph/IFieldSpan.hpp
"
25
#include "
shamrock/solvergraph/Indexes.hpp
"
26
#include "
shamsolvergraph/node/INode.hpp
"
27
#include <string>
28
29
#define NODE_EDGES(X_RO, X_RW) \
30
/* ------------------- inputs ------------------- */
\
31
X_RO(shamrock::solvergraph::Indexes<u32>, sizes) \
32
X_RO(CellGraphEdge, cell_neigh_graph) \
33
X_RO(shamrock::solvergraph::IFieldSpan<Tscal>, spans_block_cell_sizes) \
34
X_RO(shamrock::solvergraph::IFieldSpan<Tscal>, spans_phi) \
35
\
36
/* ------------------- outputs ------------------- */
\
37
X_RW(shamrock::solvergraph::IFieldSpan<Tvec>, spans_phi_g)
38
39
namespace
shammodels::basegodunov::modules
{
40
59
template
<
class
Tvec,
class
Tgr
id
Vec>
60
class
NodeSelfGravityAcceleration :
public
shamrock::solvergraph::INode
{
61
using
Tscal = shambase::VecComponent<Tvec>;
62
using
CellGraphEdge =
solvergraph::OrientedAMRGraphEdge<Tvec, TgridVec>
;
63
64
u32
block_size;
65
66
public
:
67
NodeSelfGravityAcceleration(
u32
block_size) : block_size(block_size) {}
68
69
EXPAND_NODE_EDGES(NODE_EDGES)
70
71
void
_impl_evaluate_internal
();
72
73
inline
virtual
std::string
_impl_get_label
()
const
{
return
"SelfGravityAcceleration"
; }
74
75
virtual
std::string
_impl_get_tex
()
const
;
76
};
77
78
}
// namespace shammodels::basegodunov::modules
79
80
#undef NODE_EDGES
IFieldSpan.hpp
INode.hpp
Indexes.hpp
OrientedAMRGraphEdge.hpp
aliases_int.hpp
u32
std::uint32_t u32
32 bit unsigned integer
Definition
aliases_int.hpp:27
shammodels::basegodunov::modules::NodeSelfGravityAcceleration::_impl_evaluate_internal
void _impl_evaluate_internal()
evaluate the node
Definition
NodeSelfGravityAcceleration.cpp:91
shammodels::basegodunov::modules::NodeSelfGravityAcceleration::_impl_get_tex
virtual std::string _impl_get_tex() const
get the tex of the node
Definition
NodeSelfGravityAcceleration.cpp:163
shammodels::basegodunov::modules::NodeSelfGravityAcceleration::_impl_get_label
virtual std::string _impl_get_label() const
get the label of the node
Definition
NodeSelfGravityAcceleration.hpp:73
shammodels::basegodunov::solvergraph::OrientedAMRGraphEdge
Definition
OrientedAMRGraphEdge.hpp:27
shamrock::solvergraph::INode
Inode is node between data edges, takes multiple inputs, multiple outputs.
Definition
INode.hpp:31
shammodels::basegodunov::modules
namespace for the basegodunov model modules
Definition
AMRCellInfos.hpp:20
vec.hpp
Generated on
for Shamrock by
1.15.0