Commit 120a8553 authored by kraus's avatar kraus
Browse files

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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment