tk::MeshWriter class

Charm++ group used to output particle data to file in parallel.

Constructors, destructors, conversion operators

MeshWriter(bool benchmark, std::size_t nmesh)
MeshWriter(CkMigrateMessage* m) explicit
Migrate constructor.

Public functions

void nchare(int n)
void write(std::size_t meshid, bool meshoutput, bool fieldoutput, uint64_t itr, uint64_t itf, tk::real time, int chareid, const std::string& basefilename, const std::vector<std::size_t>& inpoel, const UnsMesh::Coords& coord, 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::vector<std::string>& elemfieldnames, const std::vector<std::string>& nodefieldnames, const std::vector<std::string>& elemsurfnames, const std::vector<std::string>& nodesurfnames, const std::vector<std::vector<tk::real>>& elemfields, const std::vector<std::vector<tk::real>>& nodefields, const std::vector<std::vector<tk::real>>& elemsurfs, const std::vector<std::vector<tk::real>>& nodesurfs, const std::set<int>& outsets, CkCallback c)
Output unstructured mesh into file.

Charm++ pack/unpack serializer member functions

bool m_benchmark
True if benchmark mode.
int m_nchare
Total number chares across the whole problem.
std::size_t m_nmesh
Total number of meshes.
void pup(PUP::er& p) override
Pack/Unpack serialize member function.
void operator|(PUP::er& p, MeshWriter& m)
Pack/Unpack serialize operator|.

Function documentation

tk::MeshWriter::MeshWriter(bool benchmark, std::size_t nmesh)

Parameters
benchmark in True of benchmark mode. No field output happens in benchmark mode. This (and associated if tests) are here so client code does not have to deal with this.
nmesh in Total number of meshes

Constructor: set some defaults that stay constant at all times

void tk::MeshWriter::nchare(int n)

Parameters
in Total number of chares across the whole problem

Set the total number of chares

void tk::MeshWriter::write(std::size_t meshid, bool meshoutput, bool fieldoutput, uint64_t itr, uint64_t itf, tk::real time, int chareid, const std::string& basefilename, const std::vector<std::size_t>& inpoel, const UnsMesh::Coords& coord, 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::vector<std::string>& elemfieldnames, const std::vector<std::string>& nodefieldnames, const std::vector<std::string>& elemsurfnames, const std::vector<std::string>& nodesurfnames, const std::vector<std::vector<tk::real>>& elemfields, const std::vector<std::vector<tk::real>>& nodefields, const std::vector<std::vector<tk::real>>& elemsurfs, const std::vector<std::vector<tk::real>>& nodesurfs, const std::set<int>& outsets, CkCallback c)

Output unstructured mesh into file.

Parameters
meshid in Mesh Id
meshoutput in True if mesh is to be written
fieldoutput in True if field data is to be written
itr in Iteration count since a new mesh. New mesh in this context means that either the mesh is moved and/or its topology has changed.
itf in Field output iteration count
time in Physical time this at this field output dump
chareid in The chare id the write-to-file request is coming from
basefilename in String to use as the base of the filename
inpoel in Mesh connectivity for the mesh chunk to be written with local ids
coord in Node coordinates of the mesh chunk to be written
bface in Map of boundary-face lists mapped to corresponding side set ids for this mesh chunk
bnode in Map of boundary-node lists mapped to corresponding side set ids for this mesh chunk with local ids
triinpoel in Interconnectivity of points and boundary-face in this mesh chunk with local ids
elemfieldnames in Names of element fields to be output to file
nodefieldnames in Names of node fields to be output to file
elemsurfnames in Names of eleme surface fields to be output to file
nodesurfnames in Names of node surface fields to be output to file
elemfields in Field data in mesh elements to output to file
nodefields in Field data in mesh nodes to output to file
elemsurfs in Surface field data in mesh elements to output to file
nodesurfs in Surface field data in mesh nodes to output to file
outsets in Unique set of surface side set ids along which to save solution field variables
in Function to continue with after the write

void tk::MeshWriter::pup(PUP::er& p) override

Pack/Unpack serialize member function.

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

void tk::MeshWriter::operator|(PUP::er& p, MeshWriter& m)

Pack/Unpack serialize operator|.

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