inciter::DiagCG class

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

Public static functions

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

Constructors, destructors, conversion operators

DiagCG(CkMigrateMessage*) explicit
Migrate constructor.

Public functions

auto DiagCG(const CProxy_Discretization& disc, const FaceData& fd) -> DiagCG_SDAG_CODE explicit
Constructor.
void ResumeFromSync() override
Return from migration.
void setup(tk::real v)
Setup: query boundary conditions, output mesh, etc.
void sendinit()
Send own chare-boundary data to neighboring chares.
void advance(tk::real newdt)
Advance equations to next time step.
void lhs()
Compute left-hand side of transport equations.
void comlhs(const std::vector<std::size_t>& gid, const std::vector<std::vector<tk::real>>& L)
Receive contributions to left-hand side matrix on chare-boundaries.
void comrhs(const std::vector<std::size_t>& gid, const std::vector<std::vector<tk::real>>& R)
Receive contributions to right-hand side vector on chare-boundaries.
void comdif(const std::vector<std::size_t>& gid, const std::vector<std::vector<tk::real>>& D)
Receive contributions to RHS mass diffusion on chare-boundaries.
void update(const tk::Fields& a)
Update solution at the end of time step.
void diag()
Signal the runtime system that diagnostics have been computed.
void refine()
Optionally refine/derefine mesh.
void resize(const tk::UnsMesh::Chunk& chunk, const tk::UnsMesh::Coords& coord, const tk::Fields& u, const std::unordered_map<int, std::vector<std::size_t>>& msum, const std::map<int, std::vector<std::size_t>>& bnode)
Receive new mesh from refiner.
void solution(tk::Fields& u) const
void resized()
Resizing data sutrctures after mesh refinement has been completed.
void step()
Evaluate whether to continue with next time step.

Charm++ pack/unpack serializer member functions

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

Function documentation

static void inciter::DiagCG::registerReducers()

Configure Charm++ custom reduction types initiated from this chare array.

Since this is a [nodeinit] routine, the runtime system executes the routine exactly once on every logical node early on in the Charm++ init sequence. Must be static as it is 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.

DiagCG_SDAG_CODE inciter::DiagCG::DiagCG(const CProxy_Discretization& disc, const FaceData& fd) explicit

Constructor.

Parameters
disc in Discretization proxy
fd in Face data structures

void inciter::DiagCG::ResumeFromSync() override

Return from migration.

This is called when load balancing (LB) completes. The presence of this function does not affect whether or not we block on LB.

void inciter::DiagCG::setup(tk::real v)

Setup: query boundary conditions, output mesh, etc.

Parameters
in Total mesh volume

void inciter::DiagCG::advance(tk::real newdt)

Advance equations to next time step.

Parameters
newdt in Size of this new time step

void inciter::DiagCG::comlhs(const std::vector<std::size_t>& gid, const std::vector<std::vector<tk::real>>& L)

Receive contributions to left-hand side matrix on chare-boundaries.

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

This function receives contributions to m_lhs, which stores the diagonal (lumped) mass matrix at mesh nodes. While m_lhs stores own contributions, m_lhsc collects the neighbor chare contributions during communication. This way work on m_lhs and m_lhsc is overlapped. The two are combined in lhsmerge().

void inciter::DiagCG::comrhs(const std::vector<std::size_t>& gid, const std::vector<std::vector<tk::real>>& R)

Receive contributions to right-hand side vector on chare-boundaries.

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

This function receives contributions to m_rhs, which stores the right hand side vector at mesh nodes. While m_rhs stores own contributions, m_rhsc collects the neighbor chare contributions during communication. This way work on m_rhs and m_rhsc is overlapped. The two are combined in solve().

void inciter::DiagCG::comdif(const std::vector<std::size_t>& gid, const std::vector<std::vector<tk::real>>& D)

Receive contributions to RHS mass diffusion on chare-boundaries.

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

This function receives contributions to m_dif, which stores the mass diffusion right hand side vector at mesh nodes. While m_dif stores own contributions, m_difc collects the neighbor chare contributions during communication. This way work on m_dif and m_difc is overlapped. The two are combined in solve().

void inciter::DiagCG::update(const tk::Fields& a)

Update solution at the end of time step.

Parameters
in Limited antidiffusive element contributions

void inciter::DiagCG::resize(const tk::UnsMesh::Chunk& chunk, const tk::UnsMesh::Coords& coord, const tk::Fields& u, const std::unordered_map<int, std::vector<std::size_t>>& msum, const std::map<int, std::vector<std::size_t>>& bnode)

Receive new mesh from refiner.

Parameters
chunk in New mesh chunk (connectivity and global<->local id maps)
coord in New mesh node coordinates
in New solution on new mesh
msum in New node communication map
bnode in Map of boundary-node lists mapped to corresponding side set ids for this mesh chunk

void inciter::DiagCG::solution(tk::Fields& u) const

Parameters
in/out Reference to update with current solution

Const-ref access to current solution

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

Pack/Unpack serialize member function.

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

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

Pack/Unpack serialize operator|.

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