Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
src
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
70
Issues
70
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OPAL
src
Commits
aeb3e26a
Commit
aeb3e26a
authored
May 21, 2015
by
gsell
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitorious.psi.ch:opal/src
parents
18f1b1c5
b4728120
Changes
131
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
131 changed files
with
769 additions
and
3242 deletions
+769
-3242
CMakeLists.txt
CMakeLists.txt
+11
-31
classic/5.0/src/AbsBeamline/AlignWrapper.cpp
classic/5.0/src/AbsBeamline/AlignWrapper.cpp
+2
-2
classic/5.0/src/AbsBeamline/AlignWrapper.h
classic/5.0/src/AbsBeamline/AlignWrapper.h
+2
-2
classic/5.0/src/AbsBeamline/BeamBeam.cpp
classic/5.0/src/AbsBeamline/BeamBeam.cpp
+2
-3
classic/5.0/src/AbsBeamline/BeamBeam.h
classic/5.0/src/AbsBeamline/BeamBeam.h
+1
-1
classic/5.0/src/AbsBeamline/Collimator.cpp
classic/5.0/src/AbsBeamline/Collimator.cpp
+5
-6
classic/5.0/src/AbsBeamline/Collimator.h
classic/5.0/src/AbsBeamline/Collimator.h
+2
-2
classic/5.0/src/AbsBeamline/Component.cpp
classic/5.0/src/AbsBeamline/Component.cpp
+4
-5
classic/5.0/src/AbsBeamline/Component.h
classic/5.0/src/AbsBeamline/Component.h
+2
-2
classic/5.0/src/AbsBeamline/Corrector.cpp
classic/5.0/src/AbsBeamline/Corrector.cpp
+26
-21
classic/5.0/src/AbsBeamline/Corrector.h
classic/5.0/src/AbsBeamline/Corrector.h
+29
-7
classic/5.0/src/AbsBeamline/Cyclotron.cpp
classic/5.0/src/AbsBeamline/Cyclotron.cpp
+5
-1
classic/5.0/src/AbsBeamline/Cyclotron.h
classic/5.0/src/AbsBeamline/Cyclotron.h
+12
-11
classic/5.0/src/AbsBeamline/CyclotronValley.cpp
classic/5.0/src/AbsBeamline/CyclotronValley.cpp
+3
-4
classic/5.0/src/AbsBeamline/CyclotronValley.h
classic/5.0/src/AbsBeamline/CyclotronValley.h
+2
-2
classic/5.0/src/AbsBeamline/Degrader.cpp
classic/5.0/src/AbsBeamline/Degrader.cpp
+3
-4
classic/5.0/src/AbsBeamline/Degrader.h
classic/5.0/src/AbsBeamline/Degrader.h
+2
-2
classic/5.0/src/AbsBeamline/Diagnostic.cpp
classic/5.0/src/AbsBeamline/Diagnostic.cpp
+2
-3
classic/5.0/src/AbsBeamline/Diagnostic.h
classic/5.0/src/AbsBeamline/Diagnostic.h
+1
-1
classic/5.0/src/AbsBeamline/Drift.cpp
classic/5.0/src/AbsBeamline/Drift.cpp
+2
-3
classic/5.0/src/AbsBeamline/Drift.h
classic/5.0/src/AbsBeamline/Drift.h
+1
-1
classic/5.0/src/AbsBeamline/ElementBase.cpp
classic/5.0/src/AbsBeamline/ElementBase.cpp
+73
-2
classic/5.0/src/AbsBeamline/ElementBase.h
classic/5.0/src/AbsBeamline/ElementBase.h
+45
-2
classic/5.0/src/AbsBeamline/Lambertson.cpp
classic/5.0/src/AbsBeamline/Lambertson.cpp
+2
-3
classic/5.0/src/AbsBeamline/Lambertson.h
classic/5.0/src/AbsBeamline/Lambertson.h
+1
-1
classic/5.0/src/AbsBeamline/Marker.cpp
classic/5.0/src/AbsBeamline/Marker.cpp
+2
-3
classic/5.0/src/AbsBeamline/Marker.h
classic/5.0/src/AbsBeamline/Marker.h
+1
-1
classic/5.0/src/AbsBeamline/Monitor.cpp
classic/5.0/src/AbsBeamline/Monitor.cpp
+3
-4
classic/5.0/src/AbsBeamline/Monitor.h
classic/5.0/src/AbsBeamline/Monitor.h
+2
-2
classic/5.0/src/AbsBeamline/Multipole.cpp
classic/5.0/src/AbsBeamline/Multipole.cpp
+2
-3
classic/5.0/src/AbsBeamline/Multipole.h
classic/5.0/src/AbsBeamline/Multipole.h
+1
-1
classic/5.0/src/AbsBeamline/ParallelPlate.cpp
classic/5.0/src/AbsBeamline/ParallelPlate.cpp
+2
-14
classic/5.0/src/AbsBeamline/ParallelPlate.h
classic/5.0/src/AbsBeamline/ParallelPlate.h
+2
-9
classic/5.0/src/AbsBeamline/Patch.cpp
classic/5.0/src/AbsBeamline/Patch.cpp
+2
-3
classic/5.0/src/AbsBeamline/Patch.h
classic/5.0/src/AbsBeamline/Patch.h
+1
-1
classic/5.0/src/AbsBeamline/Probe.cpp
classic/5.0/src/AbsBeamline/Probe.cpp
+2
-6
classic/5.0/src/AbsBeamline/Probe.h
classic/5.0/src/AbsBeamline/Probe.h
+2
-3
classic/5.0/src/AbsBeamline/RBend.cpp
classic/5.0/src/AbsBeamline/RBend.cpp
+38
-37
classic/5.0/src/AbsBeamline/RBend.h
classic/5.0/src/AbsBeamline/RBend.h
+3
-1
classic/5.0/src/AbsBeamline/RFCavity.cpp
classic/5.0/src/AbsBeamline/RFCavity.cpp
+4
-5
classic/5.0/src/AbsBeamline/RFCavity.h
classic/5.0/src/AbsBeamline/RFCavity.h
+2
-2
classic/5.0/src/AbsBeamline/RFQuadrupole.cpp
classic/5.0/src/AbsBeamline/RFQuadrupole.cpp
+2
-3
classic/5.0/src/AbsBeamline/RFQuadrupole.h
classic/5.0/src/AbsBeamline/RFQuadrupole.h
+1
-1
classic/5.0/src/AbsBeamline/SBend.cpp
classic/5.0/src/AbsBeamline/SBend.cpp
+28
-24
classic/5.0/src/AbsBeamline/SBend.h
classic/5.0/src/AbsBeamline/SBend.h
+3
-1
classic/5.0/src/AbsBeamline/Separator.cpp
classic/5.0/src/AbsBeamline/Separator.cpp
+2
-3
classic/5.0/src/AbsBeamline/Separator.h
classic/5.0/src/AbsBeamline/Separator.h
+1
-1
classic/5.0/src/AbsBeamline/Septum.cpp
classic/5.0/src/AbsBeamline/Septum.cpp
+2
-6
classic/5.0/src/AbsBeamline/Septum.h
classic/5.0/src/AbsBeamline/Septum.h
+2
-3
classic/5.0/src/AbsBeamline/Solenoid.cpp
classic/5.0/src/AbsBeamline/Solenoid.cpp
+3
-4
classic/5.0/src/AbsBeamline/Solenoid.h
classic/5.0/src/AbsBeamline/Solenoid.h
+2
-2
classic/5.0/src/AbsBeamline/Stripper.cpp
classic/5.0/src/AbsBeamline/Stripper.cpp
+2
-6
classic/5.0/src/AbsBeamline/Stripper.h
classic/5.0/src/AbsBeamline/Stripper.h
+2
-3
classic/5.0/src/AbsBeamline/TravelingWave.cpp
classic/5.0/src/AbsBeamline/TravelingWave.cpp
+4
-5
classic/5.0/src/AbsBeamline/TravelingWave.h
classic/5.0/src/AbsBeamline/TravelingWave.h
+2
-2
classic/5.0/src/Beamlines/TBeamline.h
classic/5.0/src/Beamlines/TBeamline.h
+8
-14
classic/5.0/src/ComponentWrappers/CorrectorWrapper.cpp
classic/5.0/src/ComponentWrappers/CorrectorWrapper.cpp
+3
-4
classic/5.0/src/ComponentWrappers/CorrectorWrapper.h
classic/5.0/src/ComponentWrappers/CorrectorWrapper.h
+2
-2
classic/5.0/src/ComponentWrappers/CyclotronWrapper.cpp
classic/5.0/src/ComponentWrappers/CyclotronWrapper.cpp
+3
-4
classic/5.0/src/ComponentWrappers/CyclotronWrapper.h
classic/5.0/src/ComponentWrappers/CyclotronWrapper.h
+2
-2
classic/5.0/src/ComponentWrappers/MultipoleWrapper.cpp
classic/5.0/src/ComponentWrappers/MultipoleWrapper.cpp
+3
-4
classic/5.0/src/ComponentWrappers/MultipoleWrapper.h
classic/5.0/src/ComponentWrappers/MultipoleWrapper.h
+2
-2
classic/5.0/src/ComponentWrappers/RBendWrapper.cpp
classic/5.0/src/ComponentWrappers/RBendWrapper.cpp
+3
-4
classic/5.0/src/ComponentWrappers/RBendWrapper.h
classic/5.0/src/ComponentWrappers/RBendWrapper.h
+2
-2
classic/5.0/src/ComponentWrappers/SBendWrapper.cpp
classic/5.0/src/ComponentWrappers/SBendWrapper.cpp
+3
-4
classic/5.0/src/ComponentWrappers/SBendWrapper.h
classic/5.0/src/ComponentWrappers/SBendWrapper.h
+2
-2
classic/5.0/src/Fields/Interpolation/MMatrix.cpp
classic/5.0/src/Fields/Interpolation/MMatrix.cpp
+60
-57
classic/5.0/src/Fields/Interpolation/MVector.cpp
classic/5.0/src/Fields/Interpolation/MVector.cpp
+63
-59
classic/5.0/src/Fields/Interpolation/SquarePolynomialVector.cpp
...c/5.0/src/Fields/Interpolation/SquarePolynomialVector.cpp
+24
-26
classic/5.0/src/Parser/ClassicParser.cpp
classic/5.0/src/Parser/ClassicParser.cpp
+3
-1
classic/5.0/src/Utilities/ClassicField.cpp
classic/5.0/src/Utilities/ClassicField.cpp
+2
-2
classic/5.0/src/Utilities/ClassicField.h
classic/5.0/src/Utilities/ClassicField.h
+2
-2
ippl/CMakeLists.txt
ippl/CMakeLists.txt
+27
-6
ippl/src/CMakeLists.txt
ippl/src/CMakeLists.txt
+18
-18
ippl/src/DataSource/ACLVISFieldDataSource.hpp
ippl/src/DataSource/ACLVISFieldDataSource.hpp
+0
-1
ippl/src/DataSource/ACLVISPtclAttribDataSource.hpp
ippl/src/DataSource/ACLVISPtclAttribDataSource.hpp
+1
-1
ippl/src/DataSource/ACLVISPtclBaseDataSource.hpp
ippl/src/DataSource/ACLVISPtclBaseDataSource.hpp
+1
-1
ippl/src/DataSource/DataConnect.h
ippl/src/DataSource/DataConnect.h
+0
-1
ippl/src/DataSource/FileDataConnect.h
ippl/src/DataSource/FileDataConnect.h
+0
-1
ippl/src/DataSource/FileFieldDataSource.hpp
ippl/src/DataSource/FileFieldDataSource.hpp
+0
-2
ippl/src/DataSource/FilePtclAttribDataSource.hpp
ippl/src/DataSource/FilePtclAttribDataSource.hpp
+0
-2
ippl/src/DataSource/FilePtclBaseDataSource.hpp
ippl/src/DataSource/FilePtclBaseDataSource.hpp
+0
-3
ippl/src/DataSource/MakeDataSource.hpp
ippl/src/DataSource/MakeDataSource.hpp
+0
-2
ippl/src/DataSource/PtclAttribDataSource.cpp
ippl/src/DataSource/PtclAttribDataSource.cpp
+0
-3
ippl/src/DataSource/StringDataSource.hpp
ippl/src/DataSource/StringDataSource.hpp
+1
-1
ippl/src/FFT/FFT.h
ippl/src/FFT/FFT.h
+1
-1
ippl/src/FFT/FFT.hpp
ippl/src/FFT/FFT.hpp
+5
-5
ippl/src/Message/Message.h
ippl/src/Message/Message.h
+0
-1
ippl/src/Particle/ParticleAttribBase.h
ippl/src/Particle/ParticleAttribBase.h
+0
-1
ippl/src/Profile/Profiler.h
ippl/src/Profile/Profiler.h
+1
-1
ippl/src/Utility/DiscConfig.h
ippl/src/Utility/DiscConfig.h
+0
-1
ippl/src/Utility/DiscField.h
ippl/src/Utility/DiscField.h
+0
-1
ippl/src/Utility/DiscMeta.h
ippl/src/Utility/DiscMeta.h
+0
-1
ippl/src/Utility/DiscParticle.h
ippl/src/Utility/DiscParticle.h
+0
-1
ippl/src/Utility/DiscType.h
ippl/src/Utility/DiscType.h
+0
-1
ippl/src/Utility/Inform.h
ippl/src/Utility/Inform.h
+0
-2
ippl/src/Utility/IplCounter.h
ippl/src/Utility/IplCounter.h
+1
-1
ippl/src/Utility/IpplCounter.h
ippl/src/Utility/IpplCounter.h
+0
-2
ippl/src/Utility/IpplInfo.cpp
ippl/src/Utility/IpplInfo.cpp
+6
-12
ippl/src/Utility/IpplMemoryUsage.h
ippl/src/Utility/IpplMemoryUsage.h
+0
-1
ippl/src/Utility/IpplStats.h
ippl/src/Utility/IpplStats.h
+0
-1
ippl/src/Utility/IpplTimings.h
ippl/src/Utility/IpplTimings.h
+0
-1
ippl/src/Utility/NamedObj.h
ippl/src/Utility/NamedObj.h
+1
-1
ippl/src/Utility/PAssert.cpp
ippl/src/Utility/PAssert.cpp
+4
-10
ippl/src/Utility/Pstring.h
ippl/src/Utility/Pstring.h
+0
-45
ippl/src/Utility/bstring.h
ippl/src/Utility/bstring.h
+0
-2517
ippl/test/FFT/CMakeLists.txt
ippl/test/FFT/CMakeLists.txt
+8
-5
ippl/test/FFT/TestRC.cpp
ippl/test/FFT/TestRC.cpp
+2
-3
ippl/test/particle/CMakeLists.txt
ippl/test/particle/CMakeLists.txt
+8
-5
ippl/test/toyfdtf/CMakeLists.txt
ippl/test/toyfdtf/CMakeLists.txt
+8
-5
src/Algorithms/AutophaseTracker.cpp
src/Algorithms/AutophaseTracker.cpp
+4
-4
src/Algorithms/BeamBeam3D.cpp
src/Algorithms/BeamBeam3D.cpp
+3
-4
src/Algorithms/BeamBeam3D.h
src/Algorithms/BeamBeam3D.h
+2
-2
src/Algorithms/MPSplitIntegrator.cpp
src/Algorithms/MPSplitIntegrator.cpp
+3
-4
src/Algorithms/MPSplitIntegrator.h
src/Algorithms/MPSplitIntegrator.h
+2
-2
src/Algorithms/ParallelCyclotronTracker.cpp
src/Algorithms/ParallelCyclotronTracker.cpp
+1
-1
src/Algorithms/ParallelCyclotronTracker.h
src/Algorithms/ParallelCyclotronTracker.h
+13
-13
src/Algorithms/ParallelSliceTracker.cpp
src/Algorithms/ParallelSliceTracker.cpp
+6
-5
src/Algorithms/ParallelTTracker.cpp
src/Algorithms/ParallelTTracker.cpp
+12
-14
src/Algorithms/ParallelTTracker.h
src/Algorithms/ParallelTTracker.h
+1
-1
src/Distribution/MagneticField.h
src/Distribution/MagneticField.h
+3
-7
src/Elements/OpalBeamline.cpp
src/Elements/OpalBeamline.cpp
+19
-8
src/Elements/OpalBeamline.h
src/Elements/OpalBeamline.h
+4
-4
src/Elements/OpalHKicker.cpp
src/Elements/OpalHKicker.cpp
+2
-2
src/Elements/OpalKicker.cpp
src/Elements/OpalKicker.cpp
+3
-3
src/Elements/OpalVKicker.cpp
src/Elements/OpalVKicker.cpp
+2
-2
src/Main.cpp
src/Main.cpp
+15
-21
src/OpalParser/OpalParser.cpp
src/OpalParser/OpalParser.cpp
+4
-3
src/Utilities/OpalSection.cpp
src/Utilities/OpalSection.cpp
+23
-2
src/Utilities/OpalSection.h
src/Utilities/OpalSection.h
+1
-0
tests/opal_src/Elements/OpalPolynomialTimeDependenceTest.cpp
tests/opal_src/Elements/OpalPolynomialTimeDependenceTest.cpp
+1
-1
No files found.
CMakeLists.txt
View file @
aeb3e26a
...
...
@@ -43,15 +43,6 @@ else ()
message
(
STATUS
"Unknown C++ compiler. Please use the GNU or Intel compiler, IF you are having problems."
)
endif
()
#FIND_PACKAGE (IPPL REQUIRED HINTS $ENV{IPPL_PREFIX} $ENV{IPPL_DIR} $ENV{IPPL})
#MESSAGE (STATUS "Found IPPL library: ${IPPL_LIBRARY}")
#MESSAGE (STATUS "Found IPPL include dir: ${IPPL_INCLUDE_DIR}")
SET
(
IPPL_CMAKE_CXX_FLAGS
"-DIPPL_LINUX -DIPPL_STRINGSTREAM -std=c++1y -DIPPL_MPI -DMPICH_SKIP_MPICXX -DIPPL_GCC -DIPPL_DONT_POOL -DIPPL_USE_XDIV_RNG -DIPPL_NO_STRINGSTREAM -DPETE_BITWISE_COPY -DIPPL_HAS_TEMPLATED_COMPLEX -DIPPL_USE_STANDARD_HEADERS -DIPPL_USE_PARTIAL_SPECIALIZATION -DIPPL_STDSTL -DIPPL_LONGLONG -DWITH_BRICK -DnoCOMP_GNUOLD -Drestrict=__restrict__ -DNOCTAssert "
)
set
(
IPPL_INCLUDE_DIR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/ippl/src"
)
set
(
IPPL_LIBRARY_DIR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/ippl/src"
)
set
(
IPPL_LIBRARY
"ippl"
)
FIND_PACKAGE
(
H5Hut REQUIRED
)
FIND_PACKAGE
(
HDF5 REQUIRED
)
FIND_PACKAGE
(
GSL REQUIRED
)
...
...
@@ -60,7 +51,7 @@ set (BOOSTROOT $ENV{BOOST_DIR})
set
(
Boost_USE_STATIC_LIBS ON
)
set
(
Boost_USE_MULTITHREADED OFF
)
set
(
Boost_USE_STATIC_RUNTIME OFF
)
find_package
(
Boost 1.55.0 COMPONENTS regex filesystem system
)
find_package
(
Boost 1.55.0
REQUIRED
COMPONENTS regex filesystem system
)
if
(
Boost_INCLUDE_DIRS
)
message
(
STATUS
"Found boost include dir:
${
Boost_INCLUDE_DIR
}
"
)
message
(
STATUS
"Found boost library dir:
${
Boost_LIBRARY_DIR
}
"
)
...
...
@@ -172,28 +163,17 @@ IF (NO_FIELD_ASSIGN_OPTIMIZATION)
)
ENDIF
(
NO_FIELD_ASSIGN_OPTIMIZATION
)
INCLUDE
(
FindSubversion
)
IF
(
Subversion_SVN_EXECUTABLE
)
EXECUTE_PROCESS
(
COMMAND
${
Subversion_SVN_EXECUTABLE
}
info
${
CMAKE_CURRENT_SOURCE_DIR
}
OUTPUT_VARIABLE OPAL_WC_INFO
ERROR_VARIABLE Subversion_svn_info_error
RESULT_VARIABLE Subversion_svn_info_result
OUTPUT_STRIP_TRAILING_WHITESPACE
)
IF
(
${
Subversion_svn_info_result
}
EQUAL 0
)
Subversion_WC_INFO
(
${
CMAKE_CURRENT_SOURCE_DIR
}
OPAL
)
ELSE
()
SET
(
OPAL_WC_REVISION 0
)
EXECUTE_PROCESS
(
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
COMMAND git rev-parse HEAD
OUTPUT_VARIABLE GIT_OUT OUTPUT_STRIP_TRAILING_WHITESPACE
)
SET
(
OPAL_WC_REVISION \"
${
GIT_OUT
}
\"
)
ENDIF
()
INCLUDE
(
FindGit
)
IF
(
GIT_FOUND
)
SET
(
OPAL_WC_REVISION 0
)
EXECUTE_PROCESS
(
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
COMMAND git rev-parse HEAD
OUTPUT_VARIABLE GIT_OUT OUTPUT_STRIP_TRAILING_WHITESPACE
)
SET
(
OPAL_WC_REVISION \"
${
GIT_OUT
}
\"
)
ELSE
()
MESSAGE
(
STATUS
"could not find
subversion
"
)
MESSAGE
(
STATUS
"could not find
git
"
)
SET
(
OPAL_WC_REVISION \"\"
)
ENDIF
()
...
...
classic/5.0/src/AbsBeamline/AlignWrapper.cpp
View file @
aeb3e26a
...
...
@@ -92,7 +92,7 @@ const BGeometryBase &AlignWrapper::getGeometry() const {
}
const
std
::
string
&
AlignWrapper
::
getType
()
const
{
ElementBase
::
ElementBase
::
ElementType
AlignWrapper
::
getType
()
const
{
return
itsElement
->
getType
();
}
...
...
@@ -157,4 +157,4 @@ AlignWrapper::~AlignWrapper()
AlignWrapper
::
AlignWrapper
(
ElementBase
*
elem
)
:
ElementBase
(
elem
->
getName
()),
itsElement
(
elem
),
itsOffset
()
{
shareFlag
=
false
;
}
}
\ No newline at end of file
classic/5.0/src/AbsBeamline/AlignWrapper.h
View file @
aeb3e26a
...
...
@@ -95,7 +95,7 @@ public:
/// Get element type std::string.
// Returns the type std::string for the enclosed item.
virtual
const
std
::
string
&
getType
()
const
;
virtual
ElementBase
::
ElementBase
::
ElementType
getType
()
const
;
/// Disallow misalignment of an already misaligned object.
// This method returns [b]this[/b], since "this" is already an
...
...
@@ -158,4 +158,4 @@ private:
mutable
Euclid3D
itsOffset
;
};
#endif // CLASSIC_AlignWrapper_HH
#endif // CLASSIC_AlignWrapper_HH
\ No newline at end of file
classic/5.0/src/AbsBeamline/BeamBeam.cpp
View file @
aeb3e26a
...
...
@@ -76,7 +76,6 @@ void BeamBeam::getDimensions(double &zBegin, double &zEnd) const {
}
const
std
::
string
&
BeamBeam
::
getType
()
const
{
static
const
std
::
string
type
(
"BeamBeam"
);
return
type
;
ElementBase
::
ElementType
BeamBeam
::
getType
()
const
{
return
BEAMBEAM
;
}
classic/5.0/src/AbsBeamline/BeamBeam.h
View file @
aeb3e26a
...
...
@@ -75,7 +75,7 @@ public:
virtual
bool
bends
()
const
;
virtual
const
std
::
string
&
getType
()
const
;
virtual
ElementBase
::
ElementType
getType
()
const
;
virtual
void
getDimensions
(
double
&
zBegin
,
double
&
zEnd
)
const
;
...
...
classic/5.0/src/AbsBeamline/Collimator.cpp
View file @
aeb3e26a
...
...
@@ -316,7 +316,7 @@ void Collimator::initialise(PartBunch *bunch, double &startField, double &endFie
lossDs_m
=
std
::
unique_ptr
<
LossDataSink
>
(
new
LossDataSink
(
filename_m
.
substr
(
0
,
filename_m
.
rfind
(
"."
)),
!
Options
::
asciidump
));
}
goOnline
();
goOnline
(
-
1e6
);
}
void
Collimator
::
initialise
(
PartBunch
*
bunch
,
const
double
&
scaleFactor
)
{
...
...
@@ -331,7 +331,7 @@ void Collimator::initialise(PartBunch *bunch, const double &scaleFactor) {
lossDs_m
=
std
::
unique_ptr
<
LossDataSink
>
(
new
LossDataSink
(
filename_m
.
substr
(
0
,
filename_m
.
rfind
(
"."
)),
!
Options
::
asciidump
));
}
goOnline
();
goOnline
(
-
1e6
);
}
void
Collimator
::
finalise
()
...
...
@@ -341,7 +341,7 @@ void Collimator::finalise()
*
gmsg
<<
"* Finalize probe"
<<
endl
;
}
void
Collimator
::
goOnline
()
{
void
Collimator
::
goOnline
(
const
double
&
)
{
if
(
RefPartBunch_m
==
NULL
)
{
if
(
!
informed_m
)
{
std
::
string
errormsg
=
Fieldmap
::
typeset_msg
(
"BUNCH SIZE NOT SET"
,
"warning"
);
...
...
@@ -569,9 +569,8 @@ void Collimator::getDimensions(double &zBegin, double &zEnd) const {
}
const
std
::
string
&
Collimator
::
getType
()
const
{
static
const
std
::
string
type
(
"Collimator"
);
return
type
;
ElementBase
::
ElementType
Collimator
::
getType
()
const
{
return
COLLIMATOR
;
}
string
Collimator
::
getCollimatorShape
()
{
...
...
classic/5.0/src/AbsBeamline/Collimator.h
View file @
aeb3e26a
...
...
@@ -85,11 +85,11 @@ public:
virtual
bool
bends
()
const
;
virtual
void
goOnline
();
virtual
void
goOnline
(
const
double
&
kineticEnergy
);
virtual
void
goOffline
();
virtual
const
std
::
string
&
getType
()
const
;
virtual
ElementBase
::
ElementType
getType
()
const
;
virtual
void
getDimensions
(
double
&
zBegin
,
double
&
zEnd
)
const
;
...
...
classic/5.0/src/AbsBeamline/Component.cpp
View file @
aeb3e26a
...
...
@@ -87,7 +87,7 @@ trackMap(FVps<double, 6> &, const PartData &, bool, bool) const {
"Called for component
\"
"
+
getName
()
+
"
\"
."
);
}
void
Component
::
goOnline
()
{
void
Component
::
goOnline
(
const
double
&
)
{
online_m
=
true
;
}
...
...
@@ -111,7 +111,6 @@ void Component::getMisalignment(double &x, double &y, double &s) const {
s
=
ds_m
;
}
const
std
::
string
&
Component
::
getType
()
const
{
static
const
std
::
string
type
(
""
);
return
type
;
}
ElementBase
::
ElementType
Component
::
getType
()
const
{
return
ElementBase
::
ANY
;
}
\ No newline at end of file
classic/5.0/src/AbsBeamline/Component.h
View file @
aeb3e26a
...
...
@@ -116,7 +116,7 @@ public:
// virtual bool determineEntryPoint(const double &kineticEnergy, const double &tolerance) = 0;
virtual
void
goOnline
();
virtual
void
goOnline
(
const
double
&
kineticEnergy
);
virtual
void
goOffline
();
...
...
@@ -132,7 +132,7 @@ public:
virtual
void
getDimensions
(
double
&
zBegin
,
double
&
zEnd
)
const
=
0
;
virtual
const
std
::
string
&
getType
()
const
;
virtual
ElementBase
::
ElementType
getType
()
const
;
virtual
void
setComponentType
(
std
::
string
name
)
{
};
virtual
std
::
string
getComponentType
()
const
{
return
""
;
};
...
...
classic/5.0/src/AbsBeamline/Corrector.cpp
View file @
aeb3e26a
...
...
@@ -20,7 +20,9 @@
#include "AbsBeamline/Corrector.h"
#include "AbsBeamline/BeamlineVisitor.h"
#include "Algorithms/PartBunch.h"
#include "Physics/Physics.h"
#include "Utilities/GeneralClassicException.h"
// Class Corrector
// ------------------------------------------------------------------------
...
...
@@ -77,20 +79,32 @@ bool Corrector::apply(const Vector_t &R, const Vector_t ¢roid, const double
}
void
Corrector
::
initialise
(
PartBunch
*
bunch
,
double
&
startField
,
double
&
endField
,
const
double
&
scaleFactor
)
{
Inform
m
(
"Corrector::initialise "
);
endField_m
=
endField
=
startField
+
getElementLength
();
RefPartBunch_m
=
bunch
;
startField_m
=
startField
;
BDipoleField
f
=
getField
();
kickField_m
=
Vector_t
(
f
.
getBx
(),
f
.
getBy
(),
0.0
);
m
<<
"B= "
<<
kickField_m
<<
endl
;
endField_m
=
endField
=
startField
+
getElementLength
();
RefPartBunch_m
=
bunch
;
startField_m
=
startField
;
}
void
Corrector
::
finalise
()
{
}
void
Corrector
::
goOnline
(
const
double
&
kineticEnergy
)
{
if
(
kineticEnergy
<
0.0
)
{
throw
GeneralClassicException
(
"Corrector::goOnline"
,
"given kinetic energy is negative"
);
}
const
double
pathLength
=
getGeometry
().
getElementLength
();
const
double
minLength
=
Physics
::
c
*
RefPartBunch_m
->
getdT
();
if
(
pathLength
<
minLength
)
throw
GeneralClassicException
(
"Corrector::goOnline"
,
"length of corrector, L= "
+
std
::
to_string
(
pathLength
)
+
", shorter than distance covered during one time step, dS= "
+
std
::
to_string
(
minLength
));
const
double
momentum
=
sqrt
(
std
::
pow
(
kineticEnergy
*
1e6
,
2.0
)
+
2.0
*
kineticEnergy
*
1e6
*
RefPartBunch_m
->
getM
());
const
double
magnitude
=
momentum
/
(
Physics
::
c
*
pathLength
);
kickField_m
=
magnitude
*
RefPartBunch_m
->
getQ
()
*
Vector_t
(
kickY_m
,
-
kickX_m
,
0.0
);
INFOMSG
(
"Corrector::goOnline "
<<
"at Ekin= "
<<
kineticEnergy
<<
" MeV, B= "
<<
kickField_m
<<
" T"
<<
endl
);
online_m
=
true
;
}
bool
Corrector
::
bends
()
const
{
return
false
;
}
...
...
@@ -101,15 +115,6 @@ void Corrector::getDimensions(double &zBegin, double &zEnd) const
zEnd
=
startField_m
+
getElementLength
();
}
const
std
::
string
&
Corrector
::
getType
()
const
{
static
const
std
::
string
type
(
"Corrector"
);
return
type
;
ElementBase
::
ElementType
Corrector
::
getType
()
const
{
return
CORRECTOR
;
}
void
Corrector
::
SetKickX
(
double
k
)
{
kickX_m
=
k
;
}
void
Corrector
::
SetKickY
(
double
k
)
{
kickY_m
=
k
;
}
double
Corrector
::
GetKickX
()
const
{
return
kickX_m
;
}
double
Corrector
::
GetKickY
()
const
{
return
kickY_m
;
}
classic/5.0/src/AbsBeamline/Corrector.h
View file @
aeb3e26a
...
...
@@ -85,24 +85,26 @@ public:
virtual
void
initialise
(
PartBunch
*
bunch
,
double
&
startField
,
double
&
endField
,
const
double
&
scaleFactor
);
virtual
void
goOnline
(
const
double
&
kineticEnergy
);
virtual
void
finalise
();
virtual
bool
bends
()
const
;
virtual
const
std
::
string
&
getType
()
const
;
virtual
ElementBase
::
ElementType
getType
()
const
;
virtual
void
getDimensions
(
double
&
zBegin
,
double
&
zEnd
)
const
;
void
S
etKickX
(
double
k
);
void
s
etKickX
(
double
k
);
void
S
etKickY
(
double
k
);
void
s
etKickY
(
double
k
);
double
G
etKickX
()
const
;
double
g
etKickX
()
const
;
double
G
etKickY
()
const
;
double
g
etKickY
()
const
;
private:
private:
double
startField_m
;
double
endField_m
;
double
kickX_m
;
...
...
@@ -123,4 +125,24 @@ protected:
};
#endif // CLASSIC_Corrector_HH
inline
void
Corrector
::
setKickX
(
double
k
)
{
kickX_m
=
k
;
}
inline
void
Corrector
::
setKickY
(
double
k
)
{
kickY_m
=
k
;
}
inline
double
Corrector
::
getKickX
()
const
{
return
kickX_m
;
}
inline
double
Corrector
::
getKickY
()
const
{
return
kickY_m
;
}
#endif // CLASSIC_Corrector_HH
\ No newline at end of file
classic/5.0/src/AbsBeamline/Cyclotron.cpp
View file @
aeb3e26a
...
...
@@ -174,10 +174,14 @@ void Cyclotron::setType(std::string t) {
type_m
=
t
;
}
const
std
::
string
&
Cyclotron
::
getType
()
const
{
const
std
::
string
&
Cyclotron
::
get
Cyclotron
Type
()
const
{
return
type_m
;
}
ElementBase
::
ElementType
Cyclotron
::
getType
()
const
{
return
CYCLOTRON
;
}
void
Cyclotron
::
setCyclHarm
(
double
h
)
{
harm_m
=
h
;
}
...
...
classic/5.0/src/AbsBeamline/Cyclotron.h
View file @
aeb3e26a
...
...
@@ -37,21 +37,21 @@ struct BfieldData {
//~ double *dbt; //dBz/dtheta
//~ double *dbtt; //d2Bz/dtheta2
//~ double *dbttt; //d3Bz/dtheta3
//~
//~
//~ // to be calculated in getdiffs: all other derivatives:
//~ double *dbr; // dBz/dr
//~ double *dbrr; // ...
//~ double *dbrrr;
//~
//~
//~ double *dbrt;
//~ double *dbrrt;
//~ double *dbrtt;
//~
//~
//~ // used to get (Br,Btheta,Bz) at any off-plane point
//~ double *f2; // for Bz
//~ double *f3; // for Br
//~ double *g3; // for Btheta
//~
//~
std
::
vector
<
double
>
bfld
;
//Bz
std
::
vector
<
double
>
dbt
;
//dBz/dtheta
std
::
vector
<
double
>
dbtt
;
//d2Bz/dtheta2
...
...
@@ -132,7 +132,8 @@ public:
void
setRfFieldMapFN
(
std
::
vector
<
std
::
string
>
rffmapfn
);
void
setType
(
std
::
string
t
);
virtual
const
std
::
string
&
getType
()
const
;
const
std
::
string
&
getCyclotronType
()
const
;
virtual
ElementBase
::
ElementType
getType
()
const
;
virtual
void
getDimensions
(
double
&
zBegin
,
double
&
zEnd
)
const
;
...
...
@@ -158,7 +159,7 @@ public:
void
setZinit
(
double
zinit
);
virtual
double
getZinit
()
const
;
void
setPZinit
(
double
zinit
);
virtual
double
getPZinit
()
const
;
...
...
@@ -221,7 +222,7 @@ private:
std
::
vector
<
double
>
rffrequ_m
;
std
::
vector
<
double
>
rfphi_m
;
std
::
vector
<
double
>
escale_m
;
// a scale factor for the E-field
std
::
vector
<
bool
>
superpose_m
;
// electric fields are superposed or not
std
::
vector
<
bool
>
superpose_m
;
// electric fields are superposed or not
double
symmetry_m
;
...
...
@@ -260,13 +261,13 @@ private:
BPositions
BP
;
BFieldType
myBFieldType_m
;
// RF field map handler
// Fieldmap *RFfield;
std
::
vector
<
Fieldmap
*>
RFfields_m
;
std
::
vector
<
Fieldmap
*>
RFfields_m
;
std
::
vector
<
std
::
string
>
RFfilename_m
;
// handling for store the particle out of region
// handling for store the particle out of region
std
::
unique_ptr
<
LossDataSink
>
lossDs_m
;
void
getdiffs
();
...
...
@@ -286,4 +287,4 @@ private:
};
#endif // CLASSIC_Cyclotron_HH
#endif // CLASSIC_Cyclotron_HH
\ No newline at end of file
classic/5.0/src/AbsBeamline/CyclotronValley.cpp
View file @
aeb3e26a
...
...
@@ -185,7 +185,7 @@ bool CyclotronValley::bends() const {
}
void
CyclotronValley
::
goOnline
()
{
void
CyclotronValley
::
goOnline
(
const
double
&
)
{
Fieldmap
::
readMap
(
filename_m
);
online_m
=
true
;
}
...
...
@@ -205,7 +205,6 @@ void CyclotronValley::getDimensions(double &zBegin, double &zEnd) const {
}
const
std
::
string
&
CyclotronValley
::
getType
()
const
{
static
const
std
::
string
type
(
"CyclotronValley"
);
return
type
;
ElementBase
::
ElementType
CyclotronValley
::
getType
()
const
{
return
CYCLOTRONVALLEY
;
}
classic/5.0/src/AbsBeamline/CyclotronValley.h
View file @
aeb3e26a
...
...
@@ -57,7 +57,7 @@ public:
void
setFast
(
bool
fast
);
bool
getFast
()
const
;
const
std
::
string
&
getType
()
const
;
ElementBase
::
ElementType
getType
()
const
;
virtual
bool
apply
(
const
size_t
&
i
,
const
double
&
t
,
double
E
[],
double
B
[]);
virtual
bool
apply
(
const
size_t
&
i
,
const
double
&
t
,
Vector_t
&
E
,
Vector_t
&
B
);
...
...
@@ -72,7 +72,7 @@ public:
virtual
bool
bends
()
const
;
virtual
void
goOnline
();
virtual
void
goOnline
(
const
double
&
kineticEnergy
);
virtual
void
goOffline
();
...
...
classic/5.0/src/AbsBeamline/Degrader.cpp
View file @
aeb3e26a
...
...
@@ -166,7 +166,7 @@ void Degrader::finalise()
*
gmsg
<<
"* Finalize Degrader"
<<
endl
;
}
void
Degrader
::
goOnline
()
{
void
Degrader
::
goOnline
(
const
double
&
)
{
Inform
msg
(
"Degrader::goOnline "
);
if
(
RefPartBunch_m
==
NULL
)
{
if
(
!
informed_m
)
{
...
...
@@ -229,9 +229,8 @@ void Degrader::getDimensions(double &zBegin, double &zEnd) const {
}
const
std
::
string
&
Degrader
::
getType
()
const
{
static
const
std
::
string
type
(
"DEGRADER"
);
return
type
;
ElementBase
::
ElementType
Degrader
::
getType
()
const
{
return
DEGRADER
;
}
string
Degrader
::
getDegraderShape
()
{
...
...
classic/5.0/src/AbsBeamline/Degrader.h
View file @
aeb3e26a
...
...
@@ -74,11 +74,11 @@ public:
virtual
bool
bends
()
const
;
virtual
void
goOnline
();
virtual
void
goOnline
(
const
double
&
kineticEnergy
);
virtual
void
goOffline
();
virtual
const
std
::
string
&
getType
()
const
;
virtual
ElementBase
::
ElementType
getType
()
const
;
virtual
void
getDimensions
(
double
&
zBegin
,
double
&
zEnd
)
const
;
...
...
classic/5.0/src/AbsBeamline/Diagnostic.cpp
View file @
aeb3e26a
...
...
@@ -71,9 +71,8 @@ bool Diagnostic::bends() const {
return
false
;
}
const
std
::
string
&
Diagnostic
::
getType
()
const
{
static
const
std
::
string
type
(
"Diagnostic"
);
return
type
;
ElementBase
::
ElementType
Diagnostic
::
getType
()
const
{
return
DIAGNOSTIC
;
}
void
Diagnostic
::
getDimensions
(
double
&
zBegin
,
double
&
zEnd
)
const
...
...
classic/5.0/src/AbsBeamline/Diagnostic.h
View file @
aeb3e26a
...
...
@@ -55,7 +55,7 @@ public:
virtual
bool
bends
()
const
;
virtual
const
std
::
string
&
getType
()
const
;
virtual
ElementBase
::
ElementType
getType
()
const
;
virtual
void
getDimensions
(
double
&
zBegin
,
double
&
zEnd
)
const
;
...
...
classic/5.0/src/AbsBeamline/Drift.cpp
View file @
aeb3e26a
...
...
@@ -79,7 +79,6 @@ void Drift::getDimensions(double &zBegin, double &zEnd) const {
zEnd
=
startField_m
+
getElementLength
();
}
const
std
::
string
&
Drift
::
getType
()
const
{
static
const
std
::
string
type
(
"Drift"
);
return
type
;
ElementBase
::
ElementType
Drift
::
getType
()
const
{
return
DRIFT
;
}
classic/5.0/src/AbsBeamline/Drift.h
View file @
aeb3e26a
...
...
@@ -56,7 +56,7 @@ public:
virtual
bool
bends
()
const
;
virtual
const
std
::
string
&
getType
()
const
;
virtual
ElementBase
::
ElementType
getType
()
const
;
virtual
void
getDimensions
(
double
&
zBegin
,
double
&
zEnd
)
const
;
...
...
classic/5.0/src/AbsBeamline/ElementBase.cpp
View file @
aeb3e26a
...
...
@@ -145,8 +145,79 @@ const ConstChannel *ElementBase::getConstChannel(const std::string &aKey) const
}
std
::
string
ElementBase
::
getTypeString
()
const
{
switch
(
getType
())
{
case
ALIGNWRAPPER
:
return
"AlignWrapper"
;
case
BEAMBEAM
:
return
"BeamBeam"
;
case
BEAMLINE
:
return
"Beamline"
;
case
COLLIMATOR
:
return
"Collimator"
;
case
CORRECTOR
:
return
"Corrector"
;
case
CYCLOTRON
:
return
"Cyclotron"
;
case
CYCLOTRONVALLEY
:
return
"CyclotronValley"
;
case
DEGRADER
:
return
"Degrader"
;
case
DIAGNOSTIC
:
return
"Diagnostic"
;
case
DRIFT
:
return
"Drift"
;
case
INTEGRATOR
:
return
"Integrator"
;
case
LAMBERTSON
:
return
"Lambertson"
;
case
MARKER
:
return
"Marker"
;
case
MONITOR
:
return
"Monitor"
;
case
MULTIPOLE
:
return
"Multipole"
;
case
OFFSET
:
return
"Offset"
;
case
PARALLELPLATE
:
return
"ParallelPlate"
;
case
PATCH
:
return
"Patch"
;
case
PROBE
:
return
"Probe"
;
case
RBEND
:
return
"RBend"
;
case
RFCAVITY
:
return
"RFCavity"
;
case
RFQUADRUPOLE
:
return
"RFQuadrupole"
;
case
RING
:
return
"Ring"
;
case
SBEND3D
:
return
"SBend3D"
;
case
SBEND
:
return
"SBend"
;
case
SEPARATOR
:
return
"Separator"
;
case
SEPTUM
:
return
"Septum"
;
case
SOLENOID
:
return
"Solenoid"
;
case
STRIPPER
:
return
"Stripper"
;
case
TRAVELINGWAVE
:
return
"TravelingWave"
;
case
VARIABLERFCAVITY
:
return
"VariableRFCavity"
;
case
ANY
:
default:
return
""
;
}
}
ElementImage
*
ElementBase
::
getImage
()
const
{
return
new
ElementImage
(
getName
(),
getType
(),
userAttribs
);
std
::
string
type
=
getTypeString
();
return
new
ElementImage
(
getName
(),
type
,
userAttribs
);
}
...
...
@@ -229,4 +300,4 @@ void ElementBase::setBoundaryGeometry(BoundaryGeometry *geo) {
void
ElementBase
::
setSurfacePhysics
(
SurfacePhysicsHandler
*
sphys
)
{
sphys_m
=
sphys
;
}
}
\ No newline at end of file
classic/5.0/src/AbsBeamline/ElementBase.h