inciter::NodeDiagnostics class

NodeDiagnostics class used to compute diagnostics while integrating PDEs.

Public static functions

static void registerReducers()
Configure Charm++ custom reduction types initiated from this class.

Public functions

auto compute(Discretization& d, const tk::Fields& u, const tk::Fields& un, const std::unordered_map<int, std::unordered_map<std::size_t, std::array<tk::real, 4>>>& bnorm, const std::unordered_set<std::size_t>& symbcnodes, const std::unordered_set<std::size_t>& farfieldbcnodes) const -> bool
Compute diagnostics, e.g., residuals, norms of errors, etc.

Charm++ pack/unpack serializer member functions

void pup(PUP::er&)
Pack/Unpack serialize member function.
void operator|(PUP::er& p, NodeDiagnostics& d)
Pack/Unpack serialize operator|.

Function documentation

static void inciter::NodeDiagnostics::registerReducers()

Configure Charm++ custom reduction types initiated from this class.

This routine is supposed to be called from a Charm++ initnode routine. Since the runtime system executes initnode routines exactly once on every logical node early on in the Charm++ init sequence, they must be static as they are called without an object. See also: Section "Initializations at Program Startup" at in the Charm++ manual http://charm.cs.illinois.edu/manuals/html/charm++/manual.html.

bool inciter::NodeDiagnostics::compute(Discretization& d, const tk::Fields& u, const tk::Fields& un, const std::unordered_map<int, std::unordered_map<std::size_t, std::array<tk::real, 4>>>& bnorm, const std::unordered_set<std::size_t>& symbcnodes, const std::unordered_set<std::size_t>& farfieldbcnodes) const

Compute diagnostics, e.g., residuals, norms of errors, etc.

Parameters
in Discretization proxy to read from
in Current solution vector
un in Previous solution vector
bnorm in Face normals in boundary points, key local node id, first 3 reals of value: unit normal, outer key: side set id
symbcnodes in Unique set of node ids at which to set symmetry BCs
farfieldbcnodes in Unique set of node ids at which to set farfield BCs
Returns True if diagnostics have been computed

Diagnostics are defined as some norm, e.g., L2 norm, of a quantity, computed in mesh nodes, A, as ||A||_2 = sqrt[ sum_i(A_i)^2 V_i ], where the sum is taken over all mesh nodes and V_i is the nodal volume. We send multiple sets of quantities to the host for aggregation across the whole mesh. The final aggregated solution will end up in Transporter::diagnostics(). Aggregation of the partially computed diagnostics is done via potentially different policies for each field.

void inciter::NodeDiagnostics::operator|(PUP::er& p, NodeDiagnostics& d)

Pack/Unpack serialize operator|.

Parameters
in/out Charm++'s PUP::er serializer object reference
in/out Diagnostics object reference