Commit 120a8553 authored by kraus's avatar kraus

Merge branch 'develop' into svn: speedup compilation further

parent 629f9c85
......@@ -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
......
......@@ -20,6 +20,7 @@
// ------------------------------------------------------------------------
#include "AbsBeamline/AttributeSet.h"
#include "Channels/Channel.h"
#include "AbsBeamline/ElementBase.h"
#include "Channels/DirectChannel.h"
......
......@@ -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
// ------------------------------------------------------------------------
......
......@@ -24,6 +24,7 @@
#include "AbsBeamline/BeamlineVisitor.h"
#include "Fields/Fieldmap.hh"
#include "Structure/LossDataSink.h"
#include "H5hut.h"
#include <memory>
extern Inform *gmsg;
......
......@@ -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
......
......@@ -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
......
......@@ -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>
......
......@@ -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"
......
......@@ -23,6 +23,9 @@
#include "Algorithms/PartBunch.h"
#include "Fields/Fieldmap.hh"
#include "AbsBeamline/BeamlineVisitor.h"
#include "H5hut.h"
#include <fstream>
#include <memory>
......
......@@ -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
......
......@@ -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>
......
......@@ -19,6 +19,7 @@
// ------------------------------------------------------------------------
#include "AbsBeamline/RBend.h"
#include "Algorithms/PartBunch.h"
#include "AbsBeamline/BeamlineVisitor.h"
#include "Fields/Fieldmap.hh"
#include <iostream>
......
......@@ -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);
......
......@@ -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>
......
//#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;
......
#include <cfloat>
#include <vector>
#include "Algorithms/PartBins.h"
#include "Algorithms/PBunchDefs.h"
#include "Physics/Physics.h"
extern Inform *gmsg;
......
......@@ -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 */
......
......@@ -17,7 +17,6 @@
#define OPAL_BinsCyc_HH
#ifndef PartBinTest
#include "Ippl.h"
#else
#include "ranlib.h"
#define Inform ostream
......
......@@ -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;
......
#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;
}
......
......@@ -19,16 +19,14 @@
//
// ------------------------------------------------------------------------
#include <float.h>
#include <cfloat>
#include <cmath>
#include "Algorithms/Tracker.h"
#include "AbsBeamline/AlignWrapper.h"
#include "AbsBeamline/Patch.h"
#include "Algorithms/MapIntegrator.h"
#include "Algorithms/PartData.h"
#include "Algorithms/Particle.h"
#include "Fields/BMultipoleField.h"
#include <cmath>
typedef FTps<double, 2> Series2;
typedef FTps<double, 6> Series;
......
......@@ -23,13 +23,13 @@
#include "Algorithms/AbstractTracker.h"
#include "Algorithms/PartBunch.h"
#include "Algorithms/PartData.h"
#include "Algorithms/Particle.h"
#include "FixedAlgebra/FTps.h"
#include "Utilities/OpalField.h"
class BMultipoleField;
class Euclid3D;
class Particle;
// Class Tracker
......@@ -81,10 +81,6 @@ class Euclid3D;
// [/DL]
typedef std::list<OpalField> FieldList;
// typedef std::vector<OpalSection> SectionList;
class Tracker: public AbstractTracker {
public:
......
#ifndef OPAL_VEKTOR_HH
#define OPAL_VEKTOR_HH
#include "AppTypes/Vektor.h"
typedef Vektor<double, 3> Vector_t;
#endif
......@@ -6,9 +6,7 @@
#include <string>
#include <map>
#include <vector>
#include "Ippl.h"
typedef ParticleSpatialLayout<double, 3>::SingleParticlePos_t Vector_t;
#include "Algorithms/Vektor.h"
enum MapType {
UNKNOWN = 0,
......
#include "Solvers/CSRWakeFunction.hh"
#include "Algorithms/PartBunch.h"
#include "Filters/Filter.h"
#include "Physics/Physics.h"
#include "AbsBeamline/RBend.h"
......
......@@ -11,7 +11,8 @@
#include <vector>
#include "Solvers/SurfacePhysicsHandler.hh"
#include "Algorithms/PBunchDefs.h"
//#include "Algorithms/PBunchDefs.h"
#include "Algorithms/Vektor.h"
class RANLIB_class;
class ElementBase;
......
......@@ -5,10 +5,13 @@
#include "Utilities/OpalFilter.h"
#include "Solvers/WakeFunction.hh"
#include "Physics/Physics.h"
#include "Utility/IpplInfo.h"
#include <vector>
#include <cassert>
#include "Ippl.h"
#include <map>
#include <string>
#include <complex>
//#define USE_FFTW
using Physics::pi;
......
......@@ -19,8 +19,6 @@
#include <set>
#include <iostream>
#include "Ippl.h"
#include "AbstractObjects/Attribute.h"
#include "AbstractObjects/AttributeBase.h"
#include "Utilities/Options.h"
......
......@@ -20,7 +20,6 @@
#include "MemoryManagement/RCObject.h"
#include "AbstractObjects/Invalidator.h"
#include "Utility/Inform.h"
#include <iosfwd>
#include <string>
......
......@@ -20,7 +20,6 @@
#include "AbstractObjects/Attribute.h"
#include "MemoryManagement/RCObject.h"
#include "Utility/Inform.h"
#include <iosfwd>
#include <set>
#include <string>
......
......@@ -348,29 +348,29 @@ int OpalData::getNumberOfMaxPhases() {
}
Mesh_t* OpalData::getMesh() {
return p->mesh_m;
}
// Mesh_t* OpalData::getMesh() {
// return p->mesh_m;
// }
FieldLayout_t* OpalData::getFieldLayout() {
return p->FL_m;
}
// FieldLayout_t* OpalData::getFieldLayout() {
// return p->FL_m;
// }
Layout_t* OpalData::getLayout() {
return p->PL_m;
}
// Layout_t* OpalData::getLayout() {
// return p->PL_m;
// }
void OpalData::setMesh(Mesh_t *mesh) {
p->mesh_m = mesh;
}
// void OpalData::setMesh(Mesh_t *mesh) {
// p->mesh_m = mesh;
// }
void OpalData::setFieldLayout(FieldLayout_t *fieldlayout) {
p->FL_m = fieldlayout;
}
// void OpalData::setFieldLayout(FieldLayout_t *fieldlayout) {
// p->FL_m = fieldlayout;
// }
void OpalData::setLayout(Layout_t *layout) {
p->PL_m = layout;
}
// void OpalData::setLayout(Layout_t *layout) {
// p->PL_m = layout;
// }
void OpalData::setGlobalPhaseShift(double shift) {
/// units: (sec)
......
......@@ -18,7 +18,6 @@
//
// ------------------------------------------------------------------------
#include "AbstractObjects/ObjectFunction.h"
#include "Algorithms/PBunchDefs.h"
#include <iosfwd>
#include <string>
......@@ -217,14 +216,6 @@ public:
std::vector<MaxPhasesT>::iterator getLastMaxPhases();
int getNumberOfMaxPhases();
Mesh_t* getMesh();
FieldLayout_t* getFieldLayout();
Layout_t* getLayout();
void setMesh(Mesh_t *mesh);
void setFieldLayout(FieldLayout_t *fieldlayout);
void setLayout(Layout_t *layout);
unsigned long long getMaxTrackSteps();
void setMaxTrackSteps(unsigned long long s);
void incMaxTrackSteps(unsigned long long s);
......
......@@ -6,12 +6,11 @@
class EnvelopeBunch;
#include "Algorithms/Vektor.h"
#include "Algorithms/Tracker.h"
#include "Structure/DataSink.h"
#include "Utilities/Options.h"
#include "Ippl.h"
#include "Physics/Physics.h"
#include "AbsBeamline/AlignWrapper.h"
......
......@@ -26,32 +26,43 @@
#include <limits>
#include "Algorithms/ParallelTTracker.h"
#include "Algorithms/PartPusher.h"
#include "AbsBeamline/AlignWrapper.h"
#include "AbsBeamline/BeamBeam.h"
#include "AbsBeamline/Collimator.h"
#include "AbsBeamline/Corrector.h"
#include "AbsBeamline/Diagnostic.h"
#include "AbsBeamline/Drift.h"
#include "AbsBeamline/ElementBase.h"
#include "AbsBeamline/Lambertson.h"
#include "AbsBeamline/Marker.h"
#include "AbsBeamline/Monitor.h"
#include "AbsBeamline/Multipole.h"
#include "AbsBeamline/Probe.h"
#include "AbsBeamline/RBend.h"
#include "AbsBeamline/RFCavity.h"
#include "AbsBeamline/TravelingWave.h"
#include "AbsBeamline/RFQuadrupole.h"
#include "AbsBeamline/SBend.h"
#include "AbsBeamline/Separator.h"
#include "AbsBeamline/Septum.h"
#include "AbsBeamline/Solenoid.h"
#include "AbsBeamline/ParallelPlate.h"
#include "AbsBeamline/CyclotronValley.h"
#include "Beamlines/Beamline.h"
#include "Lines/Sequence.h"
#include "AbstractObjects/OpalData.h"
#include "BasicActions/Option.h"
#include "BeamlineGeometry/Euclid3D.h"
#include "BeamlineGeometry/PlanarArcGeometry.h"
#include "BeamlineGeometry/RBendGeometry.h"
#include "Beamlines/Beamline.h"
#include "Lines/Sequence.h"
#include "Fields/BMultipoleField.h"
#include "FixedAlgebra/FTps.h"
#include "FixedAlgebra/FTpsMath.h"
#include "FixedAlgebra/FVps.h"
#include "Utilities/NumToStr.h"
#include "Distribution/Distribution.h"
#include "ValueDefinitions/RealVariable.h"
#include "Utilities/Timer.h"
#include "Solvers/WakeFunction.hh"
#include "Utilities/OpalException.h"
#include "Solvers/SurfacePhysicsHandler.hh"
#include "Structure/BoundaryGeometry.h"
#define PSdim 6
class PartData;
using namespace std;
......@@ -657,7 +668,7 @@ void ParallelTTracker::checkCavity(double s, Component *& comp, double & cavity_
}
}
void ParallelTTracker::doOneStep(BorisPusher pusher) {
void ParallelTTracker::doOneStep(BorisPusher & pusher) {
bool global_EOL = true; //check if any particle hasn't reached the end of the field from the last element
unsigned long bends = 0;
......@@ -1687,7 +1698,7 @@ void ParallelTTracker::bgf_main_collision_test() {
numParticlesInSimulation_m = itsBunch->getTotalNum();
}
void ParallelTTracker::timeIntegration1(BorisPusher pusher) {
void ParallelTTracker::timeIntegration1(BorisPusher & pusher) {
IpplTimings::startTimer(timeIntegrationTimer1_m);
if(bgf_m != NULL && secondaryFlg_m > 0) return;
......@@ -1709,7 +1720,7 @@ void ParallelTTracker::timeIntegration1(BorisPusher pusher) {
IpplTimings::stopTimer(timeIntegrationTimer1_m);
}
void ParallelTTracker::timeIntegration1_bgf(BorisPusher pusher) {
void ParallelTTracker::timeIntegration1_bgf(BorisPusher & pusher) {
IpplTimings::startTimer(timeIntegrationTimer1_m);
if(bgf_m == NULL || secondaryFlg_m == 0) return;
......@@ -1755,7 +1766,7 @@ void ParallelTTracker::timeIntegration1_bgf(BorisPusher pusher) {
IpplTimings::stopTimer(timeIntegrationTimer1_m);
}
void ParallelTTracker::timeIntegration2(BorisPusher pusher) {
void ParallelTTracker::timeIntegration2(BorisPusher & pusher) {
IpplTimings::startTimer(timeIntegrationTimer2_m);
/*
......@@ -1812,7 +1823,7 @@ void ParallelTTracker::timeIntegration2(BorisPusher pusher) {
IpplTimings::stopTimer(timeIntegrationTimer2_m);
}
void ParallelTTracker::timeIntegration2_bgf(BorisPusher pusher) {
void ParallelTTracker::timeIntegration2_bgf(BorisPusher & pusher) {
IpplTimings::startTimer(timeIntegrationTimer2_m);
/// After kick, we do collision test before integration in second half step with new momentum, if hit, then move collision particles to the position where collision occurs.
......
......@@ -25,43 +25,40 @@
#include "Physics/Physics.h"
#include "AbsBeamline/AlignWrapper.h"
#include "AbsBeamline/BeamBeam.h"
#include "AbsBeamline/Collimator.h"
#include "AbsBeamline/Corrector.h"
#include "AbsBeamline/Diagnostic.h"
#include "AbsBeamline/Drift.h"
#include "AbsBeamline/ElementBase.h"
#include "AbsBeamline/Lambertson.h"
#include "AbsBeamline/Marker.h"
#include "AbsBeamline/Monitor.h"
#include "AbsBeamline/Multipole.h"
#include "AbsBeamline/Probe.h"
#include "AbsBeamline/RBend.h"
#include "AbsBeamline/RFCavity.h"
#include "AbsBeamline/TravelingWave.h"
#include "AbsBeamline/RFQuadrupole.h"
#include "AbsBeamline/SBend.h"
#include "AbsBeamline/Separator.h"
#include "AbsBeamline/Septum.h"
#include "AbsBeamline/Solenoid.h"
#include "AbsBeamline/ParallelPlate.h"
#include "AbsBeamline/CyclotronValley.h"
class BMultipoleField;
class PartBunch;
class AlignWrapper;
class BeamBeam;
class Collimator;
class Corrector;
class Diagnostic;
class Drift;
class ElementBase;
class Lambertson;
class Marker;
class Monitor;
class Multipole;
class Probe;
class RBend;
class RFCavity;
class TravelingWave;
class RFQuadrupole;
class SBend;
class Separator;
class Septum;
class Solenoid;
class ParallelPlate;
class CyclotronValley;
#include "Beamlines/Beamline.h"
#include "Elements/OpalBeamline.h"
#include "Structure/SurfacePhysics.h"
#include "Filters/Filter.h"
#include "Utilities/OpalFilter.h"