28 auto edges = get_edges();
30 edges.spans_field.check_sizes(edges.sizes.indexes);
34 loc_val += field_ref.compute_sum();
37 T global_sum = shamalgs::collective::allreduce_sum(loc_val);
39 edges.mean_val.value = (global_sum / edges.total_volume.value);
52 std::string tex = R
"tex(
56 {mean} &=\sum_{i\in \Omega} {field}_i / {total_volume} \\
57 \Omega = [0,{block_count} * N_{\rm cell/block}) \\
58 N_{\rm cell/block} & = {block_size}
Header file describing a Node Instance.
std::uint32_t u32
32 bit unsigned integer
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.
const IEdge & get_ro_edge_base(int slot)
Get a reference to a read only edge.
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
From original version by Thomas Guillet (T.A.Guillet@exeter.ac.uk).