Logo Search packages:      
Sourcecode: yade version File versions  Download package

Public Member Functions | Public Attributes

TesselationWrapper Class Reference

Handle the triangulation of spheres in a scene, build tesselation on request, and give access to computed quantities : currently volume and porosity of each Voronoï sphere. More accessors in course of implementation. Feel free to suggest new ones. More...

#include <TesselationWrapper.hpp>

Inheritance diagram for TesselationWrapper:
Inheritance graph
[legend]
Collaboration diagram for TesselationWrapper:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void action ()
void AddBoundingPlanes (void)
 Add axis aligned bounding planes (modelised as spheres with (almost) infinite radius)
void AddBoundingPlanes (double pminx, double pmaxx, double pminy, double pmaxy, double pminz, double pmaxz, double dt)
 Force boudaries at positions not equal to precomputed ones.
virtual void callPostLoad (void)
void checkMinMax (double x, double y, double z, double rad)
virtual void checkPyClassRegistersItself (const std::string &thisClassName) const
void clear (void)
 Reset the triangulation.
void clear2 (void)
void ComputeTesselation (void)
 Compute voronoi centers then stop (don't compute anything else)
void ComputeTesselation (double pminx, double pmaxx, double pminy, double pmaxy, double pminz, double pmaxz, double dt)
void ComputeVolumes (void)
virtual string getBaseClassName (unsigned int i=0) const
virtual int getBaseClassNumber ()
boost::python::dict getVolPoroDef (bool deformation)
 return python array containing voronoi volumes, per-particle porosity, and optionaly per-particle deformation, if states 0 and 1 have been assigned
void InitIter (void)
 set first and last facets, set facet_it = facet_begin
bool insert (double x, double y, double z, double rad, unsigned int id)
 Insert a sphere, "id" will be used by some getters to retrieve spheres.
void insertSceneSpheres ()
 A faster version of insert, inserting all spheres in scene.
virtual bool isActivated ()
bool move (double x, double y, double z, double rad, unsigned int id)
 Move one sphere to the new position (x,y,z) and maintain triangulation (invalidates the tesselation)
bool nextFacet (std::pair< unsigned int, unsigned int > &facet)
 set facet = next pair (body1->id,body2->id), returns facet_it==facet_end
unsigned int NumberOfFacets (bool initIters=false)
 number of facets in the tesselation (finite branches of the triangulation)
bool operator!= (const Serializable &other)
bool operator== (const Serializable &other)
virtual boost::python::dict pyDict () const
virtual void pyHandleCustomCtorArgs (boost::python::tuple &args, boost::python::dict &kw)
virtual void pyRegisterClass (boost::python::object _scope)
virtual void pySetAttr (const std::string &key, const boost::python::object &value)
std::string pyStr ()
 string representation of this object
void pyUpdateAttrs (const boost::python::dict &d)
 REGISTER_BASE_CLASS_NAME (Factorable)
 REGISTER_CLASS_NAME (Serializable)
 REGISTER_CLASS_NAME (Factorable)
void RemoveBoundingPlanes (void)
template<class ArchiveT >
void serialize (ArchiveT &ar, unsigned int version)
void setState (bool state=0)
 make the current state the initial (0) or final (1) configuration for the definition of displacement increments, use only state=0 if you just want to get only volmumes and porosity
double Volume (unsigned int id)
 Get volume of the sphere inserted with indentifier "id"".
 YADE_CLASS_BASE_DOC (GlobalEngine, Engine,"Engine that will generally affect the whole simulation (contrary to PartialEngine).")
 YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY (TesselationWrapper, GlobalEngine,"Handle the triangulation of spheres in a scene, build tesselation on request, and give access to computed quantities : currently volume and porosity of each Voronoï sphere. Example script :\n tt=TriaxialTest()\ntt.generate('test.xml')\nO.load('test.xml')\nO.run(100) //for unknown reasons, this procedure crashes at iteration 0\nTW=TesselationWrapper()\nTW.triangulate() //compute regular Delaunay triangulation, don't construct tesselation\nTW.computeVolumes() //will silently tesselate the packing\nTW.volume(10) //get volume associated to sphere of id 10",((unsigned int, n_spheres, 0,,"|ycomp|")), Tes=new CGT::Tesselation;clear();facet_begin=Tes->Triangulation().finite_edges_begin();facet_end=Tes->Triangulation().finite_edges_end();facet_it=Tes->Triangulation().finite_edges_begin();inf=1e10;,.def("triangulate",&TesselationWrapper::insertSceneSpheres,"triangulate spheres of the packing").def("setState",&TesselationWrapper::setState,(python::arg("state")=0),"Make the current state the initial (0) or final (1) configuration for the definition of displacement increments, use only state=0 if you just want to get only volmumes and porosity.").def("volume",&TesselationWrapper::Volume,(python::arg("id")=0),"Returns the volume of Voronoi's cell of a sphere.").def("computeVolumes",&TesselationWrapper::ComputeVolumes,"Compute volumes of all Voronoi's cells.").def("getVolPoroDef",&TesselationWrapper::getVolPoroDef,(python::arg("deformation")=false),"Return a table with per-sphere computed quantities. Include deformations on the increment defined by states 0 and 1 if deformation=True (make sure to define states 0 and 1 consistently)."))

Public Attributes

bool bounded
 DECLARE_LOGGER
CGT::Finite_edges_iterator facet_begin
 edge iterators are used for returning tesselation "facets", i.e. spheres with a common branch in the triangulation, convert CGAL::edge to int pair (b1->id, b2->id)
CGT::Finite_edges_iterator facet_end
CGT::Finite_edges_iterator facet_it
double inf
double mean_radius
MicroMacroAnalyser mma
CGT::Point Pmax
CGT::Point Pmin
bool rad_divided
Scenescene
CGT::TesselationTes
shared_ptr< TimingDeltastimingDeltas
 precise profiling information (timing of fragments of the engine)
TimingInfo timingInfo
 high-level profiling information; not serializable

Detailed Description

Handle the triangulation of spheres in a scene, build tesselation on request, and give access to computed quantities : currently volume and porosity of each Voronoï sphere. More accessors in course of implementation. Feel free to suggest new ones.

Example usage script :

tt=TriaxialTest() tt.generate("test.xml") O.load("test.xml") O.run(100) //for unknown reasons, this procedure crashes at iteration 0 TW=TesselationWrapper() TW.triangulate() //compute regular Delaunay triangulation, don't construct tesselation TW.computeVolumes() //will silently tesselate the packing TW.volume(10) //get volume associated to sphere of id 10

Definition at line 37 of file TesselationWrapper.hpp.


The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index