29#include <unordered_map> 
   52               "The \"WAKE\" statement defines data for the wakefuction " 
   56        (
"TYPE", 
"Specifies the wake function.",
 
   57         {
"1D-CSR", 
"1D-CSR-IGF", 
"LONG-SHORT-RANGE", 
"TRANSV-SHORT-RANGE"});
 
   60        (
"NBIN", 
"Number of bins for the line density calculation");
 
   63        (
"CONST_LENGTH", 
"True if the length of the Bunch is considered as constant");
 
   66        (
"CONDUCT", 
"Conductivity.", {
"DC", 
"AC"});
 
   69        (
"Z0", 
"Impedance of the beam pipe ");
 
   72        (
"RADIUS", 
"The radius of the beam pipe [m]");
 
   75        (
"SIGMA", 
"Material constant dependant on the beam pipe material");
 
   78        (
"TAU", 
"Material constant dependant on the beam pipe material");
 
   81        (
"FILTERS", 
"List of filters to apply on line density");
 
   84        (
"FNAME", 
"Filename of the wakefield file");
 
  113    return dynamic_cast<OpalWake*
>(object) != 0;
 
  148    *
gmsg << 
"* ************* W A K E ************************************************************\n";
 
  149    *
gmsg << 
"OpalWake::initWakefunction ";
 
  150    *
gmsg << 
"for element " << element.
getName() << 
"\n";
 
  151    *
gmsg << 
"* **********************************************************************************" << 
endl;
 
  154    std::vector<Filter*> filters;
 
  156    for (std::vector<std::string>::const_iterator fit = filters_str.begin(); fit != filters_str.end(); ++fit) {
 
  164    static const std::unordered_map<std::string, OpalWakeType> stringOpalWakeType_s = {
 
  173                            "The attribute \"TYPE\" isn't set for the \"WAKE\" statement");
 
  180                                    "At least 8 bins have to be used, ideally far more");
 
  190                                    "At least 8 bins have to be used, ideally far more");
 
  229                                "Invalid \"TYPE\" of \"WAKE\" statement");
 
  235    os << 
"* ************* W A K E ************************************************************ " << 
std::endl;
 
  244    os << 
"* ********************************************************************************** " << 
std::endl;
 
Inform & endl(Inform &inf)
 
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
 
double getReal(const Attribute &attr)
Return real value.
 
Attribute makeStringArray(const std::string &name, const std::string &help)
Create a string array attribute.
 
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::vector< std::string > getStringArray(const Attribute &attr)
Get string array value.
 
std::string getString(const Attribute &attr)
Get string value.
 
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
 
boost::function< boost::tuple< double, bool >(arguments_t)> type
 
The base class for all OPAL definitions.
 
The base class for all OPAL objects.
 
void registerOwnership(const AttributeHandler::OwnerType &itsClass) const
 
const std::string & getOpalName() const
Return object name.
 
void setOpalName(const std::string &name)
Set object name.
 
std::vector< Attribute > itsAttr
The object attributes.
 
bool builtin
Built-in flag.
 
Object * find(const std::string &name)
Find entry.
 
static OpalData * getInstance()
 
void define(Object *newObject)
Define a new object.
 
virtual const std::string & getName() const
Get element name.
 
void print(std::ostream &os) const
Print the object.
 
virtual bool canReplaceBy(Object *object)
Test if replacement is allowed.
 
OpalWake()
Exemplar constructor.
 
static OpalWake * find(const std::string &name)
Find named WAKE.
 
void initWakefunction(const ElementBase &element)
 
virtual void update()
Update the WAKE data.
 
virtual void execute()
Check the WAKE data.
 
virtual OpalWake * clone(const std::string &name)
Make clone.
 
The base class for all OPAL exceptions.
 
static OpalFilter * find(const std::string &name)
Find named FILTER.