27 auto edges = get_edges();
29 edges.spans_a_field.check_sizes(edges.sizes.indexes);
30 edges.spans_a_ext.check_sizes(edges.sizes.indexes);
33 = edges.sizes.indexes.template map<u32>([&](
u64 id,
u32 block_count) {
34 return block_count * block_size;
38 shamsys::instance::get_compute_scheduler_ptr(),
42 [](
u32 i,
const Tvec *__restrict a_field, Tvec *__restrict a_ext) {
43 a_ext[i] += a_field[i];
52 std::string tex = R
"tex(
53 Add an acceleration field to the external forces acceleration
56 {a_ext}_i &= {a_ext}_i + {a_field}_i
Node adding a per cell acceleration field to the external forces acceleration.
Header file describing a Node Instance.
std::uint32_t u32
32 bit unsigned integer
std::uint64_t u64
64 bit unsigned integer
Represents a collection of objects distributed across patches identified by a u64 id.
Add a per cell acceleration field (e.g. the self-gravity acceleration) to the external forces acceler...
virtual std::string _impl_get_tex() const
get the tex of the node
void _impl_evaluate_internal()
evaluate the node
IEdge & get_rw_edge_base(int slot)
Get a reference to a read write edge and cast it to the type IEdge.
const IEdge & get_ro_edge_base(int slot)
Get a reference to a read only edge.
void distributed_data_kernel_call(sham::DeviceScheduler_ptr dev_sched, RefIn in, RefOut in_out, const shambase::DistributedData< index_t > &thread_counts, Functor &&func)
A variant of sham::kernel_call for distributed data.
void replace_all(std::string &inout, std::string_view what, std::string_view with)
replace all occurence of a search string with another
namespace for the basegodunov model modules
A variant of sham::MultiRef for distributed data.