class
DistFCTDistFCT Charm++ chare array used to advance PDEs in time with DiagCG+LW+FCT.
Contents
Constructors, destructors, conversion operators
- DistFCT(CkMigrateMessage*) explicit
- Migrate constructor.
Public functions
-
auto DistFCT(int nchare,
std::size_t nu,
std::size_t np,
const tk::
NodeCommMap& nodeCommMap, 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 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>>>& bcdir, const std::unordered_map<int, std::unordered_set<std::size_t>>& symbcnodemap, const std::unordered_map<int, std::unordered_map<std::size_t, std::array<tk:: real, 4>>>& bnorm) - 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 remap(const Discretization& d)
- Remap local ids after a mesh node reorder.
-
void resize(std::size_t nu,
const tk::
NodeCommMap& nodeCommMap, 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)
-
auto fields() const -> std::tuple<std::vector<std::string>, std::vector<std::vector<tk::
real>>, std::vector<std::string>, std::vector<std::vector<tk:: real>>> - Collect mesh output fields from FCT.
Pack/unpack (Charm++ serialization) routines
Function documentation
DistFCT_SDAG_CODE inciter:: DistFCT:: DistFCT(int nchare,
std::size_t nu,
std::size_t np,
const tk:: NodeCommMap& nodeCommMap,
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 |
nodeCommMap 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:: diff(const Discretization& d,
const tk::Fields& Un)
Compute mass diffusion rhs contribution required for the low order solution.
Parameters | |
---|---|
d in | Discretization proxy to read mesh data from |
Un in | Solution at the previous time step |
Returns | Mass diffusion contribution to the RHS of the low order system |
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 |
P 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::
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 |
Q 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::
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 |
A 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>>>& bcdir,
const std::unordered_map<int, std::unordered_set<std::size_t>>& symbcnodemap,
const std::unordered_map<int, std::unordered_map<std::size_t, std::array<tk:: real, 4>>>& bnorm)
Compute and sum antidiffusive element contributions (AEC) to mesh nodes.
Parameters | |
---|---|
d in | Discretization proxy to read mesh data from |
dUh in | Increment of the high order solution |
Un in | Solution at the previous time step |
bcdir 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. |
symbcnodemap in | Unique set of node ids at which to set symmetry BCs |
bnorm in | Face normals in boundary points: key global node id, value: unit normal, outer key: side set id |
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::
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::
void inciter:: DistFCT:: remap(const Discretization& d)
Remap local ids after a mesh node reorder.
Parameters | |
---|---|
d in | Discretization proxy to read mesh data from |
void inciter:: DistFCT:: resize(std::size_t nu,
const tk:: NodeCommMap& nodeCommMap,
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 |
nodeCommMap 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 | |
---|---|
p in/out | Charm++'s PUP::er serializer object reference |