diff --git a/ippl/src/AppTypes/Vektor.h b/ippl/src/AppTypes/Vektor.h index 7f92412ccaaa370542d42311b4593044958bb655..7a7ef5f14fbee068baa4510b944ffed0af94bad9 100644 --- a/ippl/src/AppTypes/Vektor.h +++ b/ippl/src/AppTypes/Vektor.h @@ -17,6 +17,7 @@ #include "PETE/IpplExpressions.h" #include "AppTypes/TSVMeta.h" +#include <cmath> #include <iostream> #include <iomanip> @@ -277,6 +278,17 @@ cross(const Vektor<T1,D> &lhs, const Vektor<T2,D> &rhs) return TSV_MetaCross< Vektor<T1,D> , Vektor<T2,D> > :: apply(lhs,rhs); } +//---------------------------------------------------------------------- +// euclidean norm +//---------------------------------------------------------------------- +template < class T, unsigned D > +inline double +euclidean_norm(const Vektor<T, D> &a) +{ + return std::sqrt(dot(a, a)); +} + + //---------------------------------------------------------------------- // I/O template<class T, unsigned D> @@ -296,10 +308,4 @@ inline std::ostream& operator<<(std::ostream& out, const Vektor<T,D>& rhs) return out; } -#endif // VEKTOR_H - -/*************************************************************************** - * $RCSfile: Vektor.h,v $ $Author: adelmann $ - * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:24 $ - * IPPL_VERSION_ID: $Id: Vektor.h,v 1.1.1.1 2003/01/23 07:40:24 adelmann Exp $ - ***************************************************************************/ \ No newline at end of file +#endif // VEKTOR_H \ No newline at end of file diff --git a/ippl/src/FFT/FFT.hpp b/ippl/src/FFT/FFT.hpp index b1a3c67747654b87bf99837b7c38e905af3a601a..91c8e6ff1ba24f5edd72d9b119689648c467a16f 100644 --- a/ippl/src/FFT/FFT.hpp +++ b/ippl/src/FFT/FFT.hpp @@ -15,7 +15,7 @@ #include "FFT/FFT.h" #include "FieldLayout/FieldLayout.h" #include "Field/BareField.h" -#include "Utility/IpplStats.h" +//#include "Utility/IpplStats.h" //============================================================================= // FFT CCTransform Constructors diff --git a/ippl/src/Field/BareField.h b/ippl/src/Field/BareField.h index 7af317ab2c1d7f608e9980b007ffc58c9ab490dc..23e7cff063c9b90c6adfe1d2e7aa717a1d92618d 100644 --- a/ippl/src/Field/BareField.h +++ b/ippl/src/Field/BareField.h @@ -31,6 +31,7 @@ #include "Index/SIndex.h" #include "SubField/SubBareField.h" #include "Utility/IpplInfo.h" +#include "Utility/IpplStats.h" #include "Utility/PAssert.h" #include "Utility/Unique.h" #include "Utility/my_auto_ptr.h" diff --git a/ippl/src/Field/BareField.hpp b/ippl/src/Field/BareField.hpp index 0bb7f462d2ffb53915cc946308fce78ad09bab9f..6b7a8f2ad78f227001df38ba9d56634588c2be0d 100644 --- a/ippl/src/Field/BareField.hpp +++ b/ippl/src/Field/BareField.hpp @@ -33,10 +33,9 @@ #include "Utility/Inform.h" #include "Utility/Unique.h" #include "Utility/IpplInfo.h" -#include "Utility/IpplStats.h" +//#include "Utility/IpplStats.h" #include <map> -#include <utility> #include <cstdlib> diff --git a/ippl/src/Index/SIndexAssign.hpp b/ippl/src/Index/SIndexAssign.hpp index cb7ce6b6605abd3ad20d68ef8bec2129521a87f0..fab0558d6822c4fc8dd9f3e8c860dcbe28c9843e 100644 --- a/ippl/src/Index/SIndexAssign.hpp +++ b/ippl/src/Index/SIndexAssign.hpp @@ -27,9 +27,9 @@ #include "Index/SIndexAssign.h" #include "Index/SIndex.h" #include "Field/BrickIterator.h" -#include "Field/Field.h" -#include "Field/IndexedField.h" -#include "Field/Assign.h" +// #include "Field/Field.h" +// #include "Field/IndexedField.h" +// #include "Field/Assign.h" #include "Utility/IpplInfo.h" diff --git a/ippl/src/Meshes/UniformCartesian.hpp b/ippl/src/Meshes/UniformCartesian.hpp index c220b1c475a1e9c43ac5894eb03bad3395ce7abc..203b15ba59aea87dbf5b40aec5b2624aef60b99b 100644 --- a/ippl/src/Meshes/UniformCartesian.hpp +++ b/ippl/src/Meshes/UniformCartesian.hpp @@ -14,7 +14,6 @@ #include "Field/BareField.h" #include "Field/BrickExpression.h" #include "Field/LField.h" -#include "Field/Field.h" #include "Field/Assign.h" #include "Field/AssignDefs.h" diff --git a/ippl/src/Message/Communicate.cpp b/ippl/src/Message/Communicate.cpp index 377cc3193d2555150afd09dfbeac2656f1fb3e6c..4db98415c385ba6909dc6f499983a0004532b6e5 100644 --- a/ippl/src/Message/Communicate.cpp +++ b/ippl/src/Message/Communicate.cpp @@ -38,7 +38,6 @@ #include "Utility/IpplInfo.h" #include "Utility/IpplStats.h" -#include "Utility/RandomNumberGen.h" #include "Utility/PAssert.h" #include <cstdio> diff --git a/ippl/src/Message/Message.h b/ippl/src/Message/Message.h index 65ca219a1f04d6d18b5507351b3641329a084b20..13499e08eb0d3b071eee8874eae637ac5a401142 100644 --- a/ippl/src/Message/Message.h +++ b/ippl/src/Message/Message.h @@ -31,7 +31,6 @@ * of resolving who needs to free up the storage used for the Message elements. ***************************************************************************/ -#include "Utility/Inform.h" #include <complex> #include <cstddef> #include <vector> diff --git a/ippl/src/Message/Message.hpp b/ippl/src/Message/Message.hpp index 67e7b0b3148d7e148b716b79d1077f0a04c3d3f0..033c187a6f96f4c212fad4add0c5cc8c79696265 100644 --- a/ippl/src/Message/Message.hpp +++ b/ippl/src/Message/Message.hpp @@ -12,7 +12,6 @@ ***************************************************************************/ #include "Message/Message.h" -#include "Utility/Inform.h" #include "Utility/IpplInfo.h" #include <iterator> diff --git a/ippl/src/Particle/AbstractParticle.h b/ippl/src/Particle/AbstractParticle.h index 9ba7e8c0e4d99a1b0a72582bcde2396242563c77..64e46479f547dc301ee4ce47f4585b85e435bac9 100644 --- a/ippl/src/Particle/AbstractParticle.h +++ b/ippl/src/Particle/AbstractParticle.h @@ -22,7 +22,9 @@ #define ABSTRACT_PARTICLE_H #include "Particle/ParticleLayout.h" -#include "Particle/ParticleAttrib.h" + +template<class T> class ParticleAttrib; +class ParticleAttribBase; template <class T, unsigned Dim> class AbstractParticle { diff --git a/ippl/src/Particle/Interpolator.h b/ippl/src/Particle/Interpolator.h index 41142fe01f521e422dc99840e35ca9a1406fd97c..ee11f7e04d016525ac4a768284f4922dc97bfe3f 100644 --- a/ippl/src/Particle/Interpolator.h +++ b/ippl/src/Particle/Interpolator.h @@ -16,14 +16,13 @@ #include "Field/LField.h" #include "Field/CompressedBrickIterator.h" #include "Index/NDIndex.h" +#include "Meshes/Centering.h" #include "AppTypes/Vektor.h" #include "Utility/IpplInfo.h" #include "Utility/IpplException.h" -#include <iostream> +#include <ostream> #include <vector> -#include <utility> -#include <cmath> // Helper class and functions for finding nearest grid point given centering diff --git a/ippl/src/Particle/IpplParticleBase.h b/ippl/src/Particle/IpplParticleBase.h index fa5e4a1639b8e8fdf6f6f90a6d45f2c475795ebe..bf2b807ad78eb3600d54171751ecb933fa8273df 100644 --- a/ippl/src/Particle/IpplParticleBase.h +++ b/ippl/src/Particle/IpplParticleBase.h @@ -95,15 +95,18 @@ // include files #include "Particle/AbstractParticle.h" +#include "Particle/ParticleAttribBase.h" +#include "Particle/ParticleLayout.h" #include "AppTypes/Vektor.h" #include "DataSource/DataSource.h" #include "DataSource/MakeDataSource.h" #include "Message/Formatter.h" #include <vector> -#include <algorithm> // Include algorithms #include <utility> #include <iostream> +template <class T, unsigned Dim> +using PLayout = ParticleLayout<T, Dim>; // forward declarations class Inform; @@ -120,7 +123,6 @@ template <class T, unsigned D> class ParticleBConds; template<class PLayout> class IpplParticleBase : public DataSource, public AbstractParticle<typename PLayout::Position_t, PLayout::Dimension> { - public: // useful enums enum { Dim = PLayout::Dimension }; diff --git a/ippl/src/Particle/PAssignDefs.h b/ippl/src/Particle/PAssignDefs.h index e70c126691c9dbef0ce14160ff74bc3f7142e1f2..8304ecb041812deba5609c617af928e42ddf9c1b 100644 --- a/ippl/src/Particle/PAssignDefs.h +++ b/ippl/src/Particle/PAssignDefs.h @@ -18,7 +18,8 @@ // forward declarations template<class T> class ParticleAttrib; template<class T, unsigned Dim> class ParticleAttribElem; - +template<class T> class ParticleAttribIterator; +template <class T> class ParticleAttribConstIterator; ////////////////////////////////////////////////////////////////////// // diff --git a/ippl/src/Particle/ParticleAttrib.h b/ippl/src/Particle/ParticleAttrib.h index 3673425b8cab7b497285b84a75c2db2c1ec90899..f84b6332385f93594877006860351e25dee26cc7 100644 --- a/ippl/src/Particle/ParticleAttrib.h +++ b/ippl/src/Particle/ParticleAttrib.h @@ -73,6 +73,7 @@ // include files #include "Particle/ParticleAttribBase.h" #include "Particle/ParticleAttribElem.h" +#include "Particle/PAssign.h" #include "SubParticle/SubParticleAttrib.h" #include "DataSource/DataSource.h" #include "DataSource/MakeDataSource.h" diff --git a/ippl/src/SubParticle/SubParticleAssignDefs.h b/ippl/src/SubParticle/SubParticleAssignDefs.h index 4535de9781d97a1cbe630163c9b7466347a547aa..82d40b001812adf11026e3ae29a9b1efa7b64af6 100644 --- a/ippl/src/SubParticle/SubParticleAssignDefs.h +++ b/ippl/src/SubParticle/SubParticleAssignDefs.h @@ -13,7 +13,7 @@ // include files #include "SubField/SubFieldAssignDefs.h" -#include "SubParticle/SubParticleAssign.h" +#include "SubParticle/SubParticleAttrib.h" ////////////////////////////////////////////////////////////////////// // diff --git a/ippl/src/Utility/DiscField.h b/ippl/src/Utility/DiscField.h index 2cdbb53cd318aea2f0fe64f1be66abdc68c7fea8..48b7a336f1cfbde9b042dd4ea532f2b54810f221 100644 --- a/ippl/src/Utility/DiscField.h +++ b/ippl/src/Utility/DiscField.h @@ -14,7 +14,6 @@ // include files #include "Index/NDIndex.h" #include "Field/BrickExpression.h" -#include "Field/Field.h" #include "Utility/DiscBuffer.h" #include "Utility/DiscConfig.h" #include "Utility/Inform.h" @@ -24,8 +23,6 @@ #include <cstdlib> #include <unistd.h> #include <fcntl.h> -#include <sys/stat.h> -#include <sys/types.h> #include <vector> #include <iostream> diff --git a/ippl/src/Utility/DiscField.hpp b/ippl/src/Utility/DiscField.hpp index 2582eb84e2fe1c6a0f0b800cc25f13b3c9be8b20..e6ba341234945a58fcb13f3554d1c325b41171a1 100644 --- a/ippl/src/Utility/DiscField.hpp +++ b/ippl/src/Utility/DiscField.hpp @@ -27,7 +27,6 @@ #include "Utility/DiscField.h" #include "Utility/DiscConfig.h" #include "Utility/DiscMeta.h" -#include "Field/BrickIterator.h" #include "Message/Tags.h" #include "Utility/PAssert.h" diff --git a/ippl/src/Utility/DiscParticle.h b/ippl/src/Utility/DiscParticle.h index 632ec760f4bcc501751445e67ad9448326ebbb3e..51bfee3dbeaed246e50784e59b5172bbdc93d1f8 100644 --- a/ippl/src/Utility/DiscParticle.h +++ b/ippl/src/Utility/DiscParticle.h @@ -15,9 +15,9 @@ #include "Utility/DiscConfig.h" #include "Utility/IpplInfo.h" #include "Utility/PAssert.h" +#include "Message/Communicate.h" #include "Message/Message.h" - - +#include "Message/Tags.h" #include <vector> #include <iostream> @@ -26,7 +26,6 @@ // forward declarations template<class T> class IpplParticleBase; template<class T> class ParticleAttrib; -class Message; class DiscParticle { diff --git a/ippl/src/Utility/Inform.h b/ippl/src/Utility/Inform.h index 3317301d48925afedbd875ea35f37c98a997ba5c..21c9f86d2cc8f4358619b8095fa8daa3839fada9 100644 --- a/ippl/src/Utility/Inform.h +++ b/ippl/src/Utility/Inform.h @@ -34,6 +34,7 @@ #include <iostream> #include <iomanip> #include <sstream> +#include <string> #define INFORM_ALL_NODES (-1) diff --git a/ippl/src/Utility/IpplInfo.cpp b/ippl/src/Utility/IpplInfo.cpp index a626255a5e01f70e8b771232c0ac3a90f12526a9..113bd119813451d0e6f8d7a36521934bc346a99f 100644 --- a/ippl/src/Utility/IpplInfo.cpp +++ b/ippl/src/Utility/IpplInfo.cpp @@ -25,6 +25,7 @@ // include files #include "Utility/IpplInfo.h" +#include "Utility/Inform.h" #include "Utility/IpplStats.h" #include "Utility/PAssert.h" #include "Utility/RandomNumberGen.h" diff --git a/ippl/src/Utility/IpplInfo.h b/ippl/src/Utility/IpplInfo.h index ce1fe8211492dbbec6210be4d76818a6391119a4..0355229cedf6bdbbc36d92e53cb90a920e3e74ca 100644 --- a/ippl/src/Utility/IpplInfo.h +++ b/ippl/src/Utility/IpplInfo.h @@ -43,9 +43,8 @@ */ // include files -#include "Utility/Inform.h" -#include "Message/Communicate.h" #include "Utility/StaticIpplInfo.h" +#include "Utility/Inform.h" #include <iostream> #include <stack> @@ -56,6 +55,8 @@ #include <mpi.h> // forward declarations +class Communicate; +class Inform; class IpplStats; class IpplInfo; std::ostream& operator<<(std::ostream&, const IpplInfo&); diff --git a/ippl/src/Utility/IpplMemoryUsage.cpp b/ippl/src/Utility/IpplMemoryUsage.cpp index 2e2ca97e6c0cbc43ada250e8afeab4b9b9358561..b5bfbedc87be74eeb43548654247c35739cda33b 100644 --- a/ippl/src/Utility/IpplMemoryUsage.cpp +++ b/ippl/src/Utility/IpplMemoryUsage.cpp @@ -40,6 +40,9 @@ // #include "Utility/IpplMemoryUsage.h" +#include "Message/GlobalComm.h" +#include "Utility/IpplInfo.h" + ////////////////////////////////////////////////////////////////////// IpplMemoryUsage::IpplMemoryUsage() { } diff --git a/ippl/src/Utility/IpplMemoryUsage.h b/ippl/src/Utility/IpplMemoryUsage.h index bcb43a779140d3bfaa483c8801d72e472bbd3bb7..094915ab8940725ad52d5a0ec72ca386ef4c077d 100644 --- a/ippl/src/Utility/IpplMemoryUsage.h +++ b/ippl/src/Utility/IpplMemoryUsage.h @@ -38,11 +38,11 @@ // You should have received a copy of the GNU General Public License // along with OPAL. If not, see <https://www.gnu.org/licenses/>. // -#ifndef IPPL_MEMPRYUSAGE_H -#define IPPL_MEMPRYUSAGE_H +#ifndef IPPL_MEMORYUSAGE_H +#define IPPL_MEMORYUSAGE_H -#include "Ippl.h" #include <memory> +#include <string> #include <sys/resource.h> #include <sys/time.h> // not required but increases portability diff --git a/ippl/src/Utility/IpplStats.h b/ippl/src/Utility/IpplStats.h index a7be10ac3fb40373d187ccb86a5ee83fbed41fbb..b22678d39e6804baf67a1a1947ed9d75bbbfd0e7 100644 --- a/ippl/src/Utility/IpplStats.h +++ b/ippl/src/Utility/IpplStats.h @@ -38,10 +38,11 @@ // include files #include "Utility/IpplInfo.h" #include "Utility/Timer.h" -#include "Utility/Inform.h" #include <vector> +class Inform; + class IpplStats { public: diff --git a/ippl/src/Utility/IpplTimings.cpp b/ippl/src/Utility/IpplTimings.cpp index 427c52cf669d456dbd3737c78536bc0d984c3903..884407a6af73ac50d42ecf0e12a1b8d7a6bcbb33 100644 --- a/ippl/src/Utility/IpplTimings.cpp +++ b/ippl/src/Utility/IpplTimings.cpp @@ -7,7 +7,6 @@ #include "Utility/IpplTimings.h" #include "Utility/Inform.h" -#include "Utility/IpplInfo.h" #include "Message/GlobalComm.h" #include "PETE/IpplExpressions.h" diff --git a/ippl/src/Utility/PAssert.h b/ippl/src/Utility/PAssert.h index a780daef37e92601fb9052b590a323edd0bf415a..4659fa032aabb10939082e52c37749075f069f18 100644 --- a/ippl/src/Utility/PAssert.h +++ b/ippl/src/Utility/PAssert.h @@ -6,7 +6,6 @@ #ifndef PASSERT_H #define PASSERT_H -#include "Utility/IpplInfo.h" #include <exception> #include <stdexcept> diff --git a/optimizer/Comm/types.h b/optimizer/Comm/types.h index 259fb38f3ffbe8f411fc2c28d56c21bfb6b151c8..ecd0a4a3cfc2dac62219d9ecebeec07e3f11d622 100644 --- a/optimizer/Comm/types.h +++ b/optimizer/Comm/types.h @@ -21,8 +21,6 @@ #ifndef __COMM_TYPES__ #define __COMM_TYPES__ -#include <vector> - #include "mpi.h" namespace Comm { diff --git a/optimizer/Util/CmdArguments.cpp b/optimizer/Util/CmdArguments.cpp index f247e56404d5098b5b83c389988539017b4b0ca1..038fdebd377df587feeacc6acbabb80bedb3723a 100644 --- a/optimizer/Util/CmdArguments.cpp +++ b/optimizer/Util/CmdArguments.cpp @@ -27,6 +27,8 @@ // #include "Util/CmdArguments.h" +#include "boost/algorithm/string.hpp" + void CmdArguments::addArguments(int argc, char **argv) { for(int i=1; i<argc; i++) { diff --git a/optimizer/Util/CmdArguments.h b/optimizer/Util/CmdArguments.h index bff896739fbd47e5002b65b2dc80d93e32db9cb0..2f079944ee27564a3db6a99617c3ace086835355 100644 --- a/optimizer/Util/CmdArguments.h +++ b/optimizer/Util/CmdArguments.h @@ -35,7 +35,6 @@ #include <set> #include "boost/smart_ptr.hpp" -#include "boost/algorithm/string.hpp" #include "boost/utility/value_init.hpp" #include "Util/OptPilotException.h" diff --git a/optimizer/Util/MPIHelper.cpp b/optimizer/Util/MPIHelper.cpp index be01293828bde017343cf43e8685d4657fe2f9a9..d3ebc395458c2e4f86eddbf0b343bc6243fbbe8d 100644 --- a/optimizer/Util/MPIHelper.cpp +++ b/optimizer/Util/MPIHelper.cpp @@ -22,6 +22,7 @@ #include <boost/static_assert.hpp> #include <boost/serialization/map.hpp> +#include <boost/serialization/vector.hpp> #include <boost/archive/text_oarchive.hpp> #include <boost/archive/text_iarchive.hpp> diff --git a/optimizer/Util/Types.h b/optimizer/Util/Types.h index cff85c900cb725346a49217c1e575976a68e8ce4..3d32e070429ea34fd7e6282112de2c477253c934 100644 --- a/optimizer/Util/Types.h +++ b/optimizer/Util/Types.h @@ -21,17 +21,12 @@ #ifndef __TYPES_H__ #define __TYPES_H__ -#include <vector> #include <map> +#include <utility> +#include <vector> -#include <boost/serialization/map.hpp> -#include "boost/serialization/vector.hpp" #include "boost/tuple/tuple.hpp" -#include "boost/variant.hpp" -#include "boost/fusion/adapted/struct/adapt_struct.hpp" -#include "boost/fusion/include/adapt_struct.hpp" - #include "Expression/Expression.h" //FIXME: add namespaces diff --git a/src/AbstractObjects/Attribute.cpp b/src/AbstractObjects/Attribute.cpp index 9ad9e8991b7647efe63ad63eaf17e5354e4cfff2..d7285595a891d63ae4f08bb2d661e67fbce80ace 100644 --- a/src/AbstractObjects/Attribute.cpp +++ b/src/AbstractObjects/Attribute.cpp @@ -20,6 +20,8 @@ #include "AbstractObjects/AttributeBase.h" #include "Utilities/Options.h" +#include "Utility/Inform.h" + #include <set> #include <iostream> diff --git a/src/AbstractObjects/Attribute.h b/src/AbstractObjects/Attribute.h index 3449810550e95065f05e0b214a1a1e4ed94b6fef..77907f8cc90e1c0e7624fdfc29ebd4c32a2370a8 100644 --- a/src/AbstractObjects/Attribute.h +++ b/src/AbstractObjects/Attribute.h @@ -24,9 +24,6 @@ #include <iosfwd> #include <string> -// #include <Ippl.h> -#include <Utility/Inform.h> - class Statement; // Class Attribute diff --git a/src/Algorithms/ParallelTTracker.cpp b/src/Algorithms/ParallelTTracker.cpp index 73c32bcd8301f1e264d48f214f64f4e5a500587a..868cb338f0221e79f87dc0d43fe211b4609e6e20 100644 --- a/src/Algorithms/ParallelTTracker.cpp +++ b/src/Algorithms/ParallelTTracker.cpp @@ -22,19 +22,18 @@ #include "Algorithms/ParallelTTracker.h" #include <cfloat> -#include <iostream> +#include <cmath> #include <fstream> +#include <limits> #include <iomanip> +#include <iostream> #include <sstream> #include <string> -#include <limits> -#include <cmath> #include "Algorithms/OrbitThreader.h" #include "Algorithms/CavityAutophaser.h" #include "Beamlines/Beamline.h" #include "Beamlines/FlaggedBeamline.h" -#include "Lines/Sequence.h" #include "Solvers/CSRWakeFunction.hh" diff --git a/src/Algorithms/ThickTracker.h b/src/Algorithms/ThickTracker.h index 7ea954f78927ba0e627aa8660e2f671f38ea0ebc..175731ac5c3c558e8f0e71fe28e2874d4349b668 100644 --- a/src/Algorithms/ThickTracker.h +++ b/src/Algorithms/ThickTracker.h @@ -24,42 +24,27 @@ #define OPAL_ThickTracker_HH #include "Algorithms/Tracker.h" -#include "Structure/DataSink.h" #include "Hamiltonian.h" -#include "MapAnalyser.h" - #include "Algorithms/IndexMap.h" #include "AbsBeamline/BeamStripping.h" -#include "AbsBeamline/CCollimator.h" -#include "AbsBeamline/Corrector.h" -#include "AbsBeamline/Degrader.h" #include "AbsBeamline/Drift.h" -#include "AbsBeamline/FlexibleCollimator.h" #include "AbsBeamline/ElementBase.h" -#include "AbsBeamline/Marker.h" -#include "AbsBeamline/Monitor.h" #include "AbsBeamline/Multipole.h" -#include "AbsBeamline/Probe.h" -#include "AbsBeamline/RFCavity.h" -#include "AbsBeamline/RBend.h" #include "AbsBeamline/RBend3D.h" #include "AbsBeamline/SBend.h" -#include "AbsBeamline/Septum.h" -#include "AbsBeamline/Solenoid.h" -#include "AbsBeamline/TravelingWave.h" #include "Elements/OpalBeamline.h" -#include "Structure/Beam.h" - -//#include <array> #include <cmath> - +#include <list> +#include <string> #include <tuple> +#include <vector> class BMultipoleField; +class DataSink; template <class T, unsigned Dim> class PartBunchBase; @@ -101,14 +86,13 @@ class PartBunchBase; class ThickTracker: public Tracker { -public: +private: typedef Hamiltonian::series_t series_t; - typedef MapAnalyser::fMatrix_t fMatrix_t; - typedef MapAnalyser::cfMatrix_t cfMatrix_t; typedef FVps<double, 6> map_t; typedef FVector<double, 6> particle_t; typedef std::tuple<series_t, std::size_t, double> tuple_t; typedef std::list<tuple_t> beamline_t; + typedef FMatrix<double, 6, 6> fMatrix_t; public: @@ -331,7 +315,6 @@ private: Hamiltonian hamiltonian_m; - MapAnalyser mapAnalyser_m; Vector_t RefPartR_m; diff --git a/src/BasicActions/Option.cpp b/src/BasicActions/Option.cpp index bb80d744adab2da32ee70438c8133eb25bc3e20e..1c8f2c15878eb49b627c7a2ad2df732ad87a66c9 100644 --- a/src/BasicActions/Option.cpp +++ b/src/BasicActions/Option.cpp @@ -20,13 +20,13 @@ #include "BasicActions/Option.h" #include "Attributes/Attributes.h" #include "Parser/FileStream.h" +#include "Utilities/OpalException.h" #include "Utilities/Options.h" #include "Utilities/OptionTypes.h" #include "Utilities/ClassicRandom.h" -#include "Utility/IpplInfo.h" - -#include "Utilities/OpalException.h" +#include "Utility/Inform.h" +#include "Utility/IpplInfo.h" #include "Utility/IpplMemoryUsage.h" #include <ctime> diff --git a/src/BasicActions/PSystem.cpp b/src/BasicActions/PSystem.cpp index a8c34ed5b87032b2a8daac397b7242f19e81e02e..d3698e7fcaaf9d20da3f27d4adb74ef76719329f 100644 --- a/src/BasicActions/PSystem.cpp +++ b/src/BasicActions/PSystem.cpp @@ -18,9 +18,10 @@ #include "BasicActions/PSystem.h" -#include "Ippl.h" #include "Attributes/Attributes.h" +#include "Utility/IpplInfo.h" + #include <cstdlib> // Class PSystem // ------------------------------------------------------------------------ diff --git a/src/BasicActions/System.cpp b/src/BasicActions/System.cpp index 6a78bd47c627a0f72dbd733bca1f290a8aa8320b..7c3b614d50c10bce94037cd44fff875bd25b952a 100644 --- a/src/BasicActions/System.cpp +++ b/src/BasicActions/System.cpp @@ -18,9 +18,10 @@ #include "BasicActions/System.h" -#include "Ippl.h" #include "Attributes/Attributes.h" +#include "Utility/IpplInfo.h" + #include <cstdlib> // Class System // ------------------------------------------------------------------------ diff --git a/src/Classic/AbsBeamline/BeamStripping.cpp b/src/Classic/AbsBeamline/BeamStripping.cpp index a456fdb4dbd0b48da054fd07b3f909fc41830b84..90f384fe91d3ff3ed50011f9024521f74f37dd6a 100644 --- a/src/Classic/AbsBeamline/BeamStripping.cpp +++ b/src/Classic/AbsBeamline/BeamStripping.cpp @@ -38,10 +38,7 @@ #include <cmath> #include <cstdio> -#include "Ippl.h" - -#include "gsl/gsl_spline.h" -#include "gsl/gsl_interp.h" +#include "Utility/Inform.h" #define CHECK_BSTP_FSCANF_EOF(arg) if (arg == EOF)\ throw GeneralClassicException("BeamStripping::getPressureFromFile",\ diff --git a/src/Classic/AbsBeamline/Component.h b/src/Classic/AbsBeamline/Component.h index 8f9f5fa133e81fddd4e36efe21416d416785bc56..51c92da2f917258a8560f0b8eada10a32dc572c7 100644 --- a/src/Classic/AbsBeamline/Component.h +++ b/src/Classic/AbsBeamline/Component.h @@ -25,7 +25,6 @@ #include "AbsBeamline/ElementBase.h" #include "Fields/EMField.h" -#include "Algorithms/Vektor.h" class PartData; diff --git a/src/Classic/AbsBeamline/Degrader.cpp b/src/Classic/AbsBeamline/Degrader.cpp index df2c02cc1c41930adccb79f3d67db66ec89bf29b..f9f8bcc20e357d1174d0d54be1d989dafcdb35d8 100644 --- a/src/Classic/AbsBeamline/Degrader.cpp +++ b/src/Classic/AbsBeamline/Degrader.cpp @@ -21,13 +21,12 @@ #include "AbsBeamline/Degrader.h" #include "Algorithms/PartBunchBase.h" #include "AbsBeamline/BeamlineVisitor.h" -#include "Fields/Fieldmap.h" #include "Structure/LossDataSink.h" #include "Utilities/Options.h" #include "Solvers/ParticleMatterInteractionHandler.hh" #include "Physics/Physics.h" -#include "Utilities/Util.h" #include <memory> +#include <string> extern Inform *gmsg; diff --git a/src/Classic/AbsBeamline/Degrader.h b/src/Classic/AbsBeamline/Degrader.h index 239c1ea911b2b21e2de1727b622bd831f9447b43..7426f5c436c180a7967e86c3b7dddb3c74a377b8 100644 --- a/src/Classic/AbsBeamline/Degrader.h +++ b/src/Classic/AbsBeamline/Degrader.h @@ -25,6 +25,8 @@ #include "AbsBeamline/Component.h" #include "AbsBeamline/BeamlineVisitor.h" #include "BeamlineGeometry/StraightGeometry.h" + +#include <string> #include <vector> class LossDataSink; diff --git a/src/Classic/AbsBeamline/ElementBase.h b/src/Classic/AbsBeamline/ElementBase.h index 7121877da9160b56a6c9f978d1bb2cd6d7aa264a..87f5d6e8e730d6f0bc581b667702c1b6f48ae562 100644 --- a/src/Classic/AbsBeamline/ElementBase.h +++ b/src/Classic/AbsBeamline/ElementBase.h @@ -65,8 +65,8 @@ #include "AbsBeamline/AttributeSet.h" #include "BeamlineGeometry/Geometry.h" +#include "BeamlineGeometry/Euclid3D.h" #include "MemoryManagement/RCObject.h" -#include "Algorithms/Vektor.h" #include "Algorithms/Quaternion.h" #include "Algorithms/CoordinateSystemTrafo.h" #include "Utilities/GeneralClassicException.h" @@ -328,7 +328,6 @@ public: virtual bool isInside(const Vector_t &r) const; - void setMisalignment(double x, double y, double s); void setMisalignment(const CoordinateSystemTrafo &cst); void getMisalignment(double &x, double &y, double &s) const; diff --git a/src/Classic/AbsBeamline/SBend.cpp b/src/Classic/AbsBeamline/SBend.cpp index 6c89c6708b71558a78c75b0d5bc4e246fdd42e77..15fe1b9122035cbf068d9f7a396db610b11a18f5 100644 --- a/src/Classic/AbsBeamline/SBend.cpp +++ b/src/Classic/AbsBeamline/SBend.cpp @@ -19,13 +19,10 @@ // ------------------------------------------------------------------------ #include "AbsBeamline/SBend.h" -#include "Algorithms/PartBunchBase.h" #include "AbsBeamline/BeamlineVisitor.h" -#include "Utilities/Options.h" #include "Fields/Fieldmap.h" -#include "AbstractObjects/OpalData.h" -#include <iostream> -#include <fstream> + +#include <string> extern Inform *gmsg; diff --git a/src/Classic/Algorithms/PBunchDefs.h b/src/Classic/Algorithms/PBunchDefs.h index 9071c70465966bc421f306aae55222e438ac8529..89fed8cd0fcc0e6423d3e7959f831516af8f4f1f 100644 --- a/src/Classic/Algorithms/PBunchDefs.h +++ b/src/Classic/Algorithms/PBunchDefs.h @@ -3,17 +3,10 @@ #include "Algorithms/Vektor.h" #include "Particle/IntCIC.h" -#include "Particle/IntNGP.h" -#include "Particle/IntSUDS.h" -#include "Particle/IntTSC.h" #include "Particle/ParticleSpatialLayout.h" -#include "Particle/ParticleUniformLayout.h" -#include "Particle/ParticleAttrib.h" #include "Meshes/UniformCartesian.h" -#include "Meshes/Centering.h" #include "FieldLayout/CenteredFieldLayout.h" #include "Field/Field.h" -#include "FFT/FFT.h" #ifdef ENABLE_AMR #include "Amr/AmrDefs.h" @@ -22,37 +15,21 @@ #endif typedef IntCIC IntrplCIC_t; -typedef IntNGP IntrplNGP_t; -typedef IntSUDS IntrplSUDS_t; -typedef IntTSC IntrplTSC_t; typedef ParticleSpatialLayout<double, 3>::ParticlePos_t Ppos_t; typedef ParticleSpatialLayout<double, 3>::ParticleIndex_t PID_t; -typedef ParticleUniformLayout<double, 3>::ParticlePos_t UPpos_t; -typedef ParticleUniformLayout<double, 3>::ParticleIndex_t UPID_t; - -typedef ParticleAttrib<double> Pscalar_t; - -typedef InterpolatorTraits<double, 3, IntrplCIC_t>::Cache_t Pcache_t; - typedef UniformCartesian<3, double> Mesh_t; typedef ParticleSpatialLayout< double, 3, Mesh_t > Layout_t; -typedef ParticleUniformLayout< double, 3 > ULayout_t; typedef Cell Center_t; typedef CenteredFieldLayout<3, Mesh_t, Center_t> FieldLayout_t; + typedef Field<double, 3, Mesh_t, Center_t> Field_t; typedef Field<Vector_t, 3, Mesh_t, Center_t> VField_t; -typedef Field<int, 3, Mesh_t, Center_t> IField_t; -typedef Field<std::complex<double>, 3, Mesh_t, Center_t> CxField_t; -typedef FFT<RCTransform, 3, double> FFT_t; -typedef FFT<SineTransform, 3, double> SINE_t; -typedef FFT<CCTransform, 3, double> FFTC_t; - #ifdef ENABLE_AMR typedef amr::AmrField_t AmrField_t; typedef amr::AmrScalarFieldContainer_t AmrScalarFieldContainer_t; @@ -61,10 +38,4 @@ typedef FFT<CCTransform, 3, double> FFTC_t; typedef BoxLibParticle<AmrLayout_t> AmrParticle_t; #endif -namespace ParticleType { - enum type { REGULAR, - SECONDARY, - STRIPPED}; -} - #endif \ No newline at end of file diff --git a/src/Classic/Algorithms/PartBins.h b/src/Classic/Algorithms/PartBins.h index 7d77d894193ccb4027c74f25c362952db9e8e3ba..4e11711a0fc8492d33195a1f25c154f1520b704c 100644 --- a/src/Classic/Algorithms/PartBins.h +++ b/src/Classic/Algorithms/PartBins.h @@ -25,8 +25,6 @@ #include <memory> #include <vector> -#include "Algorithms/PBunchDefs.h" - class Inform; class PartBins { diff --git a/src/Classic/Algorithms/PartBunch.cpp b/src/Classic/Algorithms/PartBunch.cpp index d7f7c91542a77003e7f9ab2a6859ac044eb39ac9..767369953dad34b0e195703f37036dc8a7a45fbd 100644 --- a/src/Classic/Algorithms/PartBunch.cpp +++ b/src/Classic/Algorithms/PartBunch.cpp @@ -17,32 +17,24 @@ // along with OPAL. If not, see <https://www.gnu.org/licenses/>. // #include "Algorithms/PartBunch.h" -#include "FixedAlgebra/FMatrix.h" -#include "FixedAlgebra/FVector.h" + #include <cfloat> #include <memory> #include <utility> - -#include "Distribution/Distribution.h" // OPAL file -#include "Structure/FieldSolver.h" // OPAL file -#include "Utilities/GeneralClassicException.h" +#include "FixedAlgebra/FMatrix.h" +#include "FixedAlgebra/FVector.h" +#include "Particle/ParticleBalancer.h" #include "Algorithms/ListElem.h" - -#include <gsl/gsl_rng.h> -#include <gsl/gsl_histogram.h> -#include <gsl/gsl_cdf.h> -#include <gsl/gsl_randist.h> -#include <gsl/gsl_sf_erf.h> -#include <gsl/gsl_qrng.h> +#include "Distribution/Distribution.h" +#include "Structure/FieldSolver.h" +#include "Utilities/GeneralClassicException.h" #ifdef DBG_SCALARFIELD #include "Structure/FieldWriter.h" #endif - - //#define FIELDSTDOUT PartBunch::PartBunch(const PartData *ref): // Layout is set using setSolver() diff --git a/src/Classic/Algorithms/PartBunchBase.h b/src/Classic/Algorithms/PartBunchBase.h index 47b865bd6587ccaacf28de35295d892cb421313a..be9af282f1a973c900efb1b834b76eb33386bd30 100644 --- a/src/Classic/Algorithms/PartBunchBase.h +++ b/src/Classic/Algorithms/PartBunchBase.h @@ -18,29 +18,36 @@ #ifndef PART_BUNCH_BASE_H #define PART_BUNCH_BASE_H -#include "Ippl.h" -#include "Particle/AbstractParticle.h" //TODO should be in Ippl.h -#include "Algorithms/PBunchDefs.h" -#include "Algorithms/OpalParticle.h" +#include "Utility/IpplTimings.h" +#include "Particle/AbstractParticle.h" +#include "Particle/ParticleAttrib.h" + #include "Algorithms/CoordinateSystemTrafo.h" +#include "Algorithms/OpalParticle.h" +#include "Algorithms/PBunchDefs.h" +#include "Algorithms/Quaternion.h" +#include "Algorithms/Vektor.h" + #include "FixedAlgebra/FMatrix.h" #include "FixedAlgebra/FVector.h" -#include "Algorithms/PartBins.h" -#include "Algorithms/PartBinsCyc.h" -#include "Algorithms/PartData.h" -#include "Algorithms/Quaternion.h" #include <memory> #include <utility> #include <vector> -#include "Structure/FieldSolver.h" -#include "Algorithms/ListElem.h" - class Distribution; - -template <class T, int, int> class FMatrix; -template <class T, int> class FVector; +class FieldSolver; +class PartBins; +class PartBinsCyc; +class PartData; + +namespace ParticleType { + enum type { REGULAR, + FIELDEMISSION, + SECONDARY, + NEWSECONDARY, + STRIPPED}; +} template <class T, unsigned Dim> class PartBunchBase @@ -59,8 +66,6 @@ public: public: - explicit PartBunchBase(AbstractParticle<T, Dim>* pb); - virtual ~PartBunchBase() { } PartBunchBase(AbstractParticle<T, Dim>* pb, const PartData *ref); @@ -629,7 +634,7 @@ protected: int distDump_m; /// Mesh enlargement - double dh_m; /// in % how much the mesh is enlarged + double dh_m; /// relative enlargement of the mesh /// if larger than 0, emitt particles for tEmission_m [s] double tEmission_m; diff --git a/src/Classic/Algorithms/PartBunchBase.hpp b/src/Classic/Algorithms/PartBunchBase.hpp index a99a1232c0c9254d584835b35ee7c0ff604c8a8d..4559a3d35181d8189f8ec3cc0d22c0710ccd3a5b 100644 --- a/src/Classic/Algorithms/PartBunchBase.hpp +++ b/src/Classic/Algorithms/PartBunchBase.hpp @@ -24,7 +24,11 @@ #include "Distribution/Distribution.h" #include "AbstractObjects/OpalData.h" // OPAL file +#include "Algorithms/PartBins.h" +#include "Algorithms/PartBinsCyc.h" +#include "Algorithms/PartData.h" #include "Physics/Physics.h" +#include "Structure/FieldSolver.h" #include "Utilities/GeneralClassicException.h" #include "Utilities/OpalException.h" #include "Utilities/Options.h" @@ -34,7 +38,7 @@ extern Inform *gmsg; template <class T, unsigned Dim> -PartBunchBase<T, Dim>::PartBunchBase(AbstractParticle<T, Dim>* pb) +PartBunchBase<T, Dim>::PartBunchBase(AbstractParticle<T, Dim>* pb, const PartData *ref) : R(*(pb->R_p)), ID(*(pb->ID_p)), pbin_m(nullptr), @@ -42,7 +46,7 @@ PartBunchBase<T, Dim>::PartBunchBase(AbstractParticle<T, Dim>* pb) pmsg_m(nullptr), f_stream(nullptr), fixed_grid(false), -// reference(ref), //FIXME + reference(ref), unit_state_(units), stateOfLastBoundP_(unitless), moments_m(), @@ -93,13 +97,6 @@ PartBunchBase<T, Dim>::PartBunchBase(AbstractParticle<T, Dim>* pb) setup(pb); } -template <class T, unsigned Dim> -PartBunchBase<T, Dim>::PartBunchBase(AbstractParticle<T, Dim>* pb, const PartData *ref) - : PartBunchBase(pb) -{ - reference = ref; -} - /* * Bunch common member functions */ diff --git a/src/Classic/Algorithms/PartData.h b/src/Classic/Algorithms/PartData.h index 735d544161903544a3f71f64d55f5f3a5f8b1c74..73636d2a3bc2b7ca35380b052a5a33f985e10e4c 100644 --- a/src/Classic/Algorithms/PartData.h +++ b/src/Classic/Algorithms/PartData.h @@ -19,9 +19,6 @@ // // ------------------------------------------------------------------------ -class LogicalError; - - // Class PartData // ------------------------------------------------------------------------ /// Particle reference data. diff --git a/src/Classic/Algorithms/PolynomialTimeDependence.cpp b/src/Classic/Algorithms/PolynomialTimeDependence.cpp index 00a07a7bffbec68b1785b771f2d03c3087be900d..6827726d73b18fe3ce4378bae53ae116a643e804 100644 --- a/src/Classic/Algorithms/PolynomialTimeDependence.cpp +++ b/src/Classic/Algorithms/PolynomialTimeDependence.cpp @@ -27,6 +27,8 @@ #include "Algorithms/PolynomialTimeDependence.h" +#include "Utility/Inform.h" + Inform &PolynomialTimeDependence::print(Inform &os) { Inform::FmtFlags_t ff = os.flags(); os << std::scientific; diff --git a/src/Classic/Algorithms/PolynomialTimeDependence.h b/src/Classic/Algorithms/PolynomialTimeDependence.h index ac2e7abaa31ee5dc91cf7eb83241169dbd1fd016..300f1ad653ad02ab02f8622d806c8964497457cf 100644 --- a/src/Classic/Algorithms/PolynomialTimeDependence.h +++ b/src/Classic/Algorithms/PolynomialTimeDependence.h @@ -30,9 +30,9 @@ #include <vector> #include <iostream> -#include "Ippl.h" #include "Algorithms/AbstractTimeDependence.h" +class Inform; /** @class PolynomialTimeDependence * @@ -91,5 +91,4 @@ Inform &operator<<(Inform &os, PolynomialTimeDependence &p) { return p.print(os); } -#endif - +#endif \ No newline at end of file diff --git a/src/Classic/Algorithms/SplineTimeDependence.cpp b/src/Classic/Algorithms/SplineTimeDependence.cpp index 40d9c3515c988a73429f7678204a4e30a4288620..6ea5ff6e06096bde8c9067ab31bdc36a82f4ce68 100644 --- a/src/Classic/Algorithms/SplineTimeDependence.cpp +++ b/src/Classic/Algorithms/SplineTimeDependence.cpp @@ -31,6 +31,8 @@ #include "Utilities/GeneralClassicException.h" #include "Algorithms/SplineTimeDependence.h" +#include "Utility/Inform.h" + SplineTimeDependence::SplineTimeDependence(size_t splineOrder, std::vector<double> times, std::vector<double> values) diff --git a/src/Classic/Algorithms/SplineTimeDependence.h b/src/Classic/Algorithms/SplineTimeDependence.h index ede981913b18e7a72dda0b114cfc823f8b4fff1a..47e004160a6d93273f8ff0e74306e96a45dff675 100644 --- a/src/Classic/Algorithms/SplineTimeDependence.h +++ b/src/Classic/Algorithms/SplineTimeDependence.h @@ -28,14 +28,15 @@ #ifndef _CLASSIC_SRC_ALGORITHMS_SPLINETIMEDEPENDENCE_H_ #define _CLASSIC_SRC_ALGORITHMS_SPLINETIMEDEPENDENCE_H_ -#include <memory> +#include <vector> #include <gsl/gsl_spline.h> -#include "Ippl.h" #include "Utilities/GeneralClassicException.h" #include "Algorithms/AbstractTimeDependence.h" +class Inform; + /** @class SplineTimeDependence * * Time dependence that follows a spline. Interpolation is supported at diff --git a/src/Classic/Algorithms/Vektor.h b/src/Classic/Algorithms/Vektor.h index 7e974849a2bf1d2f4267f1b265e31381f898b5ef..84ffdb3a7d16a28a5bba8b7c893167443004a894 100644 --- a/src/Classic/Algorithms/Vektor.h +++ b/src/Classic/Algorithms/Vektor.h @@ -5,11 +5,4 @@ typedef Vektor<double, 3> Vector_t; -/// comment: this should go to AppTypes/Vektor.h - -inline -double euclidean_norm(Vector_t a) { - return std::sqrt(dot(a,a)); -} - #endif \ No newline at end of file diff --git a/src/Classic/Beamlines/Beamline.h b/src/Classic/Beamlines/Beamline.h index 80e4e8d72ac566eb0de9910a5f4c5b23e210362a..07598825933bf695ea9dbfbde034d10287c2849d 100644 --- a/src/Classic/Beamlines/Beamline.h +++ b/src/Classic/Beamlines/Beamline.h @@ -24,9 +24,6 @@ #include "Algorithms/Vektor.h" #include "Algorithms/Quaternion.h" -class CLRangeError; - - // Class Beamline // ------------------------------------------------------------------------ /// An abstract sequence of beam line components. diff --git a/src/Classic/Beamlines/TBeamline.h b/src/Classic/Beamlines/TBeamline.h index 2e20b65223f0a23a619bc9d0eb7b5d19d73b6031..7b9a88182a300db8911f0bc83bbf2cd82582c761 100644 --- a/src/Classic/Beamlines/TBeamline.h +++ b/src/Classic/Beamlines/TBeamline.h @@ -23,10 +23,10 @@ #include "Beamlines/Beamline.h" #include "AbsBeamline/BeamlineVisitor.h" #include "Beamlines/BeamlineGeometry.h" -#include "Utilities/CLRangeError.h" #include "Algorithms/Vektor.h" #include "Algorithms/Quaternion.h" #include <algorithm> +#include <string> #include <list> template <class T> diff --git a/src/Classic/MemoryManagement/RCObject.h b/src/Classic/MemoryManagement/RCObject.h index 2260ce7d65230b029f6bf0db145845216df3e812..679d770267130e0187600790032527af3902971e 100644 --- a/src/Classic/MemoryManagement/RCObject.h +++ b/src/Classic/MemoryManagement/RCObject.h @@ -36,8 +36,6 @@ // All constructors, the destructor, and the assignment operators are // protected, since a stand-alone RCObject makes no sense. -//#include <Ippl.h> - class RCObject { diff --git a/src/Classic/Parser/Statement.h b/src/Classic/Parser/Statement.h index da2d3b9e0abb6d9aaa58e343ddf3e4de5025628c..3c13c0187d28b968964c45779ce43d45d4e457f5 100644 --- a/src/Classic/Parser/Statement.h +++ b/src/Classic/Parser/Statement.h @@ -25,7 +25,7 @@ #include <list> #include <string> -#include <Ippl.h> +#include "Utility/Inform.h" class Parser; diff --git a/src/Classic/Solvers/BeamStrippingPhysics.cpp b/src/Classic/Solvers/BeamStrippingPhysics.cpp index f94dce5bea0f9c49ae2d60e7367a6a884f175da3..823207a13b287bf84fafc4285595cf4887045ed6 100644 --- a/src/Classic/Solvers/BeamStrippingPhysics.cpp +++ b/src/Classic/Solvers/BeamStrippingPhysics.cpp @@ -31,7 +31,7 @@ #include "Structure/LossDataSink.h" #include "Utilities/Options.h" -#include "Ippl.h" +#include "Utility/Inform.h" #include <iostream> #include <fstream> diff --git a/src/Classic/Solvers/CollimatorPhysics.cpp b/src/Classic/Solvers/CollimatorPhysics.cpp index 11e529447c39268fb911327c03d783e0a73576d2..8c5812a5e718a32dfff77b90021f38f0ea797bc4 100644 --- a/src/Classic/Solvers/CollimatorPhysics.cpp +++ b/src/Classic/Solvers/CollimatorPhysics.cpp @@ -35,7 +35,7 @@ #include "Utilities/Util.h" #include "Utilities/Timer.h" -#include "Ippl.h" +#include "Utility/Inform.h" #include <gsl/gsl_randist.h> @@ -44,6 +44,8 @@ #include <fstream> #include <algorithm> +#include <sys/time.h> + namespace { struct DegraderInsideTester: public InsideTester { explicit DegraderInsideTester(ElementBase * el) { diff --git a/src/Classic/Solvers/CollimatorPhysics.hh b/src/Classic/Solvers/CollimatorPhysics.hh index fc8fc6bfae79c00641e2b197b7ac82dfdf447f9f..d0690b62877464db53375068f0a27dc6f7d938f5 100644 --- a/src/Classic/Solvers/CollimatorPhysics.hh +++ b/src/Classic/Solvers/CollimatorPhysics.hh @@ -21,18 +21,18 @@ #ifndef COLLIMATORPHYSICS_HH #define COLLIMATORPHYSICS_HH -#include <vector> #include "Solvers/ParticleMatterInteractionHandler.hh" + +#include "AbsBeamline/ElementBase.h" #include "Algorithms/Vektor.h" -#include "AbsBeamline/Component.h" -#include "AbsBeamline/CCollimator.h" -#include "AbsBeamline/FlexibleCollimator.h" -#include "AbsBeamline/Degrader.h" #include <gsl/gsl_rng.h> #include "Utility/IpplTimings.h" -class ElementBase; +#include <memory> +#include <utility> +#include <string> +#include <vector> template <class T, unsigned Dim> class PartBunchBase; diff --git a/src/Classic/Structure/LossDataSink.cpp b/src/Classic/Structure/LossDataSink.cpp index fe465ead4b393cd8849f9bf2c0aa41c4afcfb874..121b8118b142afd067458f6175739763cdcb4215 100644 --- a/src/Classic/Structure/LossDataSink.cpp +++ b/src/Classic/Structure/LossDataSink.cpp @@ -1,6 +1,5 @@ #include "Structure/LossDataSink.h" -#include "Ippl.h" #include "Utilities/Options.h" #include "AbstractObjects/OpalData.h" #include "Utilities/GeneralClassicException.h" diff --git a/src/Classic/Structure/LossDataSink.h b/src/Classic/Structure/LossDataSink.h index cb3d147246fc3145aad06dc800e830050f45c24c..771c8c89eacaafd58b7c03a03d9d7d4458af313e 100644 --- a/src/Classic/Structure/LossDataSink.h +++ b/src/Classic/Structure/LossDataSink.h @@ -2,11 +2,10 @@ // Copyright & License: See Copyright.readme in src directory // -#ifndef OPAL_LOSSOUTPUT_H_ -#define OPAL_LOSSOUTPUT_H_ +#ifndef LOSSDATASINK_H_ +#define LOSSDATASINK_H_ ////////////////////////////////////////////////////////////// -#include "Utility/IpplInfo.h" #include "Algorithms/Vektor.h" #include "AbsBeamline/ElementBase.h" #include "AbstractObjects/OpalData.h" @@ -17,7 +16,6 @@ #include <functional> #include <set> -#include <hdf5.h> #include "H5hut.h" struct SetStatistics { @@ -199,4 +197,4 @@ std::set<SetStatistics> LossDataSink::computeStatistics(unsigned int numStatisti // c-basic-offset: 4 // indent-tabs-mode: nil // require-final-newline: nil -// End: +// End: \ No newline at end of file diff --git a/src/Classic/Structure/MeshGenerator.h b/src/Classic/Structure/MeshGenerator.h index 018f7713e5c910bf238bc125ad0ae507801a296f..ddd428e9005f9275d68391a0003404842f124231 100644 --- a/src/Classic/Structure/MeshGenerator.h +++ b/src/Classic/Structure/MeshGenerator.h @@ -1,4 +1,23 @@ -#include "AbsBeamline/ElementBase.h" +// +// Mesh Generator +// +// Copyright (c) 2008-2020 +// Paul Scherrer Institut, Villigen PSI, Switzerland +// All rights reserved. +// +// OPAL is licensed under GNU GPL version 3. +// + +#ifndef MESHGENERATOR_H_ +#define MESHGENERATOR_H_ + +#include "Algorithms/Vektor.h" + +#include <string> +#include <utility> +#include <vector> + +class ElementBase; class MeshData { public: @@ -41,6 +60,8 @@ private: std::vector<MeshData> elements_m; }; +#endif + // vi: set et ts=4 sw=4 sts=4: // Local Variables: // mode:c diff --git a/src/Classic/Structure/PeakFinder.cpp b/src/Classic/Structure/PeakFinder.cpp index 5c6150269376d0a9103ad44440b32b5ea0f0d755..e06688c5c185fcc7170b5c5ee4bf392366c950c6 100644 --- a/src/Classic/Structure/PeakFinder.cpp +++ b/src/Classic/Structure/PeakFinder.cpp @@ -5,7 +5,9 @@ #include <iterator> #include "AbstractObjects/OpalData.h" -#include "Ippl.h" + +#include "Message/GlobalComm.h" +#include "Utility/IpplInfo.h" PeakFinder::PeakFinder(std::string elem, double min, double max, double binWidth, bool singlemode) diff --git a/src/Classic/Structure/PeakFinder.h b/src/Classic/Structure/PeakFinder.h index a6b0777e8c4318f3defb3ba1f00db714318ecec6..b74916ee9dfa2da1f6e75695d540ab736c9cbf01 100644 --- a/src/Classic/Structure/PeakFinder.h +++ b/src/Classic/Structure/PeakFinder.h @@ -14,7 +14,6 @@ * used for the cyclotron probe element. */ -#include "Utility/IpplInfo.h" #include "Algorithms/Vektor.h" #include <fstream> diff --git a/src/Classic/TrimCoils/OpalTrimCoil.cpp b/src/Classic/TrimCoils/OpalTrimCoil.cpp index 992e6638e0fd34ef02d6e587b2a1cbbe7b4eacdc..270c5f6cfe2a8d882308cb9b1c2fe6f450779c5e 100644 --- a/src/Classic/TrimCoils/OpalTrimCoil.cpp +++ b/src/Classic/TrimCoils/OpalTrimCoil.cpp @@ -31,7 +31,7 @@ #include "TrimCoils/TrimCoilPhaseFit.h" #include "TrimCoils/TrimCoilMirrored.h" #include "Utilities/OpalException.h" -#include "Utility/IpplInfo.h" +#include "Utility/Inform.h" extern Inform *gmsg; diff --git a/src/Classic/TrimCoils/OpalTrimCoil.h b/src/Classic/TrimCoils/OpalTrimCoil.h index 4591db3334c5901d9f2bfc15ac1848f2a0b62fae..67e0a757086216d5afd61d15d9c9b70671ca420f 100644 --- a/src/Classic/TrimCoils/OpalTrimCoil.h +++ b/src/Classic/TrimCoils/OpalTrimCoil.h @@ -31,6 +31,7 @@ #include "AbstractObjects/Definition.h" class Attribute; +class Inform; class TrimCoil; class OpalTrimCoil: public Definition { diff --git a/src/Distribution/ClosedOrbitFinder.h b/src/Distribution/ClosedOrbitFinder.h index aede80ce4b02f9c84bbb879026a199baee14ec69..27771a60b7ceaa8a02918a163571a410cd0a8f9b 100644 --- a/src/Distribution/ClosedOrbitFinder.h +++ b/src/Distribution/ClosedOrbitFinder.h @@ -37,7 +37,6 @@ #include <utility> #include <vector> -#include "Utilities/Options.h" #include "Utilities/Options.h" #include "Utilities/OpalException.h" #include "Physics/Physics.h" diff --git a/src/Distribution/Distribution.cpp b/src/Distribution/Distribution.cpp index 4a88b8643f5f04019bcd8772f1430aa463b2f6a6..8e6ae954e359b833fadc6f0ba12b86306837a7bb 100644 --- a/src/Distribution/Distribution.cpp +++ b/src/Distribution/Distribution.cpp @@ -27,7 +27,6 @@ #include "AbstractObjects/OpalData.h" #include "Algorithms/PartBins.h" #include "Algorithms/PartBunchBase.h" -#include "Structure/Beam.h" #include "Algorithms/PartBinsCyc.h" #include "BasicActions/Option.h" #include "Distribution/LaserProfile.h" diff --git a/src/Distribution/SigmaGenerator.h b/src/Distribution/SigmaGenerator.h index f70f034dc7d16c9b2a3793b810bac4a2384547d4..30b46d2f36755d26ce908fbf0ce484e85833fb28 100644 --- a/src/Distribution/SigmaGenerator.h +++ b/src/Distribution/SigmaGenerator.h @@ -33,16 +33,19 @@ #define SIGMAGENERATOR_H #include <array> +#include <fstream> +#include <functional> #include <string> #include <vector> +#include <boost/numeric/ublas/matrix.hpp> + #include "AbsBeamline/Cyclotron.h" #include "FixedAlgebra/FTps.h" #include "Physics/Physics.h" #include "Distribution/RealDiracMatrix.h" - class SigmaGenerator { public: @@ -54,7 +57,7 @@ public: typedef RealDiracMatrix::vector_t vector_t; /// Container for storing the properties for each angle typedef std::vector<double> container_t; - /// Type of the truncated powere series + /// Type of the truncated power series typedef FTps<double,2*3> Series; /// Type of a map typedef FVps<double,2*3> Map; diff --git a/src/Elements/OpalElement.h b/src/Elements/OpalElement.h index 4c43fae214f70adcf37e2ea26aaafff0fbc7a729..c5eb7390bb28db25b4accc3eefc601b8cd77190c 100644 --- a/src/Elements/OpalElement.h +++ b/src/Elements/OpalElement.h @@ -21,6 +21,7 @@ #include "AbstractObjects/Element.h" #include "MemoryManagement/OwnPtr.h" #include <map> +#include <string> class Statement; diff --git a/src/Main.cpp b/src/Main.cpp index f834b1483b1ebedb3eb82f75a1e04009beb78f4c..0e286dcf058e64bbec7589c629b37e1084e41ffc 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -17,9 +17,6 @@ #include "opal.h" -Ippl *ippl; -Inform *gmsg; - #include "H5hut.h" #include "AbstractObjects/OpalData.h" @@ -33,52 +30,37 @@ Inform *gmsg; #include "BasicActions/Option.h" #include "Utilities/Options.h" -#include "Utilities/Options.h" #include "Utilities/OpalException.h" #include "Utilities/EarlyLeaveException.h" #include "Utilities/Util.h" +#include "Util/SDDSParser/SDDSParserException.h" + #include "OPALconfig.h" #ifdef ENABLE_AMR #include <AMReX_ParallelDescriptor.H> #endif -/* - Includes related to the optimizer -*/ -#include "boost/smart_ptr.hpp" - -#include "Pilot/Pilot.h" -#include "Util/CmdArguments.h" -#include "Util/OptPilotException.h" - -#include "Optimizer/EA/FixedPisaNsga2.h" -#include "Optimizer/EA/BlendCrossover.h" -#include "Optimizer/EA/IndependentBitMutation.h" - -#include "Optimize/OpalSimulation.h" - -#include "Comm/CommSplitter.h" -#include "Comm/Topology/NoCommTopology.h" -#include "Comm/Splitter/ManyMasterSplit.h" -#include "Comm/MasterGraph/SocialNetworkGraph.h" - -#include "Expression/Parser/function.hpp" -#include "Expression/FromFile.h" -#include "Expression/SumErrSq.h" -#include "Expression/SDDSVariable.h" -#include "Expression/RadialPeak.h" -#include "Expression/SumErrSqRadialPeak.h" -#include "Expression/ProbeVariable.h" + +// IPPL +#include "Message/Communicate.h" +#include "Utility/Inform.h" +#include "Utility/IpplException.h" +#include "Utility/IpplInfo.h" +#include "Utility/IpplTimings.h" #include <gsl/gsl_errno.h> #include <boost/filesystem.hpp> -#include <boost/algorithm/string/predicate.hpp> +#include <boost/system/error_code.hpp> #include <cstring> +#include <iomanip> +#include <iostream> #include <set> -#include <algorithm> + +Ippl *ippl; +Inform *gmsg; namespace { void errorHandlerGSL(const char *reason, diff --git a/src/OpalParser/IfStatement.cpp b/src/OpalParser/IfStatement.cpp index f0483dbf1ca643f58fd7302badd131d120277907..aec7f27a97d3b1f37c8835abd423367826adcd25 100644 --- a/src/OpalParser/IfStatement.cpp +++ b/src/OpalParser/IfStatement.cpp @@ -26,6 +26,7 @@ #include "Parser/TokenStream.h" #include "Utilities/ParseError.h" +#include "Utility/IpplInfo.h" // class IfStatement // Statement of the form "IF ( <condition> ) <statement>". diff --git a/src/OpalParser/OpalParser.cpp b/src/OpalParser/OpalParser.cpp index 8cd8ecbc022814922c8a689a9b78d639cafda26e..839af98d10aa89d153ad706e08e85d72ce895ec1 100644 --- a/src/OpalParser/OpalParser.cpp +++ b/src/OpalParser/OpalParser.cpp @@ -41,7 +41,9 @@ #include <new> #include <boost/algorithm/string.hpp> -#include <Ippl.h> +#include "Message/GlobalComm.h" +#include "Utility/Inform.h" +#include "Utility/IpplInfo.h" using namespace Expressions; diff --git a/src/OpalParser/WhileStatement.cpp b/src/OpalParser/WhileStatement.cpp index cd453c945e0f225ba080bd746f29f262d5925660..7f16066f67e155c068bd9a101d9a8609ca28ae4a 100644 --- a/src/OpalParser/WhileStatement.cpp +++ b/src/OpalParser/WhileStatement.cpp @@ -17,6 +17,7 @@ // ------------------------------------------------------------------------ #include "OpalParser/WhileStatement.h" + #include "AbstractObjects/OpalData.h" #include "AbstractObjects/Attribute.h" #include "Attributes/Attributes.h" @@ -26,6 +27,8 @@ #include "Parser/TokenStream.h" #include "Utilities/ParseError.h" +#include "Utility/IpplInfo.h" + // class WhileStatement // Statement of the form "WHILE ( <condition> ) <statement>". // ------------------------------------------------------------------------ diff --git a/src/Sample/Sampler.cpp b/src/Sample/Sampler.cpp index 1facdcfe9d812aac70fbe9090083e205a6604b8f..ebfd8185010517f130f9bff7ebcc142fb7a35350 100644 --- a/src/Sample/Sampler.cpp +++ b/src/Sample/Sampler.cpp @@ -32,6 +32,7 @@ #include "Util/MPIHelper.h" #include <boost/property_tree/json_parser.hpp> +#include <boost/property_tree/ptree.hpp> #include <boost/filesystem.hpp> diff --git a/src/Sample/Sampler.h b/src/Sample/Sampler.h index a8db3f192fdc0388f8dceceac4951e401d473e1f..2f77350f951eeb93aa451e3690c0420e0fdcc92d 100644 --- a/src/Sample/Sampler.h +++ b/src/Sample/Sampler.h @@ -29,6 +29,8 @@ #include <sstream> #include <vector> #include <map> +#include <memory> +#include <queue> #include <utility> #include <fstream> #include <list> @@ -44,9 +46,6 @@ #include "Sample/SamplingMethod.h" #include <boost/smart_ptr.hpp> -#include <boost/chrono.hpp> -#include <boost/property_tree/ptree.hpp> - class Sampler : public Optimizer { diff --git a/src/Solvers/BoxCornerDomain.h b/src/Solvers/BoxCornerDomain.h index 2a6d8f594c8c04620a5e2a9c44e9c4a5a1ecf034..02bbc1a9bed7131da5153643b1b7d9522adf80ab 100644 --- a/src/Solvers/BoxCornerDomain.h +++ b/src/Solvers/BoxCornerDomain.h @@ -28,9 +28,9 @@ #include <map> #include <string> -#include <cmath> -#include "Solvers/RegularDomain.h" +#include <utility> +#include "Solvers/RegularDomain.h" /* @@ -164,4 +164,4 @@ private: // c-basic-offset: 4 // indent-tabs-mode: nil // require-final-newline: nil -// End: +// End: \ No newline at end of file diff --git a/src/Solvers/FFTBoxPoissonSolver.h b/src/Solvers/FFTBoxPoissonSolver.h index 66dbb9f5464ce92f909508f891e11fc2642e67f8..61876efb68d462920dff4aab715a774e6258fb1a 100644 --- a/src/Solvers/FFTBoxPoissonSolver.h +++ b/src/Solvers/FFTBoxPoissonSolver.h @@ -23,11 +23,16 @@ ////////////////////////////////////////////////////////////// #include "PoissonSolver.h" + +#include "FFT/FFT.h" + class PartBunch; ////////////////////////////////////////////////////////////// class FFTBoxPoissonSolver : public PoissonSolver { public: + typedef FFT<SineTransform, 3, double> SINE_t; + // constructor and destructor FFTBoxPoissonSolver(PartBunch &bunch, std::string greensFuntion); diff --git a/src/Solvers/FFTPoissonSolver.h b/src/Solvers/FFTPoissonSolver.h index 2ead1b25d59c38bb909dcf6654ddb1abad2f5c64..8fb703bbced8cbba9c4b5f1b9faf560ffc24422b 100644 --- a/src/Solvers/FFTPoissonSolver.h +++ b/src/Solvers/FFTPoissonSolver.h @@ -32,12 +32,16 @@ ////////////////////////////////////////////////////////////// #include "PoissonSolver.h" +#include "FFT/FFT.h" + class PartBunch; ////////////////////////////////////////////////////////////// class FFTPoissonSolver : public PoissonSolver { public: + typedef FFT<RCTransform, 3, double> FFT_t; + // constructor and destructor FFTPoissonSolver(PartBunch &bunch, std::string greensFuntion); diff --git a/src/Solvers/IrregularDomain.h b/src/Solvers/IrregularDomain.h index fc991c4d61cf4c45780fe9df38122e554c67e0ed..03dba24299bdbaf422a9e7d8f25414cd5cc7779c 100644 --- a/src/Solvers/IrregularDomain.h +++ b/src/Solvers/IrregularDomain.h @@ -26,9 +26,10 @@ #ifndef IRREGULAR_DOMAIN_H #define IRREGULAR_DOMAIN_H -#include <vector> +#include <map> #include <string> -#include "Algorithms/PBunchDefs.h" +#include "Algorithms/Vektor.h" +#include "Algorithms/Quaternion.h" /// enumeration corresponding to different interpolation methods at the boundary enum { diff --git a/src/Solvers/P3MPoissonSolver.h b/src/Solvers/P3MPoissonSolver.h index 20ea43d164ef3cb8ccda3d383ba3032bd4257d69..12c4336ddc82ac615d38636f507da33c3b157ee0 100644 --- a/src/Solvers/P3MPoissonSolver.h +++ b/src/Solvers/P3MPoissonSolver.h @@ -33,7 +33,10 @@ const unsigned Dim = 3; #include <memory> ////////////////////////////////////////////////////////////// #include "PoissonSolver.h" -#include "Algorithms/PartBunchBase.h" + +#include "FFT/FFT.h" + +//#include "Algorithms/PartBunchBase.h" template <class T, unsigned Dim> class PartBunchBase; @@ -42,6 +45,9 @@ class PartBunchBase; class P3MPoissonSolver : public PoissonSolver { public: + + typedef FFT<CCTransform, 3, double> FFTC_t; + // constructor and destructor P3MPoissonSolver(Mesh_t *mesh, FieldLayout_t *fl, double interaction_radius, double alpha, double eps); diff --git a/src/Solvers/PoissonSolver.h b/src/Solvers/PoissonSolver.h index 84aa754cee851194d88d2da0b47501c89b172ed4..a82fadf4aec05e697868fb21f0cd03db5c7eca5e 100644 --- a/src/Solvers/PoissonSolver.h +++ b/src/Solvers/PoissonSolver.h @@ -4,6 +4,8 @@ ////////////////////////////////////////////////////////////// #include "Algorithms/PBunchDefs.h" +#include "Field/Field.h" + #ifdef ENABLE_AMR #include "Utilities/OpalException.h" #endif @@ -12,6 +14,11 @@ template <class T, unsigned Dim> class PartBunchBase; class PoissonSolver { + +protected: + typedef Field<int, 3, Mesh_t, Center_t> IField_t; + typedef Field<std::complex<double>, 3, Mesh_t, Center_t> CxField_t; + public: // given a charge-density field rho and a set of mesh spacings hr, diff --git a/src/Structure/Beam.h b/src/Structure/Beam.h index 0bb1657a0b16dd765dc382965a595bc7127e9870..5f221a50c236208451f6fe61b85e80ffe4a1825c 100644 --- a/src/Structure/Beam.h +++ b/src/Structure/Beam.h @@ -22,6 +22,7 @@ #include "Algorithms/PartData.h" #include <ostream> +#include <string> class Inform; diff --git a/src/Structure/DataSink.cpp b/src/Structure/DataSink.cpp index 017025569742f17affaa2372f90b082351f475a4..a23503889dfd1aa23db2ca38c02c5e35bb53ee02 100644 --- a/src/Structure/DataSink.cpp +++ b/src/Structure/DataSink.cpp @@ -28,6 +28,8 @@ #include "Structure/DataSink.h" +#include "Utility/FieldDebugFunctions.h" + #include "OPALconfig.h" #include "AbstractObjects/OpalData.h" #include "Utilities/Options.h" @@ -39,6 +41,8 @@ #ifdef __linux__ #include "MemoryProfiler.h" +#else + #include "MemoryWriter.h" #endif @@ -49,17 +53,11 @@ #include "LBalWriter.h" -#include "MemoryWriter.h" #ifdef ENABLE_AMR #include "GridLBalWriter.h" #endif - -#include <boost/filesystem.hpp> -#include <boost/regex.hpp> - -#include <queue> #include <sstream> DataSink::DataSink() @@ -176,8 +174,6 @@ void DataSink::writeImpactStatistics(const PartBunchBase<double, 3> *beam, long std::unique_ptr<Inform> ofp(new Inform(NULL, ffn.c_str(), Inform::APPEND, 0)); Inform &fid = *ofp; - setInform(fid); - fid.precision(6); fid << std::setiosflags(std::ios::scientific); double t = beam->getT() * 1.0e9; diff --git a/src/Structure/DataSink.h b/src/Structure/DataSink.h index f33e6ca397dbe0458ad8564a4e1288c6a19adc56..7e3abf0daa8bd80add7beb4c9afbac977e80a584 100644 --- a/src/Structure/DataSink.h +++ b/src/Structure/DataSink.h @@ -28,26 +28,33 @@ #ifndef _OPAL_DATA_SINK_H #define _OPAL_DATA_SINK_H -#include "Algorithms/PBunchDefs.h" +#include "Algorithms/Vektor.h" +#include "SDDSWriter.h" #include "StatWriter.h" #include "H5Writer.h" #include "MultiBunchDump.h" +#include <iomanip> +#include <memory> +#include <string> +#include <vector> + template <class T, unsigned Dim> class PartBunchBase; class BoundaryGeometry; class H5PartWrapper; +class MultiBunchHandler; class DataSink { -public: +private: typedef StatWriter::losses_t losses_t; typedef std::unique_ptr<StatWriter> statWriter_t; typedef std::unique_ptr<SDDSWriter> sddsWriter_t; typedef std::unique_ptr<H5Writer> h5Writer_t; typedef std::unique_ptr<MultiBunchDump> mbWriter_t; - +public: /** \brief Default constructor. * * The default constructor is called at the start of a new calculation (as diff --git a/src/Structure/H5PartWrapper.h b/src/Structure/H5PartWrapper.h index 9daceaf8088d74a14438d089a6876a93336225dc..e21368c8c4145c748599ac17e7d466ed0bae620d 100644 --- a/src/Structure/H5PartWrapper.h +++ b/src/Structure/H5PartWrapper.h @@ -6,15 +6,19 @@ // /*! - H5PartWrapper: a class that manages a calls to H5Part + H5PartWrapper: a class that manages calls to H5Part */ -#include "Algorithms/PBunchDefs.h" -#include "Algorithms/PartBunchBase.h" -#include "Utilities/OpalException.h" +template <class T, unsigned Dim> +class PartBunchBase; + +#include "Utility/IpplInfo.h" #include "H5hut.h" +#include <map> +#include <string> + #define REPORTONERROR(rc) H5PartWrapper::reportOnError(rc, __FILE__, __LINE__) #define READFILEATTRIB(type, file, name, value) REPORTONERROR(H5ReadFileAttrib##type(file, name, value)); #define WRITESTRINGFILEATTRIB(file, name, value) REPORTONERROR(H5WriteFileAttribString(file, name, value)); diff --git a/src/Structure/H5PartWrapperForPC.cpp b/src/Structure/H5PartWrapperForPC.cpp index 09fc259388965d6faed06d8822852a14dee4b1d0..58c5454c2b586bd3012352eab1ae93573e9468fa 100644 --- a/src/Structure/H5PartWrapperForPC.cpp +++ b/src/Structure/H5PartWrapperForPC.cpp @@ -11,8 +11,6 @@ #include "Utilities/Util.h" #include "Physics/Physics.h" -#include <boost/filesystem.hpp> - #include <sstream> #include <set> diff --git a/src/Structure/H5PartWrapperForPC.h b/src/Structure/H5PartWrapperForPC.h index 0b40133ddd12dfad93b8174ec97cde282b0eaf71..9abe5eaffd9b783a2fb97cbe5f407ee096da8d25 100644 --- a/src/Structure/H5PartWrapperForPC.h +++ b/src/Structure/H5PartWrapperForPC.h @@ -7,8 +7,7 @@ #include "Structure/H5PartWrapper.h" -#include "Algorithms/PBunchDefs.h" -#include "Utilities/OpalException.h" +#include "Algorithms/Vektor.h" #include "H5hut.h" diff --git a/src/Structure/H5PartWrapperForPT.cpp b/src/Structure/H5PartWrapperForPT.cpp index 8fe3529b4308a97f2fd90ae006f1aac7c8dc3dfe..9f7e02e3365f4c108fbaeb485f65748d4975768c 100644 --- a/src/Structure/H5PartWrapperForPT.cpp +++ b/src/Structure/H5PartWrapperForPT.cpp @@ -6,12 +6,13 @@ #include "OPALconfig.h" #include "AbstractObjects/OpalData.h" +#include "Algorithms/PartBunchBase.h" +#include "Algorithms/Vektor.h" #include "Utilities/Options.h" #include "Utilities/Util.h" #include "Physics/Physics.h" #include "h5core/h5_types.h" -#include <boost/filesystem.hpp> #include <sstream> #include <set> diff --git a/src/Structure/H5PartWrapperForPT.h b/src/Structure/H5PartWrapperForPT.h index 7d7e0924b6d29e65457aa68a6a975352c350159c..80022896068a7e9569cbd41f25ba52b2f61ecf04 100644 --- a/src/Structure/H5PartWrapperForPT.h +++ b/src/Structure/H5PartWrapperForPT.h @@ -11,9 +11,6 @@ #include "Structure/H5PartWrapper.h" -#include "Algorithms/PBunchDefs.h" -#include "Utilities/OpalException.h" - #include "H5hut.h" class H5PartWrapperForPT: public H5PartWrapper { diff --git a/src/Structure/IpplInfoWrapper.h b/src/Structure/IpplInfoWrapper.h index 31a3195aac6ea114bd197dd2b1c0780f1b3536e4..cd4fa1478533ce2162073d411b18e9de923eafe0 100644 --- a/src/Structure/IpplInfoWrapper.h +++ b/src/Structure/IpplInfoWrapper.h @@ -9,7 +9,7 @@ Class documentation */ -#include "Ippl.h" +#include "Utility/IpplInfo.h" class IpplInfoWrapper { public: diff --git a/src/Structure/SDDSWriter.h b/src/Structure/SDDSWriter.h index 757dad16f61ccc52ba8f3a7cfd9417f98425311e..39e1d1a4f85c3f1784334c6197335007bacdfbd5 100644 --- a/src/Structure/SDDSWriter.h +++ b/src/Structure/SDDSWriter.h @@ -31,7 +31,6 @@ #include <sstream> #include <boost/filesystem.hpp> -#include <boost/variant.hpp> #include "Structure/SDDSColumn.h" #include "Structure/SDDSColumnSet.h" diff --git a/src/Track/TrackEnd.h b/src/Track/TrackEnd.h index dfe5debb7a440df437e62e7db81dad98c950b1a6..48496a9eb67fac57a1acb368b5879337b689cc1e 100644 --- a/src/Track/TrackEnd.h +++ b/src/Track/TrackEnd.h @@ -21,7 +21,6 @@ #include "AbstractObjects/Action.h" class Sequence; -class TrackParser; // Class TrackEnd diff --git a/src/opal.cpp b/src/opal.cpp index 09961c5b034999fb97be8d70784c63f278e65a45..bb8625b6cdd2f66d53418bff7495167a3942cce3 100644 --- a/src/opal.cpp +++ b/src/opal.cpp @@ -3,7 +3,6 @@ extern Ippl *ippl; extern Inform *gmsg; - #include "AbstractObjects/OpalData.h" #include "OpalConfigure/Configure.h" #include "OpalParser/OpalParser.h" @@ -19,6 +18,12 @@ extern Inform *gmsg; #include <AMReX.H> #endif +#include "Message/Communicate.h" + +#include <fstream> +#include <iostream> +#include <limits> +#include <string> int run_opal(char */*args*/[], std::string inputfile, int restartStep, int infoLevel, int warnLevel, MPI_Comm comm) diff --git a/src/opal.h b/src/opal.h index a53b5d872c110a45ace5b6098452a507a8bae146..15e46cc579adfd6d3e7a470166a8b619f785a312 100644 --- a/src/opal.h +++ b/src/opal.h @@ -1,8 +1,7 @@ #ifndef __OPAL_H__ #define __OPAL_H__ -#include "Ippl.h" - +#include "Utility/IpplInfo.h" int run_opal(char *arg[], std::string inputfile, diff --git a/tests/ippl_src/Index/Index.cpp b/tests/ippl_src/Index/Index.cpp index 6f66973b97f8e136e721b53c5db7032fbe6acb81..ed58fded35e28aa350332c52a846b2b6cff47db3 100644 --- a/tests/ippl_src/Index/Index.cpp +++ b/tests/ippl_src/Index/Index.cpp @@ -2,6 +2,7 @@ #include "opal_test_utilities/SilenceTest.h" +#include "Field/Field.h" #include "Index/SOffset.h" #include <iostream> diff --git a/tests/ippl_src/Meshes/Average.cpp b/tests/ippl_src/Meshes/Average.cpp index 362f6384f0147a0718918bd6d77d07ba24022f77..dbecef9876d12de59897a40bfda542a7de128bab 100644 --- a/tests/ippl_src/Meshes/Average.cpp +++ b/tests/ippl_src/Meshes/Average.cpp @@ -4,6 +4,7 @@ #include "gtest/gtest.h" +#include "Field/Field.h" #include "Meshes/UniformCartesian.h" // set dimensionality and problem size diff --git a/tests/ippl_src/Meshes/CartesianCentering.cpp b/tests/ippl_src/Meshes/CartesianCentering.cpp index 6fe18d7e430a15768927e92c4be5d3e589c8f32d..beb12ee8a6502ddaf98668203b54606e1f248c2f 100644 --- a/tests/ippl_src/Meshes/CartesianCentering.cpp +++ b/tests/ippl_src/Meshes/CartesianCentering.cpp @@ -14,10 +14,10 @@ namespace { void hardCodedOutput(std::string filename); // Prototype of function defined below. bool thediff(std::string filename1, std::string filename2); - - CenteringEnum zz[2] = {CELL, VERTEX}; } +CenteringEnum zz[2] = {CELL, VERTEX}; + // template definitions CenteringEnum CCCEnums<2U,1U,0U>::allCell[2U*1U]; CenteringEnum CCCEnums<3U,1U,1U>::allFace[3U*1U]; diff --git a/tests/ippl_src/Particle/EdgeCentering.cpp b/tests/ippl_src/Particle/EdgeCentering.cpp index 12fc7770b279c29fada29a16176270b45edeb5c3..dec83389691ce2bd38db6766d2de56ae1cf55312 100644 --- a/tests/ippl_src/Particle/EdgeCentering.cpp +++ b/tests/ippl_src/Particle/EdgeCentering.cpp @@ -2,7 +2,7 @@ // #include "Algorithms/PBunchDefs.h" // #include "Algorithms/PartBunch.h" // #include "Algorithms/PartData.h" -#include "Particle/IntCIC.h" +//#include "Particle/IntCIC.h" #include "Particle/ParticleSpatialLayout.h" #include "Particle/ParticleAttrib.h" #include "Meshes/UniformCartesian.h" @@ -16,13 +16,10 @@ #define GUARDCELLSIZE 1 #define DIM 3 -typedef IntCIC IntrplCIC_t; - typedef Vektor<double, DIM> Vector_t; typedef ParticleSpatialLayout<double, DIM>::ParticlePos_t Ppos_t; typedef ParticleSpatialLayout<double, DIM>::ParticleIndex_t PID_t; typedef ParticleAttrib<double> Pscalar_t; -typedef InterpolatorTraits<double, DIM, IntrplCIC_t>::Cache_t Pcache_t; typedef UniformCartesian<DIM> Mesh_t; typedef ParticleSpatialLayout< double, DIM, Mesh_t> PLayout_t;