30template<
class Tvec,
template<
class>
class SPHKernel>
42 = tmp.get_field_buf_ref<Tvec>(sched.pdl_old().
get_field_idx<Tvec>(
"xyz"));
44 = tmp.get_field_buf_ref<Tvec>(sched.pdl_old().
get_field_idx<Tvec>(
"vxyz"));
48 std::vector<u32> idx_keep = {};
49 for (
u32 i = 0; i < pos.size(); i++) {
50 if (this->filter(pos[i])) {
51 idx_keep.push_back(i);
55 if (idx_keep.empty()) {
59 idx_keep.size(), shamsys::instance::get_compute_scheduler_ptr());
63 tmp.keep_ids(filter_idx_buf, idx_keep.size());
Header file describing a Node Instance.
std::uint32_t u32
32 bit unsigned integer
A buffer allocated in USM (Unified Shared Memory)
void copy_from_stdvec(const std::vector< T > &vec)
Copy the content of a std::vector into the buffer.
std::vector< T > copy_to_stdvec() const
Copy the content of the buffer to a std::vector.
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...
u32 get_field_idx(const std::string &field_name) const
Get the field id if matching name & type.
PatchDataLayer container class, the layout is described in patchdata_layout.
Class holding the value of numerous constants generated from the following source.
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 math utility
The configuration for a sph solver.