← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3735: Remove some global headers

 

------------------------------------------------------------
revno: 3735
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Fri 2015-11-06 21:00:30 +0100
message:
  Remove some global headers
  
  Put them only there, where they are required.
  Should slighltly increase compilation time.
modified:
  core/Omega.cpp
  gui/qt4/GLViewer.cpp
  gui/qt5/GLViewer.cpp
  lib/base/Math.hpp
  lib/base/openmp-accu.hpp
  pkg/common/Dispatching.cpp
  pkg/dem/Disp2DPropLoadEngine.cpp
  pkg/dem/MicroMacroAnalyser.cpp
  pkg/dem/Shop_01.cpp
  pkg/dem/SimpleShear.cpp
  pkg/lbm/HydrodynamicsLawLBM.cpp


--
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 'core/Omega.cpp'
--- core/Omega.cpp	2015-06-16 13:54:56 +0000
+++ core/Omega.cpp	2015-11-06 20:00:30 +0000
@@ -18,6 +18,8 @@
 #include<boost/algorithm/string.hpp>
 #include<boost/thread/mutex.hpp>
 
+#include <boost/filesystem.hpp>
+
 #include<lib/serialization/ObjectIO.hpp>
 
 

=== modified file 'gui/qt4/GLViewer.cpp'
--- gui/qt4/GLViewer.cpp	2015-06-26 20:15:36 +0000
+++ gui/qt4/GLViewer.cpp	2015-11-06 20:00:30 +0000
@@ -24,6 +24,8 @@
 #include<lib/pyutil/gil.hpp>
 #include<QtGui/qevent.h>
 
+#include <boost/filesystem.hpp>
+
 #ifdef YADE_GL2PS
 	#include<gl2ps.h>
 #endif

=== modified file 'gui/qt5/GLViewer.cpp'
--- gui/qt5/GLViewer.cpp	2015-06-26 20:19:22 +0000
+++ gui/qt5/GLViewer.cpp	2015-11-06 20:00:30 +0000
@@ -24,6 +24,8 @@
 #include<lib/pyutil/gil.hpp>
 #include<QtGui/qevent.h>
 
+#include <boost/filesystem.hpp>
+
 #ifdef YADE_GL2PS
 	#include<gl2ps.h>
 #endif

=== modified file 'lib/base/Math.hpp'
--- lib/base/Math.hpp	2015-04-24 15:54:07 +0000
+++ lib/base/Math.hpp	2015-11-06 20:00:30 +0000
@@ -55,8 +55,6 @@
 #include <boost/lexical_cast.hpp>
 #include <boost/python.hpp>
 #include <boost/python/object.hpp>
-#include <boost/version.hpp>
-#include <boost/any.hpp>
 #include <boost/type_traits.hpp>
 #include <boost/preprocessor.hpp>
 #include <boost/python/module.hpp>
@@ -64,10 +62,6 @@
 #include <boost/shared_ptr.hpp>
 #include <boost/foreach.hpp>
 #include <boost/tuple/tuple.hpp>
-#include <boost/filesystem/convenience.hpp>
-#include <boost/filesystem.hpp>
-#include <boost/filesystem/operations.hpp>
-#include <boost/filesystem/exception.hpp>
 #include <boost/numeric/conversion/bounds.hpp>
 
 using boost::shared_ptr;
@@ -96,9 +90,6 @@
 
 #include <Eigen/Core>
 #include <Eigen/Geometry>
-#include <Eigen/QR>
-#include <Eigen/LU>
-#include <Eigen/SVD>
 #include <Eigen/Eigenvalues>
 #include <float.h>
 
@@ -392,4 +383,4 @@
 #endif
 
 } // namespace serialization
-} // namespace boost
\ No newline at end of file
+} // namespace boost

=== modified file 'lib/base/openmp-accu.hpp'
--- lib/base/openmp-accu.hpp	2014-10-15 06:44:01 +0000
+++ lib/base/openmp-accu.hpp	2015-11-06 20:00:30 +0000
@@ -59,8 +59,6 @@
 		// reset one element to ZeroInitializer
 		void add(size_t ix, const T& diff){ chunks[omp_get_thread_num()][ix]+=diff; }
 		void reset(size_t ix){ set(ix,ZeroInitializer<T>()); }
-		// fill all memory with zeros; the caller is responsible for assuring that such value is meaningful when converted to T
-		// void memsetZero(){ for(size_t th=0; th<nThreads; th++) memset(&chunks[th],0,CLS*nCL); }
 		// get all stored data, organized first by index, then by threads; only used for debugging
 		std::vector<std::vector<T> > getPerThreadData() const { std::vector<std::vector<T> > ret; for(size_t ix=0; ix<sz; ix++){ std::vector<T> vi; for(size_t th=0; th<nThreads; th++) vi.push_back(chunks[th][ix]); ret.push_back(vi); } return ret; }
 };

=== modified file 'pkg/common/Dispatching.cpp'
--- pkg/common/Dispatching.cpp	2014-10-15 06:44:01 +0000
+++ pkg/common/Dispatching.cpp	2015-11-06 20:00:30 +0000
@@ -25,13 +25,10 @@
 		const shared_ptr<Body>& b=(*bodies)[id];
 		processBody(b);
 	}
-// 	With -j4, this update takes more time that the dispatching in itslef, and it is quite useless: commented out
-// 	scene->updateBound();
 }
 
 void BoundDispatcher::processBody(const shared_ptr<Body>& b)
 {
-// 	const shared_ptr<Body>& b=(*bodies)[id];
 		shared_ptr<Shape>& shape=b->shape;
 		if(!b->isBounded() || !shape) return;
 		if(b->bound) {
@@ -74,7 +71,6 @@
 	scene=Omega::instance().getScene().get(); // to make sure if called from outside of the loop
 	Vector3i cellDist=Vector3i::Zero();
 	if(scene->isPeriodic) {
-		//throw logic_error("IGeomDispatcher::explicitAction does not support periodic boundary conditions (O.periodic==True)");
 		for(int i=0; i<3; i++) cellDist[i]=-(int)((b2->state->pos[i]-b1->state->pos[i])/scene->cell->getSize()[i]+.5);
 	}
 	Vector3r shift2=scene->cell->hSize*cellDist.cast<Real>();

=== modified file 'pkg/dem/Disp2DPropLoadEngine.cpp'
--- pkg/dem/Disp2DPropLoadEngine.cpp	2015-04-24 15:54:07 +0000
+++ pkg/dem/Disp2DPropLoadEngine.cpp	2015-11-06 20:00:30 +0000
@@ -13,6 +13,7 @@
 #include<core/Scene.hpp>
 #include<lib/base/Math.hpp>
 
+#include <boost/filesystem.hpp>
 
 YADE_PLUGIN((Disp2DPropLoadEngine));
 

=== modified file 'pkg/dem/MicroMacroAnalyser.cpp'
--- pkg/dem/MicroMacroAnalyser.cpp	2015-02-16 22:50:18 +0000
+++ pkg/dem/MicroMacroAnalyser.cpp	2015-11-06 20:00:30 +0000
@@ -10,16 +10,17 @@
 #include<pkg/common/ElastMat.hpp>
 #include<pkg/dem/ScGeom.hpp>
 #include<pkg/dem/FrictPhys.hpp>
-#include<core/Omega.hpp>
-#include<core/Scene.hpp>
+#include <core/Omega.hpp>
+#include <core/Scene.hpp>
 #include <pkg/common/Sphere.hpp>
-#include<lib/triangulation/KinematicLocalisationAnalyser.hpp>
-#include<lib/triangulation/TriaxialState.h>
+#include <lib/triangulation/KinematicLocalisationAnalyser.hpp>
+#include <lib/triangulation/TriaxialState.h>
 #include <lib/triangulation/Tenseur3.h>
-#include<boost/iostreams/filtering_stream.hpp>
-#include<boost/iostreams/filter/bzip2.hpp>
-#include<boost/iostreams/device/file.hpp>
-#include<pkg/dem/TriaxialCompressionEngine.hpp>
+#include <boost/iostreams/filtering_stream.hpp>
+#include <boost/iostreams/filter/bzip2.hpp>
+#include <boost/iostreams/device/file.hpp>
+#include <boost/filesystem.hpp>
+#include <pkg/dem/TriaxialCompressionEngine.hpp>
 #include "MicroMacroAnalyser.hpp"
 
 YADE_PLUGIN((MicroMacroAnalyser));

=== modified file 'pkg/dem/Shop_01.cpp'
--- pkg/dem/Shop_01.cpp	2015-11-06 20:00:30 +0000
+++ pkg/dem/Shop_01.cpp	2015-11-06 20:00:30 +0000
@@ -42,6 +42,7 @@
 	#include"pkg/common/Gl1_NormPhys.hpp"
 #endif
 
+#include <boost/filesystem.hpp>
 #include "py/_utils.hpp"
 
 

=== modified file 'pkg/dem/SimpleShear.cpp'
--- pkg/dem/SimpleShear.cpp	2014-10-15 06:44:01 +0000
+++ pkg/dem/SimpleShear.cpp	2015-11-06 20:00:30 +0000
@@ -36,6 +36,8 @@
 #include<pkg/common/Box.hpp>
 #include<pkg/common/Sphere.hpp>
 
+#include <boost/filesystem.hpp>
+
 #include <utility>
 
 YADE_PLUGIN((SimpleShear))

=== modified file 'pkg/lbm/HydrodynamicsLawLBM.cpp'
--- pkg/lbm/HydrodynamicsLawLBM.cpp	2015-04-24 15:54:07 +0000
+++ pkg/lbm/HydrodynamicsLawLBM.cpp	2015-11-06 20:00:30 +0000
@@ -29,7 +29,7 @@
 #include<pkg/common/Box.hpp>
 #include<pkg/common/Sphere.hpp>
 #include<pkg/dem/CohesiveFrictionalContactLaw.hpp>
-
+#include <boost/filesystem.hpp>
 
 namespace bfs=boost::filesystem;