tk::MeshWriter class

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

Constructors, destructors, conversion operators

MeshWriter(ctr::FieldFileType filetype, Centering bnd_centering, bool benchmark, std::size_t nmesh)
Constructor: set some defaults that stay constant at all times.
MeshWriter(CkMigrateMessage* m) explicit
Migrate constructor.

Public functions

void nchare(std::size_t meshid, int n)
Set the total number of chares.
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

ctr::FieldFileType m_filetype
Output file format type.
Centering m_bndCentering
Centering to identify what boundary data to write.
bool m_benchmark
True if benchmark mode.
std::size_t m_nmesh
Total number of meshes.
std::vector<int> m_nchare
Total number chares across the whole problem (one per mesh)
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(ctr::FieldFileType filetype, Centering bnd_centering, bool benchmark, std::size_t nmesh)

Constructor: set some defaults that stay constant at all times.

Parameters
filetype in Output file format type
bnd_centering in Centering to identify what boundary data to write. For a nodal scheme, e.g., ALECG, this is nodal, for a DG scheme, this is cell-based.
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

void tk::MeshWriter::nchare(std::size_t meshid, int n)

Set the total number of chares.

Parameters
meshid in Mesh whose number of chares to set
in Total number of chares across the whole problem (for a mesh)

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 elemental 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