Last change
on this file since 431 was
431,
checked in by touze, 11 years ago
|
systeme periodique (mailles) + multipoles + madx
|
File size:
1.4 KB
|
Line | |
---|
1 | |
---|
2 | #include <iostream> |
---|
3 | #include <algorithm> // std::find |
---|
4 | |
---|
5 | #include "abstractElement.h" |
---|
6 | |
---|
7 | abstractElement::abstractElement() : abstractSoftware_(NULL) |
---|
8 | { |
---|
9 | setDefaultValues(); |
---|
10 | setDefaults(); |
---|
11 | stepmaxcm_ = 1000000; |
---|
12 | } |
---|
13 | |
---|
14 | abstractElement::abstractElement(string lab) : abstractSoftware_(NULL) |
---|
15 | { |
---|
16 | specificName_ = lab; |
---|
17 | setDefaultValues(); |
---|
18 | setDefaults(); |
---|
19 | stepmaxcm_ = 1000000; |
---|
20 | } |
---|
21 | |
---|
22 | abstractElement::~abstractElement() |
---|
23 | { |
---|
24 | if (parametersString_ != NULL) delete [] parametersString_ ; |
---|
25 | } |
---|
26 | |
---|
27 | void abstractElement::setDefaultValues() |
---|
28 | { |
---|
29 | defaultSpecificName_ = string("XXXXXX"); |
---|
30 | defaultLength_ = 0.0; |
---|
31 | defaultAperture_ = 1.e+6; |
---|
32 | phaseStepMax_ = 10.; |
---|
33 | } |
---|
34 | |
---|
35 | void abstractElement::setDefaults() |
---|
36 | { |
---|
37 | specificName_ = defaultSpecificName_; |
---|
38 | nbParam_ = 2; |
---|
39 | lenghtElem_ = defaultLength_; |
---|
40 | aperture_ = defaultAperture_; |
---|
41 | } |
---|
42 | |
---|
43 | void abstractElement::setPhaseStep(double) { |
---|
44 | cout << " setPhaseStep : ce n'est pas celui la qu'il faut ! " ; |
---|
45 | return; |
---|
46 | } |
---|
47 | |
---|
48 | void abstractElement::setParameters(double ll, double aper) |
---|
49 | { |
---|
50 | lenghtElem_ = ll; |
---|
51 | aperture_ = aper; |
---|
52 | } |
---|
53 | |
---|
54 | void abstractElement::setLabel(string lab) |
---|
55 | { |
---|
56 | specificName_= lab; |
---|
57 | } |
---|
58 | |
---|
59 | string abstractElement::getLabel() const { |
---|
60 | return specificName_; |
---|
61 | } |
---|
62 | |
---|
63 | nomdElements abstractElement::getNomdElement() const { |
---|
64 | return elementName_; |
---|
65 | } |
---|
66 | |
---|
67 | double abstractElement::getLenghtOfElement() const { |
---|
68 | return lenghtElem_; |
---|
69 | } |
---|
70 | |
---|
71 | int abstractElement::getNbParams() const { |
---|
72 | return nbParam_; |
---|
73 | } |
---|
74 | |
---|
75 | double abstractElement::getInitialKineticEnergy() const { |
---|
76 | return 0.0; |
---|
77 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.