|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
|
#include <DistributionMoments.h>
Public Member Functions | |
| DistributionMoments () | |
| void | foo () |
| void | compute (const std::vector< OpalParticle >::const_iterator &, const std::vector< OpalParticle >::const_iterator &) |
| void | computeMoments (ippl::ParticleAttrib< Vector_t< double, 3 > >::view_type &Rview, ippl::ParticleAttrib< Vector_t< double, 3 > >::view_type &Pview, ippl::ParticleAttrib< double >::view_type &Mview, size_t Np, size_t Nlocal) |
| void | computeMinMaxPosition (ippl::ParticleAttrib< Vector_t< double, 3 > >::view_type &Rview, size_t Nlcoal) |
| void | computeMeanKineticEnergy () |
| void | computeDebyeLength (ippl::ParticleAttrib< Vector_t< double, 3 > >::view_type &Rview, ippl::ParticleAttrib< Vector_t< double, 3 > >::view_type &Pview, size_t Np, size_t Nlocal, double density) |
| void | computePlasmaParameter (double) |
| Vector_t< double, 3 > | getMeanPosition () const |
| Vector_t< double, 3 > | getStandardDeviationPosition () const |
| Vector_t< double, 3 > | getMeanMomentum () const |
| Vector_t< double, 3 > | getStandardDeviationMomentum () const |
| Vector_t< double, 3 > | getNormalizedEmittance () const |
| Vector_t< double, 3 > | getGeometricEmittance () const |
| Vector_t< double, 3 > | getStandardDeviationRP () const |
| Vector_t< double, 3 > | getHalo () const |
| Vector_t< double, 3 > | getMinPosition () const |
| Vector_t< double, 3 > | getMaxPosition () const |
| Vector_t< double, 3 > | getMaxR () const |
| Vector_t< double, 3 > | get68Percentile () const |
| Vector_t< double, 3 > | get95Percentile () const |
| Vector_t< double, 3 > | get99Percentile () const |
| Vector_t< double, 3 > | get99_99Percentile () const |
| Vector_t< double, 3 > | getNormalizedEmittance68Percentile () const |
| Vector_t< double, 3 > | getNormalizedEmittance95Percentile () const |
| Vector_t< double, 3 > | getNormalizedEmittance99Percentile () const |
| Vector_t< double, 3 > | getNormalizedEmittance99_99Percentile () const |
| double | getMeanTime () const |
| double | getStdTime () const |
| double | getMeanGamma () const |
| double | getMeanGammaZ () const |
| double | getMeanKineticEnergy () const |
| double | getTemperature () const |
| double | getDebyeLength () const |
| double | getPlasmaParameter () const |
| double | getStdKineticEnergy () const |
| double | getDx () const |
| double | getDDx () const |
| double | getDy () const |
| double | getDDy () const |
| Vector_t< double, 6 > | getMeans () const |
| Vector_t< double, 6 > | getCentroid () const |
| matrix_t | getMoments6x6 () const |
| double | getTotalCharge () const |
| double | getTotalMass () const |
| double | getTotalNumParticles () const |
| void | computeMeans (ippl::ParticleAttrib< Vector_t< double, 3 > >::view_type &Rview, ippl::ParticleAttrib< Vector_t< double, 3 > >::view_type &Pview, ippl::ParticleAttrib< double >::view_type &Mview, size_t Np, size_t Nlocal) |
Private Types | |
| using | iterator_t = std::vector<Vector_t<double, 2>>::const_iterator |
Private Member Functions | |
| bool | isParticleExcluded (const OpalParticle &) const |
| template<class InputIt> | |
| void | computePercentiles (const InputIt &, const InputIt &) |
| std::pair< double, iterator_t > | determinePercentilesDetail (const iterator_t &begin, const iterator_t &end, const std::vector< int > &globalAccumulatedHistogram, const std::vector< int > &localAccumulatedHistogram, unsigned int dimension, int numRequiredParticles) const |
| double | computeNormalizedEmittance (const iterator_t &begin, const iterator_t &end) const |
| void | fillMembers (std::vector< double > &) |
| void | reset () |
| void | resetPlasmaParameters () |
Static Private Attributes | |
| static const double | percentileOneSigmaNormalDist_m = std::erf(1 / sqrt(2)) |
| static const double | percentileTwoSigmasNormalDist_m = std::erf(2 / sqrt(2)) |
| static const double | percentileThreeSigmasNormalDist_m = std::erf(3 / sqrt(2)) |
| static const double | percentileFourSigmasNormalDist_m = std::erf(4 / sqrt(2)) |
Definition at line 38 of file DistributionMoments.h.
|
private |
Definition at line 114 of file DistributionMoments.h.
| DistributionMoments::DistributionMoments | ( | ) |
Definition at line 39 of file DistributionMoments.cpp.
References moments_m, notCentMoments_m, reset(), and resetPlasmaParameters().
| void DistributionMoments::compute | ( | const std::vector< OpalParticle >::const_iterator & | first, |
| const std::vector< OpalParticle >::const_iterator & | last ) |
Definition at line 343 of file DistributionMoments.cpp.
Referenced by LossDataSink::saveH5().
| void DistributionMoments::computeDebyeLength | ( | ippl::ParticleAttrib< Vector_t< double, 3 > >::view_type & | Rview, |
| ippl::ParticleAttrib< Vector_t< double, 3 > >::view_type & | Pview, | ||
| size_t | Np, | ||
| size_t | Nlocal, | ||
| double | density ) |
Definition at line 744 of file DistributionMoments.cpp.
References Physics::c, computePlasmaParameter(), debyeLength_m, Dim, Physics::epsilon_0, Units::eV2kg, Units::GeV2eV, Physics::m_e, Physics::q_e, resetPlasmaParameters(), and temperature_m.
| void DistributionMoments::computeMeanKineticEnergy | ( | ) |
Definition at line 731 of file DistributionMoments.cpp.
| void DistributionMoments::computeMeans | ( | ippl::ParticleAttrib< Vector_t< double, 3 > >::view_type & | Rview, |
| ippl::ParticleAttrib< Vector_t< double, 3 > >::view_type & | Pview, | ||
| ippl::ParticleAttrib< double >::view_type & | Mview, | ||
| size_t | Np, | ||
| size_t | Nlocal ) |
Definition at line 47 of file DistributionMoments.cpp.
References centroid_m, Dim, meanGamma_m, meanGammaZ_m, meanKineticEnergy_m, meanP_m, meanR_m, and means_m.
Referenced by computeMoments().
| void DistributionMoments::computeMinMaxPosition | ( | ippl::ParticleAttrib< Vector_t< double, 3 > >::view_type & | Rview, |
| size_t | Nlcoal ) |
Definition at line 298 of file DistributionMoments.cpp.
| void DistributionMoments::computeMoments | ( | ippl::ParticleAttrib< Vector_t< double, 3 > >::view_type & | Rview, |
| ippl::ParticleAttrib< Vector_t< double, 3 > >::view_type & | Pview, | ||
| ippl::ParticleAttrib< double >::view_type & | Mview, | ||
| size_t | Np, | ||
| size_t | Nlocal ) |
Definition at line 136 of file DistributionMoments.cpp.
References centroid_m, computeMeans(), Dim, geometricEps_m, halo_m, Options::haloShift, meanGamma_m, meanKineticEnergy_m, meanP_m, meanR_m, moments_m, normalizedEps_m, notCentMoments_m, reset(), stdKineticEnergy_m, stdP_m, stdR_m, and stdRP_m.
|
private |
Definition at line 646 of file DistributionMoments.cpp.
References begin(), and end().
Referenced by computePercentiles().
|
private |
Definition at line 461 of file DistributionMoments.cpp.
References computeNormalizedEmittance(), Options::computePercentiles, determinePercentilesDetail(), maxR_m, meanR_m, minR_m, ninetyFivePercentile_m, ninetyNine_NinetyNinePercentile_m, ninetyNinePercentile_m, normalizedEps68Percentile_m, normalizedEps95Percentile_m, normalizedEps99_99Percentile_m, normalizedEps99Percentile_m, percentileFourSigmasNormalDist_m, percentileOneSigmaNormalDist_m, percentileThreeSigmasNormalDist_m, percentileTwoSigmasNormalDist_m, sixtyEightPercentile_m, and totalNumParticles_m.
| void DistributionMoments::computePlasmaParameter | ( | double | density | ) |
Definition at line 830 of file DistributionMoments.cpp.
References debyeLength_m, Physics::pi, and plasmaParameter_m.
Referenced by computeDebyeLength().
|
private |
Computes the percentile and the range of all local particles that are contained therein. In a first step the container globalAccumulatedHistogram is looped through until accumulated histogram value exceeds the required number of particles. The percentile then is between the boundaries of the last histogram bin before the loop stopped. Then all particle coordinates that are between the boundaries of this bin are communicated acros all nodes and sorted. The exact percentile is then determined by counting the n smallest coordinates such that the total number of partiles results is equal to 'numRequiredParticles'. In accordance with matlab (?) the percentile is the midpoint between the last particle within the percentile and tje first particle outside. Finally each node determines which of its particles are contained in the percentile.
To determine the histogram, the coordinates should not be used directly. Instead, the absolute value of the difference between a coordinate and the mean, |x - <x>|, should be used so that the percentile values are similar to the standard deviation.
| begin | begin of a container containing the one dimensional phase space of all local particles. |
| end | end of the container. |
| globalAccumulatedHistogram | container with partial sum of histogram values of position coordinates summed up across all nodes. The first value should be 0. |
| localAccumulatedHistogram | container with partial sum of histogram values of position coordinates of all local particles. The first value should be 0. |
| dimension | dimension of the one dimensional phase space. |
| numRequiredParticles | number of particles that are contained in the requested percentile. Is determined by the total number of particles and the percentile. |
Definition at line 590 of file DistributionMoments.cpp.
References begin(), end(), and meanR_m.
Referenced by computePercentiles().
|
private |
Definition at line 683 of file DistributionMoments.cpp.
| void DistributionMoments::foo | ( | ) |
|
inline |
Definition at line 287 of file DistributionMoments.h.
References sixtyEightPercentile_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 295 of file DistributionMoments.h.
References ninetyFivePercentile_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 311 of file DistributionMoments.h.
References ninetyNine_NinetyNinePercentile_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 303 of file DistributionMoments.h.
References ninetyNinePercentile_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 263 of file DistributionMoments.h.
References centroid_m.
|
inline |
Definition at line 251 of file DistributionMoments.h.
References moments_m.
|
inline |
Definition at line 259 of file DistributionMoments.h.
References moments_m.
|
inline |
Definition at line 236 of file DistributionMoments.h.
References debyeLength_m.
|
inline |
Definition at line 247 of file DistributionMoments.h.
References moments_m.
|
inline |
Definition at line 255 of file DistributionMoments.h.
References moments_m.
|
inline |
Definition at line 192 of file DistributionMoments.h.
References geometricEps_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 200 of file DistributionMoments.h.
References halo_m.
|
inline |
Definition at line 208 of file DistributionMoments.h.
References maxR_m.
|
inline |
Definition at line 319 of file DistributionMoments.h.
References maxR_m, and minR_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 220 of file DistributionMoments.h.
References meanGamma_m.
|
inline |
Definition at line 224 of file DistributionMoments.h.
References meanGammaZ_m.
|
inline |
Definition at line 228 of file DistributionMoments.h.
References meanKineticEnergy_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 180 of file DistributionMoments.h.
References meanP_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 172 of file DistributionMoments.h.
References meanR_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 267 of file DistributionMoments.h.
References means_m.
|
inline |
Definition at line 212 of file DistributionMoments.h.
References meanTime_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 204 of file DistributionMoments.h.
References minR_m.
|
inline |
Definition at line 271 of file DistributionMoments.h.
References moments_m.
|
inline |
Definition at line 188 of file DistributionMoments.h.
References normalizedEps_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 291 of file DistributionMoments.h.
References normalizedEps68Percentile_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 299 of file DistributionMoments.h.
References normalizedEps95Percentile_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 315 of file DistributionMoments.h.
References normalizedEps99_99Percentile_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 307 of file DistributionMoments.h.
References normalizedEps99Percentile_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 239 of file DistributionMoments.h.
References plasmaParameter_m.
|
inline |
Definition at line 184 of file DistributionMoments.h.
References stdP_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 176 of file DistributionMoments.h.
References stdR_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 196 of file DistributionMoments.h.
References stdRP_m.
|
inline |
Definition at line 243 of file DistributionMoments.h.
References stdKineticEnergy_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 216 of file DistributionMoments.h.
References stdTime_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 233 of file DistributionMoments.h.
References Physics::c, Units::eV2kg, Physics::kB, and temperature_m.
|
inline |
Definition at line 275 of file DistributionMoments.h.
References totalCharge_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 279 of file DistributionMoments.h.
References totalMass_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 283 of file DistributionMoments.h.
References totalNumParticles_m.
|
private |
Definition at line 870 of file DistributionMoments.cpp.
|
private |
Definition at line 835 of file DistributionMoments.cpp.
References centroid_m, geometricEps_m, halo_m, meanKineticEnergy_m, meanP_m, meanR_m, ninetyFivePercentile_m, ninetyNine_NinetyNinePercentile_m, ninetyNinePercentile_m, normalizedEps68Percentile_m, normalizedEps95Percentile_m, normalizedEps99_99Percentile_m, normalizedEps99Percentile_m, normalizedEps_m, sixtyEightPercentile_m, stdKineticEnergy_m, stdP_m, stdR_m, stdRP_m, totalCharge_m, totalMass_m, and totalNumParticles_m.
Referenced by computeMoments(), and DistributionMoments().
|
private |
Definition at line 863 of file DistributionMoments.cpp.
References debyeLength_m, plasmaParameter_m, and temperature_m.
Referenced by computeDebyeLength(), and DistributionMoments().
|
private |
Definition at line 157 of file DistributionMoments.h.
Referenced by computeMeans(), computeMoments(), getCentroid(), and reset().
|
private |
Definition at line 151 of file DistributionMoments.h.
Referenced by computeDebyeLength(), computePlasmaParameter(), getDebyeLength(), and resetPlasmaParameters().
|
private |
Definition at line 134 of file DistributionMoments.h.
Referenced by computeMoments(), getGeometricEmittance(), and reset().
|
private |
Definition at line 135 of file DistributionMoments.h.
Referenced by computeMoments(), getHalo(), and reset().
|
private |
Definition at line 136 of file DistributionMoments.h.
Referenced by computeMinMaxPosition(), computePercentiles(), getMaxPosition(), and getMaxR().
|
private |
Definition at line 154 of file DistributionMoments.h.
Referenced by computeMeans(), computeMoments(), and getMeanGamma().
|
private |
Definition at line 155 of file DistributionMoments.h.
Referenced by computeMeans(), and getMeanGammaZ().
|
private |
Definition at line 149 of file DistributionMoments.h.
Referenced by computeMeans(), computeMoments(), getMeanKineticEnergy(), and reset().
|
private |
Definition at line 129 of file DistributionMoments.h.
Referenced by computeMeans(), computeMoments(), getMeanMomentum(), and reset().
|
private |
Definition at line 128 of file DistributionMoments.h.
Referenced by computeMeans(), computeMoments(), computePercentiles(), determinePercentilesDetail(), getMeanPosition(), and reset().
|
private |
Definition at line 158 of file DistributionMoments.h.
Referenced by computeMeans(), and getMeans().
|
private |
Definition at line 147 of file DistributionMoments.h.
Referenced by getMeanTime().
|
private |
Definition at line 137 of file DistributionMoments.h.
Referenced by computeMinMaxPosition(), computePercentiles(), getMaxR(), and getMinPosition().
|
private |
Definition at line 159 of file DistributionMoments.h.
Referenced by computeMoments(), DistributionMoments(), getDDx(), getDDy(), getDx(), getDy(), and getMoments6x6().
|
private |
Definition at line 140 of file DistributionMoments.h.
Referenced by computePercentiles(), get95Percentile(), and reset().
|
private |
Definition at line 144 of file DistributionMoments.h.
Referenced by computePercentiles(), get99_99Percentile(), and reset().
|
private |
Definition at line 142 of file DistributionMoments.h.
Referenced by computePercentiles(), get99Percentile(), and reset().
|
private |
Definition at line 139 of file DistributionMoments.h.
Referenced by computePercentiles(), getNormalizedEmittance68Percentile(), and reset().
|
private |
Definition at line 141 of file DistributionMoments.h.
Referenced by computePercentiles(), getNormalizedEmittance95Percentile(), and reset().
|
private |
Definition at line 145 of file DistributionMoments.h.
Referenced by computePercentiles(), getNormalizedEmittance99_99Percentile(), and reset().
|
private |
Definition at line 143 of file DistributionMoments.h.
Referenced by computePercentiles(), getNormalizedEmittance99Percentile(), and reset().
|
private |
Definition at line 133 of file DistributionMoments.h.
Referenced by computeMoments(), getNormalizedEmittance(), and reset().
|
private |
Definition at line 160 of file DistributionMoments.h.
Referenced by computeMoments(), and DistributionMoments().
|
staticprivate |
Definition at line 169 of file DistributionMoments.h.
Referenced by computePercentiles().
|
staticprivate |
Definition at line 166 of file DistributionMoments.h.
Referenced by computePercentiles().
|
staticprivate |
Definition at line 168 of file DistributionMoments.h.
Referenced by computePercentiles().
|
staticprivate |
Definition at line 167 of file DistributionMoments.h.
Referenced by computePercentiles().
|
private |
Definition at line 152 of file DistributionMoments.h.
Referenced by computePlasmaParameter(), getPlasmaParameter(), and resetPlasmaParameters().
|
private |
Definition at line 138 of file DistributionMoments.h.
Referenced by computePercentiles(), get68Percentile(), and reset().
|
private |
Definition at line 153 of file DistributionMoments.h.
Referenced by computeMoments(), getStdKineticEnergy(), and reset().
|
private |
Definition at line 131 of file DistributionMoments.h.
Referenced by computeMoments(), getStandardDeviationMomentum(), and reset().
|
private |
Definition at line 130 of file DistributionMoments.h.
Referenced by computeMoments(), getStandardDeviationPosition(), and reset().
|
private |
Definition at line 132 of file DistributionMoments.h.
Referenced by computeMoments(), getStandardDeviationRP(), and reset().
|
private |
Definition at line 148 of file DistributionMoments.h.
Referenced by getStdTime().
|
private |
Definition at line 150 of file DistributionMoments.h.
Referenced by computeDebyeLength(), getTemperature(), and resetPlasmaParameters().
|
private |
Definition at line 162 of file DistributionMoments.h.
Referenced by getTotalCharge(), and reset().
|
private |
Definition at line 163 of file DistributionMoments.h.
Referenced by getTotalMass(), and reset().
|
private |
Definition at line 164 of file DistributionMoments.h.
Referenced by computePercentiles(), getTotalNumParticles(), and reset().