inciter::Refiner class

Mesh refiner for interfacing the mesh refinement library.

Public static functions

static void registerReducers()
Configure Charm++ reduction types.

Constructors, destructors, conversion operators

Refiner(const CProxy_Transporter& transporter, const CProxy_Sorter& sorter, const tk::CProxy_Solver& solver, const Scheme& scheme, const tk::RefinerCallback& cbr, const tk::SorterCallback& cbs, const std::vector<std::size_t>& ginpoel, const tk::UnsMesh::CoordMap& coordmap, const std::map<int, std::vector<std::size_t>>& belem, const std::vector<std::size_t>& triinpoel, const std::map<int, std::vector<std::size_t>>& bnode, int nchare) explicit
Constructor.
Refiner(CkMigrateMessage*) explicit
Migrate constructor.

Public functions

void dtref(tk::real t, const SchemeBase::Proxy& s, const std::map<int, std::vector<std::size_t>>& bnode)
Start mesh refinement (during time stepping, t>0)
void addBndEdges(CkReductionMsg* msg)
Receive boundary edges from all PEs (including this one)
void addRefBndEdges(int fromch, const tk::UnsMesh::EdgeNodeCoord& ed)
Receive newly added mesh node IDs on our chare boundary.
void recvRefBndEdges()
Acknowledge received newly added nodes shared with other chares.
void correctref()
Correct refinement to arrive at conforming mesh across chare boundaries.
void eval()
Decide what to do after a mesh refinement step.
void sendProxy()
Send Refiner proxy to Discretization objects.

Charm++ pack/unpack serializer member functions

void pup(PUP::er& p)
Pack/Unpack serialize member function.
void operator|(PUP::er& p, Refiner& r)
Pack/Unpack serialize operator|.

Function documentation

static void inciter::Refiner::registerReducers()

Configure Charm++ reduction types.

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.

inciter::Refiner::Refiner(const CProxy_Transporter& transporter, const CProxy_Sorter& sorter, const tk::CProxy_Solver& solver, const Scheme& scheme, const tk::RefinerCallback& cbr, const tk::SorterCallback& cbs, const std::vector<std::size_t>& ginpoel, const tk::UnsMesh::CoordMap& coordmap, const std::map<int, std::vector<std::size_t>>& belem, const std::vector<std::size_t>& triinpoel, const std::map<int, std::vector<std::size_t>>& bnode, int nchare) explicit

Constructor.

Parameters
transporter in Transporter (host) proxy
sorter in Mesh reordering (sorter) proxy
solver in Linear system solver proxy
scheme in Discretization scheme
cbr in Charm++ callbacks for Refiner
cbs in Charm++ callbacks for Sorter
ginpoel in Mesh connectivity (this chare) using global node IDs
coordmap in Mesh node coordinates (this chare) for global node IDs
belem in File-internal elem ids of side sets (caller PE)
triinpoel in Triangle face connectivity with global IDs (caller PE)
bnode in Node lists of side sets (caller PE)
nchare in Total number of refiner chares (chare array elements)

void inciter::Refiner::dtref(tk::real t, const SchemeBase::Proxy& s, const std::map<int, std::vector<std::size_t>>& bnode)

Start mesh refinement (during time stepping, t>0)

Parameters
in Physical time
in Discretization scheme Charm++ proxy we interoperate with
bnode in Node lists of side sets

void inciter::Refiner::addBndEdges(CkReductionMsg* msg)

Receive boundary edges from all PEs (including this one)

Parameters
msg in Charm++ message containing the aggregated map of bnd edges

Receive boundary edges from all refiner chares (including this one)

void inciter::Refiner::addRefBndEdges(int fromch, const tk::UnsMesh::EdgeNodeCoord& ed)

Receive newly added mesh node IDs on our chare boundary.

Parameters
fromch in Chare call coming from
ed in Newly added node IDs associated to parent nodes on chare boundary

Receive newly added mesh node IDs on our chare boundary Receive newly added global node IDs and coordinates associated to global parent IDs of edges on our mesh chunk boundary.

void inciter::Refiner::correctref()

Correct refinement to arrive at conforming mesh across chare boundaries.

This function is called repeatedly until there is not a a single edge that needs correction for the whole distributed problem to arrive at a conforming mesh across chare boundaries during this initial mesh refinement step.

void inciter::Refiner::eval()

Decide what to do after a mesh refinement step.

If this function is called during a step (potentially multiple levels of) initial AMR, it evaluates whether to do another one. If it is called during time stepping, this concludes the single mesh refinement step and the new mesh is sent to the PDE worker (Discretization).

void inciter::Refiner::sendProxy()

Send Refiner proxy to Discretization objects.

This should be called when bound Discretization chare array elements have already been created.

void inciter::Refiner::pup(PUP::er& p)

Pack/Unpack serialize member function.

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

void inciter::Refiner::operator|(PUP::er& p, Refiner& r)

Pack/Unpack serialize operator|.

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