diff --git a/Core/Algorithms/inc/Beam.h b/Core/Algorithms/inc/Beam.h index b005ce9590ee721ce2eb0fca6dcdc66d24fbf494..245123354fbb3e308bed0506ff33dbd63a1f7f12 100644 --- a/Core/Algorithms/inc/Beam.h +++ b/Core/Algorithms/inc/Beam.h @@ -18,16 +18,7 @@ #include "Types.h" #include "IParameterized.h" - -#ifndef GCCXML_SKIP_THIS -//#ifdef _WIN32 -//#define EIGEN_DONT_ALIGN_STATICALLY 1 -//#define EIGEN_DONT_ALIGN 1 -//#define EIGEN_DONT_VECTORIZE 1 -//#define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT 1 -//#endif -#include <Eigen/Core> -#endif +#include "EigenCore.h" //! Ideal collimated Beam defined by wavelength, direction and intensity. diff --git a/Core/Algorithms/inc/DWBASimulation.h b/Core/Algorithms/inc/DWBASimulation.h index 8c6b77fe8356243357534844ce08307828eb652f..cf7ba118510890a1a8f7a29302875b543037aef1 100644 --- a/Core/Algorithms/inc/DWBASimulation.h +++ b/Core/Algorithms/inc/DWBASimulation.h @@ -21,10 +21,7 @@ #include "OutputData.h" #include "ThreadInfo.h" #include "Types.h" - -#ifndef GCCXML_SKIP_THIS -#include <Eigen/Core> -#endif +#include "EigenCore.h" //! Base class for different simulations, using DWBA. diff --git a/Core/Algorithms/inc/Detector.h b/Core/Algorithms/inc/Detector.h index ccc14638a78956750f0b548e32beecebd7962ba8..bf0cb0fe0c002219de4edb8340ab85bbdc51f1c0 100644 --- a/Core/Algorithms/inc/Detector.h +++ b/Core/Algorithms/inc/Detector.h @@ -19,10 +19,8 @@ #include "IDetectorResolution.h" #include "DetectorParameters.h" #include "SafePointerVector.h" +#include "EigenCore.h" -#ifndef GCCXML_SKIP_THIS -#include <Eigen/Core> -#endif //! Detector with axes and resolution function. diff --git a/Core/Algorithms/inc/ILayerRTCoefficients.h b/Core/Algorithms/inc/ILayerRTCoefficients.h index 027611706e1b5f5a21c6b2630d41d738ac0b99dc..49399832253d9c158bc9c7c59debf445619a6c85 100644 --- a/Core/Algorithms/inc/ILayerRTCoefficients.h +++ b/Core/Algorithms/inc/ILayerRTCoefficients.h @@ -17,10 +17,7 @@ #define ILAYERRTCOEFFICIENTS_H_ #include "Types.h" - -#ifndef GCCXML_SKIP_THIS -#include <Eigen/Core> -#endif +#include "EigenCore.h" class ILayerRTCoefficients { diff --git a/Core/Algorithms/inc/Simulation.h b/Core/Algorithms/inc/Simulation.h index 8bcb39d6de3293fcb83e22ff435924725eeb8390..e274a7f8f998c83b93f3d611cd97e2bc16aa54da 100644 --- a/Core/Algorithms/inc/Simulation.h +++ b/Core/Algorithms/inc/Simulation.h @@ -20,9 +20,7 @@ #include "Instrument.h" #include "SimulationParameters.h" -#ifndef GCCXML_SKIP_THIS -#include <Eigen/Core> -#endif +#include "EigenCore.h" class ProgramOptions; diff --git a/Core/Algorithms/inc/SpecularMagnetic.h b/Core/Algorithms/inc/SpecularMagnetic.h index 872a3907781656c44f7a5d85312d057c658d673f..66238799a9facc61053ce9afd30eda1ea6fa2cb6 100644 --- a/Core/Algorithms/inc/SpecularMagnetic.h +++ b/Core/Algorithms/inc/SpecularMagnetic.h @@ -20,8 +20,7 @@ #include "ISimulation.h" #include "MultiLayer.h" #include "MatrixRTCoefficients.h" - -#include <Eigen/Core> +#include "EigenCore.h" //! Implements the matrix formalism for the calculation of wave amplitudes of diff --git a/Core/Algorithms/inc/SpecularMatrix.h b/Core/Algorithms/inc/SpecularMatrix.h index e72447350a0eff3a2095243d4956ab29feb2b6db..54c6bfbdabdf6f00319c47127cf30ab555c08630 100644 --- a/Core/Algorithms/inc/SpecularMatrix.h +++ b/Core/Algorithms/inc/SpecularMatrix.h @@ -20,8 +20,8 @@ #include "ISimulation.h" #include "MultiLayer.h" #include "ScalarRTCoefficients.h" +#include "EigenCore.h" -#include <Eigen/Core> //! Implements the matrix formalism for the calculation of wave amplitudes of //! the coherent wave solution in a multilayer diff --git a/Core/Algorithms/src/Simulation.cpp b/Core/Algorithms/src/Simulation.cpp index 0c696c6df375a7fb3b6783508aa79525e194f177..c59534d7129a248ab74ea330b8783c179545e55f 100644 --- a/Core/Algorithms/src/Simulation.cpp +++ b/Core/Algorithms/src/Simulation.cpp @@ -40,7 +40,7 @@ Simulation::Simulation() } Simulation::Simulation(const Simulation& other) -: IParameterized(other) +: ICloneable(), IParameterized(other) , mp_sample(0) , mp_sample_builder(other.mp_sample_builder) , m_instrument(other.m_instrument) diff --git a/Core/FormFactors/inc/IFormFactor.h b/Core/FormFactors/inc/IFormFactor.h index 199515bb17c103138b6866309645f6d4d8ca56de..a9e2d54b03164b5b1147002b5714ec4cea128a80 100644 --- a/Core/FormFactors/inc/IFormFactor.h +++ b/Core/FormFactors/inc/IFormFactor.h @@ -20,10 +20,7 @@ #include "IMaterial.h" #include "ISample.h" #include "Bin.h" - -#ifndef GCCXML_SKIP_THIS -#include <Eigen/Core> -#endif +#include "EigenCore.h" //! The basic interface for form factors. diff --git a/Core/Samples/inc/HomogeneousMagneticMaterial.h b/Core/Samples/inc/HomogeneousMagneticMaterial.h index c235bbc12d93c7fe7ee04c0b1341c6ee34271d87..3c9ce7d613293e8bab5efe8da407729bbd98176f 100644 --- a/Core/Samples/inc/HomogeneousMagneticMaterial.h +++ b/Core/Samples/inc/HomogeneousMagneticMaterial.h @@ -17,9 +17,7 @@ #define HOMOGENEOUSMAGNETICMATERIAL_H_ #include "HomogeneousMaterial.h" -#ifndef GCCXML_SKIP_THIS -#include <Eigen/Core> -#endif +#include "EigenCore.h" //! An homogeneous material with magnetization diff --git a/Core/Samples/inc/IMaterial.h b/Core/Samples/inc/IMaterial.h index a71f1f04af8a80ad4337fdd36d35cf44bdf898bb..6a0a60bbb769c1c622821a36e47953762c556537 100644 --- a/Core/Samples/inc/IMaterial.h +++ b/Core/Samples/inc/IMaterial.h @@ -18,13 +18,10 @@ #include "INamed.h" #include "Types.h" - +#include "EigenCore.h" #include <string> #include <iostream> -#ifndef GCCXML_SKIP_THIS -#include <Eigen/Core> -#endif //! Interface to a named material. diff --git a/Core/Tools/inc/EigenCore.h b/Core/Tools/inc/EigenCore.h new file mode 100644 index 0000000000000000000000000000000000000000..8129360e686f2bf30342b7d469079ba74205022a --- /dev/null +++ b/Core/Tools/inc/EigenCore.h @@ -0,0 +1,41 @@ +// ************************************************************************** // +// +// BornAgain: simulate and fit scattering at grazing incidence +// +//! @file Tools/inc/AxisBin.h +//! @brief Defines class AxisBin. +//! +//! @homepage http://apps.jcns.fz-juelich.de/BornAgain +//! @license GNU General Public License v3 or higher (see COPYING) +//! @copyright Forschungszentrum Jülich GmbH 2013 +//! @authors Scientific Computing Group at MLZ Garching +//! @authors C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke +// +// ************************************************************************** // + +#ifndef BORNAGAIN_EIGENCORE_H +#define BORNAGAIN_EIGENCORE_H + +//! This include file is introduced to deal with Eigen alignment + +//! See general desciption of the alignment problem +//! http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html + +//! See also issue with POSIX_ADVISORY_INFO at http://eigen.tuxfamily.org/bz/show_bug.cgi?id=554 + +#ifndef GCCXML_SKIP_THIS +//#ifdef _WIN32 +//#define EIGEN_DONT_ALIGN_STATICALLY 1 +//#define EIGEN_DONT_ALIGN 1 +//#define EIGEN_DONT_VECTORIZE 1 +//#define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT 1 +//#endif +#ifndef _WIN32 +#include <unistd.h> +#endif +#include <Eigen/Core> +#endif + + +#endif //BORNAGAIN_EIGENCORE_H + diff --git a/Core/Tools/inc/MathFunctions.h b/Core/Tools/inc/MathFunctions.h index b3dcd0590ac749a64dea9e8d04131b1c311a7c90..1f0b78ca02ab198ec1267851389abf5e12b11c7e 100644 --- a/Core/Tools/inc/MathFunctions.h +++ b/Core/Tools/inc/MathFunctions.h @@ -30,9 +30,7 @@ #include "gsl/gsl_sf_expint.h" #include "gsl/gsl_integration.h" -#ifndef GCCXML_SKIP_THIS -#include <Eigen/Core> -#endif +#include "EigenCore.h" //! Various mathematical functions. diff --git a/cmake/modules/CheckCompiler.cmake b/cmake/modules/CheckCompiler.cmake index 5f26d905a13a693e7f8d70f2adda0a56ad6fe400..9807e38152d4393584d50f80729b4271adcad3a5 100644 --- a/cmake/modules/CheckCompiler.cmake +++ b/cmake/modules/CheckCompiler.cmake @@ -78,8 +78,9 @@ if(c++11) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-deprecated-declaration") endif() + #---Print the final compiler flags-------------------------------------------------------------------- -message(STATUS "BornAgain Platform: ${BORNAGsAIN_PLATFORM}") +message(STATUS "BornAgain Platform: ${BORNAGAIN_PLATFORM}") message(STATUS "BornAgain Architecture: ${BORNAGAIN_ARCHITECTURE}") message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}") message(STATUS "Compiler Flags: ${CMAKE_CXX_FLAGS} ${ALL_CXX_FLAGS_${CMAKE_BUILD_TYPE}}") diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake index f28c67d31a03e09cb6a2d0bfc4fa5bd4eb1b115d..7872054d2002dfcc06ea44dc1b01bf8f040a3dd3 100644 --- a/cmake/modules/SearchInstalledSoftware.cmake +++ b/cmake/modules/SearchInstalledSoftware.cmake @@ -67,11 +67,7 @@ if(BORNAGAIN_PYTHON OR BORNAGAIN_GUI) endif() find_package(Numpy REQUIRED) endif() -message("XXX ${PYTHON_LIBRARIES}") # --- ROOT --- find_package(ROOT) -#if(ROOT_FOUND) -# include_directories(${ROOT_INCLUDE_DIR}) -#endif() diff --git a/cmake/modules/SetUpLinux.cmake b/cmake/modules/SetUpLinux.cmake index 7c9b2f62e05c1a03e3e8670c5f85f8508b9934fa..0a9547b67595c8d92ccea626f1b6935dcf6d897a 100644 --- a/cmake/modules/SetUpLinux.cmake +++ b/cmake/modules/SetUpLinux.cmake @@ -18,6 +18,8 @@ if(${SYSCTL_OUTPUT} MATCHES x86_64) else() message(STATUS "Found a 32bit system") set(BIT_ENVIRONMENT "-m32") + add_definitions(-DEIGEN_DONT_ALIGN_STATICALLY=1) + message(STATUS "--> switching off static alignment in Eigen due to 32 bit") set(SPECIAL_CINT_FLAGS "") if(CMAKE_COMPILER_IS_GNUCXX) message(STATUS "Found GNU compiler collection")