33 enum class GhostType { None, Periodic, Reflective };
36 GhostType ghost_type_x;
37 GhostType ghost_type_y;
38 GhostType ghost_type_z;
41 template<
class Tgr
idVec>
45 TgridVec box_size = sim_box.
upper - sim_box.
lower;
46 TgridVec box_center = (sim_box.
upper + sim_box.
lower) / 2;
52 = {box_center - box_size / 2, box_center + box_size / 2};
53 if (new_box != sim_box) {
55 "Rebuilding AABB from size and center gives a different AABB");
62 mode.ghost_type_x == GhostType::Periodic,
63 mode.ghost_type_y == GhostType::Periodic,
64 mode.ghost_type_z == GhostType::Periodic};
71 i32 repetition_x = mode.ghost_type_x != GhostType::None;
72 i32 repetition_y = mode.ghost_type_y != GhostType::None;
73 i32 repetition_z = mode.ghost_type_z != GhostType::None;
75 for (
i32 xoff = -repetition_x; xoff <= repetition_x; xoff++) {
76 for (
i32 yoff = -repetition_y; yoff <= repetition_y; yoff++) {
77 for (
i32 zoff = -repetition_z; zoff <= repetition_z; zoff++) {
78 func(xoff, yoff, zoff);
90#define NODE_EDGES(X_RO, X_RW) \
92 X_RO(shamrock::solvergraph::IDataEdge<std::vector<u64>>, ids_to_check) \
93 X_RO(shamrock::solvergraph::ScalarEdge<shammath::AABB<TgridVec>>, sim_box) \
94 X_RO(shamrock::solvergraph::SerialPatchTreeRefEdge<TgridVec>, patch_tree) \
95 X_RO(shamrock::solvergraph::ScalarsEdge<shammath::AABB<TgridVec>>, patch_boxes) \
98 X_RW(shamrock::solvergraph::DDSharedScalar<GhostLayerCandidateInfos>, ghost_layers_candidates)
100 template<
class Tgr
idVec>
108 EXPAND_NODE_EDGES(NODE_EDGES)
112 inline virtual std::string
_impl_get_label()
const {
return "FindGhostLayerCandidates"; };
Shared distributed data layer for patch data management in solver graphs.
Defines the PatchDataLayerRefs class for managing distributed references to patch data layers.
std::int32_t i32
32 bit integer
#define SHAM_ASSERT(x)
Shorthand for SHAM_ASSERT_NAMED without a message.
virtual std::string _impl_get_label() const
get the label of the node
void _impl_evaluate_internal()
evaluate the node
virtual std::string _impl_get_tex() const
get the tex of the node
Inode is node between data edges, takes multiple inputs, multiple outputs.
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.
namespace for the basegodunov model modules
Axis-Aligned bounding box.
bool is_volume_not_null() const noexcept
Checks if the AABB has a non-zero volume.
T lower
Lower bound of the AABB.
T upper
Upper bound of the AABB.
A structure for 3D paving functions with general boundary conditions (periodic or reflective per dire...