inciter::DG class

DG Charm++ chare array used to advance PDEs in time with DG+RK.

Public static functions

static void registerReducers()
Configure Charm++ reduction types for concatenating BC nodelists.

Constructors, destructors, conversion operators

DG(CkMigrateMessage*) explicit
Migrate constructor.

Public functions

auto DG(const CProxy_Discretization& disc, const std::map<int, std::vector<std::size_t>>& bface, const std::map<int, std::vector<std::size_t>>&, const std::vector<std::size_t>& triinpoel) -> DG_SDAG_CODE explicit
Constructor.
void ResumeFromSync() override
Return from migration.
void comfac(int fromch, const tk::UnsMesh::FaceSet& infaces)
Receive unique set of faces we potentially share with/from another chare.
void comGhost(int fromch, const GhostData& ghost)
Receive ghost data on chare boundaries from fellow chare.
void reqGhost()
Receive requests for ghost data.
void sendGhost()
Send all of our ghost data to fellow chares.
void setup(tk::real v)
Setup: query boundary conditions, output mesh, etc.
void limitIC()
Limit initial solution and prepare for time stepping.
void start()
Start time stepping.
void sendinit()
Send own chare-boundary data to neighboring chares.
void cominit(int fromch, const std::vector<std::size_t>& tetid, const std::vector<std::vector<tk::real>>& u)
Receive chare-boundary ghost data from neighboring chares.
void comlim(int fromch, const std::vector<std::size_t>& tetid, const std::vector<std::vector<tk::real>>& lfn)
Receive chare-boundary limiter function data from neighboring chares.
void comsol(int fromch, const std::vector<std::size_t>& tetid, const std::vector<std::vector<tk::real>>& u)
Receive chare-boundary ghost data from neighboring chares.
void advance(tk::real)
Advance equations to next time step.
void diag()
Signal the runtime system that diagnostics have been computed.
void refine()
Optionally refine/derefine mesh.
void resizeAfterRefined(const std::vector<std::size_t>& ginpoel, const tk::UnsMesh::Chunk& chunk, const tk::UnsMesh::Coords& coord, const std::unordered_map<std::size_t, tk::UnsMesh::Edge>& addedNodes, const std::unordered_map<std::size_t, std::size_t>& addedTets, const std::unordered_map<int, std::vector<std::size_t>>& msum, const std::map<int, std::vector<std::size_t>>& bface, const std::map<int, std::vector<std::size_t>>& bnode, const std::vector<std::size_t>& triinpoel)
Receive new mesh from refiner.
void lhs()
Compute left hand side.
void lim()
Compute limiter function.
void solution(tk::Fields& u) const
void resized()
Resizing data sutrctures after mesh refinement has been completed.
void solve(tk::real newdt)
Compute right hand side and solve system.
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, DG& i)
Pack/Unpack serialize operator|.

Function documentation

static void inciter::DG::registerReducers()

Configure Charm++ reduction types for concatenating BC nodelists.

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.

DG_SDAG_CODE inciter::DG::DG(const CProxy_Discretization& disc, const std::map<int, std::vector<std::size_t>>& bface, const std::map<int, std::vector<std::size_t>>&, const std::vector<std::size_t>& triinpoel) explicit

Constructor.

Parameters
disc in Discretization proxy
bface in Boundary-faces mapped to side set ids
triinpoel in Boundary-face connectivity

void inciter::DG::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::DG::comfac(int fromch, const tk::UnsMesh::FaceSet& infaces)

Receive unique set of faces we potentially share with/from another chare.

Parameters
fromch in Sender chare id
infaces in Unique set of faces we potentially share with fromch

void inciter::DG::comGhost(int fromch, const GhostData& ghost)

Receive ghost data on chare boundaries from fellow chare.

Parameters
fromch in Caller chare ID
ghost in Ghost data, see Inciter/FaceData.h for the type

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

Setup: query boundary conditions, output mesh, etc.

Parameters
in Total mesh volume

void inciter::DG::limitIC()

Limit initial solution and prepare for time stepping.

This function applies limiter to initial solution and then proceeds to communicate this limited solution and begin time stepping

void inciter::DG::cominit(int fromch, const std::vector<std::size_t>& tetid, const std::vector<std::vector<tk::real>>& u)

Receive chare-boundary ghost data from neighboring chares.

Parameters
fromch in Sender chare id
tetid in Ghost tet ids we receive solution data for
in Solution ghost data

This function receives contributions to m_u from fellow chares.

void inciter::DG::comlim(int fromch, const std::vector<std::size_t>& tetid, const std::vector<std::vector<tk::real>>& lfn)

Receive chare-boundary limiter function data from neighboring chares.

Parameters
fromch in Sender chare id
tetid in Ghost tet ids we receive solution data for
lfn in Limiter function ghost data

This function receives contributions to m_limFunc from fellow

void inciter::DG::comsol(int fromch, const std::vector<std::size_t>& tetid, const std::vector<std::vector<tk::real>>& u)

Receive chare-boundary ghost data from neighboring chares.

Parameters
fromch in Sender chare id
tetid in Ghost tet ids we receive solution data for
in Solution ghost data

This function receives contributions to m_u from fellow chares.

void inciter::DG::resizeAfterRefined(const std::vector<std::size_t>& ginpoel, const tk::UnsMesh::Chunk& chunk, const tk::UnsMesh::Coords& coord, const std::unordered_map<std::size_t, tk::UnsMesh::Edge>& addedNodes, const std::unordered_map<std::size_t, std::size_t>& addedTets, const std::unordered_map<int, std::vector<std::size_t>>& msum, const std::map<int, std::vector<std::size_t>>& bface, const std::map<int, std::vector<std::size_t>>& bnode, const std::vector<std::size_t>& triinpoel)

Receive new mesh from refiner.

Parameters
ginpoel in Mesh connectivity with global node ids
chunk in New mesh chunk (connectivity and global<->local id maps)
coord in New mesh node coordinates
addedNodes in Newly added mesh nodes and their parents (local ids)
addedTets in Newly added mesh cells and their parents (local ids)
msum in New node communication map
bface in Boundary-faces mapped to side set ids
bnode in Boundary-node lists mapped to side set ids
triinpoel in Boundary-face connectivity

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

Parameters
in/out Reference to update with current solution

Const-ref access to current solution

void inciter::DG::solve(tk::real newdt)

Compute right hand side and solve system.

Parameters
newdt in Size of this new time step

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

Pack/Unpack serialize member function.

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

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

Pack/Unpack serialize operator|.

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