yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #11402
[Branch ~yade-pkg/yade/git-trunk] Rev 3397: -fix noCache.
------------------------------------------------------------
revno: 3397
committer: Chao Yuan <chaoyuan2012@xxxxxxxxx>
timestamp: Thu 2014-01-30 13:46:41 +0100
message:
-fix noCache.
modified:
lib/triangulation/Network.ipp
pkg/dem/UnsaturatedEngine.cpp
pkg/dem/UnsaturatedEngine.hpp
--
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 'lib/triangulation/Network.ipp'
--- lib/triangulation/Network.ipp 2014-01-29 18:04:39 +0000
+++ lib/triangulation/Network.ipp 2014-01-30 12:46:41 +0000
@@ -573,7 +573,7 @@
template<class Tesselation>
void Network<Tesselation>::Line_Solid_Pore(Cell_handle cell, int j)
{
- Line_Solid_Pore(cell, j, false, true);
+ Line_Solid_Pore(cell, j, false, false);//FIXME:SLIP_ON_LATERALS, reuseFacetData ?? (Chao)
}
template<class Tesselation>
void Network<Tesselation>::Line_Solid_Pore(Cell_handle cell, int j, bool SLIP_ON_LATERALS, bool reuseFacetData)
@@ -635,11 +635,11 @@
double d13 = (SV1->point())[bi1.coordinate] - (SV3->point())[bi1.coordinate];
double d23 = (SV2->point())[bi2.coordinate] - (SV3->point())[bi2.coordinate];
if (bi1.flowCondition && ! SLIP_ON_LATERALS) {
- cell->info().solidLine[j][facetF1]= abs(d23);
+ cell->info().solidLine[j][facetF1]= abs(d23); cerr<<"AA "<<cell->info().solidLine[j][facetF1]<<endl;//FIXME:error here
} else cell->info().solidLine[j][facetF1]=0;
if (bi2.flowCondition && ! SLIP_ON_LATERALS) {
- cell->info().solidLine[j][facetF2]= abs(d13);
+ cell->info().solidLine[j][facetF2]= abs(d13); cerr<<"BB "<<cell->info().solidLine[j][facetF2]<<endl;//FIXME:error here
} else cell->info().solidLine[j][facetF2]=0;
}; break;
}
=== modified file 'pkg/dem/UnsaturatedEngine.cpp'
--- pkg/dem/UnsaturatedEngine.cpp 2014-01-29 17:06:48 +0000
+++ pkg/dem/UnsaturatedEngine.cpp 2014-01-30 12:46:41 +0000
@@ -51,7 +51,7 @@
updateVolumeCapillaryCell(solver);//save capillary volume of all cells, for calculating saturation
computeSolidLine(solver);//save cell->info().solidLine[j][y]
}
- solver->noCache = true;
+ solver->noCache = false;
}
void UnsaturatedEngine::action()
@@ -1220,7 +1220,9 @@
CGT::Vecteur nullVect(0,0,0);
//reset forces
if (!onlyCache) for (Finite_vertices_iterator v = Tri.finite_vertices_begin(); v != Tri.finite_vertices_end(); ++v) v->info().forces=nullVect;
-
+
+ solver->noCache=true;//FIXME:turn true ??(Chao)
+
#ifdef parallel_forces
if (solver->noCache) {
solver->perVertexUnitForce.clear(); solver->perVertexPressure.clear();
@@ -1279,7 +1281,7 @@
}
solver->noCache=false;//cache should always be defined after execution of this function
if (onlyCache) return;
- } else {//use cached values
+ } else {//use cached values //FIXME:Never run, currently.(chao)
#ifndef parallel_forces
for (Finite_cells_iterator cell = Tri.finite_cells_begin(); cell != cell_end; cell++) {
for (int yy=0;yy<4;yy++) cell->vertex(yy)->info().forces = cell->vertex(yy)->info().forces + cell->info().unitForceVectors[yy]*cell->info().p();}
=== modified file 'pkg/dem/UnsaturatedEngine.hpp'
--- pkg/dem/UnsaturatedEngine.hpp 2014-01-29 17:06:48 +0000
+++ pkg/dem/UnsaturatedEngine.hpp 2014-01-30 12:46:41 +0000
@@ -95,7 +95,8 @@
TPL Vector3r fluidForce(unsigned int id_sph, Solver& flow) {
const CGT::Vecteur& f=flow->T[flow->currentTes].vertex(id_sph)->info().forces; return Vector3r(f[0],f[1],f[2]);}
-
+ TPL bool testNoCache(Solver&flow){bool testnoCache=flow->noCache; return testnoCache;}//clean later
+
template<class Cellhandle >
double getRadiusMin(Cellhandle cell, int j);
template<class Cellhandle>
@@ -154,7 +155,8 @@
void _vertxID(){vertxID(solver);}
void _testSolidLine(){testSolidLine(solver);}
Vector3r _fluidForce(unsigned int id_sph) {return fluidForce(id_sph,solver);}
-
+ bool _testNoCache() {return testNoCache(solver);}
+
virtual ~UnsaturatedEngine();
virtual void action();
@@ -226,7 +228,8 @@
.def("computeForce",&UnsaturatedEngine::_computeFacetPoreForcesWithCache,"Test computeFacetPoreForcesWithCache(). ")
.def("vertxID",&UnsaturatedEngine::_vertxID,"cout vertxID. ")
.def("testSolidLine",&UnsaturatedEngine::_testSolidLine,"For checking solidLine.")
- .def("fluidForce",&UnsaturatedEngine::_fluidForce,(python::arg("Id_sph")),"Return the fluid force on sphere Id_sph.")
+ .def("fluidForce",&UnsaturatedEngine::_fluidForce,(python::arg("Id_sph")),"Return the fluid force on sphere Id_sph.")
+ .def("testNoCache",&UnsaturatedEngine::_testNoCache, "test noCache.")
)
DECLARE_LOGGER;
};