inciter::DG class

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

Public types

enum class IMEXRKScheme { CB3a, CB3d }
Available IMEX Runge-Kutta schemes.

Public static functions

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

Constructors, destructors, conversion operators

DG(CkMigrateMessage* msg) explicit
Migrate constructor.

Public functions

auto DG(const CProxy_Discretization& disc, const CProxy_Ghosts& ghostsproxy, 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) -> DG_SDAG_CODE explicit
Constructor.
void ResumeFromSync() override
Return from migration.
void resizeSolVectors()
Resize solution vectors after extension due to Ghosts and continue setup.
void setup()
Setup: query boundary conditions, output mesh, etc.
void box(tk::real v, const std::vector<tk::real>& blkvols)
Receive total box IC volume and set conditions in box.
void evalLB(int nrestart)
void start()
Start time stepping.
void next()
Continue to next time step.
void comrefine(int fromch, const std::vector<std::size_t>& tetid, const std::vector<std::size_t>& ndof)
Receive chare-boundary updated solution from neighboring chares.
void comsmooth(int fromch, const std::vector<std::size_t>& tetid, const std::vector<std::size_t>& ndof)
void comlim(int fromch, const std::vector<std::size_t>& tetid, const std::vector<std::vector<tk::real>>& u, const std::vector<std::vector<tk::real>>& prim)
Receive chare-boundary limiter function data from neighboring chares.
void comreco(int fromch, const std::vector<std::size_t>& tetid, const std::vector<std::vector<tk::real>>& u, const std::vector<std::vector<tk::real>>& prim)
Receive chare-boundary reconstructed data from neighboring chares.
void comsol(int fromch, std::size_t fromstage, const std::vector<std::size_t>& tetid, const std::vector<std::vector<tk::real>>& u, const std::vector<std::vector<tk::real>>& prim, const std::vector<std::size_t>& interface, const std::vector<std::size_t>& ndof)
Receive chare-boundary ghost data from neighboring chares.
void comale(int fromch, const std::vector<std::size_t>& tetid, const std::vector<std::vector<tk::real>>& geoElem, const std::vector<std::array<tk::real, 3>>& coord)
Receive updated ALE ghost mesh data from neighboring chares.
void comnorm(const std::unordered_map<int, std::unordered_map<std::size_t, std::array<tk::real, 4>>>& innorm)
Receive boundary point normals on chare-boundaries.
void comnodeout(const std::vector<std::size_t>& gid, const std::vector<std::size_t>& nesup, const std::vector<std::vector<tk::real>>& Lu, const std::vector<std::vector<tk::real>>& Lp)
Receive nodal solution (ofor field output) contributions from neighboring chares.
void refine(const std::vector<tk::real>& l2res)
Optionally refine/derefine mesh.
void resizePostAMR(const std::vector<std::size_t>&, const tk::UnsMesh::Chunk& chunk, const tk::UnsMesh::Coords& coord, const std::unordered_map<std::size_t, tk::UnsMesh::Edge>&, const std::unordered_map<std::size_t, std::size_t>& addedTets, const std::set<std::size_t>& removedNodes, const std::unordered_map<std::size_t, std::size_t>& amrNodeMap, const tk::NodeCommMap& nodeCommMap, 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, const std::unordered_map<std::size_t, std::set<std::size_t>>& elemblockid)
Receive new mesh from Refiner.
void extractFieldOutput(const std::vector<std::size_t>&, const tk::UnsMesh::Chunk& chunk, const tk::UnsMesh::Coords& coord, const std::unordered_map<std::size_t, tk::UnsMesh::Edge>&, const std::unordered_map<std::size_t, std::size_t>& addedTets, const tk::NodeCommMap& nodeCommMap, 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, CkCallback c)
Extract field output going to file.
auto solution() const -> const tk::Fields&
void lhs()
Compute left hand side - no-op for DG.
void resized()
Unused in DG.
void transferSol()
(no-op)
void advance(tk::real, std::array<tk::real, 6>)
(no-op)
void aleMove(tk::real newdt)
Set the new time step size and perform the ALE mesh update.
void initializeLinearSystem()
Initialize the linear solver via the interface BiCG::init()
void solveLinearSystem()
Solve the linear system via the interface BiCG::solve()
void solve()
Compute right hand side and solve system.
void step()
Evaluate whether to continue with next time step.
void computeBNorm()
Start computing the boundary normals for ALE.
void meshveldone()
Done with computing the mesh mesh velocity for ALE.

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 [initnode] 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 CProxy_Ghosts& ghostsproxy, 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) explicit

Constructor.

Parameters
disc in Discretization proxy
ghostsproxy
bface in Boundary-faces mapped to side set ids
bnode
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::box(tk::real v, const std::vector<tk::real>& blkvols)

Receive total box IC volume and set conditions in box.

Parameters
v in Total volume within user-specified box
blkvols

void inciter::DG::evalLB(int nrestart)

Parameters
nrestart in Number of times restarted

void inciter::DG::comrefine(int fromch, const std::vector<std::size_t>& tetid, const std::vector<std::size_t>& ndof)

Receive chare-boundary updated solution from neighboring chares.

Parameters
fromch in Sender chare id
tetid in Ghost tet ids we receive solution data for
ndof in Number of degrees of freedom for chare-boundary elements

This function receives contributions to the refined ndof data from fellow chares.

void inciter::DG::comsmooth(int fromch, const std::vector<std::size_t>& tetid, const std::vector<std::size_t>& ndof)

Parameters
fromch in Sender chare id
tetid in Ghost tet ids we receive solution data for
ndof in Number of degrees of freedom for chare-boundary elements

This function receives contributions to the smoothed ndof data from fellow chares.

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

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
u in Limited high-order solution
prim in Limited high-order primitive quantities

This function receives contributions to the limited solution from fellow chares.

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

Receive chare-boundary reconstructed data from neighboring chares.

Parameters
fromch in Sender chare id
tetid in Ghost tet ids we receive solution data for
u in Reconstructed high-order solution
prim in Limited high-order primitive quantities

This function receives contributions to the reconstructed solution from fellow chares.

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

Receive chare-boundary ghost data from neighboring chares.

Parameters
fromch in Sender chare id
fromstage in Sender chare time step stage
tetid in Ghost tet ids we receive solution data for
u in Solution ghost data
prim in Primitive variables in ghost cells
interface in Interface marker in ghost cells
ndof in Number of degrees of freedom for chare-boundary elements

This function receives contributions to the unlimited solution from fellow chares.

void inciter::DG::comale(int fromch, const std::vector<std::size_t>& tetid, const std::vector<std::vector<tk::real>>& geoElem, const std::vector<std::array<tk::real, 3>>& coord)

Receive updated ALE ghost mesh data from neighboring chares.

Parameters
fromch in Sender chare id
tetid in Ghost tet ids we receive ALE mesh data for
geoElem in Updated ghost-element geometry
coord in Updated off-face coordinates for face ghosts

void inciter::DG::comnorm(const std::unordered_map<int, std::unordered_map<std::size_t, std::array<tk::real, 4>>>& innorm)

Receive boundary point normals on chare-boundaries.

Parameters
innorm in Incoming partial sums of boundary point normal contributions to normals (first 3 components), inverse distance squared (4th component), associated to side set ids

void inciter::DG::comnodeout(const std::vector<std::size_t>& gid, const std::vector<std::size_t>& nesup, const std::vector<std::vector<tk::real>>& Lu, const std::vector<std::vector<tk::real>>& Lp)

Receive nodal solution (ofor field output) contributions from neighboring chares.

Parameters
gid in Global mesh node IDs at which we receive contributions
nesup in Number of elements surrounding points
Lu in Partial contributions of solution nodal fields to chare-boundary nodes
Lp in Partial contributions of primitive quantity nodal fields to chare-boundary nodes

void inciter::DG::refine(const std::vector<tk::real>& l2res)

Optionally refine/derefine mesh.

Parameters
l2res in L2-norms of the residual for each scalar component computed across the whole problem

void inciter::DG::resizePostAMR(const std::vector<std::size_t>&, const tk::UnsMesh::Chunk& chunk, const tk::UnsMesh::Coords& coord, const std::unordered_map<std::size_t, tk::UnsMesh::Edge>&, const std::unordered_map<std::size_t, std::size_t>& addedTets, const std::set<std::size_t>& removedNodes, const std::unordered_map<std::size_t, std::size_t>& amrNodeMap, const tk::NodeCommMap& nodeCommMap, 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, const std::unordered_map<std::size_t, std::set<std::size_t>>& elemblockid)

Receive new mesh from Refiner.

Parameters
chunk in New mesh chunk (connectivity and global<->local id maps)
coord in New mesh node coordinates
addedTets in Newly added mesh cells and their parents (local ids)
removedNodes in Newly removed mesh node local ids
amrNodeMap in Node id map after amr (local ids)
nodeCommMap in New node communication map
bface in Boundary-faces mapped to side set ids
bnode
triinpoel in Boundary-face connectivity
elemblockid in Local tet ids associated with mesh block ids

void inciter::DG::extractFieldOutput(const std::vector<std::size_t>&, const tk::UnsMesh::Chunk& chunk, const tk::UnsMesh::Coords& coord, const std::unordered_map<std::size_t, tk::UnsMesh::Edge>&, const std::unordered_map<std::size_t, std::size_t>& addedTets, const tk::NodeCommMap& nodeCommMap, 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, CkCallback c)

Extract field output going to file.

Parameters
chunk in Field-output mesh chunk (connectivity and global<->local id maps)
coord in Field-output mesh node coordinates
addedTets in Field-output mesh cells and their parents (local ids)
nodeCommMap in Field-output mesh node communication map
bface in Field-output meshndary-faces mapped to side set ids
triinpoel in Field-output mesh boundary-face connectivity
c in Function to continue with after the write

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

Returns Const-ref to current solution

Const-ref access to current solution

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

Set the new time step size and perform the ALE mesh update.

Parameters
newdt in Size of this new time step

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

Pack/Unpack serialize member function.

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

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

Pack/Unpack serialize operator|.

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