CEPS
24.01
Cardiac ElectroPhysiology Simulator
|
Convert a Geometry to a mesh file readable by the Medit viewer.
The Geometry is written into a single mesh file.
Definition at line 45 of file MeditGeometryWriter.hpp.
#include <MeditGeometryWriter.hpp>
Public Member Functions | |
MeditGeometryWriter (const CepsString &fileName, Geometry *geom) | |
Constructor with ouput file name and linked geometry. More... | |
~MeditGeometryWriter () | |
Destructor. More... | |
void | write () |
Writes mesh. More... | |
void | showGeometryPartitioning (CepsBool flag) |
If true, cell attribute is replaced by owning process rank. (default is false) More... | |
Public Member Functions inherited from FileWriter | |
FileWriter (CepsBool binary=false) | |
Constructor. More... | |
FileWriter (const CepsString &file, CepsBool binary=false) | |
Constructor. More... | |
~FileWriter () override | |
Constructor. More... | |
CepsString | getFileName () |
Name of parsed file. More... | |
void | open () |
Creates file or cleans previous content. More... | |
void | close () |
Close current file. More... | |
CepsBool | good () |
Tells if file is ok. More... | |
void | reset () |
The file stream is placed at the beginning of the file. More... | |
void | write (const CepsString &s) |
Single line writing. More... | |
template<typename T > | |
FileWriter & | operator<< (const T &content) |
Writing operator. More... | |
Public Member Functions inherited from CepsObject | |
CepsObject ()=default | |
default constructor More... | |
CepsObject (const CepsObject &)=default | |
Copy constructor. More... | |
virtual | ~CepsObject ()=default |
Destructor. More... | |
CepsObject & | operator= (const CepsObject &)=default |
Assignment operator. More... | |
CepsObject * | toBaseObject () |
Returns a pointer to CepsObject class. More... | |
const CepsObject * | toBaseObject () const |
Returns a pointer to CepsObject class, const version. More... | |
Profiler * | getProfiler () const |
Access to profiler. More... | |
Protected Member Functions | |
void | writeNodes () |
Writes node coordinates and attribute. More... | |
void | writeCells () |
Writes cells and boundary cells with attributes. More... | |
void | writeHeader () |
Medit headers are written using this method. More... | |
void | writeCellsOf (Mesh *mesh, CepsBool boundary=false) |
Gather and write the cells. More... | |
CepsUInt | determineCellOwner (CepsUInt *cellOffset, CepsUInt index) |
Get index of owner of cell (owner of first node) More... | |
Protected Attributes | |
Geometry * | m_geom |
Geometry to write. More... | |
CepsBool | m_showGeometryPartitioning |
Replaces attributes with owners rank. More... | |
Protected Attributes inherited from FileWriter | |
CepsString | m_fileName |
file to write More... | |
std::ofstream | m_file |
corresponding stream More... | |
CepsBool | m_binary |
binary output if true More... | |
Additional Inherited Members | |
Static Protected Attributes inherited from CepsObject | |
static Profiler | m_profiler |
The same profiler for each big object. More... | |
MeditGeometryWriter::MeditGeometryWriter | ( | const CepsString & | fileName, |
Geometry * | geom | ||
) |
Constructor with ouput file name and linked geometry.
Definition at line 33 of file MeditGeometryWriter.cpp.
MeditGeometryWriter::~MeditGeometryWriter | ( | ) |
Destructor.
Definition at line 44 of file MeditGeometryWriter.cpp.
|
protected |
Get index of owner of cell (owner of first node)
Definition at line 394 of file MeditGeometryWriter.cpp.
void MeditGeometryWriter::showGeometryPartitioning | ( | CepsBool | flag | ) |
If true, cell attribute is replaced by owning process rank. (default is false)
Definition at line 49 of file MeditGeometryWriter.cpp.
void MeditGeometryWriter::write | ( | ) |
Writes mesh.
Does all the required computing to output the geometry into a single '.mesh' file. Only a single process does the actual I/O operations. All the data is communicated to the root process. Root process then proceeds to write the data into a file.
Definition at line 55 of file MeditGeometryWriter.cpp.
|
protected |
Writes cells and boundary cells with attributes.
Cells are written in this order:
Definition at line 140 of file MeditGeometryWriter.cpp.
Gather and write the cells.
Definition at line 209 of file MeditGeometryWriter.cpp.
|
protected |
Medit headers are written using this method.
Definition at line 71 of file MeditGeometryWriter.cpp.
|
protected |
Writes node coordinates and attribute.
Definition at line 78 of file MeditGeometryWriter.cpp.
|
protected |
Geometry to write.
Definition at line 101 of file MeditGeometryWriter.hpp.
|
protected |
Replaces attributes with owners rank.
Definition at line 102 of file MeditGeometryWriter.hpp.