31 using Tscal = shambase::VecComponent<Tvec>;
32 static constexpr u32 dim = shambase::VectorProperties<Tvec>::dimension;
43 context_other.sched->for_each_patchdata_nonempty(
45 data_other.add_obj(patch.
id_patch, pdat.duplicate());
62 using namespace shamrock::patch;
64 auto dev_sched = shamsys::instance::get_compute_scheduler_ptr();
73 remain_to_gen = std::min(remain_to_gen, pdat.
get_obj_cnt());
75 if (remain_to_gen == 0) {
81 indices.fill_lambda([&](
u32 i) {
85 pdat.extract_elements(indices, tmp);
92 std::string
get_name() {
return "GeneratorFromOtherContext"; }
std::uint32_t u32
32 bit unsigned integer
std::uint64_t u64
64 bit unsigned integer
A buffer allocated in USM (Unified Shared Memory).
Represents a collection of objects distributed across patches identified by a u64 id.
utility for generating Cubic crystal lattices
iterator_utils::LatticeIteratorDiscontinuous< Tvec, LatticeCubic > IteratorDiscontinuous
Iterator utility to generate the lattice in a discontinuous order.
bool is_done()
This function return true if the setup is done.
ISPHSetupNode_Dot get_dot_subgraph()
Get a dot subgraph describing the node and its childrens (recursively).
shamrock::patch::PatchDataLayer next_n(u32 nmax)
This function generate patchdata with at most nmax per MPI ranks This function is always assumed as c...
std::string get_name()
Get the name of the node.
This class is an interface that all SPH setup nodes must implement. It describe an operation associat...
PatchDataLayer container class, the layout is described in patchdata_layout.
u32 get_obj_cnt() const
get the number of objects (particles) stored in this layer
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...
namespace for the sph model modules
This file contains the definition for the stacktrace related functionality.
shambase::details::BasicStackEntry StackEntry
Alias for shambase::details::BasicStackEntry.
This struct is used to generate a dot graph of the setup tree.
Patch object that contain generic patch information.
u64 id_patch
unique key that identify the patch