19 #ifndef _OPAL_BOUNDARY_GEOMETRY_H
20 #define _OPAL_BOUNDARY_GEOMETRY_H
26 #include <unordered_map>
27 #include <unordered_set>
34 #include <gsl/gsl_rng.h>
57 const std::string&
name);
64 const std::string& name);
75 size_t n,
double darkinward,
80 size_t n,
double darkinward,
335 for (
size_t i = 0; i <
apert_m.size(); i += 3) {
339 return ((x(0)*x(0)) + (x(1)*x(1))) > r;
375 const int triangle_id,
411 std::unordered_map<int,
412 std::unordered_set<int>>
ids;
475 assert (1 <= vertex_id && vertex_id <=3);
489 const int triangle_id,
void setFNParameterY(double parameterFNY)
std::vector< double > TriFEPartloss_m
std::ostream & operator<<(std::ostream &os, const Attribute &attr)
Interface for basic beam line object.
The base class for all OPAL definitions.
std::vector< Vector_t > partsr_m
int intersectLineSegmentBoundary(const Vector_t &P0, const Vector_t &P1, Vector_t &intersection_pt, int &triangle_id)
std::unordered_map< int, std::unordered_set< int > > ids
IpplTimings::TimerRef TfastIsInside_m
void writeGeomToVtk(std::string fn)
Vector_t getCooridinate(size_t i)
int intersectLineTriangle(const enum INTERSECTION_TESTS kind, const Vector_t &P0, const Vector_t &P1, const int triangle_id, Vector_t &I)
IpplTimings::TimerRef TisInside_m
void setvVThermal(double vVThermal)
std::vector< double > apert_m
SecondaryEmissionPhysics sec_phys_m
void setMaxFN(size_t maxFNemission)
void createParticlesOnSurface(size_t n, double darkinward, OpalBeamline &itsOpalBeamline, PartBunchBase< double, 3 > *itsBunch)
void setEInitThreshold(double einitthreshold)
void setWorkFunction(double workFunction)
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh).
std::vector< Vector_t > Points_m
void setFNParameterB(double parameterFNB)
virtual void execute()
Execute the command.
std::vector< Vector_t > TriNormals_m
std::vector< double > TriAreas_m
void setFNParameterA(double parameterFNA)
std::vector< std::array< unsigned int, 4 > > Triangles_m
std::vector< short > TriBGphysicstag_m
std::string getDistribution()
int emitSecondaryFurmanPivi(const Vector_t &intecoords, const int i, PartBunchBase< double, 3 > *itsBunch, double &seyNum)
struct BoundaryGeometry::@91 voxelMesh_m
int intersectTinyLineSegmentBoundary(const Vector_t &, const Vector_t &, Vector_t &, int &)
void updateElement(ElementBase *element)
void createPriPart(size_t n, double darkinward, OpalBeamline &itsOpalBeamline, PartBunchBase< double, 3 > *itsBunch)
int emitSecondaryNone(const Vector_t &intecoords, const int &triId)
IpplTimings::TimerRef Tinitialize_m
int partInside(const Vector_t &r, const Vector_t &v, const double dt, int Parttype, const double Qloss, Vector_t &intecoords, int &triId)
std::vector< std::string > getStringArray(const Attribute &attr)
Get string array value.
Vector_t mapIndices2Voxel(const int, const int, const int)
static BoundaryGeometry * find(const std::string &name)
std::vector< double > TriSePartloss_m
bool isOutsideApperture(Vector_t x)
Vector_t getMomenta(size_t i)
std::vector< std::string > getDistributionArray()
IpplTimings::TimerRef TRayTrace_m
std::vector< double > TriPrPartloss_m
void setvSeyMax(double vSeyMax)
IpplTimings::TimerRef TPartInside_m
int fastIsInside(const Vector_t &reference_pt, const Vector_t &P)
void setvKtheta(double vKtheta)
std::vector< Vector_t > partsp_m
double fieldFNthreshold_m
virtual ~BoundaryGeometry()
int emitSecondaryVaughan(const Vector_t &intecoords, const int i, PartBunchBase< double, 3 > *itsBunch, double &seyNum)
void setBoundaryMatType(int BoundaryMatType)
std::string getFilename() const
Vector_t mapPoint2Voxel(const Vector_t &)
The base class for all OPAL objects.
void enableDebug(enum DebugFlags flags)
int intersectTriangleVoxel(const int triangle_id, const int i, const int j, const int k)
void setFNParameterVYSe(double parameterFNVYSe)
Inform & printInfo(Inform &os) const
void computeMeshVoxelization(void)
std::vector< Vector_t > TriBarycenters_m
void setvEZero(double vEZero)
void setNEmissionMode(bool nEmissionMode)
Timing::TimerRef TimerRef
void clearCooridinateArray()
void setvSeyZero(double vSeyZero)
double getReal(const Attribute &attr)
Return real value.
void setvKenergy(double vKenergy)
void setvEmax(double vEmax)
virtual void update()
Update this object.
void disableDebug(enum DebugFlags flags)
int mapVoxelIndices2ID(const int i, const int j, const int k)
void setFNParameterVYZe(double parameterFNVYZe)
virtual bool canReplaceBy(Object *object)
Test if replacement is allowed.
void operator=(const BoundaryGeometry &)
virtual BoundaryGeometry * clone(const std::string &name)
Return a clone.
double fieldEnhancement_m
const Vector_t & getPoint(const int triangle_id, const int vertex_id)
std::string getTopology() const
void setFNTreshold(double fieldFNthreshold)
int intersectRayBoundary(const Vector_t &P, const Vector_t &v, Vector_t &I)
std::string getString(const Attribute &attr)
Get string value.
void setFieldEnhancement(double fieldEnhancement)