yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #07188
[Branch ~yade-dev/yade/trunk] Rev 2766: - remove save_vtk flag and add python wrapping
------------------------------------------------------------
revno: 2766
committer: Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx>
branch nick: yade
timestamp: Fri 2011-02-25 21:42:33 +0100
message:
- remove save_vtk flag and add python wrapping
modified:
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 'pkg/dem/FlowEngine.cpp'
--- pkg/dem/FlowEngine.cpp 2011-02-25 19:07:36 +0000
+++ pkg/dem/FlowEngine.cpp 2011-02-25 20:42:33 +0000
@@ -19,8 +19,6 @@
#include <sys/stat.h>
#include <sys/types.h>
-int dd=0;
-
CREATE_LOGGER (FlowEngine);
FlowEngine::~FlowEngine()
@@ -122,7 +120,7 @@
char *f = "slifile";
flow->SliceField(f);
}
- if (save_vtk &&dd++>50) {flow->save_vtk_file(); dd=0;}
+ if (save_vtk) {flow->save_vtk_file();}
}
// if ( scene->iter % PermuteInterval == 0 )
// { Update_Triangulation = true; }
=== modified file 'pkg/dem/FlowEngine.hpp'
--- pkg/dem/FlowEngine.hpp 2011-02-25 19:07:36 +0000
+++ pkg/dem/FlowEngine.hpp 2011-02-25 20:42:33 +0000
@@ -51,6 +51,7 @@
void imposePressure(Vector3r pos, Real p);
void clearImposedPressure();
Real getFlux(int cond);
+ void saveVtk() {flow->save_vtk_file();}
virtual ~FlowEngine();
@@ -120,6 +121,7 @@
.def("imposePressure",&FlowEngine::imposePressure,(python::arg("pos"),python::arg("p")),"Impose pressure in cell of location 'pos'.")
.def("clearImposedPressure",&FlowEngine::clearImposedPressure,"Clear the list of points with pressure imposed.")
.def("getFlux",&FlowEngine::getFlux,(python::arg("cond")),"Get influx in cell associated to an imposed P (indexed using 'cond').")
+ .def("saveVtk",&FlowEngine::saveVtk,"Save pressure field in vtk format.")
)
DECLARE_LOGGER;
};