AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::quest::PSTLReader Class Reference

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.5.0/src/axom/quest/stl/PSTLReader.hpp>

Inheritance diagram for axom::quest::PSTLReader:

Public Member Functions

 PSTLReader (MPI_Comm comm)
 Constructor. More...
 
virtual ~PSTLReader ()
 Destructor. More...
 
virtual int read () final override
 Reads in an STL file to all ranks in the associated communicator. More...
 
void setFileName (const std::string &fileName)
 Sets the name of the file to read. More...
 
int getNumNodes () const
 Returns the number of nodes of the surface mesh. More...
 
int getNumFaces () const
 Returns the number of faces of the surface mesh. More...
 
void clear ()
 Clears all internal data-structures. More...
 
void getMesh (mint::UnstructuredMesh< mint::SINGLE_SHAPE > *mesh)
 Stores the STL data in the supplied unstructured mesh object. More...
 

Protected Attributes

std::string m_fileName
 
axom::IndexType m_num_nodes
 
axom::IndexType m_num_faces
 
std::vector< double > m_nodes
 

Constructor & Destructor Documentation

◆ PSTLReader()

axom::quest::PSTLReader::PSTLReader ( MPI_Comm  comm)

Constructor.

Parameters
[in]commuser-supplied MPI communicator.

◆ ~PSTLReader()

virtual axom::quest::PSTLReader::~PSTLReader ( )
virtual

Destructor.

Member Function Documentation

◆ read()

virtual int axom::quest::PSTLReader::read ( )
finaloverridevirtual

Reads in an STL file to all ranks in the associated communicator.

Note
Rank 0 reads in the STL mesh file and broadcasts the data the rest of the ranks.
Returns
status set to zero on success; set to a non-zero value otherwise.

Reimplemented from axom::quest::STLReader.

◆ setFileName()

void axom::quest::STLReader::setFileName ( const std::string &  fileName)
inlineinherited

Sets the name of the file to read.

Parameters
[in]fileNamethe name of the file to read.

References axom::quest::STLReader::m_fileName.

◆ getNumNodes()

int axom::quest::STLReader::getNumNodes ( ) const
inlineinherited

Returns the number of nodes of the surface mesh.

Returns
numNodes the number of nodes.

References axom::quest::STLReader::m_num_nodes.

◆ getNumFaces()

int axom::quest::STLReader::getNumFaces ( ) const
inlineinherited

Returns the number of faces of the surface mesh.

Returns
numFaces the number of faces.

References axom::quest::STLReader::clear(), axom::quest::STLReader::getMesh(), axom::quest::STLReader::m_num_faces, and axom::quest::STLReader::read().

◆ clear()

void axom::quest::STLReader::clear ( )
inherited

Clears all internal data-structures.

Referenced by axom::quest::STLReader::getNumFaces().

◆ getMesh()

void axom::quest::STLReader::getMesh ( mint::UnstructuredMesh< mint::SINGLE_SHAPE > *  mesh)
inherited

Stores the STL data in the supplied unstructured mesh object.

Parameters
[in,out]meshpointer to the unstructured mesh.
Precondition
mesh != nullptr.

Referenced by axom::quest::STLReader::getNumFaces().

Member Data Documentation

◆ m_fileName

std::string axom::quest::STLReader::m_fileName
protectedinherited

◆ m_num_nodes

axom::IndexType axom::quest::STLReader::m_num_nodes
protectedinherited

◆ m_num_faces

axom::IndexType axom::quest::STLReader::m_num_faces
protectedinherited

◆ m_nodes

std::vector<double> axom::quest::STLReader::m_nodes
protectedinherited

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