Class Bunch#

Inheritance Relationships#

Base Type#

Class Documentation#

class Bunch : public OrbitUtils::CppPyWrapper#

Public Functions

Bunch()#

Bunch class. The container for the 6D cooordinates and additional atributes for each macroparticles. The parcticles’ info can be read changed, and dumped to a file.

virtual ~Bunch()#
double &x(int index)#
double &y(int index)#
double &z(int index)#
double &px(int index)#
double &py(int index)#
double &pz(int index)#
double &dE(int index)#
double &xp(int index)#
double &yp(int index)#
int flag(int index)#
double *coordPartArr(int index)#
double **coordArr()#
void ringwrap(double ring_length)#
int addParticle(double x, double px, double y, double py, double z, double pz_or_dE)#
void deleteParticleFast(int index)#
void recoverParticle(int index)#
void deleteParticle(int index)#
void compress()#
double getMass()#
double getClassicalRadius()#
double getCharge()#
double getMacroSize()#
double getB_Rho()#

Return the B*Rho parameter of the particle B*Rho = momentum/charge - [T*m] or B*Rho = 3.335640952*momentum[GeV/c]/charge[electron charges]

double setMass(double mass)#
double setCharge(double chrg)#
double setMacroSize(double mcrsz)#
int getSize()#
int getSizeGlobal()#
int getSizeGlobalFromMemory()#
int getTotalCount()#
int getCapacity()#
void print(std::ostream &Out)#
void print(const char *fileName)#
int readBunchCoords(const char *fileName, int nParts)#
int readBunchCoords(const char *fileName)#
int readParticleAttributesNames(const char *fileName, std::vector<std::string> &attr_names, std::map<std::string, std::map<std::string, double>> &part_attr_dicts)#
void readParticleAttributes(const char *fileName)#
void deleteAllParticles()#
void addParticleAttributes(const std::string att_name, std::map<std::string, double> part_attr_dict)#
int hasParticleAttributes(const std::string att_name)#
void removeParticleAttributes(const std::string name)#
void removeAllParticleAttributes()#
ParticleAttributes *getParticleAttributes(const std::string name)#
void getParticleAttributesNames(std::vector<std::string> &names)#
void clearAllParticleAttributesAndMemorize()#
void restoreAllParticleAttributesFromMemory()#
SyncPart *getSyncPart()#
OrbitUtils::AttributesBucket *getBunchAttributes()#
double getBunchAttributeDouble(const std::string att_name)#
int getBunchAttributeInt(const std::string att_name)#
void setBunchAttribute(const std::string att_name, double att_val)#
void setBunchAttribute(const std::string att_name, int att_val)#
void getIntBunchAttributeNames(std::vector<std::string> &names)#
void getDoubleBunchAttributeNames(std::vector<std::string> &names)#
void initBunchAttributes(const char *fileName)#
void copyEmptyBunchTo(Bunch *bunch)#
void copyBunchTo(Bunch *bunch)#
void addParticlesTo(Bunch *bunch)#
pyORBIT_MPI_Comm *getMPI_Comm_Local()#
void setMPI_Comm_Local(pyORBIT_MPI_Comm *pyComm_Local)#
int getMPI_Size()#
int getMPI_Rank()#

Protected Functions

virtual void init()#

Protected Attributes

double **arrAttr#
double mass#
double charge#
double classicalRadius#
double energy#
double macroSizeForAll#
int nDim#
int nTotalSize#
int nSize#
int nNew#
int nChunk#
int nChunkMin#
int sizeGlobal#
int *arrFlag#
double **arrCoord#
int needOfCompress#
std::map<std::string, ParticleAttributes*> attrCntrMap#
std::map<std::string, int> attrCntrSizeMap#
int attrCntrSize#
int attributesSize#
std::map<std::string, int> attrCntrLowIndMap#
std::map<std::string, int> attrCntrUppIndMap#
std::map<std::string, ParticleAttributes*> attrCntrMapTemp#
std::vector<ParticleAttributes*> attrCntrVect#
OrbitUtils::AttributesBucket *bunchAttr#
SyncPart *syncPart#
int iMPIini#
int rank_MPI#
int size_MPI#
pyORBIT_MPI_Comm *pyComm_Local#
PyObject *py_wrapper#