inciter::Ghosts class

Ghosts Charm++ chare array used to determine ghost data structures.

Public types

struct OutMesh
Storage type for refined mesh used for field output.
using FaceMap = std::unordered_map<tk::UnsMesh::Face, std::array<std::size_t, 2>, tk::UnsMesh::Hash<3>, tk::UnsMesh::Eq<3>>

Constructors, destructors, conversion operators

Ghosts(CkMigrateMessage*) explicit
Migrate constructor.

Public functions

auto Ghosts(const CProxy_Discretization& disc, const std::map<int, std::vector<std::size_t>>& bface, const std::vector<std::size_t>& triinpoel, std::size_t nunk, CkCallback cbDone) -> Ghosts_SDAG_CODE explicit
Constructor.
void resizeComm()
Start sizing communication buffers and setting up ghost data.
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 nodeNeighSetup()
Setup node-neighborhood (esup)
void comEsup(int fromch, const std::unordered_map<std::size_t, std::vector<std::size_t>>& bndEsup, const std::unordered_map<std::size_t, std::vector<tk::real>>& nodeBndCells)
Receive element-surr-points data on chare boundaries from fellow chare.

Public variables

CProxy_Discretization m_disc
Discretization proxy.
std::size_t m_nunk
Counter for number of unknowns on this chare (including ghosts)
std::vector<std::size_t> m_inpoel
Mesh connectivity extended.
tk::UnsMesh::Coords m_coord
Node coordinates extended.
FaceData m_fd
Face data.
tk::Fields m_geoFace
Face geometry.
tk::Fields m_geoElem
Element geometry.
std::size_t m_nfac
Counter for number of faces on this chare (including chare boundaries)
std::unordered_map<int, FaceMap> m_bndFace
std::unordered_map<int, std::unordered_set<std::size_t>> m_sendGhost
Elements which are ghosts for other chares associated to those chare IDs.
std::unordered_map<int, std::unordered_map<std::size_t, std::size_t>> m_ghost
std::set<std::size_t> m_exptGhost
Expected ghost tet ids (used only in DEBUG)
std::unordered_map<std::size_t, std::size_t> m_bid
Map local ghost tet ids (value) and zero-based boundary ids (key)
std::map<std::size_t, std::vector<std::size_t>> m_esup
Elements (value) surrounding point (key) data-structure.
std::size_t m_initial
1 if starting time stepping, 0 if during time stepping

Pack/unpack (Charm++ serialization) routines

void pup(PUP::er& p) override
Pack/Unpack serialize member function.
void operator|(PUP::er& p, Ghosts& a)
Pack/Unpack serialize operator|.

Typedef documentation

using inciter::Ghosts::FaceMap = std::unordered_map<tk::UnsMesh::Face, std::array<std::size_t, 2>, tk::UnsMesh::Hash<3>, tk::UnsMesh::Eq<3>>

Local face & tet IDs associated to 3 global node IDs

This map stores tetrahedron cell faces (map key) and their associated local face ID and inner local tet id adjacent to the face (map value). A face is given by 3 global node IDs.

Function documentation

Ghosts_SDAG_CODE inciter::Ghosts::Ghosts(const CProxy_Discretization& disc, const std::map<int, std::vector<std::size_t>>& bface, const std::vector<std::size_t>& triinpoel, std::size_t nunk, CkCallback cbDone) explicit

Constructor.

Parameters
disc in Discretization proxy
bface in Boundary-faces mapped to side set ids
triinpoel in Boundary-face connectivity
nunk in Number of unknowns
cbDone in Function to continue with when Ghosts have been computed

void inciter::Ghosts::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::Ghosts::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::Ghosts::nodeNeighSetup()

Setup node-neighborhood (esup)

At this point the face-ghost communication map has been established on this chare. This function begins generating the node-ghost comm map.

void inciter::Ghosts::comEsup(int fromch, const std::unordered_map<std::size_t, std::vector<std::size_t>>& bndEsup, const std::unordered_map<std::size_t, std::vector<tk::real>>& nodeBndCells)

Receive element-surr-points data on chare boundaries from fellow chare.

Parameters
fromch in Sender chare id
bndEsup in Elements-surrounding-points data-structure from fromch
nodeBndCells in Map containing element geometries associated with remote element IDs in the esup

Receive elements-surrounding-points data-structure for points on.

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

Pack/Unpack serialize member function.

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

void inciter::Ghosts::operator|(PUP::er& p, Ghosts& a)

Pack/Unpack serialize operator|.

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

Variable documentation

std::unordered_map<int, FaceMap> inciter::Ghosts::m_bndFace

Face & tet IDs associated to global node IDs of the face for each chare

This map stores not only the unique faces associated to fellow chares, but also a newly assigned local face ID and adjacent local tet ID.

std::unordered_map<int, std::unordered_map<std::size_t, std::size_t>> inciter::Ghosts::m_ghost

Local element id associated to ghost remote id charewise

This map associates the local element id (inner map value) to the (remote) element id of the ghost (inner map key) based on the chare id (outer map key) this remote element lies in.