inciter::DistFCT class

DistFCT Charm++ chare array used to advance PDEs in time with DiagCG+LW+FCT.

Constructors, destructors, conversion operators

DistFCT(CkMigrateMessage*) explicit
Migrate constructor.

Public functions

auto DistFCT(int nchare, std::size_t nu, std::size_t np, const std::unordered_map<int, std::vector<std::size_t>>& msum, const std::unordered_map<std::size_t, std::size_t>& bid, const std::unordered_map<std::size_t, std::size_t>& lid, const std::vector<std::size_t>& inpoel) -> DistFCT_SDAG_CODE explicit
Constructor.
auto lump(const Discretization& d) -> tk::Fields
Compute lumped mass lhs required for the low order solution.
auto diff(const Discretization& d, const tk::Fields& Un) -> tk::Fields
Compute mass diffusion rhs contribution required for the low order solution.
void next()
Prepare for next time step stage.
void comaec(const std::vector<std::size_t>& gid, const std::vector<std::vector<tk::real>>& P)
Receive sums of antidiffusive element contributions on chare-boundaries.
void comalw(const std::vector<std::size_t>& gid, const std::vector<std::vector<tk::real>>& Q)
Receive contributions to the maxima and minima of unknowns of all elements surrounding mesh nodes on chare-boundaries.
void comlim(const std::vector<std::size_t>& gid, const std::vector<std::vector<tk::real>>& A)
Receive contributions of limited antidiffusive element contributions on chare-boundaries.
void aec(const Discretization& d, const tk::Fields& dUh, const tk::Fields& Un, const std::unordered_map<std::size_t, std::vector<std::pair<bool, tk::real>>>& bc)
Compute and sum antidiffusive element contributions (AEC) to mesh nodes.
void alw(const tk::Fields& Un, const tk::Fields& Ul, tk::Fields&& dUl, const CProxy_DiagCG& host)
Compute the maximum and minimum unknowns of all elements surrounding nodes.
void resize(std::size_t nu, const std::unordered_map<int, std::vector<std::size_t>>& msum, const std::unordered_map<std::size_t, std::size_t>& bid, const std::unordered_map<std::size_t, std::size_t>& lid, const std::vector<std::size_t>& inpoel)
Resize FCT data structures (e.g., after mesh refinement)

Pack/unpack (Charm++ serialization) routines

void pup(PUP::er& p) override
Pack/Unpack serialize member function.
void operator|(PUP::er& p, DistFCT& i)
Pack/Unpack serialize operator|.

Function documentation

DistFCT_SDAG_CODE inciter::DistFCT::DistFCT(int nchare, std::size_t nu, std::size_t np, const std::unordered_map<int, std::vector<std::size_t>>& msum, const std::unordered_map<std::size_t, std::size_t>& bid, const std::unordered_map<std::size_t, std::size_t>& lid, const std::vector<std::size_t>& inpoel) explicit

Constructor.

Parameters
nchare in Total number of worker chares
nu in Number of unknowns in solution vector
np in Total number of properties, i.e., scalar variables or components, per unknown in solution vector
msum in Global mesh node IDs associated to chare IDs bordering the mesh chunk we operate on
bid in Local chare-boundary mesh node IDs at which we receive contributions associated to global mesh node IDs of mesh elements we contribute to
lid in Local mesh node ids associated to the global ones of owned elements
inpoel in Mesh connectivity of our chunk of the mesh

tk::Fields inciter::DistFCT::lump(const Discretization& d)

Compute lumped mass lhs required for the low order solution.

Parameters
in Discretization proxy to read mesh data from
Returns Lumped mass matrix

tk::Fields inciter::DistFCT::diff(const Discretization& d, const tk::Fields& Un)

Compute mass diffusion rhs contribution required for the low order solution.

Parameters
in Discretization proxy to read mesh data from
Un in Solution at the previous time step
Returns Lumped mass matrix

void inciter::DistFCT::comaec(const std::vector<std::size_t>& gid, const std::vector<std::vector<tk::real>>& P)

Receive sums of antidiffusive element contributions on chare-boundaries.

Parameters
gid in Global mesh node IDs at which we receive AEC contributions
in Partial sums of positive (negative) antidiffusive element contributions to chare-boundary nodes

This function receives contributions to m_p, which stores the sum of all positive (negative) antidiffusive element contributions to nodes (Lohner: P^{+,-}_i), see also FluxCorrector::aec(). While m_p stores own contributions, m_pc collects the neighbor chare contributions during communication. This way work on m_p and m_pc is overlapped. The two are combined in lim().

void inciter::DistFCT::comalw(const std::vector<std::size_t>& gid, const std::vector<std::vector<tk::real>>& Q)

Receive contributions to the maxima and minima of unknowns of all elements surrounding mesh nodes on chare-boundaries.

Parameters
gid in Global mesh node IDs at which we receive contributions
in Partial contributions to maximum and minimum unknowns of all elements surrounding nodes to chare-boundary nodes

This function receives contributions to m_q, which stores the maximum and mimimum unknowns of all elements surrounding each node (Lohner: u^{max,min}_i), see also FluxCorrector::alw(). While m_q stores own contributions, m_qc collects the neighbor chare contributions during communication. This way work on m_q and m_qc is overlapped. The two are combined in lim().

void inciter::DistFCT::comlim(const std::vector<std::size_t>& gid, const std::vector<std::vector<tk::real>>& A)

Receive contributions of limited antidiffusive element contributions on chare-boundaries.

Parameters
gid in Global mesh node IDs at which we receive contributions
in Partial contributions to antidiffusive element contributions to chare-boundary nodes

This function receives contributions to m_a, which stores the limited antidiffusive element contributions assembled to nodes (Lohner: AEC^c), see also FluxCorrector::limit(). While m_a stores own contributions, m_ac collects the neighbor chare contributions during communication. This way work on m_a and m_ac is overlapped. The two are combined in apply().

void inciter::DistFCT::aec(const Discretization& d, const tk::Fields& dUh, const tk::Fields& Un, const std::unordered_map<std::size_t, std::vector<std::pair<bool, tk::real>>>& bc)

Compute and sum antidiffusive element contributions (AEC) to mesh nodes.

Parameters
in Discretization proxy to read mesh data from
dUh in Increment of the high order solution
Un in Solution at the previous time step
bc in Vector of pairs of bool and boundary condition value associated to mesh node IDs at which to set Dirichlet boundary conditions. Note that this BC data structure must include boundary conditions set across all PEs, not just the ones need to be set on this PE.

This function computes and starts communicating m_p, which stores the sum of all positive (negative) antidiffusive element contributions to nodes (Lohner: P^{+,-}_i), see also FluxCorrector::aec().

void inciter::DistFCT::alw(const tk::Fields& Un, const tk::Fields& Ul, tk::Fields&& dUl, const CProxy_DiagCG& host)

Compute the maximum and minimum unknowns of all elements surrounding nodes.

Parameters
Un in Solution at the previous time step
Ul in Low order solution
dUl in Low order solution increment
host in DiagCG Charm++ proxy we interoperate with

This function computes and starts communicating m_q, which stores the maximum and mimimum unknowns of all elements surrounding each node (Lohner: u^{max,min}_i), see also FluxCorrector::alw().

void inciter::DistFCT::resize(std::size_t nu, const std::unordered_map<int, std::vector<std::size_t>>& msum, const std::unordered_map<std::size_t, std::size_t>& bid, const std::unordered_map<std::size_t, std::size_t>& lid, const std::vector<std::size_t>& inpoel)

Resize FCT data structures (e.g., after mesh refinement)

Parameters
nu in New number of unknowns in solution vector
msum in New global mesh node IDs associated to chare IDs bordering the mesh chunk we operate on
bid in New local chare-boundary mesh node IDs at which we receive contributions associated to global mesh node IDs of mesh elements we contribute to
lid in New local mesh node ids associated to the global ones of owned elements
inpoel in Mesh connectivity of our chunk of the mesh

void inciter::DistFCT::pup(PUP::er& p) override

Pack/Unpack serialize member function.

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

void inciter::DistFCT::operator|(PUP::er& p, DistFCT& i)

Pack/Unpack serialize operator|.

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