11#ifndef MESHGENERATOR_H_
12#define MESHGENERATOR_H_
61 void write(
const std::string& fname);
77 double length,
double minor,
double major,
double formFactor,
78 const unsigned int numSegments = 36);
96 double length,
double innerMinor,
double innerMajor,
double outerMinor,
97 double outerMajor,
const unsigned int numSegments = 36);
155 static MeshData getBox(
double length,
double width,
double height,
double formFactor);
ippl::Vector< T, Dim > Vector_t
std::vector< Vector_t< double, 3 > > vertices_m
std::vector< std::pair< Vector_t< double, 3 >, Vector_t< double, 3 > > > decorations_m
std::vector< Vector_t< unsigned int, 3 > > triangles_m
static MeshData getSolenoid(double length, double minor, double major)
Build a solenoid body as a hollow tube with short end collars.
static MeshData getTube(double length, double innerMinor, double innerMajor, double outerMinor, double outerMajor, const unsigned int numSegments=36)
Build a hollow tube aligned with the local z-axis.
static MeshData getTravelingWave(double length, double minor, double major)
Build a traveling-wave structure with repeated shallow corrugations.
static MeshData getRFCavity(double length, double minor, double major)
Build a standing-wave cavity body from a sequence of bulged cells.
void add(const ElementBase &element)
static MeshData getBox(double length, double width, double height, double formFactor)
std::vector< MeshData > elements_m
void setDriftReference(double minor, double major)
Set the drift support radius used when meshing drift spaces.
static MeshData getQuadrupole(double length, double minor, double major, double formFactor)
Build a quadrupole-like body from four longitudinal pole blocks.
void write(const std::string &fname)
static MeshData getCylinder(double length, double minor, double major, double formFactor, const unsigned int numSegments=36)
static bool getTransverseSupport(const ElementBase &element, double &minor, double &major)
Extract a transverse support size suitable for placement/export meshes.