Commit fdb171eb authored by snuverink_j's avatar snuverink_j

Merge branch 'small-fixes' into 'master'

Small fixes

See merge request !441
parents a48c0f81 d4ece97d
...@@ -41,6 +41,7 @@ set (CMAKE_CXX_STANDARD 11) ...@@ -41,6 +41,7 @@ set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_STANDARD_REQUIRED ON) set (CMAKE_CXX_STANDARD_REQUIRED ON)
set (CMAKE_CXX_EXTENSIONS OFF) set (CMAKE_CXX_EXTENSIONS OFF)
# Disable compile time assert (used by IPPL)
add_definitions (-DNOCTAssert) add_definitions (-DNOCTAssert)
add_compile_options (-Wall) add_compile_options (-Wall)
...@@ -171,7 +172,7 @@ if (ENABLE_AMR) ...@@ -171,7 +172,7 @@ if (ENABLE_AMR)
endif () endif ()
option (ENABLE_AMR_MG_SOLVER "Enable AMR MG solver" OFF) option (ENABLE_AMR_MG_SOLVER "Enable AMR MG solver" OFF)
option (ENABLE_SAAMG_SOLVER "Enable iteartive SA-AMG-PCG self field solver" OFF) option (ENABLE_SAAMG_SOLVER "Enable iterative SA-AMG-PCG self field solver" OFF)
if (ENABLE_SAAMG_SOLVER OR ENABLE_AMR_MG_SOLVER) if (ENABLE_SAAMG_SOLVER OR ENABLE_AMR_MG_SOLVER)
# #
# :FIXME: We have to add checks whether the required Trilinos modules # :FIXME: We have to add checks whether the required Trilinos modules
......
# #
# Find gtest Google Test includes and library # Find gtest Google Test includes and library
# #
# gtest
# It can be found at:
# http://amas.web.psi.ch/tools/GSL/index.html
#
# GTEST_INCLUDE_DIR - where to find gtest/gtest.h # GTEST_INCLUDE_DIR - where to find gtest/gtest.h
# GTEST_LIBRARY - libgtest.a path # GTEST_LIBRARY - libgtest.a path
# GTEST_MAIN_LIBRARY - libgtest_main.a path # GTEST_MAIN_LIBRARY - libgtest_main.a path
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "PETE/IpplExpressions.h" #include "PETE/IpplExpressions.h"
#include "AppTypes/TSVMeta.h" #include "AppTypes/TSVMeta.h"
#include <cmath>
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
...@@ -277,6 +278,17 @@ cross(const Vektor<T1,D> &lhs, const Vektor<T2,D> &rhs) ...@@ -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); 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 // I/O
template<class T, unsigned D> template<class T, unsigned D>
...@@ -296,10 +308,4 @@ inline std::ostream& operator<<(std::ostream& out, const Vektor<T,D>& rhs) ...@@ -296,10 +308,4 @@ inline std::ostream& operator<<(std::ostream& out, const Vektor<T,D>& rhs)
return out; return out;
} }
#endif // VEKTOR_H #endif // VEKTOR_H
\ No newline at end of file
/***************************************************************************
* $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
...@@ -7,6 +7,7 @@ set (_HDRS ...@@ -7,6 +7,7 @@ set (_HDRS
FFTBase.h FFTBase.h
FFT.hpp FFT.hpp
FFT.h FFT.h
fftpack.h
fftpack_FFT.h fftpack_FFT.h
) )
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "FFT/FFT.h" #include "FFT/FFT.h"
#include "FieldLayout/FieldLayout.h" #include "FieldLayout/FieldLayout.h"
#include "Field/BareField.h" #include "Field/BareField.h"
#include "Utility/IpplStats.h" //#include "Utility/IpplStats.h"
//============================================================================= //=============================================================================
// FFT CCTransform Constructors // FFT CCTransform Constructors
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "Index/SIndex.h" #include "Index/SIndex.h"
#include "SubField/SubBareField.h" #include "SubField/SubBareField.h"
#include "Utility/IpplInfo.h" #include "Utility/IpplInfo.h"
#include "Utility/IpplStats.h"
#include "Utility/PAssert.h" #include "Utility/PAssert.h"
#include "Utility/Unique.h" #include "Utility/Unique.h"
#include "Utility/my_auto_ptr.h" #include "Utility/my_auto_ptr.h"
......
...@@ -33,10 +33,9 @@ ...@@ -33,10 +33,9 @@
#include "Utility/Inform.h" #include "Utility/Inform.h"
#include "Utility/Unique.h" #include "Utility/Unique.h"
#include "Utility/IpplInfo.h" #include "Utility/IpplInfo.h"
#include "Utility/IpplStats.h" //#include "Utility/IpplStats.h"
#include <map> #include <map>
#include <utility>
#include <cstdlib> #include <cstdlib>
......
...@@ -3,10 +3,10 @@ set (_SRCS ...@@ -3,10 +3,10 @@ set (_SRCS
set (_HDRS set (_HDRS
Assign.hpp Assign.hpp
Assign.h
AssignDefs.h AssignDefs.h
AssignGeneralBF.hpp AssignGeneralBF.hpp
AssignGeneralIBF.hpp AssignGeneralIBF.hpp
Assign.h
AssignTags.h AssignTags.h
BareField.hpp BareField.hpp
BareField.h BareField.h
......
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
#include "Index/SIndexAssign.h" #include "Index/SIndexAssign.h"
#include "Index/SIndex.h" #include "Index/SIndex.h"
#include "Field/BrickIterator.h" #include "Field/BrickIterator.h"
#include "Field/Field.h" // #include "Field/Field.h"
#include "Field/IndexedField.h" // #include "Field/IndexedField.h"
#include "Field/Assign.h" // #include "Field/Assign.h"
#include "Utility/IpplInfo.h" #include "Utility/IpplInfo.h"
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "Field/BareField.h" #include "Field/BareField.h"
#include "Field/BrickExpression.h" #include "Field/BrickExpression.h"
#include "Field/LField.h" #include "Field/LField.h"
#include "Field/Field.h"
#include "Field/Assign.h" #include "Field/Assign.h"
#include "Field/AssignDefs.h" #include "Field/AssignDefs.h"
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
#include "Utility/IpplInfo.h" #include "Utility/IpplInfo.h"
#include "Utility/IpplStats.h" #include "Utility/IpplStats.h"
#include "Utility/RandomNumberGen.h"
#include "Utility/PAssert.h" #include "Utility/PAssert.h"
#include <cstdio> #include <cstdio>
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
* of resolving who needs to free up the storage used for the Message elements. * of resolving who needs to free up the storage used for the Message elements.
***************************************************************************/ ***************************************************************************/
#include "Utility/Inform.h"
#include <complex> #include <complex>
#include <cstddef> #include <cstddef>
#include <vector> #include <vector>
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
***************************************************************************/ ***************************************************************************/
#include "Message/Message.h" #include "Message/Message.h"
#include "Utility/Inform.h"
#include "Utility/IpplInfo.h" #include "Utility/IpplInfo.h"
#include <iterator> #include <iterator>
......
...@@ -22,7 +22,9 @@ ...@@ -22,7 +22,9 @@
#define ABSTRACT_PARTICLE_H #define ABSTRACT_PARTICLE_H
#include "Particle/ParticleLayout.h" #include "Particle/ParticleLayout.h"
#include "Particle/ParticleAttrib.h"
template<class T> class ParticleAttrib;
class ParticleAttribBase;
template <class T, unsigned Dim> template <class T, unsigned Dim>
class AbstractParticle { class AbstractParticle {
......
...@@ -2,6 +2,7 @@ set (_SRCS ...@@ -2,6 +2,7 @@ set (_SRCS
) )
set (_HDRS set (_HDRS
AbstractParticle.h
BoxParticleCachingPolicy.h BoxParticleCachingPolicy.h
CellParticleCachingPolicy.h CellParticleCachingPolicy.h
GenArrayParticle.h GenArrayParticle.h
...@@ -9,8 +10,8 @@ set (_HDRS ...@@ -9,8 +10,8 @@ set (_HDRS
IntCIC.h IntCIC.h
Interpolator.h Interpolator.h
IntNGP.h IntNGP.h
IntTSC.h
IntSUDS.h IntSUDS.h
IntTSC.h
NoParticleCachingPolicy.h NoParticleCachingPolicy.h
PairBuilder/BasicPairBuilder.h PairBuilder/BasicPairBuilder.h
PairBuilder/HashPairBuilder.h PairBuilder/HashPairBuilder.h
......
...@@ -16,14 +16,13 @@ ...@@ -16,14 +16,13 @@
#include "Field/LField.h" #include "Field/LField.h"
#include "Field/CompressedBrickIterator.h" #include "Field/CompressedBrickIterator.h"
#include "Index/NDIndex.h" #include "Index/NDIndex.h"
#include "Meshes/Centering.h"
#include "AppTypes/Vektor.h" #include "AppTypes/Vektor.h"
#include "Utility/IpplInfo.h" #include "Utility/IpplInfo.h"
#include "Utility/IpplException.h" #include "Utility/IpplException.h"
#include <iostream> #include <ostream>
#include <vector> #include <vector>
#include <utility>
#include <cmath>
// Helper class and functions for finding nearest grid point given centering // Helper class and functions for finding nearest grid point given centering
......
...@@ -95,15 +95,18 @@ ...@@ -95,15 +95,18 @@
// include files // include files
#include "Particle/AbstractParticle.h" #include "Particle/AbstractParticle.h"
#include "Particle/ParticleAttribBase.h"
#include "Particle/ParticleLayout.h"
#include "AppTypes/Vektor.h" #include "AppTypes/Vektor.h"
#include "DataSource/DataSource.h" #include "DataSource/DataSource.h"
#include "DataSource/MakeDataSource.h" #include "DataSource/MakeDataSource.h"
#include "Message/Formatter.h" #include "Message/Formatter.h"
#include <vector> #include <vector>
#include <algorithm> // Include algorithms
#include <utility> #include <utility>
#include <iostream> #include <iostream>
template <class T, unsigned Dim>
using PLayout = ParticleLayout<T, Dim>;
// forward declarations // forward declarations
class Inform; class Inform;
...@@ -120,7 +123,6 @@ template <class T, unsigned D> class ParticleBConds; ...@@ -120,7 +123,6 @@ template <class T, unsigned D> class ParticleBConds;
template<class PLayout> template<class PLayout>
class IpplParticleBase : public DataSource, class IpplParticleBase : public DataSource,
public AbstractParticle<typename PLayout::Position_t, PLayout::Dimension> { public AbstractParticle<typename PLayout::Position_t, PLayout::Dimension> {
public: public:
// useful enums // useful enums
enum { Dim = PLayout::Dimension }; enum { Dim = PLayout::Dimension };
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
// forward declarations // forward declarations
template<class T> class ParticleAttrib; template<class T> class ParticleAttrib;
template<class T, unsigned Dim> class ParticleAttribElem; template<class T, unsigned Dim> class ParticleAttribElem;
template<class T> class ParticleAttribIterator;
template <class T> class ParticleAttribConstIterator;
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// //
......
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
// include files // include files
#include "Particle/ParticleAttribBase.h" #include "Particle/ParticleAttribBase.h"
#include "Particle/ParticleAttribElem.h" #include "Particle/ParticleAttribElem.h"
#include "Particle/PAssign.h"
#include "SubParticle/SubParticleAttrib.h" #include "SubParticle/SubParticleAttrib.h"
#include "DataSource/DataSource.h" #include "DataSource/DataSource.h"
#include "DataSource/MakeDataSource.h" #include "DataSource/MakeDataSource.h"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// include files // include files
#include "SubField/SubFieldAssignDefs.h" #include "SubField/SubFieldAssignDefs.h"
#include "SubParticle/SubParticleAssign.h" #include "SubParticle/SubParticleAttrib.h"
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// //
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
// include files // include files
#include "Index/NDIndex.h" #include "Index/NDIndex.h"
#include "Field/BrickExpression.h" #include "Field/BrickExpression.h"
#include "Field/Field.h"
#include "Utility/DiscBuffer.h" #include "Utility/DiscBuffer.h"
#include "Utility/DiscConfig.h" #include "Utility/DiscConfig.h"
#include "Utility/Inform.h" #include "Utility/Inform.h"
...@@ -24,8 +23,6 @@ ...@@ -24,8 +23,6 @@
#include <cstdlib> #include <cstdlib>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <vector> #include <vector>
#include <iostream> #include <iostream>
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "Utility/DiscField.h" #include "Utility/DiscField.h"
#include "Utility/DiscConfig.h" #include "Utility/DiscConfig.h"
#include "Utility/DiscMeta.h" #include "Utility/DiscMeta.h"
#include "Field/BrickIterator.h"
#include "Message/Tags.h" #include "Message/Tags.h"
#include "Utility/PAssert.h" #include "Utility/PAssert.h"
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
#include "Utility/DiscConfig.h" #include "Utility/DiscConfig.h"
#include "Utility/IpplInfo.h" #include "Utility/IpplInfo.h"
#include "Utility/PAssert.h" #include "Utility/PAssert.h"
#include "Message/Communicate.h"
#include "Message/Message.h" #include "Message/Message.h"
#include "Message/Tags.h"
#include <vector> #include <vector>
#include <iostream> #include <iostream>
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
// forward declarations // forward declarations
template<class T> class IpplParticleBase; template<class T> class IpplParticleBase;
template<class T> class ParticleAttrib; template<class T> class ParticleAttrib;
class Message;
class DiscParticle { class DiscParticle {
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
#include <sstream> #include <sstream>
#include <string>
#define INFORM_ALL_NODES (-1) #define INFORM_ALL_NODES (-1)
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
// include files // include files
#include "Utility/IpplInfo.h" #include "Utility/IpplInfo.h"
#include "Utility/Inform.h"
#include "Utility/IpplStats.h" #include "Utility/IpplStats.h"
#include "Utility/PAssert.h" #include "Utility/PAssert.h"
#include "Utility/RandomNumberGen.h" #include "Utility/RandomNumberGen.h"
......
...@@ -43,9 +43,8 @@ ...@@ -43,9 +43,8 @@
*/ */
// include files // include files
#include "Utility/Inform.h"
#include "Message/Communicate.h"
#include "Utility/StaticIpplInfo.h" #include "Utility/StaticIpplInfo.h"
#include "Utility/Inform.h"
#include <iostream> #include <iostream>
#include <stack> #include <stack>
...@@ -56,6 +55,7 @@ ...@@ -56,6 +55,7 @@
#include <mpi.h> #include <mpi.h>
// forward declarations // forward declarations
class Communicate;
class IpplStats; class IpplStats;
class IpplInfo; class IpplInfo;
std::ostream& operator<<(std::ostream&, const IpplInfo&); std::ostream& operator<<(std::ostream&, const IpplInfo&);
......
...@@ -40,6 +40,9 @@ ...@@ -40,6 +40,9 @@
// //
#include "Utility/IpplMemoryUsage.h" #include "Utility/IpplMemoryUsage.h"
#include "Message/GlobalComm.h"
#include "Utility/IpplInfo.h"
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
IpplMemoryUsage::IpplMemoryUsage() IpplMemoryUsage::IpplMemoryUsage()
{ } { }
......
...@@ -38,11 +38,11 @@ ...@@ -38,11 +38,11 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with OPAL. If not, see <https://www.gnu.org/licenses/>. // along with OPAL. If not, see <https://www.gnu.org/licenses/>.
// //
#ifndef IPPL_MEMPRYUSAGE_H #ifndef IPPL_MEMORYUSAGE_H
#define IPPL_MEMPRYUSAGE_H #define IPPL_MEMORYUSAGE_H
#include "Ippl.h"
#include <memory> #include <memory>
#include <string>
#include <sys/resource.h> #include <sys/resource.h>
#include <sys/time.h> // not required but increases portability #include <sys/time.h> // not required but increases portability
......
...@@ -38,10 +38,11 @@ ...@@ -38,10 +38,11 @@
// include files // include files
#include "Utility/IpplInfo.h" #include "Utility/IpplInfo.h"
#include "Utility/Timer.h" #include "Utility/Timer.h"
#include "Utility/Inform.h"
#include <vector> #include <vector>
class Inform;
class IpplStats { class IpplStats {
public: public:
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include "Utility/IpplTimings.h" #include "Utility/IpplTimings.h"
#include "Utility/Inform.h" #include "Utility/Inform.h"
#include "Utility/IpplInfo.h"
#include "Message/GlobalComm.h" #include "Message/GlobalComm.h"
#include "PETE/IpplExpressions.h" #include "PETE/IpplExpressions.h"
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#ifndef PASSERT_H #ifndef PASSERT_H
#define PASSERT_H #define PASSERT_H
#include "Utility/IpplInfo.h"
#include <exception> #include <exception>
#include <stdexcept> #include <stdexcept>
......
...@@ -49,10 +49,6 @@ bool Configure(int argc, char *argv[], InterPolT *interPol, ...@@ -49,10 +49,6 @@ bool Configure(int argc, char *argv[], InterPolT *interPol,
Inform msg("Configure "); Inform msg("Configure ");
Inform errmsg("Error "); Inform errmsg("Error ");
string bc_str;
string interPol_str;
string dist_str;
for (int i=1; i < argc; ++i) { for (int i=1; i < argc; ++i) {
string s(argv[i]); string s(argv[i]);
if (s == "-grid") { if (s == "-grid") {
......
...@@ -24,10 +24,6 @@ bool Configure(int argc, char *argv[], InterPolT *interPol, ...@@ -24,10 +24,6 @@ bool Configure(int argc, char *argv[], InterPolT *interPol,
Inform msg("Configure "); Inform msg("Configure ");
Inform errmsg("Error "); Inform errmsg("Error ");
string bc_str;
string interPol_str;
string dist_str;
for (int i=1; i < argc; ++i) { for (int i=1; i < argc; ++i) {
string s(argv[i]);