OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
OpalFlatTop Class Reference

Implements an old-OPAL-compatible flat-top emitter with precomputed birth times. More...

#include <OpalFlatTop.h>

Inheritance diagram for OpalFlatTop:
Inheritance graph
Collaboration diagram for OpalFlatTop:
Collaboration graph

Public Member Functions

 OpalFlatTop (std::shared_ptr< ParticleContainer_t > pc, std::shared_ptr< FieldContainer_t > fc, Distribution_t *opalDist)
 Constructor for OpalFlatTop.
 
 OpalFlatTop (std::shared_ptr< ParticleContainer_t > pc, std::shared_ptr< FieldContainer_t > fc, bool emitting, double sigmaTFall, double sigmaTRise, Vector_t< double, 3 > cutoff, double tPulseLengthFWHM, Vector_t< double, 3 > sigmaR, double ftOscAmplitude=0.0, double ftOscPeriods=0.0)
 Constructor for OpalFlatTop with parameters passed directly.
 
void generateParticles (size_t &numberOfParticles, Vector_t< double, 3 > nr) override
 Builds the global birth-time inventory for the requested particles.
 
void emitParticles (double t, double dt) override
 Emits all particles whose birth times fall into the current step.
 
bool isEmissionDone (double) const override
 Returns whether all precomputed particles have been emitted.
 
double getGlobalTimeShift () const override
 Returns the global time shift needed to center old-OPAL pulse times.
 
bool hasInitialReferenceMomentum () const override
 Reports that this sampler provides an initial reference momentum.
 
Vector_t< double, 3 > getInitialReferenceMomentum () const override
 Returns the initial reference momentum used by the tracker.
 
double getEmissionTimeStep () const override
 Returns the preferred emission time step.
 
void initDomainDecomp (double BoxIncr) override
 Initializes a domain decomposition large enough for the emitted bunch.
 
void setWithDomainDecomp (bool withDomainDecomp) override
 Sets whether to use domain decomposition during emission.
 
double getEmissionTime () const
 Returns the total emission time.
 
double getDistArea () const
 Returns the total area of the normalized flat-top distribution.
 
size_t getInventorySize () const
 Returns the number of precomputed birth times.
 
size_t getNextGlobalIndex () const
 Returns the next global inventory index to be emitted.
 
const std::vector< double > & getBirthTimes () const
 Returns the sorted global birth-time inventory.
 
void setBirthTimesForTest (std::vector< double > birthTimes)
 Replaces the birth-time inventory for tests.
 
void generateLocalParticles (size_type nlocalBefore, size_t globalBegin, size_t nNew, double tStart, double dt)
 Generates the local particles assigned to this rank for one emission step.
 
void setEmissionOffsets (ippl::Vector< double, 3 > R0, ippl::Vector< double, 3 > P0, double t0, const std::string &emissionModel="NONE")
 
void setInitialPolarization (const ippl::Vector< double, 3 > &pol)
 
void fillPolarization (size_t startIdx, size_t count)
 
Vector_t< double, 3 > getEmissionR0 () const
 
virtual void testNumEmitParticles (size_t, double)
 
virtual void testEmitParticles (size_t, double)
 
size_t computeLocalEmitCount (size_t totalToSample) const
 Computes the number of particles this rank should emit so that the global total equals totalToSample and no rank exceeds its capacity (space left).
 

Protected Attributes

std::shared_ptr< ParticleContainer_tpc_m
 
std::shared_ptr< FieldContainer_tfc_m
 
Distribution_topalDist_m = nullptr
 
std::string samplingMethod_m
 
Vector_t< double, 3 > R0_m = 0.0
 Emission source offset: position R0, momentum P0, start time t0 (applied in sample step).
 
Vector_t< double, 3 > P0_m = 0.0
 
double t0_m = 0.0
 
std::string emissionModel_m = "NONE"
 
Vector_t< double, 3 > initialPol_m = 0.0
 
bool hasEmittedOnce_m = false
 For one-shot emitters (e.g. Gaussian at delayed t0): guard to avoid double sampling.
 

Private Types

using size_type = ippl::detail::size_type
 

Private Member Functions

void setParameters (Distribution_t *opalDist)
 Reads distribution parameters from the OPALX Distribution object.
 
void setInternalVariables (bool emitting, double sigmaTFall, double sigmaTRise, Vector_t< double, 3 > cutoff, double tPulseLengthFWHM, Vector_t< double, 3 > sigmaR, double ftOscAmplitude, double ftOscPeriods)
 Sets derived flat-top profile and emission parameters.
 
void buildBirthTimeInventory (size_t numberOfParticles)
 Builds and sorts the global particle birth-time inventory.
 
double sampleTruncatedHalfGaussian (double sigma, double limit)
 Samples an absolute value from a Gaussian truncated at a limit.
 
double toBirthTime (double opalPulseTime) const
 Converts old-OPAL pulse time to tracker birth time.
 
std::pair< size_t, size_t > computeLocalEmitRange (size_t totalToEmit) const
 Computes the local contiguous subrange of a global emission batch.
 

Static Private Member Functions

static size_t determineRandInit ()
 Determines the device random seed initialization.
 
static size_t determineHostSeed ()
 Determines the host random seed initialization.
 

Private Attributes

OpalFlatTopGeneratorPool rand_pool_m
 Device random number generator pool.
 
std::mt19937_64 host_rng_m
 Host generator used to sample birth times.
 
double flattopTime_m = 0.0
 Time duration of the flat profile section.
 
double normalizedFlankArea_m = 0.0
 Area of one normalized truncated Gaussian flank.
 
double distArea_m = 0.0
 Total area of the flat-top distribution.
 
double sigmaTFall_m = 0.0
 Standard deviation of the falling flank.
 
double sigmaTRise_m = 0.0
 Standard deviation of the rising flank.
 
Vector_t< double, 3 > cutoffR_m
 Cutoff multipliers for distribution support.
 
double fallTime_m = 0.0
 Duration represented by the falling flank.
 
double riseTime_m = 0.0
 Duration represented by the rising flank.
 
bool emitting_m = false
 Flag for particle emission status.
 
size_t totalN_m = 0
 Total number of particles in the inventory.
 
bool withDomainDecomp_m = false
 Flag for domain decomposition.
 
double emissionTime_m = 0.0
 Total emission time.
 
Vector_t< double, 3 > nr_m
 Number of grid points per direction.
 
Vector_t< double, 3 > hr_m
 Grid spacing.
 
Vector_t< double, 3 > sigmaR_m
 Semi-axis lengths of the transverse disk.
 
double ftOscAmplitude_m = 0.0
 Flat-top oscillation amplitude in percent.
 
double ftOscPeriods_m = 0.0
 Number of oscillation periods across the flat top.
 
size_t emissionSteps_m = 100
 Number of steps used to derive emission dt.
 
std::vector< double > birthTimes_m
 Sorted global particle birth times.
 
size_t nextGlobalIndex_m = 0
 First global birth-time index not emitted yet.
 
bool inventoryBuilt_m = false
 True once birthTimes_m is ready for emission.
 

Detailed Description

Implements an old-OPAL-compatible flat-top emitter with precomputed birth times.

x and y coordinates are sampled uniformly on an elliptical disk. The number of particles emitted in each time interval follows the flat-top time profile:

f(t)/Z = exp(-((t - riseTime_m) / sigmaTRise_m)^2 / 2), t < riseTime 1.0, riseTime <= t <= riseTime + flattopTime exp(-((t - (fallTime_m + flattopTime_m)) / sigmaTFall_m)^2 / 2), t > riseTime + flattopTime

where Z is the normalizing factor. Unlike FlatTop, this sampler builds a sorted global inventory of particle birth times before tracking starts and emits the matching slice during each tracker step.

Definition at line 43 of file OpalFlatTop.h.

Member Typedef Documentation

◆ size_type

using OpalFlatTop::size_type = ippl::detail::size_type
private

Definition at line 181 of file OpalFlatTop.h.

Constructor & Destructor Documentation

◆ OpalFlatTop() [1/2]

OpalFlatTop::OpalFlatTop ( std::shared_ptr< ParticleContainer_t pc,
std::shared_ptr< FieldContainer_t fc,
Distribution_t opalDist 
)

Constructor for OpalFlatTop.

Parameters
pcShared pointer to ParticleContainer.
fcShared pointer to FieldContainer.
opalDistBorrowed Distribution.

Definition at line 13 of file OpalFlatTop.cpp.

References setParameters().

Here is the call graph for this function:

◆ OpalFlatTop() [2/2]

OpalFlatTop::OpalFlatTop ( std::shared_ptr< ParticleContainer_t pc,
std::shared_ptr< FieldContainer_t fc,
bool  emitting,
double  sigmaTFall,
double  sigmaTRise,
Vector_t< double, 3 >  cutoff,
double  tPulseLengthFWHM,
Vector_t< double, 3 >  sigmaR,
double  ftOscAmplitude = 0.0,
double  ftOscPeriods = 0.0 
)

Constructor for OpalFlatTop with parameters passed directly.

This is primarily intended for tests or callers that do not need a full Distribution object.

Parameters
pcShared pointer to ParticleContainer.
fcShared pointer to FieldContainer.
emittingFlag indicating whether the distribution is emitting.
sigmaTFallStandard deviation of the falling flank in the time profile.
sigmaTRiseStandard deviation of the rising flank in the time profile.
cutoffCutoff multiplier for the spatial and longitudinal distributions.
tPulseLengthFWHMTime length of the pulse in FWHM.
sigmaRSemi-axis lengths for the transverse emission disk.
ftOscAmplitudeOptional flat-top oscillation amplitude in percent.
ftOscPeriodsOptional number of oscillation periods across the flat top.

Definition at line 22 of file OpalFlatTop.cpp.

References setInternalVariables().

Here is the call graph for this function:

Member Function Documentation

◆ buildBirthTimeInventory()

void OpalFlatTop::buildBirthTimeInventory ( size_t  numberOfParticles)
private

Builds and sorts the global particle birth-time inventory.

Parameters
numberOfParticlesNumber of birth times to generate.

Definition at line 111 of file OpalFlatTop.cpp.

References birthTimes_m, cutoffR_m, distArea_m, fallTime_m, flattopTime_m, ftOscAmplitude_m, ftOscPeriods_m, host_rng_m, inventoryBuilt_m, nextGlobalIndex_m, normalizedFlankArea_m, sampleTruncatedHalfGaussian(), sigmaTFall_m, sigmaTRise_m, toBirthTime(), and Physics::two_pi.

Referenced by generateParticles().

Here is the call graph for this function:

◆ computeLocalEmitCount()

size_t SamplingBase::computeLocalEmitCount ( size_t  totalToSample) const
inherited

Computes the number of particles this rank should emit so that the global total equals totalToSample and no rank exceeds its capacity (space left).

Parameters
totalToSampleGlobal number of particles to emit this timestep.
Returns
Local number of particles this rank should create/emit.

Definition at line 6 of file SamplingBase.cpp.

References SamplingBase::pc_m.

Referenced by FlatTop::countEnteringParticlesPerRank(), FromFile::generateParticles(), Gaussian::generateParticles(), and MultiVariateGaussian::generateParticles().

◆ computeLocalEmitRange()

std::pair< size_t, size_t > OpalFlatTop::computeLocalEmitRange ( size_t  totalToEmit) const
private

Computes the local contiguous subrange of a global emission batch.

Parameters
totalToEmitNumber of particles emitted globally in the current step.
Returns
Pair of local offset into the global batch and local particle count.

Definition at line 207 of file OpalFlatTop.cpp.

References SamplingBase::pc_m.

Referenced by emitParticles().

◆ determineHostSeed()

size_t OpalFlatTop::determineHostSeed ( )
staticprivate

Determines the host random seed initialization.

Returns
Seed value for host-side birth-time sampling.

Definition at line 45 of file OpalFlatTop.cpp.

References Options::seed.

◆ determineRandInit()

size_t OpalFlatTop::determineRandInit ( )
staticprivate

Determines the device random seed initialization.

Returns
Seed value for the per-rank Kokkos random pool.

Definition at line 33 of file OpalFlatTop.cpp.

References gmsg, and Options::seed.

◆ emitParticles()

void OpalFlatTop::emitParticles ( double  t,
double  dt 
)
overridevirtual

Emits all particles whose birth times fall into the current step.

Parameters
tStart time of the current tracker step.
dtTime step size.

Reimplemented from SamplingBase.

Definition at line 268 of file OpalFlatTop.cpp.

References birthTimes_m, computeLocalEmitRange(), generateLocalParticles(), inventoryBuilt_m, nextGlobalIndex_m, and SamplingBase::pc_m.

Referenced by TEST_F(), TEST_F(), and TEST_F().

Here is the call graph for this function:

◆ fillPolarization()

void SamplingBase::fillPolarization ( size_t  startIdx,
size_t  count 
)
inlineinherited

Fill the Pol particle attribute with initialPol_m on the half-open range [startIdx, startIdx + count). No-op when the container does not store spin. Must be called after the particles have been created and before they are pushed downstream.

Definition at line 63 of file SamplingBase.hpp.

References SamplingBase::initialPol_m, and SamplingBase::pc_m.

Referenced by FlatTop::emitParticles(), FromFile::generateParticles(), Gaussian::generateParticles(), and MultiVariateGaussian::generateParticles().

◆ generateLocalParticles()

void OpalFlatTop::generateLocalParticles ( size_type  nlocalBefore,
size_t  globalBegin,
size_t  nNew,
double  tStart,
double  dt 
)

Generates the local particles assigned to this rank for one emission step.

Particles are sampled on the transverse disk, assigned a per-particle fractional step based on their birth time, and drifted for half of that effective step.

Parameters
nlocalBeforeLocal particle count before allocation.
globalBeginFirst global birth-time index assigned to this rank.
nNewNumber of local particles to generate.
tStartStart time of the current tracker step.
dtTime step size.

Definition at line 303 of file OpalFlatTop.cpp.

References birthTimes_m, Physics::c, SamplingBase::emissionModel_m, euclidean_norm(), SamplingBase::P0_m, SamplingBase::pc_m, SamplingBase::R0_m, rand_pool_m, sigmaR_m, and Physics::two_pi.

Referenced by emitParticles().

Here is the call graph for this function:

◆ generateParticles()

void OpalFlatTop::generateParticles ( size_t &  numberOfParticles,
Vector_t< double, 3 >  nr 
)
overridevirtual

Builds the global birth-time inventory for the requested particles.

Parameters
numberOfParticlesNumber of particles to generate.
nrNumber of grid points in each direction.

Reimplemented from SamplingBase.

Definition at line 93 of file OpalFlatTop.cpp.

References buildBirthTimeInventory(), emitting_m, nr, nr_m, and totalN_m.

Referenced by TEST_F(), and TEST_F().

Here is the call graph for this function:

◆ getBirthTimes()

const std::vector< double > & OpalFlatTop::getBirthTimes ( ) const
inline

Returns the sorted global birth-time inventory.

Definition at line 171 of file OpalFlatTop.h.

References birthTimes_m.

Referenced by TEST_F().

◆ getDistArea()

double OpalFlatTop::getDistArea ( ) const
inline

Returns the total area of the normalized flat-top distribution.

Definition at line 156 of file OpalFlatTop.h.

References distArea_m.

◆ getEmissionR0()

Vector_t< double, 3 > SamplingBase::getEmissionR0 ( ) const
inlineinherited

Definition at line 78 of file SamplingBase.hpp.

References SamplingBase::R0_m.

◆ getEmissionTime()

double OpalFlatTop::getEmissionTime ( ) const
inline

Returns the total emission time.

Definition at line 151 of file OpalFlatTop.h.

References emissionTime_m.

Referenced by TEST_F().

◆ getEmissionTimeStep()

double OpalFlatTop::getEmissionTimeStep ( ) const
inlineoverridevirtual

Returns the preferred emission time step.

Returns
emissionTime divided by the configured number of emission steps.

Reimplemented from SamplingBase.

Definition at line 130 of file OpalFlatTop.h.

References emissionSteps_m, and emissionTime_m.

Referenced by TEST_F().

◆ getGlobalTimeShift()

double OpalFlatTop::getGlobalTimeShift ( ) const
inlineoverridevirtual

Returns the global time shift needed to center old-OPAL pulse times.

Returns
Non-negative shift from source time to the midpoint of the emission window.

Reimplemented from SamplingBase.

Definition at line 109 of file OpalFlatTop.h.

References emissionTime_m, and SamplingBase::t0_m.

Referenced by TEST_F(), and TEST_F().

◆ getInitialReferenceMomentum()

Vector_t< double, 3 > OpalFlatTop::getInitialReferenceMomentum ( ) const
overridevirtual

Returns the initial reference momentum used by the tracker.

Returns
P0 for EMISSIONMODEL NONE, or the ASTRA half-sphere reference momentum.

Reimplemented from SamplingBase.

Definition at line 200 of file OpalFlatTop.cpp.

References SamplingBase::emissionModel_m, euclidean_norm(), and SamplingBase::P0_m.

Referenced by TEST_F().

Here is the call graph for this function:

◆ getInventorySize()

size_t OpalFlatTop::getInventorySize ( ) const
inline

Returns the number of precomputed birth times.

Definition at line 161 of file OpalFlatTop.h.

References birthTimes_m.

◆ getNextGlobalIndex()

size_t OpalFlatTop::getNextGlobalIndex ( ) const
inline

Returns the next global inventory index to be emitted.

Definition at line 166 of file OpalFlatTop.h.

References nextGlobalIndex_m.

Referenced by TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ hasInitialReferenceMomentum()

bool OpalFlatTop::hasInitialReferenceMomentum ( ) const
inlineoverridevirtual

Reports that this sampler provides an initial reference momentum.

Reimplemented from SamplingBase.

Definition at line 116 of file OpalFlatTop.h.

Referenced by TEST_F().

◆ initDomainDecomp()

void OpalFlatTop::initDomainDecomp ( double  BoxIncr)
overridevirtual

Initializes a domain decomposition large enough for the emitted bunch.

Parameters
BoxIncrPercentage by which to enlarge the computed mesh box.

Reimplemented from SamplingBase.

Definition at line 383 of file OpalFlatTop.cpp.

References Physics::c, emissionTime_m, SamplingBase::fc_m, hr_m, nr_m, SamplingBase::pc_m, and sigmaR_m.

◆ isEmissionDone()

bool OpalFlatTop::isEmissionDone ( double  ) const
inlineoverridevirtual

Returns whether all precomputed particles have been emitted.

Returns
True if the inventory exists and the next global index is past its end.

Reimplemented from SamplingBase.

Definition at line 100 of file OpalFlatTop.h.

References birthTimes_m, inventoryBuilt_m, and nextGlobalIndex_m.

Referenced by TEST_F().

◆ sampleTruncatedHalfGaussian()

double OpalFlatTop::sampleTruncatedHalfGaussian ( double  sigma,
double  limit 
)
private

Samples an absolute value from a Gaussian truncated at a limit.

Parameters
sigmaStandard deviation of the Gaussian.
limitMaximum accepted absolute value.
Returns
Sampled non-negative time offset.

Definition at line 182 of file OpalFlatTop.cpp.

References host_rng_m.

Referenced by buildBirthTimeInventory().

◆ setBirthTimesForTest()

void OpalFlatTop::setBirthTimesForTest ( std::vector< double >  birthTimes)

Replaces the birth-time inventory for tests.

Parameters
birthTimesBirth times to sort and install as the active inventory.

Definition at line 411 of file OpalFlatTop.cpp.

References birthTimes_m, inventoryBuilt_m, nextGlobalIndex_m, and totalN_m.

Referenced by TEST_F(), and TEST_F().

◆ setEmissionOffsets()

void SamplingBase::setEmissionOffsets ( ippl::Vector< double, 3 >  R0,
ippl::Vector< double, 3 >  P0,
double  t0,
const std::string &  emissionModel = "NONE" 
)
inlineinherited

◆ setInitialPolarization()

void SamplingBase::setInitialPolarization ( const ippl::Vector< double, 3 > &  pol)
inlineinherited

Definition at line 57 of file SamplingBase.hpp.

References SamplingBase::initialPol_m.

◆ setInternalVariables()

void OpalFlatTop::setInternalVariables ( bool  emitting,
double  sigmaTFall,
double  sigmaTRise,
Vector_t< double, 3 >  cutoff,
double  tPulseLengthFWHM,
Vector_t< double, 3 >  sigmaR,
double  ftOscAmplitude,
double  ftOscPeriods 
)
private

Sets derived flat-top profile and emission parameters.

Parameters
emittingFlag indicating whether the distribution is emitting.
sigmaTFallStandard deviation of the falling flank.
sigmaTRiseStandard deviation of the rising flank.
cutoffCutoff multiplier for distribution support.
tPulseLengthFWHMTime length of the pulse in FWHM.
sigmaRSemi-axis lengths for the transverse emission disk.
ftOscAmplitudeFlat-top oscillation amplitude in percent.
ftOscPeriodsNumber of oscillation periods across the flat top.

Definition at line 66 of file OpalFlatTop.cpp.

References cutoffR_m, distArea_m, emissionTime_m, emitting_m, fallTime_m, flattopTime_m, ftOscAmplitude_m, ftOscPeriods_m, normalizedFlankArea_m, riseTime_m, sigmaR_m, sigmaTFall_m, sigmaTRise_m, Physics::two_pi, and withDomainDecomp_m.

Referenced by OpalFlatTop(), and setParameters().

◆ setParameters()

◆ setWithDomainDecomp()

void OpalFlatTop::setWithDomainDecomp ( bool  withDomainDecomp)
overridevirtual

Sets whether to use domain decomposition during emission.

Parameters
withDomainDecompBoolean flag for domain decomposition.

Reimplemented from SamplingBase.

Definition at line 407 of file OpalFlatTop.cpp.

References withDomainDecomp_m.

◆ testEmitParticles()

virtual void SamplingBase::testEmitParticles ( size_t  ,
double   
)
inlinevirtualinherited

Definition at line 108 of file SamplingBase.hpp.

◆ testNumEmitParticles()

virtual void SamplingBase::testNumEmitParticles ( size_t  ,
double   
)
inlinevirtualinherited

Definition at line 105 of file SamplingBase.hpp.

◆ toBirthTime()

double OpalFlatTop::toBirthTime ( double  opalPulseTime) const
private

Converts old-OPAL pulse time to tracker birth time.

Parameters
opalPulseTimeTime coordinate in the old-OPAL pulse convention.
Returns
Birth time in the OPALX tracker convention.

Definition at line 196 of file OpalFlatTop.cpp.

References emissionTime_m, and SamplingBase::t0_m.

Referenced by buildBirthTimeInventory().

Member Data Documentation

◆ birthTimes_m

std::vector<double> OpalFlatTop::birthTimes_m
private

◆ cutoffR_m

Vector_t<double, 3> OpalFlatTop::cutoffR_m
private

Cutoff multipliers for distribution support.

Definition at line 191 of file OpalFlatTop.h.

Referenced by buildBirthTimeInventory(), and setInternalVariables().

◆ distArea_m

double OpalFlatTop::distArea_m = 0.0
private

Total area of the flat-top distribution.

Definition at line 188 of file OpalFlatTop.h.

Referenced by buildBirthTimeInventory(), getDistArea(), and setInternalVariables().

◆ emissionModel_m

◆ emissionSteps_m

size_t OpalFlatTop::emissionSteps_m = 100
private

Number of steps used to derive emission dt.

Definition at line 203 of file OpalFlatTop.h.

Referenced by getEmissionTimeStep(), and setParameters().

◆ emissionTime_m

double OpalFlatTop::emissionTime_m = 0.0
private

◆ emitting_m

bool OpalFlatTop::emitting_m = false
private

Flag for particle emission status.

Definition at line 194 of file OpalFlatTop.h.

Referenced by generateParticles(), and setInternalVariables().

◆ fallTime_m

double OpalFlatTop::fallTime_m = 0.0
private

Duration represented by the falling flank.

Definition at line 192 of file OpalFlatTop.h.

Referenced by buildBirthTimeInventory(), and setInternalVariables().

◆ fc_m

std::shared_ptr<FieldContainer_t> SamplingBase::fc_m
protectedinherited

◆ flattopTime_m

double OpalFlatTop::flattopTime_m = 0.0
private

Time duration of the flat profile section.

Definition at line 186 of file OpalFlatTop.h.

Referenced by buildBirthTimeInventory(), and setInternalVariables().

◆ ftOscAmplitude_m

double OpalFlatTop::ftOscAmplitude_m = 0.0
private

Flat-top oscillation amplitude in percent.

Definition at line 201 of file OpalFlatTop.h.

Referenced by buildBirthTimeInventory(), and setInternalVariables().

◆ ftOscPeriods_m

double OpalFlatTop::ftOscPeriods_m = 0.0
private

Number of oscillation periods across the flat top.

Definition at line 202 of file OpalFlatTop.h.

Referenced by buildBirthTimeInventory(), and setInternalVariables().

◆ hasEmittedOnce_m

bool SamplingBase::hasEmittedOnce_m = false
protectedinherited

◆ host_rng_m

std::mt19937_64 OpalFlatTop::host_rng_m
private

Host generator used to sample birth times.

Definition at line 184 of file OpalFlatTop.h.

Referenced by buildBirthTimeInventory(), and sampleTruncatedHalfGaussian().

◆ hr_m

Vector_t<double, 3> OpalFlatTop::hr_m
private

Grid spacing.

Definition at line 199 of file OpalFlatTop.h.

Referenced by initDomainDecomp().

◆ initialPol_m

Vector_t<double, 3> SamplingBase::initialPol_m = 0.0
protectedinherited

Initial polarization vector P applied to every particle this sampler creates. Rest-frame Pauli expectations along lab-frame axes; |Pol| in [0, 1]. Ignored when the container does not have a spin attribute (hasSpin() == false).

Definition at line 30 of file SamplingBase.hpp.

Referenced by SamplingBase::fillPolarization(), and SamplingBase::setInitialPolarization().

◆ inventoryBuilt_m

bool OpalFlatTop::inventoryBuilt_m = false
private

True once birthTimes_m is ready for emission.

Definition at line 207 of file OpalFlatTop.h.

Referenced by buildBirthTimeInventory(), emitParticles(), isEmissionDone(), and setBirthTimesForTest().

◆ nextGlobalIndex_m

size_t OpalFlatTop::nextGlobalIndex_m = 0
private

First global birth-time index not emitted yet.

Definition at line 206 of file OpalFlatTop.h.

Referenced by buildBirthTimeInventory(), emitParticles(), getNextGlobalIndex(), isEmissionDone(), and setBirthTimesForTest().

◆ normalizedFlankArea_m

double OpalFlatTop::normalizedFlankArea_m = 0.0
private

Area of one normalized truncated Gaussian flank.

Definition at line 187 of file OpalFlatTop.h.

Referenced by buildBirthTimeInventory(), and setInternalVariables().

◆ nr_m

Vector_t<double, 3> OpalFlatTop::nr_m
private

Number of grid points per direction.

Definition at line 198 of file OpalFlatTop.h.

Referenced by generateParticles(), and initDomainDecomp().

◆ opalDist_m

◆ P0_m

◆ pc_m

◆ R0_m

Vector_t<double, 3> SamplingBase::R0_m = 0.0
protectedinherited

◆ rand_pool_m

OpalFlatTopGeneratorPool OpalFlatTop::rand_pool_m
private

Device random number generator pool.

Definition at line 183 of file OpalFlatTop.h.

Referenced by generateLocalParticles().

◆ riseTime_m

double OpalFlatTop::riseTime_m = 0.0
private

Duration represented by the rising flank.

Definition at line 193 of file OpalFlatTop.h.

Referenced by setInternalVariables().

◆ samplingMethod_m

std::string SamplingBase::samplingMethod_m
protectedinherited

Definition at line 20 of file SamplingBase.hpp.

◆ sigmaR_m

Vector_t<double, 3> OpalFlatTop::sigmaR_m
private

Semi-axis lengths of the transverse disk.

Definition at line 200 of file OpalFlatTop.h.

Referenced by generateLocalParticles(), initDomainDecomp(), and setInternalVariables().

◆ sigmaTFall_m

double OpalFlatTop::sigmaTFall_m = 0.0
private

Standard deviation of the falling flank.

Definition at line 189 of file OpalFlatTop.h.

Referenced by buildBirthTimeInventory(), and setInternalVariables().

◆ sigmaTRise_m

double OpalFlatTop::sigmaTRise_m = 0.0
private

Standard deviation of the rising flank.

Definition at line 190 of file OpalFlatTop.h.

Referenced by buildBirthTimeInventory(), and setInternalVariables().

◆ t0_m

◆ totalN_m

size_t OpalFlatTop::totalN_m = 0
private

Total number of particles in the inventory.

Definition at line 195 of file OpalFlatTop.h.

Referenced by generateParticles(), and setBirthTimesForTest().

◆ withDomainDecomp_m

bool OpalFlatTop::withDomainDecomp_m = false
private

Flag for domain decomposition.

Definition at line 196 of file OpalFlatTop.h.

Referenced by setInternalVariables(), and setWithDomainDecomp().


The documentation for this class was generated from the following files: