|
OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
#include <MultiBunchHandler.h>

Classes | |
| struct | beaminfo_t |
| struct | injection_t |
Public Types | |
| enum | MB_MODE { MB_MODE::FORCE = 0, MB_MODE::AUTO = 1 } |
| enum | MB_BINNING { MB_BINNING::GAMMA = 0, MB_BINNING::BUNCH = 1 } |
Public Member Functions | |
| MultiBunchHandler (PartBunchBase< double, 3 > *beam, const int &numBunch, const double &eta, const double ¶, const std::string &mode, const std::string &binning) | |
| void | saveBunch (PartBunchBase< double, 3 > *beam) |
| bool | readBunch (PartBunchBase< double, 3 > *beam, const PartData &ref) |
| short | injectBunch (PartBunchBase< double, 3 > *beam, const PartData &ref, bool &flagTransition) |
| void | updateParticleBins (PartBunchBase< double, 3 > *beam) |
| void | setMode (const std::string &mbmode) |
| set the working sub-mode for multi-bunch mode: "FORCE" or "AUTO" More... | |
| void | setBinning (std::string binning) |
| void | setRadiusTurns (const double &radius) |
| void | setNumBunch (short n) |
| short | getNumBunch () const |
| bool | isForceMode () const |
| bool | calcBunchBeamParameters (PartBunchBase< double, 3 > *beam, short bunchNr) |
| beaminfo_t & | getBunchInfo (short bunchNr) |
| const beaminfo_t & | getBunchInfo (short bunchNr) const |
| injection_t & | getInjectionValues () |
| void | updateTime (const double &dt) |
| void | updatePathLength (const std::vector< double > &lpaths) |
Private Attributes | |
| std::string | onebunch_m |
| short | numBunch_m |
| The number of bunches specified in TURNS of RUN commond. More... | |
| double | eta_m |
| MB_MODE | mode_m |
| MB_BINNING | binning_m |
| double | coeffDBunches_m |
| double | radiusLastTurn_m |
| double | radiusThisTurn_m |
| short | bunchCount_m |
| std::vector< beaminfo_t > | binfo_m |
| injection_t | injection_m |
Definition at line 12 of file MultiBunchHandler.h.
|
strong |
| Enumerator | |
|---|---|
| GAMMA | |
| BUNCH | |
Definition at line 69 of file MultiBunchHandler.h.
|
strong |
| Enumerator | |
|---|---|
| FORCE | |
| AUTO | |
Definition at line 63 of file MultiBunchHandler.h.
| MultiBunchHandler::MultiBunchHandler | ( | PartBunchBase< double, 3 > * | beam, |
| const int & | numBunch, | ||
| const double & | eta, | ||
| const double & | para, | ||
| const std::string & | mode, | ||
| const std::string & | binning | ||
| ) |
Definition at line 13 of file MultiBunchHandler.cpp.
References AUTO, binfo_m, endl(), FORCE, OpalData::getInstance(), PartBins::getLastemittedBin(), PartBunchBase< T, Dim >::getNumBunch(), PartBunchBase< T, Dim >::getTotalNum(), mode_m, PAssert_GT, PartBunchBase< T, Dim >::pbin_m, setBinning(), setMode(), and PartBunchBase< T, Dim >::setPBins().

| bool MultiBunchHandler::calcBunchBeamParameters | ( | PartBunchBase< double, 3 > * | beam, |
| short | bunchNr | ||
| ) |
Definition at line 384 of file MultiBunchHandler.cpp.
References allreduce(), PartBunchBase< T, Dim >::bunchNum, MultiBunchHandler::beaminfo_t::correlation, MultiBunchHandler::beaminfo_t::dEkin, dot(), MultiBunchHandler::beaminfo_t::ekin, MultiBunchHandler::beaminfo_t::emit, getBunchInfo(), OpalData::getInstance(), PartBunchBase< T, Dim >::getLocalNum(), PartBunchBase< T, Dim >::getM(), PartBunchBase< T, Dim >::getNumBunch(), PartBunchBase< T, Dim >::getT(), MultiBunchHandler::beaminfo_t::halo, max(), MultiBunchHandler::beaminfo_t::mean, MultiBunchHandler::beaminfo_t::nParticles, PartBunchBase< T, Dim >::P, pow(), MultiBunchHandler::beaminfo_t::prms, PartBunchBase< T, Dim >::R, MultiBunchHandler::beaminfo_t::rrms, PartBunchBase< T, Dim >::setLocalNumPerBunch(), PartBunchBase< T, Dim >::setTotalNumPerBunch(), sqrt(), and MultiBunchHandler::beaminfo_t::time.
Referenced by injectBunch(), and DataSink::writeMultiBunchStatistics().

|
inline |
Definition at line 187 of file MultiBunchHandler.h.
References binfo_m, PAssert_GE, and PAssert_LT.
Referenced by calcBunchBeamParameters(), DataSink::setMultiBunchInitialPathLengh(), and DataSink::writeMultiBunchStatistics().
|
inline |
Definition at line 195 of file MultiBunchHandler.h.
References binfo_m, PAssert_GE, and PAssert_LT.
|
inline |
Definition at line 203 of file MultiBunchHandler.h.
References injection_m.
|
inline |
Definition at line 175 of file MultiBunchHandler.h.
References bunchCount_m.
Referenced by DataSink::setMultiBunchInitialPathLengh(), and DataSink::writeMultiBunchStatistics().
| short MultiBunchHandler::injectBunch | ( | PartBunchBase< double, 3 > * | beam, |
| const PartData & | ref, | ||
| bool & | flagTransition | ||
| ) |
Definition at line 226 of file MultiBunchHandler.cpp.
References AUTO, Communicate::barrier(), bunchCount_m, PartBunchBase< T, Dim >::calcBeamParameters(), calcBunchBeamParameters(), coeffDBunches_m, IpplInfo::Comm, endl(), FORCE, PartBunchBase< T, Dim >::get_centroid(), PartBunchBase< T, Dim >::get_rrms(), PartBunchBase< T, Dim >::getLocalNum(), PartBunchBase< T, Dim >::getTotalNum(), mode_m, numBunch_m, radiusLastTurn_m, radiusThisTurn_m, readBunch(), saveBunch(), PartBunchBase< T, Dim >::setLocalNumPerBunch(), PartBunchBase< T, Dim >::setNumBunch(), PartBunchBase< T, Dim >::setTotalNumPerBunch(), and updateParticleBins().

|
inline |
Definition at line 181 of file MultiBunchHandler.h.
| bool MultiBunchHandler::readBunch | ( | PartBunchBase< double, 3 > * | beam, |
| const PartData & | ref | ||
| ) |
Definition at line 146 of file MultiBunchHandler.cpp.
References PartBunchBase< T, Dim >::Bin, binfo_m, PartBunchBase< T, Dim >::boundp(), bunchCount_m, PartBunchBase< T, Dim >::bunchNum, H5PartWrapper::close(), PartBunchBase< T, Dim >::create(), endl(), AmrPartBunch::getAmrParticleBase(), PartBunchBase< T, Dim >::getLocalNum(), IpplInfo::getNodes(), H5PartWrapper::getNumParticles(), IpplTimings::getTimer(), injection_m, PartBunchBase< T, Dim >::M, IpplInfo::myNode(), onebunch_m, PartBunchBase< T, Dim >::P, PAssert_LT, PartBunchBase< T, Dim >::PType, PartBunchBase< T, Dim >::Q, PartBunchBase< T, Dim >::R, H5PartWrapperForPC::readStep(), ParticleType::REGULAR, PartBunchBase< T, Dim >::setLocalNumPerBunch(), PartBunchBase< T, Dim >::setTotalNumPerBunch(), IpplTimings::startTimer(), and IpplTimings::stopTimer().
Referenced by injectBunch().

| void MultiBunchHandler::saveBunch | ( | PartBunchBase< double, 3 > * | beam | ) |
Definition at line 79 of file MultiBunchHandler.cpp.
References H5PartWrapper::close(), ParticleAttrib< T >::create(), endl(), PartBunchBase< T, Dim >::getLocalNum(), IpplTimings::getTimer(), PartBunchBase< T, Dim >::M, onebunch_m, PartBunchBase< T, Dim >::P, PartBunchBase< T, Dim >::PType, PartBunchBase< T, Dim >::Q, PartBunchBase< T, Dim >::R, IpplTimings::startTimer(), IpplTimings::stopTimer(), H5PartWrapperForPC::writeHeader(), and H5PartWrapperForPC::writeStep().
Referenced by injectBunch().

| void MultiBunchHandler::setBinning | ( | std::string | binning | ) |
Definition at line 350 of file MultiBunchHandler.cpp.
References binning_m, BUNCH, endl(), GAMMA, and Util::toUpper().
Referenced by MultiBunchHandler().

| void MultiBunchHandler::setMode | ( | const std::string & | mbmode | ) |
set the working sub-mode for multi-bunch mode: "FORCE" or "AUTO"
Definition at line 333 of file MultiBunchHandler.cpp.
References AUTO, coeffDBunches_m, endl(), FORCE, and mode_m.
Referenced by MultiBunchHandler().

|
inline |
Definition at line 169 of file MultiBunchHandler.h.
References bunchCount_m, and Hypervolume::n.
| void MultiBunchHandler::setRadiusTurns | ( | const double & | radius | ) |
Definition at line 367 of file MultiBunchHandler.cpp.
References AUTO, endl(), OpalData::getInstance(), mode_m, radiusLastTurn_m, and radiusThisTurn_m.

| void MultiBunchHandler::updateParticleBins | ( | PartBunchBase< double, 3 > * | beam | ) |
Definition at line 313 of file MultiBunchHandler.cpp.
References binning_m, BUNCH, bunchCount_m, eta_m, GAMMA, IpplTimings::getTimer(), PartBunchBase< T, Dim >::resetPartBinBunch(), PartBunchBase< T, Dim >::resetPartBinID2(), IpplTimings::startTimer(), and IpplTimings::stopTimer().
Referenced by injectBunch().

| void MultiBunchHandler::updatePathLength | ( | const std::vector< double > & | lpaths | ) |
Definition at line 537 of file MultiBunchHandler.cpp.
References binfo_m, bunchCount_m, and PAssert_EQ.
| void MultiBunchHandler::updateTime | ( | const double & | dt | ) |
Definition at line 530 of file MultiBunchHandler.cpp.
References binfo_m, and bunchCount_m.
|
private |
Definition at line 161 of file MultiBunchHandler.h.
Referenced by getBunchInfo(), MultiBunchHandler(), readBunch(), updatePathLength(), and updateTime().
|
private |
Definition at line 148 of file MultiBunchHandler.h.
Referenced by setBinning(), and updateParticleBins().
|
private |
Definition at line 158 of file MultiBunchHandler.h.
Referenced by getNumBunch(), injectBunch(), readBunch(), setNumBunch(), updateParticleBins(), updatePathLength(), and updateTime().
|
private |
Definition at line 151 of file MultiBunchHandler.h.
Referenced by injectBunch(), and setMode().
|
private |
Definition at line 139 of file MultiBunchHandler.h.
Referenced by updateParticleBins().
|
private |
Definition at line 164 of file MultiBunchHandler.h.
Referenced by getInjectionValues(), and readBunch().
|
private |
Definition at line 144 of file MultiBunchHandler.h.
Referenced by injectBunch(), isForceMode(), MultiBunchHandler(), setMode(), and setRadiusTurns().
|
private |
The number of bunches specified in TURNS of RUN commond.
Definition at line 136 of file MultiBunchHandler.h.
Referenced by injectBunch().
|
private |
Definition at line 133 of file MultiBunchHandler.h.
Referenced by readBunch(), and saveBunch().
|
private |
Definition at line 154 of file MultiBunchHandler.h.
Referenced by injectBunch(), and setRadiusTurns().
|
private |
Definition at line 155 of file MultiBunchHandler.h.
Referenced by injectBunch(), and setRadiusTurns().
1.8.5