CEPS  24.01
Cardiac ElectroPhysiology Simulator
MeditGeometryWriter Class Reference

Detailed Description

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>

Inheritance diagram for MeditGeometryWriter:
[legend]

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 >
FileWriteroperator<< (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...
 
CepsObjectoperator= (const CepsObject &)=default
 Assignment operator. More...
 
CepsObjecttoBaseObject ()
 Returns a pointer to CepsObject class. More...
 
const CepsObjecttoBaseObject () const
 Returns a pointer to CepsObject class, const version. More...
 
ProfilergetProfiler () 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

Geometrym_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...
 

Constructor & Destructor Documentation

◆ MeditGeometryWriter()

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::~MeditGeometryWriter ( )

Destructor.

Definition at line 44 of file MeditGeometryWriter.cpp.

Member Function Documentation

◆ determineCellOwner()

CepsUInt MeditGeometryWriter::determineCellOwner ( CepsUInt cellOffset,
CepsUInt  index 
)
protected

Get index of owner of cell (owner of first node)

Definition at line 394 of file MeditGeometryWriter.cpp.

◆ showGeometryPartitioning()

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.

◆ write()

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.

◆ writeCells()

void MeditGeometryWriter::writeCells ( )
protected

Writes cells and boundary cells with attributes.

Cells are written in this order:

  • volumic cells (in 3dMesh)
  • 2d cells of mesh3d(boundary) then of mesh2d
  • 1d cells of mesh2d(boundary) then of mesh1d

Definition at line 140 of file MeditGeometryWriter.cpp.

◆ writeCellsOf()

void MeditGeometryWriter::writeCellsOf ( Mesh mesh,
CepsBool  boundary = false 
)
protected

Gather and write the cells.

Definition at line 209 of file MeditGeometryWriter.cpp.

◆ writeHeader()

void MeditGeometryWriter::writeHeader ( )
protected

Medit headers are written using this method.

Definition at line 71 of file MeditGeometryWriter.cpp.

◆ writeNodes()

void MeditGeometryWriter::writeNodes ( )
protected

Writes node coordinates and attribute.

Definition at line 78 of file MeditGeometryWriter.cpp.

Field Documentation

◆ m_geom

Geometry* MeditGeometryWriter::m_geom
protected

Geometry to write.

Definition at line 101 of file MeditGeometryWriter.hpp.

◆ m_showGeometryPartitioning

CepsBool MeditGeometryWriter::m_showGeometryPartitioning
protected

Replaces attributes with owners rank.

Definition at line 102 of file MeditGeometryWriter.hpp.


The documentation for this class was generated from the following files: