OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Public Member Functions | Private Types | Static Private Member Functions | Private Attributes | List of all members
MeshGenerator Class Reference

#include <MeshGenerator.h>

Public Member Functions

 MeshGenerator ()
 
void add (const ElementBase &element)
 
void write (const std::string &fname)
 

Private Types

enum  MeshType {
  OTHER = 0 , DIPOLE , QUADRUPOLE , SEXTUPOLE ,
  OCTUPOLE , SOLENOID , RFCAVITY
}
 

Static Private Member Functions

static MeshData getCylinder (double length, double minor, double major, double formFactor, const unsigned int numSegments=36)
 
static MeshData getBox (double length, double width, double height, double formFactor)
 

Private Attributes

std::vector< MeshDataelements_m
 

Detailed Description

Definition at line 31 of file MeshGenerator.h.

Member Enumeration Documentation

◆ MeshType

Enumerator
OTHER 
DIPOLE 
QUADRUPOLE 
SEXTUPOLE 
OCTUPOLE 
SOLENOID 
RFCAVITY 

Definition at line 39 of file MeshGenerator.h.

Constructor & Destructor Documentation

◆ MeshGenerator()

MeshGenerator::MeshGenerator ( )

Definition at line 14 of file MeshGenerator.cpp.

Member Function Documentation

◆ add()

void MeshGenerator::add ( const ElementBase element)

◆ getBox()

MeshData MeshGenerator::getBox ( double  length,
double  width,
double  height,
double  formFactor 
)
staticprivate

Definition at line 926 of file MeshGenerator.cpp.

References MeshData::decorations_m, MeshData::triangles_m, and MeshData::vertices_m.

Referenced by add().

◆ getCylinder()

MeshData MeshGenerator::getCylinder ( double  length,
double  minor,
double  major,
double  formFactor,
const unsigned int  numSegments = 36 
)
staticprivate

Definition at line 886 of file MeshGenerator.cpp.

References cos(), MeshData::decorations_m, sin(), MeshData::triangles_m, Physics::two_pi, and MeshData::vertices_m.

Referenced by add().

Here is the call graph for this function:

◆ write()

void MeshGenerator::write ( const std::string &  fname)

Definition at line 103 of file MeshGenerator.cpp.

References Util::base64_encode(), Util::combineFilePath(), elements_m, end(), OpalData::getAuxiliaryOutputDirectory(), and OpalData::getInstance().

Referenced by OpalBeamline::save3DLattice().

Here is the call graph for this function:

Member Data Documentation

◆ elements_m

std::vector<MeshData> MeshGenerator::elements_m
private

Definition at line 60 of file MeshGenerator.h.

Referenced by add(), and write().


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