← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3824: Introduce YADE_ODEINT feature

 

------------------------------------------------------------
revno: 3824
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Tue 2014-02-18 13:02:35 +0100
message:
  Introduce YADE_ODEINT feature
  
  Check boost version and enable YADE_ODEINT, if
  Boost >=1.53
modified:
  CMakeLists.txt
  pkg/dem/RungeKuttaCashKarp54Integrator.cpp
  pkg/dem/RungeKuttaCashKarp54Integrator.hpp


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2014-01-07 07:32:51 +0000
+++ CMakeLists.txt	2014-02-18 12:02:35 +0000
@@ -129,6 +129,19 @@
 INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS})
 SET(LINKLIBS  "${LINKLIBS};${BZIP2_LIBRARIES};${ZLIB_LIBRARIES};")
 #===========================================================
+IF((Boost_MAJOR_VERSION EQUAL 1) OR (Boost_MAJOR_VERSION GREATER 1) AND
+  ((Boost_MINOR_VERSION EQUAL 53) OR (Boost_MINOR_VERSION GREATER 53)))
+  SET(CONFIGURED_FEATS "${CONFIGURED_FEATS} Odeint")
+  ADD_DEFINITIONS("-DYADE_ODEINT")
+ELSE((Boost_MAJOR_VERSION EQUAL 1) OR (Boost_MAJOR_VERSION GREATER 1) AND
+    ((Boost_MINOR_VERSION EQUAL 53) OR (Boost_MINOR_VERSION GREATER 53)))
+  SET(DISABLED_FEATS "${DISABLED_FEATS} Odeint")
+  MESSAGE(STATUS "Boost Odeint can be enabled, only if Boost>=1.53 is used")
+  MESSAGE(STATUS ${Boost_MAJOR_VERSION})
+  MESSAGE(STATUS ${Boost_MINOR_VERSION})
+ENDIF((Boost_MAJOR_VERSION EQUAL 1) OR (Boost_MAJOR_VERSION GREATER 1) AND
+     ((Boost_MINOR_VERSION EQUAL 53) OR (Boost_MINOR_VERSION GREATER 53)))
+#===========================================================
 IF(ENABLE_VTK)
   FIND_PACKAGE(VTK) 
   IF(VTK_FOUND)

=== modified file 'pkg/dem/RungeKuttaCashKarp54Integrator.cpp'
--- pkg/dem/RungeKuttaCashKarp54Integrator.cpp	2014-02-17 14:31:35 +0000
+++ pkg/dem/RungeKuttaCashKarp54Integrator.cpp	2014-02-18 12:02:35 +0000
@@ -1,3 +1,4 @@
+#ifdef YADE_ODEINT
 #include<yade/pkg/dem/RungeKuttaCashKarp54Integrator.hpp>
 #include<yade/core/Scene.hpp>
 
@@ -30,4 +31,4 @@
 
 	scene->time=scene->time-dt;//Scene move next time step function already increments the time so we have to decrement it just before it.
 }
-
+#endif

=== modified file 'pkg/dem/RungeKuttaCashKarp54Integrator.hpp'
--- pkg/dem/RungeKuttaCashKarp54Integrator.hpp	2014-02-17 14:31:35 +0000
+++ pkg/dem/RungeKuttaCashKarp54Integrator.hpp	2014-02-18 12:02:35 +0000
@@ -1,3 +1,4 @@
+#ifdef YADE_ODEINT
 #pragma once
 #include <yade/core/Scene.hpp>
 #include<yade/pkg/dem/Integrator.hpp>
@@ -45,6 +46,4 @@
 	);
 };
 REGISTER_SERIALIZABLE(RungeKuttaCashKarp54Integrator);
-
-
-
+#endif