yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #11413
[Branch ~yade-pkg/yade/git-trunk] Rev 3409: borrow saveVTK from FlowEngine
------------------------------------------------------------
revno: 3409
committer: Chao Yuan <chaoyuan2012@xxxxxxxxx>
timestamp: Fri 2014-02-28 16:52:38 +0100
message:
borrow saveVTK from FlowEngine
modified:
lib/triangulation/FlowBoundingSphere.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/FlowBoundingSphere.ipp'
--- lib/triangulation/FlowBoundingSphere.ipp 2014-02-17 18:00:12 +0000
+++ lib/triangulation/FlowBoundingSphere.ipp 2014-02-28 15:52:38 +0000
@@ -487,6 +487,7 @@
void FlowBoundingSphere<Tesselation>::ComputeFacetForcesWithCache(bool onlyCache)
{
RTriangulation& Tri = T[currentTes].Triangulation();
+ Finite_cells_iterator cell_end = Tri.finite_cells_end();
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;
=== modified file 'pkg/dem/UnsaturatedEngine.cpp'
--- pkg/dem/UnsaturatedEngine.cpp 2014-02-20 17:11:45 +0000
+++ pkg/dem/UnsaturatedEngine.cpp 2014-02-28 15:52:38 +0000
@@ -56,7 +56,7 @@
}
void UnsaturatedEngine::action()
-{/*
+{
if ( !isActivated ) return;
RTriangulation& tri = solver->T[solver->currentTes].Triangulation();
if ( (tri.number_of_vertices()==0) || (updateTriangulation) ) {
@@ -81,7 +81,7 @@
for ( Finite_vertices_iterator V_it = solver->T[solver->currentTes].Triangulation().finite_vertices_begin(); V_it != vertices_end; V_it++ ) {
force = pressureForce ? Vector3r ( V_it->info().forces[0],V_it->info().forces[1],V_it->info().forces[2] ): Vector3r(0,0,0);
scene->forces.addForce ( V_it->info().id(), force);
- }*/
+ }
}
///invade mode 1. update phase reservoir before invasion. Consider no viscous effects, and invade gradually.
=== modified file 'pkg/dem/UnsaturatedEngine.hpp'
--- pkg/dem/UnsaturatedEngine.hpp 2014-02-20 17:11:45 +0000
+++ pkg/dem/UnsaturatedEngine.hpp 2014-02-28 15:52:38 +0000
@@ -123,7 +123,7 @@
Real computePoreArea(Cellhandle cell, int j);
template<class Cellhandle>
Real computePorePerimeter(Cellhandle cell, int j);
- void saveVtk() {bool initT= solver->noCache; solver->noCache=false; solver->saveVtk(); solver->noCache=initT;}
+ void saveVtk(const char* folder) {bool initT=solver->noCache; solver->noCache=false; solver->saveVtk(folder); solver->noCache=initT;}
python::list getConstrictions() {
vector<Real> csd=solver->getConstrictions(); python::list pycsd;
for (unsigned int k=0;k<csd.size();k++) pycsd.append(csd[k]); return pycsd;}
@@ -199,7 +199,7 @@
.def("setImposedPressure",&UnsaturatedEngine::_setImposedPressure,(python::arg("cond"),python::arg("p")),"Set pressure value at the point indexed 'cond'.")
.def("clearImposedPressure",&UnsaturatedEngine::_clearImposedPressure,"Clear the list of points with pressure imposed.")
.def("getConstrictions",&UnsaturatedEngine::getConstrictions,"Get the list of constrictions (inscribed circle) for all finite facets.")
- .def("saveVtk",&UnsaturatedEngine::saveVtk,"Save pressure field in vtk format.")
+ .def("saveVtk",&UnsaturatedEngine::saveVtk,(python::arg("folder")="./VTK"),"Save pressure field in vtk format. Specify a folder name for output.")
.def("getPorePressure",&UnsaturatedEngine::getPorePressure,(python::arg("pos")),"Measure pore pressure in position pos[0],pos[1],pos[2]")
.def("emulateAction",&UnsaturatedEngine::emulateAction,"get scene and run action (may be used to manipulate engine outside the main loop).")
.def("getCell",&UnsaturatedEngine::_getCell,(python::arg("pos")),"get id of the cell containing (X,Y,Z).")