← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3634: Fix some warnings during compilation.

 

------------------------------------------------------------
revno: 3634
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Fri 2015-04-24 08:07:03 +0200
message:
  Fix some warnings during compilation.
modified:
  gui/qt4/GLViewerDisplay.cpp
  pkg/common/ForceEngine.cpp
  pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp
  pkg/dem/Polyhedra_Ig2.cpp
  pkg/dem/Polyhedra_splitter.cpp
  pkg/dem/Shop_02.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 'gui/qt4/GLViewerDisplay.cpp'
--- gui/qt4/GLViewerDisplay.cpp	2014-10-15 06:44:01 +0000
+++ gui/qt4/GLViewerDisplay.cpp	2015-04-24 06:07:03 +0000
@@ -30,8 +30,6 @@
 	#include<gl2ps.h>
 #endif
 
-static int last(-1);
-
 void GLViewer::useDisplayParameters(size_t n){
 	LOG_DEBUG("Loading display parameters from #"<<n);
 	vector<shared_ptr<DisplayParameters> >& dispParams=Omega::instance().getScene()->dispParams;

=== modified file 'pkg/common/ForceEngine.cpp'
--- pkg/common/ForceEngine.cpp	2015-02-06 18:27:58 +0000
+++ pkg/common/ForceEngine.cpp	2015-04-24 06:07:03 +0000
@@ -167,7 +167,6 @@
 
 void HydroForceEngine::averageProfile(){
 	//Initialization
-	int Np;
 	int minZ;
 	int maxZ;
 	int numLayer;

=== modified file 'pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp'
--- pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp	2015-03-17 19:59:57 +0000
+++ pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp	2015-04-24 06:07:03 +0000
@@ -87,8 +87,6 @@
 			
 			unsigned int id1 = interaction->getId1();
 			unsigned int id2 = interaction->getId2();
-			Body* b1 = (*bodies)[id1].get();
-			Body* b2 = (*bodies)[id2].get();
 
 			/// interaction geometry search (this test is to compute capillarity only between spheres (probably a better way to do that)
 			int geometryIndex1 = (*bodies)[id1]->shape->getClassIndex(); // !!!

=== modified file 'pkg/dem/Polyhedra_Ig2.cpp'
--- pkg/dem/Polyhedra_Ig2.cpp	2014-10-28 12:00:01 +0000
+++ pkg/dem/Polyhedra_Ig2.cpp	2015-04-24 06:07:03 +0000
@@ -293,7 +293,7 @@
 	const std::vector<int> faceTri = B->GetSurfaceTriangulation();
 	// get vertices in global coordinate system
 	std::vector<Vector3r> pts(B->v);
-	for (int i=0; i<pts.size(); i++) pts[i] = se32.position + se32.orientation*pts[i];
+	for (unsigned int i=0; i<pts.size(); i++) pts[i] = se32.position + se32.orientation*pts[i];
 
 	//******************************************************************************
 	// find the closest point of polyhedron to the sphere center, see following paper for notation
@@ -305,17 +305,18 @@
 	Real dst2min = DBL_MAX; // minimal squared distance (large number initially)
 	// auxiliary value
 	Vector3r p1,p2,p3,e1,e2,e3,e,n,p0a,p10,p20,p30,v1,v2,v3,pa,pb,r,p0aa,pp,ppp;
-	Real dst,f1,f2,f3,t,e1n,e2n,e3n,en,p10n,p20n,p30n,o1,o2,o3,dst2,edst2,edst2min;
-	PointTriangleRelation rel=none,relTemp,relTemp2;
-	for (int i=0; i<faceTri.size()/3; i++) { // iterate over all triangles...
+  pp = Vector3r::Zero();
+	Real dst,t,en,o1,o2,o3,dst2,edst2,edst2min;
+	PointTriangleRelation rel=none,relTemp=none,relTemp2;
+	for (unsigned int i=0; i<faceTri.size()/3; i++) { // iterate over all triangles...
 		// triangle vertices
 		p1 = pts[faceTri[3*i+0]];
 		p2 = pts[faceTri[3*i+1]];
 		p3 = pts[faceTri[3*i+2]];
 		// triangle edges vectors
-		e1 = p2-p1; e1n = e1.norm();
-		e2 = p3-p2; e2n = e2.norm();
-		e3 = p1-p3; e3n = e3.norm();
+		e1 = p2-p1;
+		e2 = p3-p2;
+		e3 = p1-p3;
 		n = (e1.cross(-e3)).normalized(); // tirangle outer normal
 		dst = (p0-p1).dot(n); // oriented distance of p0 to triangle plane
 		if (dst>0) isInside = false; // p0 lies in positive halfspace of triangle, cannot be inside

=== modified file 'pkg/dem/Polyhedra_splitter.cpp'
--- pkg/dem/Polyhedra_splitter.cpp	2014-10-15 06:44:01 +0000
+++ pkg/dem/Polyhedra_splitter.cpp	2015-04-24 06:07:03 +0000
@@ -102,8 +102,8 @@
 			if (I_valu(max_i,max_i) < I_valu(2,2)) max_i = 2;
 			
 			//division of stress by volume
-			double comp_stress = I_valu(min_i,min_i)/p->GetVolume();
-			double tens_stress = I_valu(max_i,max_i)/p->GetVolume();			
+			// double comp_stress = I_valu(min_i,min_i)/p->GetVolume();
+			// double tens_stress = I_valu(max_i,max_i)/p->GetVolume();			
 			Vector3r dirC = I_vect.col(max_i);
 			Vector3r dirT = I_vect.col(min_i);
 			Vector3r dir1  = dirC.normalized() + dirT.normalized();	

=== modified file 'pkg/dem/Shop_02.cpp'
--- pkg/dem/Shop_02.cpp	2015-03-03 19:06:49 +0000
+++ pkg/dem/Shop_02.cpp	2015-04-24 06:07:03 +0000
@@ -375,10 +375,10 @@
 
 
 vector<Matrix3r> Shop::getStressProfile(Real volume, int nCell, Real dz, Real zRef, vector<Real> vPartAverageX, vector<Real> vPartAverageY, vector<Real> vPartAverageZ){
-	int minZ;
-	int maxZ;
-	Real minPosZ;
-	Real maxPosZ;
+	int minZ=0;
+	int maxZ=0;
+	Real minPosZ=0.;
+	Real maxPosZ=0.;
 	Scene* scene=Omega::instance().getScene().get();
 	vector<Matrix3r> stressTensorProfile(nCell,Matrix3r::Zero());
 	const bool isPeriodic = scene->isPeriodic;

=== modified file 'pkg/lbm/HydrodynamicsLawLBM.cpp'
--- pkg/lbm/HydrodynamicsLawLBM.cpp	2014-10-15 06:44:01 +0000
+++ pkg/lbm/HydrodynamicsLawLBM.cpp	2015-04-24 06:07:03 +0000
@@ -618,7 +618,7 @@
         /*------------------------------------------------------------------*/
         /*                  GENERAL REINITIALIZATION                        */
         /*------------------------------------------------------------------*/
-        Vector3r WallBottomVel=Vector3r::Zero();//m s-1
+        // Vector3r WallBottomVel=Vector3r::Zero();//m s-1
         FmoyCur=0.;
         VmeanFluidC=0.; VmaxC=-1000000.;    VminC=1000000.;
         RhomaxC=-1000000.;  RhominC=1000000.;RhoTot=0.;