class
#include <src/Inciter/RieCG.hpp>
RieCG RieCG Charm++ chare array used to advance PDEs in time with RieCG.
Public static functions
- static void registerReducers()
- Configure Charm++ custom reduction types initiated from this chare array.
Constructors, destructors, conversion operators
- RieCG(CkMigrateMessage* m) explicit
- Migrate constructor.
Public functions
- auto RieCG(const CProxy_Discretization& disc, 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) -> RieCG_SDAG_CODE explicit
- Constructor.
- void ResumeFromSync() override
- Return from migration.
-
void setup(tk::
real v) - Start setup for solution.
-
void advance(tk::
real newdt) - Advance equations to next time step.
- void feop()
- Start (re-)computing domain and boundary integrals.
-
void comnorm(const std::unordered_map<int, std::unordered_map<std::size_t, std::array<tk::
real, 4>>>& inbnd) - Receive contributions to boundary point normals on chare-boundaries.
-
void comgrad(const std::unordered_map<std::size_t, std::vector<tk::
real>>& ingrad) - Receive contributions to node gradients on chare-boundaries.
-
void comrhs(const std::unordered_map<std::size_t, std::vector<tk::
real>>& inrhs) - Receive contributions to right-hand side vector on chare-boundaries.
-
void evalres(const std::vector<tk::
real>& l2res) - Evaluate residuals.
-
void resizePostAMR(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::set<std::size_t>& removedNodes, const std::unordered_map<int, std::unordered_set<std::size_t>>& 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) - Receive new mesh from Refiner.
- auto solution() const -> const tk::Fields&
- void integrals()
- Compute integral quantities for output.
- void step()
- Evaluate whether to continue with next time step.
- void evalLB(int nrestart)
- void stage()
- Evaluate whether to continue with next time step stage.
Charm++ pack/unpack serializer member functions
- CProxy_Discretization m_disc
- Discretization proxy.
- std::size_t m_nrhs
- Counter for right-hand side vector nodes updated.
- std::size_t m_nnorm
- Counter for receiving boundary point normals.
- std::size_t m_nbpint
- Counter for receiving boundary point integrals.
- std::size_t m_nbeint
- Counter for receiving boundary edge integrals.
- std::size_t m_ndeint
- Counter for receiving domain edge integrals.
- std::size_t m_ngrad
- Counter for receiving gradients.
- std::map<int, std::vector<std::size_t>> m_bnode
- Boundary node lists mapped to side set ids used in the input file.
- std::map<int, std::vector<std::size_t>> m_bface
- Boundary face lists mapped to side set ids used in the input file.
- std::vector<std::size_t> m_triinpoel
- Boundary triangle face connecitivity where BCs are set by user.
- std::vector<std::size_t> m_bpoinid
- Streamable boundary point local ids.
-
std::vector<tk::
real> m_bpoinin - Streamable boundary point integrals.
- tk::Fields m_u
- Unknown/solution vector at mesh nodes.
- tk::Fields m_un
- Unknown/solution vector at mesh nodes at previous time.
- tk::Fields m_rhs
- Right-hand side vector (for the high order system)
-
std::unordered_map<std::size_t, std::vector<tk::
real>> m_rhsc - NodeDiagnostics m_diag
- Diagnostics object.
-
std::unordered_map<int, std::unordered_map<std::size_t, std::array<tk::
real, 4>>> m_bnorm -
decltype(m_
bnorm) m_bnormc -
std::unordered_map<std::size_t, std::array<tk::
real, 3>> m_bndpoinint -
std::unordered_map<tk::
UnsMesh:: Edge, std::array<tk:: real, 3>, tk:: UnsMesh:: Hash<2>, tk:: UnsMesh:: Eq<2>> m_domedgeint - Domain edge integrals.
- std::array<std::vector<std::size_t>, 3> m_dsupedge
- Superedge (tet, face, edge) end points with local ids for domain edges.
-
std::array<std::vector<tk::
real>, 3> m_dsupint - Superedge (tet, face, edge) domain edge integrals.
- std::vector<std::uint8_t> m_besym
- Streamable boundary element symmetry BC flags.
- tk::Fields m_grad
- Gradients in mesh nodes.
-
std::unordered_map<std::size_t, std::vector<tk::
real>> m_gradc - Gradients receive buffer.
- std::vector<std::size_t> m_dirbcmasks
- Nodes and their Dirichlet BC masks.
- std::vector<std::size_t> m_prebcnodes
- Nodes at pressure BCs.
-
std::vector<tk::
real> m_prebcvals - Density and pressure values at pressure BCs.
- std::set<std::size_t> m_symbcnodeset
- Unique set of ordered nodes at which symmetry BCs are set.
- std::vector<std::size_t> m_symbcnodes
- Streamable nodes at which symmetry BCs are set.
-
std::vector<tk::
real> m_symbcnorms - Streamable normals at nodes at which symmetry BCs are set.
- std::set<std::size_t> m_farbcnodeset
- Unique set of ordered nodes at which farfield BCs are set.
- std::vector<std::size_t> m_farbcnodes
- Streamable nodes at which farfield BCs are set.
-
std::vector<tk::
real> m_farbcnorms - Streamable normals at nodes at which farfield BCs are set.
-
std::map<int, std::pair<std::vector<std::size_t>, std::vector<tk::
real>>> m_surfint - Streamable surface integral nodes and normals * dA on surfaces.
- std::size_t m_stage
- Runge-Kutta stage counter.
-
std::vector<tk::
real> m_dtp - Time step size for each mesh node.
-
std::vector<tk::
real> m_tp - Physical time for each mesh node.
- int m_finished
- True in the last time step.
- void pup(PUP::er& p) override
- Pack/Unpack serialize member function.
- void operator|(PUP::er& p, RieCG& i)
- Pack/Unpack serialize operator|.
Function documentation
static void inciter:: RieCG:: registerReducers()
Configure Charm++ custom reduction types initiated from this chare array.
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:/
RieCG_SDAG_CODE inciter:: RieCG:: RieCG(const CProxy_Discretization& disc,
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 |
bface in | Boundary-faces mapped to side sets used in the input file |
bnode in | Boundary-node lists mapped to side sets used in input file |
triinpoel in | Boundary-face connectivity where BCs set (global ids) |
void inciter:: RieCG:: 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:: RieCG:: comgrad(const std::unordered_map<std::size_t, std::vector<tk:: real>>& ingrad)
Receive contributions to node gradients on chare-boundaries.
Parameters | |
---|---|
ingrad in | Partial contributions to chare-boundary nodes. Key: global mesh node IDs, value: contributions for all scalar components. |
This function receives contributions to m_grad, which stores the gradients at mesh nodes. While m_grad stores own contributions, m_gradc collects the neighbor chare contributions during communication. This way work on m_grad and m_gradc is overlapped. The two are combined in rhs().
void inciter:: RieCG:: comrhs(const std::unordered_map<std::size_t, std::vector<tk:: real>>& inrhs)
Receive contributions to right-hand side vector on chare-boundaries.
Parameters | |
---|---|
inrhs in | Partial contributions of RHS to chare-boundary nodes. Key: global mesh node IDs, value: contributions for all scalar components. |
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:: RieCG:: resizePostAMR(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::set<std::size_t>& removedNodes,
const std::unordered_map<int, std::unordered_set<std::size_t>>& 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)
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) |
removedNodes in | Newly removed mesh node local ids |
nodeCommMap 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 |
const tk::Fields& inciter:: RieCG:: solution() const
Returns | Const-ref to current solution |
---|
Const-ref access to current solution
void inciter:: RieCG:: evalLB(int nrestart)
Parameters | |
---|---|
nrestart in | Number of times restarted |
void inciter:: RieCG:: pup(PUP::er& p) override
Pack/Unpack serialize member function.
Parameters | |
---|---|
p in/out | Charm++'s PUP::er serializer object reference |
Variable documentation
std::unordered_map<std::size_t, std::array<tk:: real, 3>> inciter:: RieCG:: m_bndpoinint
Boundary point integrals
Key: global node id of boundary point, value: boundary point integral contributions.