Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
SolverStorage.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
21#include "shambackends/vec.hpp"
40#include <memory>
41
42namespace shammodels::sph {
43
44 template<class T>
45 using Component = shambase::StorageComponent<T>;
46
47 template<class Tvec, class Tmorton>
49 public:
50 using Tscal = shambase::VecComponent<Tvec>;
52
54 using GhostHandleCache = typename GhostHandle::CacheMap;
55
57
58 std::shared_ptr<shamrock::solvergraph::ExchangeGhostLayer> exchange_gz_node;
59 std::shared_ptr<shamrock::solvergraph::ExchangeGhostField<Tscal>> exchange_gz_alpha;
60 std::shared_ptr<shamrock::solvergraph::ExchangeGhostLayer> exchange_gz_positions;
61
63 std::shared_ptr<shamrock::solvergraph::OperationSequence> solver_sequence;
64
65 std::shared_ptr<shamrock::solvergraph::Indexes<u32>> part_counts;
66 std::shared_ptr<shamrock::solvergraph::Indexes<u32>> part_counts_with_ghost;
67
68 std::shared_ptr<shamrock::solvergraph::FieldRefs<Tvec>> positions_with_ghosts;
69 std::shared_ptr<shamrock::solvergraph::FieldRefs<Tscal>> hpart_with_ghosts;
70
71 std::shared_ptr<shammodels::sph::solvergraph::NeighCache> neigh_cache;
72
73 std::shared_ptr<shamrock::solvergraph::RankGetter> patch_rank_owner;
74
75 Component<SerialPatchTree<Tvec>> serial_patch_tree;
76
77 Component<GhostHandle> ghost_handler;
78
79 Component<GhostHandleCache> ghost_patch_cache;
80
82
84
86 rtree_rint_field;
87
88 std::shared_ptr<shamrock::solvergraph::Field<Tscal>> omega;
89
90 std::shared_ptr<shamrock::patch::PatchDataLayerLayout> ghost_layout;
91 std::shared_ptr<shamrock::patch::PatchDataLayerLayout> xyzh_ghost_layout;
92
94 merged_patchdata_ghost;
95
96 std::shared_ptr<shamrock::solvergraph::Field<Tscal>> alpha_av_updated;
98
99 std::shared_ptr<shamrock::solvergraph::Field<Tscal>> pressure;
100 std::shared_ptr<shamrock::solvergraph::Field<Tscal>> soundspeed;
101
104
107
110
112
113 struct Timings {
114 f64 interface = 0;
115 f64 neighbors = 0;
116 f64 io = 0;
117
119 void reset() { *this = {}; }
120 } timings_details;
121 };
122
123} // namespace shammodels::sph
Declare a class to register and retrieve nodes and edges from a unique container.
double f64
Alias for double.
std::uint32_t u32
32 bit unsigned integer
Container for objects shared between two distributed data elements.
Helper class for Storage Module of any solver.
A graph container for managing solver nodes and edges with type-safe access.
A Compressed Leaf Bounding Volume Hierarchy (CLBVH) for neighborhood queries.
namespace for the sph model
This file contains the definition for the stacktrace related functionality.
void reset()
Reset the timings logged in the storage.