yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #07550
[Branch ~yade-dev/yade/trunk] Rev 2841: - Fix retriangulation issue
------------------------------------------------------------
revno: 2841
committer: Emanuele Catalano <catalano@xxxxxxxxxxx
branch nick: yade
timestamp: Wed 2011-04-27 17:15:04 +0200
message:
- Fix retriangulation issue
- Fixed two warnings in FlowEngine
modified:
lib/triangulation/FlowBoundingSphere.cpp
pkg/dem/FlowEngine.cpp
pkg/dem/FlowEngine.hpp
--
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/FlowBoundingSphere.cpp'
--- lib/triangulation/FlowBoundingSphere.cpp 2011-04-22 09:09:28 +0000
+++ lib/triangulation/FlowBoundingSphere.cpp 2011-04-27 15:15:04 +0000
@@ -784,7 +784,7 @@
cout << "WARNING! if !areaR2Permeability, facetFluidSurfacesRatio will not be defined correctly. Don't use that."<<endl;
k = (M_PI * pow(radius,4)) / (8*viscosity*distance);}
- if (k<0) {surfneg+=1;
+ if (k<0 && DEBUG_OUT) {surfneg+=1;
cout<<"__ k<0 __"<<k<<" "<<" fluidArea "<<fluidArea<<" area "<<area<<" "<<crossSections[0]<<" "<<crossSections[1]<<" "<<crossSections[2] <<" "<<W[0]->info().id()<<" "<<W[1]->info().id()<<" "<<W[2]->info().id()<<" "<<p1<<" "<<p2<<" test "<<test<<endl;}
} else {cout <<"infinite K!"<<endl; k = infiniteK;}//Will be corrected in the next loop
@@ -798,7 +798,7 @@
}
cell->info().isvisited = !ref;
}
-// cout<<"surfneg est "<<surfneg<<endl;
+ if (DEBUG_OUT) cout<<"surfneg est "<<surfneg<<endl;
meanK /= pass;
meanRadius /= pass;
meanDistance /= pass;
=== modified file 'pkg/dem/FlowEngine.cpp'
--- pkg/dem/FlowEngine.cpp 2011-04-22 09:09:28 +0000
+++ pkg/dem/FlowEngine.cpp 2011-04-27 15:15:04 +0000
@@ -60,9 +60,9 @@
if (first) Build_Triangulation(P_zero);
timingDeltas->checkpoint("Triangulating");
+ UpdateVolumes ( );
if (!first) {
eps_vol_max=0.f;
- UpdateVolumes ( );
Eps_Vol_Cumulative += eps_vol_max;
if ((Eps_Vol_Cumulative > EpsVolPercent_RTRG || retriangulationLastIter>10000) && retriangulationLastIter>10) {
Update_Triangulation = true;
@@ -177,7 +177,7 @@
void FlowEngine::clearImposedPressure() { flow->imposedP.clear();}
Real FlowEngine::getFlux(int cond) {
- if (cond>=flow->imposedP.size()) LOG_ERROR("Getting flux with cond higher than imposedP size.");
+ if (cond>=(int)flow->imposedP.size()) LOG_ERROR("Getting flux with cond higher than imposedP size.");
CGT::RTriangulation& Tri = flow->T[flow->currentTes].Triangulation();
double flux=0;
CGT::Cell_handle cell= Tri.locate(flow->imposedP[cond].first);
@@ -252,7 +252,6 @@
flow->Initialize_pressures(P_zero);// FIXME : why, if we are going to interpolate after that?
flow->Interpolate (flow->T[!flow->currentTes], flow->T[flow->currentTes]);
if (WaveAction) flow->ApplySinusoidalPressure(flow->T[flow->currentTes].Triangulation(), Sinus_Amplitude, Sinus_Average, 30);
-
}
Initialize_volumes();
}
=== modified file 'pkg/dem/FlowEngine.hpp'
--- pkg/dem/FlowEngine.hpp 2011-04-22 09:09:28 +0000
+++ pkg/dem/FlowEngine.hpp 2011-04-27 15:15:04 +0000
@@ -56,7 +56,7 @@
void Average_real_cell_velocity();
Real getFlux(int cond);
void saveVtk() {flow->save_vtk_file();}
- vector<Real> AvFlVelOnSph(int id_sph) {flow->Average_Fluid_Velocity_On_Sphere(id_sph);}
+ vector<Real> AvFlVelOnSph(int id_sph) {return flow->Average_Fluid_Velocity_On_Sphere(id_sph);}
python::list getConstrictions() {
vector<Real> csd=flow->getConstrictions(); python::list pycsd;
for (unsigned int k=0;k<csd.size();k++) pycsd.append(csd[k]); return pycsd;}