29 auto edges = get_edges();
31 edges.spans_a_ext.check_sizes(edges.sizes.indexes);
34 = edges.sizes.indexes.template map<u32>([&](
u64 id,
u32 block_count) {
35 return block_count * block_size;
39 shamsys::instance::get_compute_scheduler_ptr(),
43 [g = g](
u32 i, Tvec *__restrict a_ext) {
52 std::string tex = R
"tex(
53 Add constant gravity to the external forces acceleration
56 {a_ext}_i &= {a_ext}_i + \mathbf{g}
Node adding a constant gravitational acceleration 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 constant gravitational acceleration g to the external forces acceleration.
void _impl_evaluate_internal()
evaluate the node
virtual std::string _impl_get_tex() const
get the tex of the node
IEdge & get_rw_edge_base(int slot)
Get a reference to a read write edge and cast it to the type IEdge.
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.