← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2544: - Fix compile crashers due to bad include paths.

 

------------------------------------------------------------
revno: 2544
committer: Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx>
branch nick: yade
timestamp: Fri 2010-11-12 20:16:09 +0100
message:
  - Fix compile crashers due to bad include paths.
modified:
  lib/triangulation/def_types.h
  pkg/dem/MicroMacroAnalyser.cpp
  pkg/dem/ScGeom.cpp
  pkg/dem/TesselationWrapper.cpp


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

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'lib/triangulation/def_types.h'
--- lib/triangulation/def_types.h	2010-09-23 11:57:48 +0000
+++ lib/triangulation/def_types.h	2010-11-12 19:16:09 +0000
@@ -14,15 +14,15 @@
 
 #include <boost/static_assert.hpp>
 
-#include<yade/lib-base/Math.hpp> // typedef for Real
+#include<yade/lib/base/Math.hpp> // typedef for Real
 
 //#define FLOW_ENGINE
 
 namespace CGT{
 //Robust kernel
-typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
-//A bit faster, but gives crash eventualy 
-// typedef CGAL::Cartesian<double> K;
+// typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
+//A bit faster, but gives crash eventualy
+typedef CGAL::Cartesian<double> K;
 
 typedef CGAL::Regular_triangulation_euclidean_traits_3<K>   				Traits;
 typedef K::Point_3									Point;
@@ -55,7 +55,7 @@
  	Real VolumeVariation;
 	double pression; //stockage d'une valeur de pression pour chaque cellule
 	Vecteur Average_Cell_Velocity; //average velocity defined for a single cell as 1/Volume * SUM_ON_FACETS(x_average_facet*average_facet_flow_rate)
-	
+
 	// Surface vectors of facets, pointing from outside toward inside the cell
 	std::vector<Vecteur> facetSurfaces;
 	// Reflects the geometrical property of the cell, so that the force by cell fluid on grain "i" is pressure*unitForceVectors[i]
@@ -81,7 +81,7 @@
 		isInside = false;
 		inv_sum_k=0;
 		isFictious=false; Pcondition = false; isInferior = false; isSuperior = false; isLateral = false; isvisited = false; isExternal=false;
-	}	
+	}
 	double inv_sum_k;
 	bool isInside;
 	bool isInferior;
@@ -109,12 +109,12 @@
 	inline Real& dv (void) {return VolumeVariation;}
 	inline int& fictious (void) {return fict;}
 	inline double& p (void) {return pression;}
-	
+
 	inline std::vector<double>& k_norm (void) {return module_permeability;}
 	inline std::vector< Vecteur >& facetSurf (void) {return facetSurfaces;}
 	inline std::vector<Vecteur>& force (void) {return cell_force;}
 	inline std::vector<double>& Rh (void) {return RayHydr;}
-	
+
 	inline Vecteur& av_vel (void) {return Average_Cell_Velocity;}
 // 	inline vector<Vecteur>& F (void) {return vec_forces;}
 // 	inline vector<double>& Q (void) {return flow_rate;}
@@ -150,7 +150,7 @@
 	inline Real& f (void) {return s;}
 	inline Real& v (void) {return vol;}
 	inline const unsigned int& id (void) const {return i;}
-	
+
 #ifdef FLOW_ENGINE
 	Vecteur forces;
 	inline Vecteur& force (void) {return forces;}
@@ -166,7 +166,7 @@
 //	Vecteur u; //... et son d�placement
 //} Info;
 //
-//Point& operator(info ) 
+//Point& operator(info )
 
 
 

=== modified file 'pkg/dem/MicroMacroAnalyser.cpp'
--- pkg/dem/MicroMacroAnalyser.cpp	2010-11-12 08:03:16 +0000
+++ pkg/dem/MicroMacroAnalyser.cpp	2010-11-12 19:16:09 +0000
@@ -15,7 +15,7 @@
 #include <yade/pkg/common/Sphere.hpp>
 #include<yade/lib/triangulation/KinematicLocalisationAnalyser.hpp>
 #include<yade/lib/triangulation/TriaxialState.h>
-#include <yade/lib-triangulation/Tenseur3.h>
+#include <yade/lib/triangulation/Tenseur3.h>
 #include<boost/iostreams/filtering_stream.hpp>
 #include<boost/iostreams/filter/bzip2.hpp>
 #include<boost/iostreams/device/file.hpp>
@@ -104,7 +104,7 @@
 	else if (state==2) ts = analyser->TS1;
 	else LOG_ERROR("state must be 1 or 2, instead of " << state);
 	CGT::TriaxialState& TS = *ts;
-	
+
 	TS.reset();
 	long Ng = bodies->size();
 	TS.mean_radius=0;
@@ -143,7 +143,7 @@
 	TS.mean_radius /= Ng;//rayon moyen
 	LOG_INFO(" loaded : " << Ng << " grains with mean radius = " << TS.mean_radius);
 	if (fictiousVtx.size()>=6){//boxes found, simulate them with big spheres
-		CGT::Point& Pmin = TS.box.base; CGT::Point& Pmax = TS.box.sommet; 
+		CGT::Point& Pmin = TS.box.base; CGT::Point& Pmax = TS.box.sommet;
 		Real FAR = 1e4;
 		TS.grains[fictiousVtx[0]].sphere = CGT::Sphere(CGT::Point(0.5*(Pmin.x()+Pmax.x()),Pmin.y()-FAR*(Pmax.x()-Pmin.x()),0.5*(Pmax.z()+Pmin.z())),FAR*(Pmax.x()-Pmin.x()));
 		TS.grains[fictiousVtx[1]].sphere = CGT::Sphere(CGT::Point(0.5*(Pmin.x()+Pmax.x()),Pmax.y()+FAR*(Pmax.x()-Pmin.x()),0.5*(Pmax.z()+Pmin.z())),FAR*(Pmax.x()-Pmin.x()));
@@ -200,7 +200,7 @@
 				triaxialCompressionEngine =  YADE_PTR_CAST<TriaxialCompressionEngine> (*itFirst);}
 		}
 		if (!triaxialCompressionEngine) LOG_ERROR("stress controller engine not found");}
-	
+
 	if (triaxialCompressionEngine) {
 		TS.wszzh = triaxialCompressionEngine->stress[triaxialCompressionEngine->wall_top][1];
 		TS.wsxxd = triaxialCompressionEngine->stress[triaxialCompressionEngine->wall_right][0];

=== modified file 'pkg/dem/ScGeom.cpp'
--- pkg/dem/ScGeom.cpp	2010-10-27 10:14:05 +0000
+++ pkg/dem/ScGeom.cpp	2010-11-12 19:16:09 +0000
@@ -90,6 +90,7 @@
 	if (isNew) {
 		initRotations(rbp1,rbp2);
 	} else {
+		rbp1.ori.normalize(); rbp2.ori.normalize(); initialOrientation2.normalize(); initialOrientation1.normalize();
 		Quaternionr delta((rbp1.ori * (initialOrientation1.conjugate())) * (initialOrientation2 * (rbp2.ori.conjugate())));
 		if (creep) delta = delta * twistCreep;
 		AngleAxisr aa(delta); // axis of rotation - this is the Moment direction UNIT vector; // angle represents the power of resistant ELASTIC moment

=== modified file 'pkg/dem/TesselationWrapper.cpp'
--- pkg/dem/TesselationWrapper.cpp	2010-11-07 11:46:20 +0000
+++ pkg/dem/TesselationWrapper.cpp	2010-11-12 19:16:09 +0000
@@ -11,7 +11,7 @@
 #include<yade/extra/boost_python_len.hpp>
 #include<yade/pkg/dem/Shop.hpp>
 #include"TesselationWrapper.hpp"
-#include <yade/lib-triangulation/Timer.h>
+#include <yade/lib/triangulation/Timer.h>
 
 YADE_PLUGIN((TesselationWrapper));
 YADE_REQUIRE_FEATURE(CGAL)
@@ -118,7 +118,7 @@
 
 
 // is this a joke?? #include<limits> std::numeric_limits<double>::infinity();
-//__attribute__((unused)) static double inf = 1e10; 
+//__attribute__((unused)) static double inf = 1e10;
 double pminx=0;
 double pminy=0;
 double pminz=0;
@@ -348,7 +348,7 @@
  			//if(!b) continue;
  			const Body::id_t id = V_it->info().id();
  			Real sphereVol = 4.188790 * std::pow ( ( V_it->point().weight() ),1.5 );// 4/3*PI*R³ = 4.188...*R³
- 			vol[id]=V_it->info().v();			
+ 			vol[id]=V_it->info().v();
  			poro[id]=(V_it->info().v() - sphereVol)/V_it->info().v();
 			if (deformation) MATRIX3R_TO_NUMPY(mma.analyser->ParticleDeformation[id],def[id]);
  			//cerr << V_it->info().v()<<" "<<ParticleDeformation[id]<<endl;
@@ -356,6 +356,6 @@
  		python::dict ret;
  		ret["vol"]=vol;
  		ret["poro"]=poro;
- 		if (deformation) ret["def"]=def;		
+ 		if (deformation) ret["def"]=def;
  		return ret;
 }