Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
OPAL
src
Commits
120a8553
Commit
120a8553
authored
Apr 18, 2012
by
kraus
Browse files
Merge branch 'develop' into svn: speedup compilation further
parent
629f9c85
Changes
59
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
35 additions
and
53 deletions
+35
-53
.gitattributes
.gitattributes
+1
-0
classic/5.0/src/AbsBeamline/AttributeSet.cpp
classic/5.0/src/AbsBeamline/AttributeSet.cpp
+1
-0
classic/5.0/src/AbsBeamline/AttributeSet.h
classic/5.0/src/AbsBeamline/AttributeSet.h
+3
-2
classic/5.0/src/AbsBeamline/Collimator.cpp
classic/5.0/src/AbsBeamline/Collimator.cpp
+1
-0
classic/5.0/src/AbsBeamline/Collimator.h
classic/5.0/src/AbsBeamline/Collimator.h
+2
-4
classic/5.0/src/AbsBeamline/Component.h
classic/5.0/src/AbsBeamline/Component.h
+1
-1
classic/5.0/src/AbsBeamline/CyclotronValley.cpp
classic/5.0/src/AbsBeamline/CyclotronValley.cpp
+0
-2
classic/5.0/src/AbsBeamline/ElementBase.cpp
classic/5.0/src/AbsBeamline/ElementBase.cpp
+0
-2
classic/5.0/src/AbsBeamline/Monitor.cpp
classic/5.0/src/AbsBeamline/Monitor.cpp
+3
-0
classic/5.0/src/AbsBeamline/Monitor.h
classic/5.0/src/AbsBeamline/Monitor.h
+3
-3
classic/5.0/src/AbsBeamline/ParallelPlate.cpp
classic/5.0/src/AbsBeamline/ParallelPlate.cpp
+0
-2
classic/5.0/src/AbsBeamline/RBend.cpp
classic/5.0/src/AbsBeamline/RBend.cpp
+1
-0
classic/5.0/src/AbsBeamline/RFCavity.cpp
classic/5.0/src/AbsBeamline/RFCavity.cpp
+0
-12
classic/5.0/src/AbsBeamline/SBend.cpp
classic/5.0/src/AbsBeamline/SBend.cpp
+1
-0
classic/5.0/src/Algorithms/PBunchDefs.h
classic/5.0/src/Algorithms/PBunchDefs.h
+2
-2
classic/5.0/src/Algorithms/PartBins.cpp
classic/5.0/src/Algorithms/PartBins.cpp
+1
-0
classic/5.0/src/Algorithms/PartBins.h
classic/5.0/src/Algorithms/PartBins.h
+2
-6
classic/5.0/src/Algorithms/PartBinsCyc.h
classic/5.0/src/Algorithms/PartBinsCyc.h
+0
-1
classic/5.0/src/Algorithms/PartBunch.h
classic/5.0/src/Algorithms/PartBunch.h
+2
-4
classic/5.0/src/Algorithms/PartPusher.h
classic/5.0/src/Algorithms/PartPusher.h
+11
-12
No files found.
.gitattributes
View file @
120a8553
...
...
@@ -141,6 +141,7 @@ classic/5.0/src/Algorithms/TrackIntegrator.cpp -text
classic/5.0/src/Algorithms/TrackIntegrator.h -text
classic/5.0/src/Algorithms/Tracker.cpp -text
classic/5.0/src/Algorithms/Tracker.h -text
classic/5.0/src/Algorithms/Vektor.h -text
classic/5.0/src/Algorithms/rbendmap.h -text
classic/5.0/src/BeamlineCore/BeamBeamRep.cpp -text
classic/5.0/src/BeamlineCore/BeamBeamRep.h -text
...
...
classic/5.0/src/AbsBeamline/AttributeSet.cpp
View file @
120a8553
...
...
@@ -20,6 +20,7 @@
// ------------------------------------------------------------------------
#include "AbsBeamline/AttributeSet.h"
#include "Channels/Channel.h"
#include "AbsBeamline/ElementBase.h"
#include "Channels/DirectChannel.h"
...
...
classic/5.0/src/AbsBeamline/AttributeSet.h
View file @
120a8553
...
...
@@ -22,13 +22,14 @@
//
// ------------------------------------------------------------------------
#include "Channels/Channel.h"
//
#include "Channels/Channel.h"
#include <functional>
#include <string>
#include <map>
class
ElementBase
;
class
Channel
;
class
ConstChannel
;
// Class AttributeSet
// ------------------------------------------------------------------------
...
...
classic/5.0/src/AbsBeamline/Collimator.cpp
View file @
120a8553
...
...
@@ -24,6 +24,7 @@
#include "AbsBeamline/BeamlineVisitor.h"
#include "Fields/Fieldmap.hh"
#include "Structure/LossDataSink.h"
#include "H5hut.h"
#include <memory>
extern
Inform
*
gmsg
;
...
...
classic/5.0/src/AbsBeamline/Collimator.h
View file @
120a8553
...
...
@@ -25,13 +25,11 @@
#include "AbsBeamline/Component.h"
#include "AbsBeamline/BeamlineVisitor.h"
#include "BeamlineGeometry/StraightGeometry.h"
#include "Algorithms/PBunchDefs.h"
#include <hdf5.h>
#include "H5hut.h"
//#include "H5hut.h"
#include <vector>
typedef
struct
h5_file
h5_file_t
;
class
LossDataSink
;
// Class Collimator
...
...
classic/5.0/src/AbsBeamline/Component.h
View file @
120a8553
...
...
@@ -25,7 +25,7 @@
#include "AbsBeamline/ElementBase.h"
#include "Fields/EMField.h"
#include "Algorithms/
PBunchDefs
.h"
#include "Algorithms/
Vektor
.h"
#define EPS_MISALIGNMENT 1e-8
...
...
classic/5.0/src/AbsBeamline/CyclotronValley.cpp
View file @
120a8553
...
...
@@ -23,8 +23,6 @@
#include "Algorithms/PartBunch.h"
#include "Fields/Fieldmap.hh"
#include "Physics/Physics.h"
#include "ValueDefinitions/RealVariable.h"
#include "Structure/BoundaryGeometry.h"
#include <iostream>
#include <fstream>
...
...
classic/5.0/src/AbsBeamline/ElementBase.cpp
View file @
120a8553
...
...
@@ -27,8 +27,6 @@
#include "Channels/Channel.h"
#include <string>
//#include "BeamlineGeometry/Euclid3D.h"
//#include "BeamlineGeometry/Geometry.h"
#include "Structure/BoundaryGeometry.h"
#include "Solvers/WakeFunction.hh"
#include "Solvers/SurfacePhysicsHandler.hh"
...
...
classic/5.0/src/AbsBeamline/Monitor.cpp
View file @
120a8553
...
...
@@ -23,6 +23,9 @@
#include "Algorithms/PartBunch.h"
#include "Fields/Fieldmap.hh"
#include "AbsBeamline/BeamlineVisitor.h"
#include "H5hut.h"
#include <fstream>
#include <memory>
...
...
classic/5.0/src/AbsBeamline/Monitor.h
View file @
120a8553
...
...
@@ -26,10 +26,10 @@
#include "BeamlineGeometry/StraightGeometry.h"
//#include "Algorithms/PBunchDefs.h"
#include <hdf5.h>
#include "H5hut.h"
#include <list>
//#include "H5hut.h"
#include <list>
typedef
struct
h5_file
h5_file_t
;
class
PartBunch
;
// Class Monitor
...
...
classic/5.0/src/AbsBeamline/ParallelPlate.cpp
View file @
120a8553
...
...
@@ -24,8 +24,6 @@
#include "Algorithms/PartBunch.h"
#include "Fields/Fieldmap.hh"
#include "Physics/Physics.h"
#include "ValueDefinitions/RealVariable.h"
#include "Structure/BoundaryGeometry.h"
#include <iostream>
#include <fstream>
...
...
classic/5.0/src/AbsBeamline/RBend.cpp
View file @
120a8553
...
...
@@ -19,6 +19,7 @@
// ------------------------------------------------------------------------
#include "AbsBeamline/RBend.h"
#include "Algorithms/PartBunch.h"
#include "AbsBeamline/BeamlineVisitor.h"
#include "Fields/Fieldmap.hh"
#include <iostream>
...
...
classic/5.0/src/AbsBeamline/RFCavity.cpp
View file @
120a8553
...
...
@@ -22,8 +22,6 @@
#include "AbsBeamline/BeamlineVisitor.h"
#include "Algorithms/PartBunch.h"
#include "Fields/Fieldmap.hh"
#include "ValueDefinitions/RealVariable.h"
#include "Structure/BoundaryGeometry.h"
#include "gsl/gsl_interp.h"
#include "gsl/gsl_spline.h"
...
...
@@ -513,16 +511,6 @@ void RFCavity::initialise(PartBunch *bunch, const double &scaleFactor) {
RefPartBunch_m
=
bunch
;
// The variable doPhase is not used; If it should be used in the future the following
// lines have to be implemented on the OPAL side
// (THIS IS THE CLASSICS SIDE AND OPAL OBJECTS ARE INAPPROPRIATE HERE)
// bool doPhase = true;
// RealVariable *ar = dynamic_cast<RealVariable *>(OpalData::getInstance()->find("OMITPHASE"));
// if (ar) {
// doPhase = false;
// msg << "Phase of particle is not considered "<< endl;
// }
INFOMSG
(
"q= "
<<
RefPartBunch_m
->
getQ
()
<<
" m= "
<<
RefPartBunch_m
->
getM
()
/
1.0E9
<<
endl
);
...
...
classic/5.0/src/AbsBeamline/SBend.cpp
View file @
120a8553
...
...
@@ -20,6 +20,7 @@
#include "Algorithms/PartPusher.h"
#include "AbsBeamline/SBend.h"
#include "Algorithms/PartBunch.h"
#include "AbsBeamline/BeamlineVisitor.h"
#include "Fields/Fieldmap.hh"
#include <iostream>
...
...
classic/5.0/src/Algorithms/PBunchDefs.h
View file @
120a8553
//#include "Ippl.h"
#ifndef PBUNCHDEFS_H
#define PBUNCHDEFS_H
#include "Algorithms/Vektor.h"
#include "Particle/IntCIC.h"
#include "Particle/IntNGP.h"
#include "Particle/IntSUDS.h"
...
...
@@ -26,7 +26,7 @@ typedef InterpolatorTraits<double, 3, IntrplCIC_t>::Cache_t Pcache_t;
typedef
UniformCartesian
<
3
,
double
>
Mesh_t
;
typedef
ParticleSpatialLayout
<
double
,
3
>::
SingleParticlePos_t
Vector_t
;
//
typedef ParticleSpatialLayout<double, 3>::SingleParticlePos_t Vector_t;
typedef
ParticleSpatialLayout
<
double
,
3
,
Mesh_t
>
Layout_t
;
...
...
classic/5.0/src/Algorithms/PartBins.cpp
View file @
120a8553
#include <cfloat>
#include <vector>
#include "Algorithms/PartBins.h"
#include "Algorithms/PBunchDefs.h"
#include "Physics/Physics.h"
extern
Inform
*
gmsg
;
...
...
classic/5.0/src/Algorithms/PartBins.h
View file @
120a8553
...
...
@@ -17,7 +17,7 @@
#define OPAL_Bins_HH
#ifndef PartBinTest
#include "
Ippl
.h"
#include "
Algorithms/PBunchDefs
.h"
#else
#include "ranlib.h"
#define Inform ostream
...
...
@@ -124,7 +124,7 @@ public:
void
resetPartInBin_cyc
(
size_t
newPartNum
[],
int
binID
);
/** update particles number in bin after particle deletion */
void
updatePartInBin
(
size_t
countLost
[]);
/** update local particles number in bin after particle deletion */
/** update local particles number in bin after particle deletion */
void
updatePartInBin_cyc
(
size_t
countLost
[]);
void
updateDeletedPartsInBin
(
size_t
countLost
[])
;
...
...
@@ -253,10 +253,6 @@ public:
size_t
getTotalNumPerBin
(
int
b
);
private:
/** Defines energy threshold for rebining */
...
...
classic/5.0/src/Algorithms/PartBinsCyc.h
View file @
120a8553
...
...
@@ -17,7 +17,6 @@
#define OPAL_BinsCyc_HH
#ifndef PartBinTest
#include "Ippl.h"
#else
#include "ranlib.h"
#define Inform ostream
...
...
classic/5.0/src/Algorithms/PartBunch.h
View file @
120a8553
...
...
@@ -20,11 +20,12 @@
//
// ------------------------------------------------------------------------
//
#include "Ippl.h"
#include "Ippl.h"
#include "PBunchDefs.h"
#include "Algorithms/Particle.h"
#include "FixedAlgebra/FMatrix.h"
#include "FixedAlgebra/FVector.h"
#include "Algorithms/PartBins.h"
#include "Algorithms/PartBinsCyc.h"
#include "Algorithms/PartData.h"
#include "Utilities/SwitcherError.h"
...
...
@@ -34,12 +35,9 @@
#include <vector>
//class PartBunch;
class
Distribution
;
class
LossDataSink
;
class
FieldSolver
;
//#include "Structure/FieldSolver.h"
class
ListElem
;
template
<
class
T
,
int
,
int
>
class
FMatrix
;
...
...
classic/5.0/src/Algorithms/PartPusher.h
View file @
120a8553
#ifndef CLASSIC_PartPusher_H
#define CLASSIC_PartPusher_H
#include "Algorithms/
PartBunch
.h"
#include "Algorithms/
Vektor
.h"
#include "Algorithms/PartData.h"
#include "Physics/Physics.h"
#include "Ippl.h"
class
BorisPusher
{
public:
...
...
@@ -37,17 +36,17 @@ inline void BorisPusher::kick(const Vector_t &R, Vector_t &P, const Vector_t &Ef
inline
void
BorisPusher
::
kick
(
const
Vector_t
&
R
,
Vector_t
&
P
,
const
Vector_t
&
Ef
,
const
Vector_t
&
Bf
,
const
double
&
dt
,
const
double
&
mass
,
const
double
&
charge
)
const
{
// Implementation follows chapter 4-4, p. 61 - 63 from
// Implementation follows chapter 4-4, p. 61 - 63 from
// Birdsall, C. K. and Langdon, A. B. (1985). Plasma physics via computer simulation.
//
// Up to finite precision effects, the new implementation is equivalent to the old one, but uses less floating point operations.
//
// Relativistic variant implemented below is described in chapter 15-4, p. 356 - 357. However, since other units are used here, small
// modifications are required. The relativistic variant can be derived from the nonrelativistic one by replacing
// mass
// by
// gamma * rest mass
// Relativistic variant implemented below is described in chapter 15-4, p. 356 - 357. However, since other units are used here, small
// modifications are required. The relativistic variant can be derived from the nonrelativistic one by replacing
// mass
// by
// gamma * rest mass
// and transforming the units.
//
// Parameters:
...
...
@@ -63,17 +62,17 @@ inline void BorisPusher::kick(const Vector_t &R, Vector_t &P, const Vector_t &Ef
// Half step E
P
+=
0.5
*
dt
*
charge
*
c
/
mass
*
Ef
;
// Full step B
double
const
gamma
=
sqrt
(
1.0
+
dot
(
P
,
P
));
Vector_t
const
t
=
0.5
*
dt
*
charge
*
c
*
c
/
(
gamma
*
mass
)
*
Bf
;
Vector_t
const
w
=
P
+
cross
(
P
,
t
);
Vector_t
const
s
=
2.0
/
(
1.0
+
dot
(
t
,
t
))
*
t
;
P
+=
cross
(
w
,
s
);
// Half step E
P
+=
0.5
*
dt
*
charge
*
c
/
mass
*
Ef
;
}
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment