32 auto edges = get_edges();
34 edges.spans_rho.check_sizes(edges.sizes_with_ghost.indexes);
35 edges.spans_dt_rho.check_sizes(edges.sizes.indexes);
36 edges.rho_next.ensure_sizes(edges.sizes_with_ghost.indexes);
38 Tscal dt = edges.dt.value;
40 auto &q = shamsys::instance::get_compute_scheduler().get_queue();
42 edges.sizes_with_ghost.indexes.for_each([&](
u64 id,
u32 block_count_with_ghost) {
43 auto &rho_span = edges.spans_rho.get_spans().get(
id);
44 auto &dt_rho_span = edges.spans_dt_rho.get_spans().get(
id);
45 auto &rho_next_span = edges.rho_next.get_spans().get(
id);
47 u32 cell_count = edges.sizes.indexes.get(
id) * block_size;
48 u32 cell_count_with_ghost = block_count_with_ghost * block_size;
54 cell_count_with_ghost,
57 const Tscal *__restrict rho,
58 const Tscal *__restrict dt_rho,
59 Tscal *__restrict rho_next) {
60 rho_next[i] = (i < cell_count) ? rho[i] + dt * dt_rho[i] : rho[i];
72 std::string tex = R
"tex(
73 Density at the end of the time step
76 {rho_next}_i &= {rho}_i + {dt} {dt_rho}_i
Node computing the gas density at the end of the time step.
Header file describing a Node Instance.
std::uint32_t u32
32 bit unsigned integer
std::uint64_t u64
64 bit unsigned integer
Compute the gas density at , , without modifying .
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 kernel_call(sham::DeviceQueue &q, RefIn in, RefOut in_out, u32 n, Functor &&func, SourceLocation &&callsite=SourceLocation{})
Submit a kernel to a SYCL queue.
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
This file contains the definition for the stacktrace related functionality.
shambase::details::BasicStackEntry StackEntry
Alias for shambase::details::BasicStackEntry.
A class that references multiple buffers or similar objects.