NEMoSys  0.63.0
A modular, extensible resource with robust automated mesh generation, mesh quality analysis, adaptive mesh refinement, and data transfer between arbitrary meshes.
NEM::GEO::rocPackShape Class Referenceabstract

This is an abstract class for all shapes supported by RocPack utility. More...

Detailed Description

This class contains abstract methods used for defining various shapes. All methods are defined in various shape classes under NEM::GEO namespace.

The shapes currently supported are,

> * HMX (Octogen crystal) > * PETN (Pentaerythritol tetranitrate crystal) > * ICOSIDODECAHEDRON

Definition at line 53 of file rocPackShape.H.

Public Member Functions

 rocPackShape ()
 Default constructor. More...
 
virtual ~rocPackShape ()
 Standard Deconstructor. More...
 
virtual std::vector< std::vector< double > > getVertices ()=0
 Gets vertices of pack shapes. More...
 
virtual std::vector< std::vector< int > > getFaces ()=0
 Gets faces of pack shapes. More...
 

Static Public Member Functions

static std::shared_ptr< rocPackShapegetShape (const std::string &shapeName)
 Creates shape object for requsted shape. More...
 

Inherited by NEM::GEO::hmxShape, NEM::GEO::icosidodecahedronShape, and NEM::GEO::petnShape.

Constructor & Destructor Documentation

◆ rocPackShape()

NEM::GEO::rocPackShape::rocPackShape ( )
inline

Definition at line 58 of file rocPackShape.H.

58 {}

◆ ~rocPackShape()

virtual NEM::GEO::rocPackShape::~rocPackShape ( )
inlinevirtual

Definition at line 62 of file rocPackShape.H.

62  {
63  std::cout << "rocPackShape class destroyed!" << std::endl;
64  }

Member Function Documentation

◆ getFaces()

virtual std::vector<std::vector<int> > NEM::GEO::rocPackShape::getFaces ( )
pure virtual

◆ getShape()

std::shared_ptr< rocPackShape > NEM::GEO::rocPackShape::getShape ( const std::string &  shapeName)
static
Parameters
shapeNameName of shape requested Shape pointer

Definition at line 38 of file rocPackShape.C.

Referenced by NEM::GEO::rocPack::rocParser().

39  {
40  if (shapeName == "hmx") {
41  std::shared_ptr<hmxShape> assignShape(new hmxShape());
42  return assignShape;
43  } else if (shapeName == "petn") {
44  std::shared_ptr<petnShape> assignShape(new petnShape());
45  return assignShape;
46  } else if (shapeName == "icosidodecahedron") {
47  std::shared_ptr<icosidodecahedronShape> assignShape(
48  new icosidodecahedronShape());
49  return assignShape;
50  } else {
51  std::cerr << "The " << shapeName << " shape is not supported yet!"
52  << std::endl;
53  throw;
54  }
55 }

◆ getVertices()

virtual std::vector<std::vector<double> > NEM::GEO::rocPackShape::getVertices ( )
pure virtual

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