|
OPALX (Object Oriented Parallel Accelerator Library for Exascale) 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 &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 |
| Computes the percentile and the range of all local particles that are contained therein. More... | |
| 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 113 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 & | , |
| const std::vector< OpalParticle >::const_iterator & | |||
| ) |
Definition at line 343 of file DistributionMoments.cpp.
Referenced by LossDataSink::saveH5().

| void DistributionMoments::computeDebyeLength | ( | ippl::ParticleAttrib< Vector_t< double, 3 > >::view_type & | Pview, |
| size_t | Np, | ||
| size_t | Nlocal, | ||
| double | density | ||
| ) |
Definition at line 635 of file DistributionMoments.cpp.
References Physics::c, ippl::Comm, computePlasmaParameter(), debyeLength_m, Dim, Physics::epsilon_0, Units::eV2kg, ippl::fence(), Units::GeV2eV, Physics::m_e, ippl::parallel_reduce(), Physics::q_e, resetPlasmaParameters(), and temperature_m.
Referenced by ParticleContainer< T, Dim >::computeDebyeLength().

| void DistributionMoments::computeMeanKineticEnergy | ( | ) |
Definition at line 622 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, ippl::Comm, Dim, ippl::fence(), meanGamma_m, meanGammaZ_m, meanKineticEnergy_m, meanP_m, meanR_m, means_m, and ippl::parallel_reduce().
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.
References ippl::Comm, Dim, ippl::fence(), ippl::getRangePolicy(), maxR_m, minR_m, and ippl::parallel_reduce().
Referenced by ParticleContainer< T, Dim >::computeMinMaxR().

| 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, ippl::Comm, computeMeans(), Dim, ippl::fence(), geometricEps_m, halo_m, Options::haloShift, ippl::max(), meanGamma_m, meanKineticEnergy_m, meanP_m, meanR_m, moments_m, normalizedEps_m, notCentMoments_m, ippl::parallel_reduce(), reset(), stdKineticEnergy_m, stdP_m, stdR_m, and stdRP_m.
Referenced by ParticleContainer< T, Dim >::updateMoments().

|
private |
Definition at line 536 of file DistributionMoments.cpp.
References begin(), ippl::Comm, end(), and ippl::max().
Referenced by computePercentiles().

|
private |
Definition at line 351 of file DistributionMoments.cpp.
References ippl::Comm, computeNormalizedEmittance(), Options::computePercentiles, determinePercentilesDetail(), first(), ippl::max(), 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 720 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 480 of file DistributionMoments.cpp.
References begin(), ippl::Comm, end(), and meanR_m.
Referenced by computePercentiles().

|
private |
| void DistributionMoments::foo | ( | ) |
|
inline |
Definition at line 286 of file DistributionMoments.h.
References sixtyEightPercentile_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 294 of file DistributionMoments.h.
References ninetyFivePercentile_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 310 of file DistributionMoments.h.
References ninetyNine_NinetyNinePercentile_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 302 of file DistributionMoments.h.
References ninetyNinePercentile_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 262 of file DistributionMoments.h.
References centroid_m.
Referenced by ParticleContainer< T, Dim >::getCentroid().
|
inline |
Definition at line 250 of file DistributionMoments.h.
References moments_m.
Referenced by ParticleContainer< T, Dim >::getDDx().
|
inline |
Definition at line 258 of file DistributionMoments.h.
References moments_m.
Referenced by ParticleContainer< T, Dim >::getDDy().
|
inline |
Definition at line 235 of file DistributionMoments.h.
References debyeLength_m.
Referenced by ParticleContainer< T, Dim >::computeDebyeLength(), and ParticleContainer< T, Dim >::getDebyeLength().
|
inline |
Definition at line 246 of file DistributionMoments.h.
References moments_m.
Referenced by ParticleContainer< T, Dim >::getDx().
|
inline |
Definition at line 254 of file DistributionMoments.h.
References moments_m.
Referenced by ParticleContainer< T, Dim >::getDy().
|
inline |
Definition at line 191 of file DistributionMoments.h.
References geometricEps_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 199 of file DistributionMoments.h.
References halo_m.
|
inline |
Definition at line 207 of file DistributionMoments.h.
References maxR_m.
Referenced by ParticleContainer< T, Dim >::getMaxR().
|
inline |
Definition at line 318 of file DistributionMoments.h.
References ippl::max(), maxR_m, and minR_m.
Referenced by LossDataSink::saveH5().

|
inline |
Definition at line 219 of file DistributionMoments.h.
References meanGamma_m.
|
inline |
Definition at line 223 of file DistributionMoments.h.
References meanGammaZ_m.
Referenced by ParticleContainer< T, Dim >::getMeanGammaZ().
|
inline |
Definition at line 227 of file DistributionMoments.h.
References meanKineticEnergy_m.
Referenced by ParticleContainer< T, Dim >::getMeanKineticEnergy(), and LossDataSink::saveH5().
|
inline |
Definition at line 179 of file DistributionMoments.h.
References meanP_m.
Referenced by ParticleContainer< T, Dim >::getMeanP(), and LossDataSink::saveH5().
|
inline |
Definition at line 171 of file DistributionMoments.h.
References meanR_m.
Referenced by ParticleContainer< T, Dim >::getMeanR(), and LossDataSink::saveH5().
|
inline |
Definition at line 266 of file DistributionMoments.h.
References means_m.
Referenced by ParticleContainer< T, Dim >::getMeans().
|
inline |
Definition at line 211 of file DistributionMoments.h.
References meanTime_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 203 of file DistributionMoments.h.
References minR_m.
Referenced by ParticleContainer< T, Dim >::getMinR().
|
inline |
Definition at line 270 of file DistributionMoments.h.
References moments_m.
Referenced by ParticleContainer< T, Dim >::getCovMatrix().
|
inline |
Definition at line 187 of file DistributionMoments.h.
References normalizedEps_m.
Referenced by ParticleContainer< T, Dim >::getNormEmit(), and LossDataSink::saveH5().
|
inline |
Definition at line 290 of file DistributionMoments.h.
References normalizedEps68Percentile_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 298 of file DistributionMoments.h.
References normalizedEps95Percentile_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 314 of file DistributionMoments.h.
References normalizedEps99_99Percentile_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 306 of file DistributionMoments.h.
References normalizedEps99Percentile_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 238 of file DistributionMoments.h.
References plasmaParameter_m.
Referenced by ParticleContainer< T, Dim >::getPlasmaParameter().
|
inline |
Definition at line 183 of file DistributionMoments.h.
References stdP_m.
Referenced by ParticleContainer< T, Dim >::getRmsP(), and LossDataSink::saveH5().
|
inline |
Definition at line 175 of file DistributionMoments.h.
References stdR_m.
Referenced by ParticleContainer< T, Dim >::getRmsR(), and LossDataSink::saveH5().
|
inline |
Definition at line 195 of file DistributionMoments.h.
References stdRP_m.
Referenced by ParticleContainer< T, Dim >::getRmsRP().
|
inline |
Definition at line 242 of file DistributionMoments.h.
References stdKineticEnergy_m.
Referenced by ParticleContainer< T, Dim >::getStdKineticEnergy(), and LossDataSink::saveH5().
|
inline |
Definition at line 215 of file DistributionMoments.h.
References stdTime_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 232 of file DistributionMoments.h.
References Physics::c, Units::eV2kg, Physics::kB, and temperature_m.
Referenced by ParticleContainer< T, Dim >::getTemperature().
|
inline |
Definition at line 274 of file DistributionMoments.h.
References totalCharge_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 278 of file DistributionMoments.h.
References totalMass_m.
Referenced by LossDataSink::saveH5().
|
inline |
Definition at line 282 of file DistributionMoments.h.
References totalNumParticles_m.
|
private |
Definition at line 760 of file DistributionMoments.cpp.

|
private |
Definition at line 725 of file DistributionMoments.cpp.
References begin(), centroid_m, end(), 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 753 of file DistributionMoments.cpp.
References debyeLength_m, plasmaParameter_m, and temperature_m.
Referenced by computeDebyeLength(), and DistributionMoments().
|
private |
Definition at line 156 of file DistributionMoments.h.
Referenced by computeMeans(), computeMoments(), getCentroid(), and reset().
|
private |
Definition at line 150 of file DistributionMoments.h.
Referenced by computeDebyeLength(), computePlasmaParameter(), getDebyeLength(), and resetPlasmaParameters().
|
private |
Definition at line 133 of file DistributionMoments.h.
Referenced by computeMoments(), getGeometricEmittance(), and reset().
|
private |
Definition at line 134 of file DistributionMoments.h.
Referenced by computeMoments(), getHalo(), and reset().
|
private |
Definition at line 135 of file DistributionMoments.h.
Referenced by computeMinMaxPosition(), computePercentiles(), getMaxPosition(), and getMaxR().
|
private |
Definition at line 153 of file DistributionMoments.h.
Referenced by computeMeans(), computeMoments(), and getMeanGamma().
|
private |
Definition at line 154 of file DistributionMoments.h.
Referenced by computeMeans(), and getMeanGammaZ().
|
private |
Definition at line 148 of file DistributionMoments.h.
Referenced by computeMeans(), computeMoments(), getMeanKineticEnergy(), and reset().
|
private |
Definition at line 128 of file DistributionMoments.h.
Referenced by computeMeans(), computeMoments(), getMeanMomentum(), and reset().
|
private |
Definition at line 127 of file DistributionMoments.h.
Referenced by computeMeans(), computeMoments(), computePercentiles(), determinePercentilesDetail(), getMeanPosition(), and reset().
|
private |
Definition at line 157 of file DistributionMoments.h.
Referenced by computeMeans(), and getMeans().
|
private |
Definition at line 146 of file DistributionMoments.h.
Referenced by getMeanTime().
|
private |
Definition at line 136 of file DistributionMoments.h.
Referenced by computeMinMaxPosition(), computePercentiles(), getMaxR(), and getMinPosition().
|
private |
Definition at line 158 of file DistributionMoments.h.
Referenced by computeMoments(), DistributionMoments(), getDDx(), getDDy(), getDx(), getDy(), and getMoments6x6().
|
private |
Definition at line 139 of file DistributionMoments.h.
Referenced by computePercentiles(), get95Percentile(), and reset().
|
private |
Definition at line 143 of file DistributionMoments.h.
Referenced by computePercentiles(), get99_99Percentile(), and reset().
|
private |
Definition at line 141 of file DistributionMoments.h.
Referenced by computePercentiles(), get99Percentile(), and reset().
|
private |
Definition at line 138 of file DistributionMoments.h.
Referenced by computePercentiles(), getNormalizedEmittance68Percentile(), and reset().
|
private |
Definition at line 140 of file DistributionMoments.h.
Referenced by computePercentiles(), getNormalizedEmittance95Percentile(), and reset().
|
private |
Definition at line 144 of file DistributionMoments.h.
Referenced by computePercentiles(), getNormalizedEmittance99_99Percentile(), and reset().
|
private |
Definition at line 142 of file DistributionMoments.h.
Referenced by computePercentiles(), getNormalizedEmittance99Percentile(), and reset().
|
private |
Definition at line 132 of file DistributionMoments.h.
Referenced by computeMoments(), getNormalizedEmittance(), and reset().
|
private |
Definition at line 159 of file DistributionMoments.h.
Referenced by computeMoments(), and DistributionMoments().
|
staticprivate |
Definition at line 168 of file DistributionMoments.h.
Referenced by computePercentiles().
|
staticprivate |
Definition at line 165 of file DistributionMoments.h.
Referenced by computePercentiles().
|
staticprivate |
Definition at line 167 of file DistributionMoments.h.
Referenced by computePercentiles().
|
staticprivate |
Definition at line 166 of file DistributionMoments.h.
Referenced by computePercentiles().
|
private |
Definition at line 151 of file DistributionMoments.h.
Referenced by computePlasmaParameter(), getPlasmaParameter(), and resetPlasmaParameters().
|
private |
Definition at line 137 of file DistributionMoments.h.
Referenced by computePercentiles(), get68Percentile(), and reset().
|
private |
Definition at line 152 of file DistributionMoments.h.
Referenced by computeMoments(), getStdKineticEnergy(), and reset().
|
private |
Definition at line 130 of file DistributionMoments.h.
Referenced by computeMoments(), getStandardDeviationMomentum(), and reset().
|
private |
Definition at line 129 of file DistributionMoments.h.
Referenced by computeMoments(), getStandardDeviationPosition(), and reset().
|
private |
Definition at line 131 of file DistributionMoments.h.
Referenced by computeMoments(), getStandardDeviationRP(), and reset().
|
private |
Definition at line 147 of file DistributionMoments.h.
Referenced by getStdTime().
|
private |
Definition at line 149 of file DistributionMoments.h.
Referenced by computeDebyeLength(), getTemperature(), and resetPlasmaParameters().
|
private |
Definition at line 161 of file DistributionMoments.h.
Referenced by getTotalCharge(), and reset().
|
private |
Definition at line 162 of file DistributionMoments.h.
Referenced by getTotalMass(), and reset().
|
private |
Definition at line 163 of file DistributionMoments.h.
Referenced by computePercentiles(), getTotalNumParticles(), and reset().