yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #11140
[Branch ~yade-pkg/yade/git-trunk] Rev 4118: Fix most of compilation warnings.
------------------------------------------------------------
revno: 4118
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Fri 2014-07-25 18:12:46 +0200
message:
Fix most of compilation warnings.
modified:
pkg/common/Grid.cpp
pkg/dem/BubbleMat.cpp
pkg/dem/HertzMindlin.cpp
pkg/dem/L3Geom.cpp
pkg/dem/Shop_02.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 'pkg/common/Grid.cpp'
--- pkg/common/Grid.cpp 2014-07-18 18:18:50 +0000
+++ pkg/common/Grid.cpp 2014-07-25 16:12:46 +0000
@@ -242,7 +242,7 @@
const shared_ptr<Interaction> intr = scene->interactions->find(c->id1,gridNo1->ConnList[i]->getId());
if(intr && intr->isReal()){
shared_ptr<ScGridCoGeom> intrGeom=YADE_PTR_CAST<ScGridCoGeom>(intr->geom);
- if(!intrGeom->isDuplicate==1){ //skip contact.
+ if(!(intrGeom->isDuplicate==1)){ //skip contact.
if (isNew) {return false;}
else {scm->isDuplicate=1;}/*cout<<"Declare "<<c->id1<<"-"<<c->id2<<" as duplicated."<<endl;*/
}
@@ -277,7 +277,7 @@
const shared_ptr<Interaction> intr = scene->interactions->find(c->id1,gridNo2->ConnList[i]->getId());
if(intr && intr->isReal()){
shared_ptr<ScGridCoGeom> intrGeom=YADE_PTR_CAST<ScGridCoGeom>(intr->geom);
- if(!intrGeom->isDuplicate==1){
+ if(!(intrGeom->isDuplicate==1)){
if (isNew) return false;
else scm->isDuplicate=1;/*cout<<"Declare "<<c->id1<<"-"<<c->id2<<" as duplicated."<<endl;*/
}
@@ -446,6 +446,7 @@
scene->forces.addTorque(geom->id3,(1-geom->relPos)*twist);
scene->forces.addForce(geom->id4,(-geom->relPos)*force);
scene->forces.addTorque(geom->id4,geom->relPos*twist);
+ return true;
}
YADE_PLUGIN((Law2_ScGridCoGeom_FrictPhys_CundallStrack));
@@ -511,6 +512,7 @@
scene->forces.addTorque(geom->id3,(1-geom->relPos)*twist);
scene->forces.addForce(geom->id4,(-geom->relPos)*force);
scene->forces.addTorque(geom->id4,geom->relPos*twist);
+ return true;
}
}
YADE_PLUGIN((Law2_ScGridCoGeom_CohFrictPhys_CundallStrack));
=== modified file 'pkg/dem/BubbleMat.cpp'
--- pkg/dem/BubbleMat.cpp 2014-07-18 18:18:50 +0000
+++ pkg/dem/BubbleMat.cpp 2014-07-25 16:12:46 +0000
@@ -75,4 +75,5 @@
scene->forces.addTorque(id1,(geom->radius1-0.5*geom->penetrationDepth)* geom->normal.cross(normalForce));
scene->forces.addTorque(id2,(geom->radius2-0.5*geom->penetrationDepth)* geom->normal.cross(normalForce));
}
+ return true;
}
=== modified file 'pkg/dem/HertzMindlin.cpp'
--- pkg/dem/HertzMindlin.cpp 2014-07-18 18:18:50 +0000
+++ pkg/dem/HertzMindlin.cpp 2014-07-25 16:12:46 +0000
@@ -186,6 +186,7 @@
scene->forces.addForce(id2,-f);
scene->forces.addTorque(id1,(geom->radius1-.5*geom->penetrationDepth)*geom->normal.cross(f));
scene->forces.addTorque(id2,(geom->radius2-.5*geom->penetrationDepth)*geom->normal.cross(f));
+ return true;
}
bool Law2_ScGeom_MindlinPhys_HertzWithLinearShear::go(shared_ptr<IGeom>& ig, shared_ptr<IPhys>& ip, Interaction* contact){
=== modified file 'pkg/dem/L3Geom.cpp'
--- pkg/dem/L3Geom.cpp 2014-07-18 18:18:50 +0000
+++ pkg/dem/L3Geom.cpp 2014-07-25 16:12:46 +0000
@@ -129,7 +129,7 @@
Vector3r normTwistVec=avgNormal*scene->dt*.5*avgNormal.dot(state1.angVel+state2.angVel);
// compute relative velocity
// noRatch: take radius or current distance as the branch vector; see discussion in ScGeom::precompute (avoidGranularRatcheting)
- Vector3r c1x=((noRatch && !r1>0) ? ( r1*normal).eval() : (contPt-state1.pos).eval()); // used only for sphere-sphere
+ Vector3r c1x=((noRatch && !(r1>0)) ? ( r1*normal).eval() : (contPt-state1.pos).eval()); // used only for sphere-sphere
Vector3r c2x=(noRatch ? (-r2*normal).eval() : (contPt-state2.pos+shift2).eval());
//Vector3r state2velCorrected=state2.vel+(scene->isPeriodic?scene->cell->intrShiftVel(I->cellDist):Vector3r::Zero()); // velocity of the second particle, corrected with meanfield velocity if necessary
//cerr<<"correction "<<(scene->isPeriodic?scene->cell->intrShiftVel(I->cellDist):Vector3r::Zero())<<endl;
@@ -320,6 +320,7 @@
Vector3r localT=charLen*(geom.relPhi().cwiseProduct(Vector3r(phys.kn,phys.ks,phys.ks)));
geom.applyLocalForceTorque(localF,localT,I,scene,static_cast<NormShearPhys*>(ip.get()));
+ return true;
}
#ifdef YADE_OPENGL
=== modified file 'pkg/dem/Shop_02.cpp'
--- pkg/dem/Shop_02.cpp 2014-07-19 19:52:41 +0000
+++ pkg/dem/Shop_02.cpp 2014-07-25 16:12:46 +0000
@@ -334,7 +334,7 @@
// *** Compute total fabric tensor from the two tensors above ***/
Matrix3r fabricTot(Matrix3r::Zero());
int q(0);
- if(!count==0){ // compute only if there are some interactions
+ if(!count){ // compute only if there are some interactions
q=nStrong*1./count;
fabricTot=(1-q)*fabricWeak+q*fabricStrong;
}