10 SIZE,
"EMISSIONSOURCE",
11 "The EMISSIONSOURCE statement defines a particle injector with "
12 "position R0, momentum P0, start time t0, and a linked Distribution.") {
27 "ZEROFACE_R0Z",
"Set Dirichlet boundary conditions (0 potential) in xy plane at R0Z.",
31 "SHIFTED_GREENS_FUNCTION",
32 "Enforce Dirichlet BCs (0 potential) in xy plane at R0Z via a shifted Green's "
33 "function instead of explicit image charges. Mutually exclusive with ZEROFACE_R0Z. "
34 "Requires the OPEN field solver. Active for ZEROFACE_MAXSTEPS steps (0 = unlimited).",
39 "Dump interpolated potential on the ZEROFACE_R0Z plane every n-th global "
40 "timestep (0 disables dumping, since it's an expensive operation).",
45 "Number of timesteps for which image charges are active. "
46 "After this many steps, the solver continues without image charges. "
47 "0 means unlimited (image charges always active).",
52 "Emission model for cathode emission. "
53 "NONE: thermal momentum applied in z only. "
54 "ASTRA: 3D isotropic thermal emission on forward half-sphere.",
55 {
"NONE",
"ASTRA"},
"NONE");
79 throw OpalException(
"EmissionSource::find()",
"EmissionSource \"" + name +
"\" not found.");
89 return ippl::Vector<double, 3>(
95 return ippl::Vector<double, 3>(
110 const int frequency =
static_cast<int>(rawFrequency);
111 if (rawFrequency < 0.0 || std::floor(rawFrequency) != rawFrequency) {
113 "EmissionSource::getZeroFacePlaneDumpFrequency",
114 "ZEROFACEPLANEDUMP must be a non-negative integer value.");
121 const int value =
static_cast<int>(rawValue);
122 if (rawValue < 0.0 || std::floor(rawValue) != rawValue) {
124 "EmissionSource::getZerofaceMaxSteps",
125 "ZEROFACE_MAXSTEPS must be a non-negative integer value.");
The base class for all OPAL definitions.
ippl::Vector< double, 3 > getP0() const
EmissionSource()
Exemplar constructor.
int getZerofaceMaxSteps() const
bool getShiftedGreensFunction() const
int getZeroFacePlaneDumpFrequency() const
@ SHIFTED_GREENS_FUNCTION
static EmissionSource * find(const std::string &name)
virtual bool canReplaceBy(Object *object)
Test if replacement is allowed.
bool getZeroFaceR0Z() const
std::string getEmissionModel() const
std::string getDistributionName() const
virtual EmissionSource * clone(const std::string &name)
Return a clone.
virtual ~EmissionSource()
virtual void execute()
Execute the command.
ippl::Vector< double, 3 > getR0() const
The base class for all OPAL objects.
void registerOwnership(const AttributeHandler::OwnerType &itsClass) const
std::vector< Attribute > itsAttr
The object attributes.
Object * find(const std::string &name)
Find entry.
static OpalData * getInstance()
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
double getReal(const Attribute &attr)
Return real value.
Attribute makePredefinedString(const std::string &name, const std::string &help, const std::initializer_list< std::string > &predefinedStrings)
Make predefined string attribute.
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
bool getBool(const Attribute &attr)
Return logical value.
std::string getString(const Attribute &attr)
Get string value.
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.