~ubuntu-branches/debian/sid/yade/sid

« back to all changes in this revision

Viewing changes to pkg/dem/FlowEngine.hpp

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2014-01-13 20:13:14 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20140113201314-4x3stisjce4t0pdx
Tags: 1.07.0-1
* [d42c7de] Imported Upstream version 1.07.0
* [a421b10] Remove patch, applied by upstream.
* [d151f88] Set Standards-Version: 3.9.5. No changes.
* [a9616c6] Add upstream file.
* [c078bb4] Inject additional parameters for weak archs. 
            Thanks to Roland Stigge <stigge@antcom.de>. (Closes: #733152)
* [21a2430] Fix version definition for IPython>1.0.0.
* [8204093] Remove google-scripts from documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
                void pressureProfile(double wallUpY, double wallDownY) {return solver->measurePressureProfile(wallUpY,wallDownY);}
147
147
                double getPorePressure(Vector3r pos){return solver->getPorePressure(pos[0], pos[1], pos[2]);}
148
148
                TPL int getCell(double posX, double posY, double posZ, Solver& flow){return flow->getCell(posX, posY, posZ);}
 
149
                TPL unsigned int nCells(Solver& flow){return flow->T[flow->currentTes].cellHandles.size();}
 
150
                TPL python::list getVertices(unsigned int id, Solver& flow){
 
151
                        python::list ids;
 
152
                        if (id>=flow->T[flow->currentTes].cellHandles.size()) {LOG_ERROR("id out of range, max value is "<<flow->T[flow->currentTes].cellHandles.size()); return ids;}                  
 
153
                        for (unsigned int i=0;i<4;i++) ids.append(flow->T[flow->currentTes].cellHandles[id]->vertex(i)->info().id());
 
154
                        return ids;
 
155
                }
149
156
                double averageSlicePressure(double posY){return solver->averageSlicePressure(posY);}
150
157
                double averagePressure(){return solver->averagePressure();}
151
158
                #ifdef LINSOLV
181
188
                Real            _getCellFlux(unsigned int cond) {return getCellFlux(cond,solver);}
182
189
                Real            _getBoundaryFlux(unsigned int boundary) {return getBoundaryFlux(boundary,solver);}
183
190
                int             _getCell(Vector3r pos) {return getCell(pos[0],pos[1],pos[2],solver);}
 
191
                unsigned int    _nCells() {return nCells(solver);}
 
192
                python::list    _getVertices(unsigned int id) {return getVertices(id,solver);}
184
193
                #ifdef LINSOLV
185
194
                void            _exportMatrix(string filename) {exportMatrix(filename,solver);}
186
195
                void            _exportTriplets(string filename) {exportTriplets(filename,solver);}
267
276
                                        normal[wall_ymax].y()=normal[wall_xmax].x()=normal[wall_zmax].z()=-1;
268
277
                                        solver = shared_ptr<FlowSolver> (new FlowSolver);
269
278
                                        first=true;
270
 
                                        updateTriangulation=false;
271
279
                                        eps_vol_max=Eps_Vol_Cumulative=retriangulationLastIter=0;
272
280
                                        ReTrg=1;
273
281
                                        backgroundCompleted=true;
304
312
                                        .def("updateBCs",&FlowEngine::_updateBCs,"tells the engine to update it's boundary conditions before running (especially useful when changing boundary pressure - should not be needed for point-wise imposed pressure)")
305
313
                                        .def("emulateAction",&FlowEngine::emulateAction,"get scene and run action (may be used to manipulate an engine outside the timestepping loop).")
306
314
                                        .def("getCell",&FlowEngine::_getCell,(python::arg("pos")),"get id of the cell containing (X,Y,Z).")
 
315
                                        .def("nCells",&FlowEngine::_nCells,"get the total number of finite cells in the triangulation.")
 
316
                                        .def("getVertices",&FlowEngine::_getVertices,(python::arg("id")),"get the vertices of a cell")
307
317
                                        #ifdef LINSOLV
308
318
                                        .def("exportMatrix",&FlowEngine::_exportMatrix,(python::arg("filename")="matrix"),"Export system matrix to a file with all entries (even zeros will displayed).")
309
319
                                        .def("exportTriplets",&FlowEngine::_exportTriplets,(python::arg("filename")="triplets"),"Export system matrix to a file with only non-zero entries.")
426
436
                        wallIds=vector<int>(6,-1);
427
437
//                      wallTopId=wallBottomId=wallFrontId=wallBackId=wallLeftId=wallRightId=-1;
428
438
                        solver = shared_ptr<FlowSolver> (new FlowSolver);
429
 
                        updateTriangulation=false;
430
439
                        eps_vol_max=Eps_Vol_Cumulative=retriangulationLastIter=0;
431
440
                        ReTrg=1;
432
441
                        first=true;