OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Patch.cpp
Go to the documentation of this file.
1 // ------------------------------------------------------------------------
2 // $RCSfile: Patch.cpp,v $
3 // ------------------------------------------------------------------------
4 // $Revision: 1.1.1.1 $
5 // ------------------------------------------------------------------------
6 // Copyright: see Copyright.readme
7 // ------------------------------------------------------------------------
8 //
9 // Class: Patch
10 // Defines the abstract interface for a geometry patch.
11 //
12 // ------------------------------------------------------------------------
13 // Class category: AbsBeamline
14 // ------------------------------------------------------------------------
15 //
16 // $Date: 2000/03/27 09:32:31 $
17 // $Author: fci $
18 //
19 // ------------------------------------------------------------------------
20 
21 #include "AbsBeamline/Patch.h"
23 
24 
25 // Class Patch
26 // ------------------------------------------------------------------------
27 
29  Component()
30 {}
31 
32 
33 Patch::Patch(const Patch &rhs):
34  Component(rhs)
35 {}
36 
37 
38 Patch::Patch(const std::string &name):
39  Component(name)
40 {}
41 
42 
44 {}
45 
46 
47 void Patch::accept(BeamlineVisitor &visitor) const {
48  visitor.visitPatch(*this);
49 }
50 
51 void Patch::initialise(PartBunchBase<double, 3> *bunch, double &startField, double &endField) {
52  RefPartBunch_m = bunch;
53 }
54 
56 {}
57 
58 bool Patch::bends() const {
59  return false;
60 }
61 
62 void Patch::getDimensions(double &zBegin, double &zEnd) const {
63 
64 }
65 
66 
68  return PATCH;
69 }
virtual void visitPatch(const Patch &)=0
Apply the algorithm to a patch.
virtual void getDimensions(double &zBegin, double &zEnd) const override
Definition: Patch.cpp:62
virtual ~Patch()
Definition: Patch.cpp:43
virtual void initialise(PartBunchBase< double, 3 > *bunch, double &startField, double &endField) override
Definition: Patch.cpp:51
PartBunchBase< double, 3 > * RefPartBunch_m
Definition: Component.h:200
virtual ElementBase::ElementType getType() const override
Get element type std::string.
Definition: Patch.cpp:67
virtual void accept(BeamlineVisitor &) const override
Apply visitor to patch.
Definition: Patch.cpp:47
virtual bool bends() const override
Definition: Patch.cpp:58
virtual void finalise() override
Definition: Patch.cpp:55
const std::string name
Interface for a geometric patch.
Definition: Patch.h:34
Interface for a single beam element.
Definition: Component.h:51
Patch()
Definition: Patch.cpp:28
Abstract algorithm.