Commit 1121acb4 authored by snuverink_j's avatar snuverink_j

various cosmetic improvements

parent b258bf6a
......@@ -152,7 +152,7 @@ template<class C>
template<class C>
void updateGhostParticles(
IpplParticleBase< ParticleSpatialLayout<T,Dim,Mesh,C > > &PData,
ParticleSpatialLayout<T, Dim, Mesh, C > &PLayout
ParticleSpatialLayout<T, Dim, Mesh, C > &/*PLayout*/
)
{
......
......@@ -708,7 +708,7 @@ IpplParticleBase<PLayout>::ghostGetMessage(Message& msg, int node) {
template<class PLayout>
size_t
IpplParticleBase<PLayout>::ghostGetSingleMessage(Message& msg, int node) {
IpplParticleBase<PLayout>::ghostGetSingleMessage(Message& msg, int /*node*/) {
// make sure we've been initialized
PAssert(Layout != 0);
......
......@@ -260,7 +260,7 @@ public:
// the precomputed mesh information
template <unsigned Dim, class M, class C, class IntOp, class CacheData>
void
scatter(Field<T,Dim,M,C>& f, const IntOp& intop,
scatter(Field<T,Dim,M,C>& f, const IntOp& /*intop*/,
const ParticleAttrib<CacheData>& cache) const {
......@@ -289,7 +289,7 @@ public:
void
gather(const Field<T,Dim,M,C>& f,
const ParticleAttrib< Vektor<PT,Dim> >& pp,
const IntOp& intop) {
const IntOp& /*intop*/) {
// make sure field is uncompressed
......@@ -319,7 +319,7 @@ public:
void
gather(const Field<T,Dim,M,C>& f,
const ParticleAttrib< Vektor<PT,Dim> >& pp,
const IntOp& intop,
const IntOp& /*intop*/,
ParticleAttrib<CacheData>& cache) {
......@@ -348,7 +348,7 @@ public:
// the precomputed mesh information
template <unsigned Dim, class M, class C, class IntOp, class CacheData>
void
gather(const Field<T,Dim,M,C>& f, const IntOp& intop,
gather(const Field<T,Dim,M,C>& f, const IntOp& /*intop*/,
const ParticleAttrib<CacheData>& cache) {
......
......@@ -560,7 +560,7 @@ void ParticleAttrib<T>::sort(SortList_t &slist)
template <class FT, unsigned Dim, class M, class C, class PT, class IntOp>
void
scatter(Field<FT,Dim,M,C>& f, const ParticleAttrib< Vektor<PT,Dim> >& pp,
const IntOp& intop, FT val) {
const IntOp& /*intop*/, FT val) {
// make sure field is uncompressed and guard cells are zeroed
f.Uncompress();
......@@ -585,7 +585,7 @@ template <class FT, unsigned Dim, class M, class C, class PT,
class IntOp, class CacheData>
void
scatter(Field<FT,Dim,M,C>& f, const ParticleAttrib< Vektor<PT,Dim> >& pp,
const IntOp& intop, ParticleAttrib<CacheData>& cache, FT val) {
const IntOp& /*intop*/, ParticleAttrib<CacheData>& cache, FT val) {
// make sure field is uncompressed and guard cells are zeroed
f.Uncompress();
......@@ -610,7 +610,7 @@ scatter(Field<FT,Dim,M,C>& f, const ParticleAttrib< Vektor<PT,Dim> >& pp,
template <class FT, unsigned Dim, class M, class C,
class IntOp, class CacheData>
void
scatter(Field<FT,Dim,M,C>& f, const IntOp& intop,
scatter(Field<FT,Dim,M,C>& f, const IntOp& /*intop*/,
const ParticleAttrib<CacheData>& cache, FT val) {
// make sure field is uncompressed and guard cells are zeroed
......
......@@ -39,10 +39,8 @@ using namespace std;
// debugging macros
#ifdef IPPL_PRINTDEBUG
#define DCDBG(x) x
#define CDCDBG(x) x
#else
#define DCDBG(x)
#define CDCDBG(x)
#endif
......
......@@ -25,7 +25,6 @@
#include <map>
class Attribute;
class AttributeBase;
class Statement;
......
......@@ -64,12 +64,12 @@ void Directory::erase(const std::string &name) {
Object *Directory::find(const std::string &name) const {
ObjectDir::const_iterator index = dir.find(name);
ObjectDir::const_iterator it = dir.find(name);
if(index == dir.end()) {
return 0;
if(it == dir.end()) {
return NULL;
} else {
return &*index->second;
return &*it->second;
}
}
......
......@@ -154,6 +154,7 @@ OpalDataImpl::OpalDataImpl():
restart_dump_freq_m(1), last_step_m(0),
hasPriorRun_m(false),
isRestart_m(false),
restartStep_m(0),
hasRestartFile_m(false),
hasBunchAllocated_m(false),
hasDataSinkAllocated_m(false),
......@@ -178,7 +179,7 @@ OpalDataImpl::~OpalDataImpl() {
// Make sure the main directory is cleared before the directories
// for tables and expressions are deleted.
delete mesh_m;// somehow this needs to be deleted first
delete FL_m;
delete FL_m;
//delete PL_m; //this gets deleted by FL_m
delete bunch_m;
......@@ -615,7 +616,7 @@ void OpalData::printNames(std::ostream &os, const std::string &pattern) {
<< pattern << "\":" << endl;
for(ObjectDir::const_iterator index = p->mainDirectory.begin();
index != p->mainDirectory.end(); index++) {
index != p->mainDirectory.end(); ++index) {
const std::string name = (*index).first;
if(! name.empty() && regex.match(name)) {
......@@ -726,7 +727,7 @@ std::vector<std::string> OpalData::getAllNames() {
std::vector<std::string> result;
for(ObjectDir::const_iterator index = p->mainDirectory.begin();
index != p->mainDirectory.end(); index++) {
index != p->mainDirectory.end(); ++index) {
std::string tmpName = (*index).first;
if(!tmpName.empty()) result.push_back(tmpName);
//// DTA
......@@ -747,7 +748,7 @@ std::vector<std::string> OpalData::getAllNames() {
// StringStream *ss;
// ss = new StringStream("myVar:=ALPHA+BETA;");
for(ObjectDir::const_iterator index = p->mainDirectory.begin();
index != p->mainDirectory.end(); index++) {
index != p->mainDirectory.end(); ++index) {
std::string tmpName = (*index).first;
if(!tmpName.empty()) {
Object *tmpObject = OpalData::getInstance()->find(tmpName);
......
......@@ -10,7 +10,6 @@
#include "Algorithms/Tracker.h"
#include "Structure/DataSink.h"
#include "Utilities/Options.h"
#include "Utilities/Options.h"
#include "Physics/Physics.h"
......
......@@ -24,7 +24,6 @@
#include "BasicActions/Option.h"
#include "Utilities/Options.h"
#include "Utilities/Options.h"
#include "Physics/Physics.h"
......
......@@ -152,8 +152,8 @@ void StatisticalErrors::execute() {
void StatisticalErrors::runSimulation(const std::string &inputFileName, MPI_Comm comm) {
IpplInfoWrapper *newippl = new IpplInfoWrapper(inputFileName, comm);
unsigned int startExtension = inputFileName.find_last_of('.');
unsigned int startRelativePath = inputFileName.find_last_of('/');
std::string::size_type startExtension = inputFileName.find_last_of('.');
std::string::size_type startRelativePath = inputFileName.find_last_of('/');
std::string relativePath("");
if (startRelativePath != std::string::npos) {
relativePath = inputFileName.substr(0, startRelativePath + 1);
......
......@@ -12,9 +12,6 @@
$Id: error.C 91 2007-05-06 17:47:45Z bakker $
*/
#define SVN_DATE "$Date: 2007-05-06 19:47:45 +0200 (Sun, 06 May 2007) $"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
......
......@@ -12,7 +12,6 @@
$Id: profile.C 106 2007-05-08 19:12:24Z bakker $
*/
#define SVN_DATE "$Date: 2007-05-08 21:12:24 +0200 (Tue, 08 May 2007) $"
#include "Ippl.h"
#include <iostream>
#include <cmath>
......
......@@ -27,7 +27,6 @@
#include <string>
#include <map>
class ElementBase;
class Channel;
class ConstChannel;
......
......@@ -22,7 +22,6 @@
// ------------------------------------------------------------------------
// Generic element classes interacting with a BeamlineVisitor.
class ElementBase;
class Component;
// Beam line structure classes.
......
......@@ -22,9 +22,7 @@
// ------------------------------------------------------------------------
#include "AbsBeamline/BendBase.h"
#include "Fields/BMultipoleField.h"
#include "Algorithms/PartPusher.h"
#include "Physics/Physics.h"
#include "Utilities/GeneralClassicException.h"
#include "gsl/gsl_spline.h"
......
......@@ -23,11 +23,10 @@
// ------------------------------------------------------------------------
#include "AbsBeamline/Component.h"
#include "AbsBeamline/BeamlineVisitor.h"
#include "BeamlineGeometry/StraightGeometry.h"
#include <vector>
class BeamlineVisitor;
class LossDataSink;
// Class Collimator
......
......@@ -148,7 +148,7 @@ public:
virtual ElementBase::ElementType getType() const;
virtual void setComponentType(std::string name) { };
virtual void setComponentType(std::string /*name*/) { };
virtual std::string getComponentType() const { return ""; };
/// Return design element.
......
......@@ -23,7 +23,9 @@
#include "AbsBeamline/Component.h"
#include "BeamlineGeometry/PlanarArcGeometry.h"
#include "Fields/BMultipoleField.h"
#include <string>
#include <vector>
class Fieldmap;
class LossDataSink;
......
......@@ -35,7 +35,6 @@
#include <string>
#include <queue>
class Beamline;
class BeamlineVisitor;
class Channel;
class ConstChannel;
......
......@@ -25,9 +25,6 @@
#include "AbsBeamline/AttributeSet.h"
#include <string>
class ElementBase;
// Class ElementImage
// ------------------------------------------------------------------------
/// An image of an element.
......
......@@ -22,11 +22,12 @@
// ------------------------------------------------------------------------
#include "AbsBeamline/Component.h"
#include "AbsBeamline/BeamlineVisitor.h"
#include "BeamlineGeometry/StraightGeometry.h"
#include <list>
#include <map>
#include <string>
class BeamlineVisitor;
class PartBunch;
class LossDataSink;
......
......@@ -21,10 +21,8 @@
#include "AbsBeamline/Component.h"
#include "BeamlineGeometry/StraightGeometry.h"
#include "Fields/BMultipoleField.h"
#include "Utilities/GeneralClassicException.h"
class PartBunch;
class Fieldmap;
// Class Multipole
// ------------------------------------------------------------------------
......
......@@ -33,7 +33,7 @@
#include "BeamlineGeometry/Euclid3DGeometry.h"
#include "AbsBeamline/Component.h"
class Fieldmap;
#include <string>
/** @Class Offset
*
......
......@@ -24,7 +24,6 @@
#include "AbsBeamline/Bend.h"
#include "BeamlineGeometry/RBendGeometry.h"
#include "Fields/BMultipoleField.h"
#include "Physics/Physics.h"
/*
* Class RBend
......
......@@ -30,18 +30,15 @@
#include <string>
#include "Physics/Physics.h"
#include "AbsBeamline/Component.h"
#include "BeamlineGeometry/PlanarArcGeometry.h"
#include "Utilities/RingSection.h"
#include "Utilities/ClassicField.h"
#include "Utilities/GeneralClassicException.h"
class LossDataSink;
class PartBunch;
class FieldMap;
/** \class[Ring]
*
......
......@@ -24,12 +24,7 @@
#include "AbsBeamline/Bend.h"
#include "BeamlineGeometry/PlanarArcGeometry.h"
#include "Fields/BMultipoleField.h"
#include "Algorithms/PartPusher.h"
#include "Physics/Physics.h"
#include <vector>
class Fieldmap;
#include <string>
/*
* Class SBend
......@@ -163,8 +158,8 @@ public:
/*
* Methods for OPAL-SLICE.
*/
virtual void addKR(int i, double t, Vector_t &K) { };
virtual void addKT(int i, double t, Vector_t &K) { };
virtual void addKR(int /* i */, double /* t */, Vector_t &/* K */) { };
virtual void addKT(int /* i */, double /* t */, Vector_t &/* K */) { };
virtual ElementBase::ElementType getType() const;
......
......@@ -20,11 +20,9 @@
//
// ------------------------------------------------------------------------
#include "Algebra/Vector.h"
#include "Algebra/VpsInvMap.h"
template <class T> class Vector;
// Class DynamicFixedPoint
// ------------------------------------------------------------------------
/// Dynamic fix point of a map.
......
......@@ -24,7 +24,6 @@
#include "Algorithms/PartData.h"
class BMultipoleField;
class Euclid3D;
template <class T, int N> class LinearMap;
template <class T, int N> class FTps;
template <class T, int N> class FVps;
......
......@@ -23,6 +23,7 @@
#include "AbsBeamline/BeamlineVisitor.h"
class ElementBase;
// Class DefaultVisitor
// ------------------------------------------------------------------------
......
......@@ -19,16 +19,11 @@
// ------------------------------------------------------------------------
#include "Algorithms/LinearMapper.h"
#include "FixedAlgebra/LinearMap.h"
class BMultipoleField;
class Euclid3D;
template <class T, int M, int N> class FMatrix;
template <class T, int N> class FTps;
template <class T, int N> class FVps;
// Class IdealMapper
// ------------------------------------------------------------------------
......
......@@ -81,15 +81,15 @@ public:
/** \brief Is true if we still have particles to emit */
bool doEmission() {return getNp() > 0;}
bool isEmitted(int n, int bin) {
bool isEmitted(int n, int /*bin*/) {
return isEmitted_m[n]; //(isEmitted_m[n][0]==1) && (isEmitted_m[n][1] == bin);
}
void setEmitted(int n, int bin) {
void setEmitted(int n, int /*bin*/) {
isEmitted_m[n] = true;
}
void updatePartPos(int n, int bin, double z) {
void updatePartPos(int n, int /*bin*/, double z) {
tmppart_m[n][2] = z;
}
......
......@@ -768,17 +768,17 @@ FieldLayout_t &PartBunch::getFieldLayout() {
}
inline
double PartBunch::getPx0(int i) {
double PartBunch::getPx0(int) {
return 0;
}
inline
double PartBunch::getPy0(int i) {
double PartBunch::getPy0(int) {
return 0;
}
inline
void PartBunch::setZ(int i, double zcoo) {};
void PartBunch::setZ(int /* i */, double /* zcoo */) {};
inline
void PartBunch::get_bounds(Vector_t &rmin, Vector_t &rmax) {
......@@ -1190,12 +1190,12 @@ double PartBunch::getInitialGamma() const {
}
inline
double PartBunch::getGamma(int i) {
double PartBunch::getGamma(int) {
return 0;
}
inline
double PartBunch::getBeta(int i) {
double PartBunch::getBeta(int) {
return 0;
}
......
......@@ -93,7 +93,7 @@ inline void BorisPusher::kick(const Vector_t &R, Vector_t &P, const Vector_t &Ef
}
inline void BorisPusher::push(Vector_t &R, const Vector_t &P, const double &dt) const {
inline void BorisPusher::push(Vector_t &R, const Vector_t &P, const double &/* dt */) const {
/** \f[ \vec{x}_{n+1/2} = \vec{x}_{n} + \frac{1}{2}\vec{v}_{n-1/2}\quad (= \vec{x}_{n} + \frac{\Delta t}{2} \frac{\vec{\beta}_{n-1/2}\gamma_{n-1/2}}{\gamma_{n-1/2}}) \f]
*
* \code
......
......@@ -133,35 +133,35 @@ public:
virtual void visitMapIntegrator(const MapIntegrator &);
/// set total number of tracked bunches
virtual void setNumBunch(int n) {};
virtual void setNumBunch(int) {};
/// get total number of tracked bunches
virtual int getNumBunch() { return 0; }
/// set the working sub-mode for multi-bunch mode
virtual void setMultiBunchMode(const int flag) {};
virtual void setMultiBunchMode(const int /*flag*/) {};
/// set the control parameter for sub-mode of multi-bunch mode
virtual void setParaAutoMode(const double para) {};
virtual void setParaAutoMode(const double /*para*/) {};
/// set last dumped step
virtual void setLastDumpedStep(const int para) { };
virtual void setLastDumpedStep(const int /*para*/) { };
/// set coefficients for track (default value is for proton in cyclotron)
virtual void setTrackCoeff(double para) {};
virtual void setTrackCoeff(double /* para */) {};
/// set multipacting flag
virtual void setMpacflg(bool mpacflg) {};
virtual void setPr(double x) { } ;
virtual void setPt(double x) { } ;
virtual void setPz(double x) { } ;
virtual void setR(double x) { } ;
virtual void setTheta(double x) { } ;
virtual void setZ(double x) { } ;
virtual void setBeGa(double x) { } ;
virtual void setPhi(double x) { } ;
virtual void setPsi(double x) { } ;
virtual void setPreviousH5Local(bool x) { } ;
virtual void setMpacflg(bool /* mpacflg */) {};
virtual void setPr(double) { } ;
virtual void setPt(double) { } ;
virtual void setPz(double) { } ;
virtual void setR(double) { } ;
virtual void setTheta(double) { } ;
virtual void setZ(double) { } ;
virtual void setBeGa(double) { } ;
virtual void setPhi(double) { } ;
virtual void setPsi(double) { } ;
virtual void setPreviousH5Local(bool) { } ;
// standing wave structures
FieldList cavities_m;
......
......@@ -83,9 +83,6 @@ public:
/// The cavity's field.
AcceleratingField field;
/// Cavities are ignored (amplitude = 0) when this switch is set.
static bool ignoreCavities;
};
#endif // CLASSIC_CyclotronValleyRep_HH
......@@ -39,7 +39,7 @@ namespace {
&DegraderRep::getElementLength,
&DegraderRep::setElementLength
},
{ 0 }
{ 0, 0, 0 }
};
}
......
......@@ -21,11 +21,11 @@
// ------------------------------------------------------------------------
#include "FixedAlgebra/FVector.h"
#include "FixedAlgebra/FLieGenerator.h"
#include <algorithm>
#include <complex>
template <int> class DragtFinnMap;
template <class T, int> class FLieGenerator;
template <class T, int, int> class FMatrix;
......
......@@ -22,14 +22,12 @@
#include "FixedAlgebra/FMatrix.h"
#include "FixedAlgebra/FVector.h"
#include "FixedAlgebra/FTps.h"
#include <algorithm>
#include <complex>
template <class T, int, int> class FMatrix;
template <class T, int> class FTps;
template <class T, int> class FVps;
// Tolerance for accepting an eigenvalue.
namespace {
const double tol = 1.0e-8;
......
......@@ -20,12 +20,13 @@
//
// ------------------------------------------------------------------------
#include "FixedAlgebra/FTps.h"
#include <algorithm>
#include <iosfwd>
template <class T> class Array1D;
template <class T, int M, int N> class FMatrix;
template <class T, int N> class FTps;
template <class T, int N> class FVector;
template <class T, int N> class LinearMap;
template <class T, int N> class TransportMap;
......
......@@ -20,10 +20,11 @@
//
// ------------------------------------------------------------------------
#include "FixedAlgebra/LinearFun.h"
#include <iosfwd>
template <class T, int M, int N> class FMatrix;
template <class T, int N> class LinearFun;
template <class T, int N> class FVector;
template <class T, int N> class FVps;
......
......@@ -20,13 +20,13 @@
//
// ------------------------------------------------------------------------
#include "FixedAlgebra/TransportFun.h"
#include <iosfwd>
template <class T, int M, int N> class FMatrix;
template <class T, int N> class FVector;
template <class T, int N> class FVps;
template <class T, int N> class TransportFun;
// Template class TransportMap<T,N>
// ------------------------------------------------------------------------
......
......@@ -102,7 +102,7 @@ inline RCObject::RCObject():
{}
inline RCObject::RCObject(const RCObject &rhs):
inline RCObject::RCObject(const RCObject &/*rhs*/):
refCount(0)
{}
......@@ -111,7 +111,7 @@ inline RCObject::~RCObject()
{}
inline RCObject &RCObject::operator=(const RCObject &rhs) {
inline RCObject &RCObject::operator=(const RCObject &/*rhs*/) {
return *this;
}
......