diff --git a/opm/core/tof/AnisotropicEikonal.cpp b/opm/core/tof/AnisotropicEikonal.cpp index 89e04461b..e3840d961 100644 --- a/opm/core/tof/AnisotropicEikonal.cpp +++ b/opm/core/tof/AnisotropicEikonal.cpp @@ -22,6 +22,8 @@ #include #include +#if BOOST_HEAP_AVAILABLE + namespace Opm { @@ -425,3 +427,30 @@ namespace Opm } // namespace Opm + + +#else // BOOST_HEAP_AVAILABLE is false + +namespace Opm +{ + const char* AnisotropicEikonal2derrmsg = + "This library has not been compiled with support for the" + "AnisotropicEikonal2d class, due to too old version of the boost libraries. " + "Boost.Heap from boost version 1.49 or newer is required. " + "To use this class you must recompile opm-core on a system with sufficiently " + "new version of boost."; + + AnisotropicEikonal2d::AnisotropicEikonal2d(const UnstructuredGrid&) + { + OPM_THROW(std::logic_error, AnisotropicEikonal2derrmsg); + } + + void AnisotropicEikonal2d::solve(const double*, + const std::vector&, + std::vector&) + { + OPM_THROW(std::logic_error, AnisotropicEikonal2derrmsg); + } +} + +#endif // BOOST_HEAP_AVAILABLE diff --git a/opm/core/tof/AnisotropicEikonal.hpp b/opm/core/tof/AnisotropicEikonal.hpp index 942c4d970..798869adc 100644 --- a/opm/core/tof/AnisotropicEikonal.hpp +++ b/opm/core/tof/AnisotropicEikonal.hpp @@ -22,7 +22,16 @@ #include #include +#include +#include + +#include + +#define BOOST_HEAP_AVAILABLE ((BOOST_VERSION / 100 % 1000) >= 49) + +#if BOOST_HEAP_AVAILABLE #include +#endif struct UnstructuredGrid; @@ -48,6 +57,7 @@ namespace Opm const std::vector& startcells, std::vector& solution); private: +#if BOOST_HEAP_AVAILABLE // Grid and topology. const UnstructuredGrid& grid_; SparseTable cell_neighbours_; @@ -82,6 +92,7 @@ namespace Opm void computeGridRadius(); void computeAnisoRatio(const double* metric); +#endif // BOOST_HEAP_AVAILABLE }; } // namespace Opm