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)
Constructor: set some defaults that stay constant at all times.
MeshWriter(CkMigrateMessage* m) explicit
Migrate constructor.

Public functions

void nchare(int n)
Set the total number of chares.
void write(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::vector<tk::real>>& elemfields, const std::vector<std::vector<tk::real>>& nodefields, CkCallback c)
Output unstructured mesh into file.

Charm++ pack/unpack serializer member functions

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)

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., DiagCG, 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.

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

Set the total number of chares.

Parameters
in Total number of chares across the whole problem

void tk::MeshWriter::write(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::vector<tk::real>>& elemfields, const std::vector<std::vector<tk::real>>& nodefields, CkCallback c)

Output unstructured mesh into file.

Parameters
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
elemfields in Field data in mesh elements to output to file
nodefields in Field data in mesh nodes to output to file
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