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

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes

VTKRecorder Class Reference

Inheritance diagram for VTKRecorder:
Inheritance graph
Collaboration diagram for VTKRecorder:
Collaboration graph

List of all members.

Public Types

enum  {

Public Member Functions

virtual void action ()
virtual void callPostLoad (void)
virtual void checkPyClassRegistersItself (const std::string &thisClassName) const
virtual string getBaseClassName (unsigned int i=0) const
virtual int getBaseClassNumber ()
virtual bool isActivated ()
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)
template<class ArchiveT >
void serialize (ArchiveT &ar, unsigned int version)
 YADE_CLASS_BASE_DOC (GlobalEngine, Engine,"Engine that will generally affect the whole simulation (contrary to PartialEngine).")
 YADE_CLASS_BASE_DOC_ATTRS_CTOR (PeriodicEngine, GlobalEngine,"Run Engine::action with given fixed periodicity real time (=wall clock time, computation time), \ virtual time (simulation time), iteration number), by setting any of those criteria \ (virtPeriod, realPeriod, iterPeriod) to a positive value. They are all negative (inactive)\ by default.\n\n\ \ The number of times this engine is activated can be limited by setting nDo>0. If the number of activations \ will have been already reached, no action will be called even if an active period has elapsed. \n\n\ \ If initRun is set (false by default), the engine will run when called for the first time; otherwise it will only \ start counting period (realLast etc interal variables) from that point, but without actually running, and will run \ only once a period has elapsed since the initial run. \n\n\ \ This class should be used directly; rather, derive your own engine which you want to be run periodically. \n\n\ \ Derived engines should override Engine::action(), which will be called periodically. If the derived Engine \ overrides also Engine::isActivated, it should also take in account return value from PeriodicEngine::isActivated, \ since otherwise the periodicity will not be functional. \n\n\ \ Example with PyRunner, which derives from PeriodicEngine; likely to be encountered in python scripts):: \n\n\ \ PyRunner(realPeriod=5,iterPeriod=10000,command='print O.iter') \n\n\ \ will print iteration number every 10000 iterations or every 5 seconds of wall clock time, whiever comes first since it was \ last run.",((Real, virtPeriod,((void)"deactivated", 0),,"Periodicity criterion using virtual (simulation) time (deactivated if <= 0)"))((Real, realPeriod,((void)"deactivated", 0),,"Periodicity criterion using real (wall clock, computation, human) time (deactivated if <=0)"))((long, iterPeriod,((void)"deactivated", 0),,"Periodicity criterion using step number (deactivated if <= 0)"))((long, nDo,((void)"deactivated",-1),,"Limit number of executions by this number (deactivated if negative)"))((bool, initRun, false,,"Run the first time we are called as well."))((Real, virtLast, 0,,"Tracks virtual time of last run |yupdate|."))((Real, realLast, 0,,"Tracks real time of last run |yupdate|."))((long, iterLast, 0,,"Tracks step number of last run |yupdate|."))((long, nDone, 0,,"Track number of executions (cummulative) |yupdate|.")), realLast=getClock();)
 YADE_CLASS_BASE_DOC_ATTRS_CTOR (VTKRecorder, PeriodicEngine,"Engine recording snapshots of simulation into series of *.vtu files, readable by VTK-based postprocessing programs such as Paraview. Both bodies (spheres and facets) and interactions can be recorded, with various vector/scalar quantities that are defined on them.\n\n:yref:`PeriodicEngine.initRun` is initialized to ``True`` automatically.",((bool, compress, false,,"Compress output XML files [experimental]."))((bool, ascii, false,,"Store data as readable text in the XML file (sets `vtkXMLWriter <http://www.vtk.org/doc/nightly/html/classvtkXMLWriter.html>`__ data mode to ``vtkXMLWriter::Ascii``, while the default is ``Appended``"))((bool, skipFacetIntr, true,,"Skip interactions with facets, when saving interactions"))((bool, skipNondynamic, false,,"Skip non-dynamic spheres (but not facets)."))((string, fileName,"",,"Base file name; it will be appended with {spheres,intrs,facets}-243100.vtu (unless *multiblock* is ``True``) depending on active recorders and step number (243100 in this case). It can contain slashes, but the directory must exist already."))((vector< string >, recorders, vector< string >(1, string("all")),,"List of active recorders (as strings). ``all`` (the default value) enables all base and generic recorders.\n\n.. admonition:: Base recorders\n\n\tBase recorders save the geometry (unstructured grids) on which other data is defined. They are implicitly activated by many of the other recorders. Each of them creates a new file (or a block, if :yref:`multiblock <VTKRecorder.multiblock>` is set).\n\n\t``spheres``\n\t\tSaves positions and radii (``radii``) of :yref:`spherical<Sphere>` particles.\n\t``facets``\n\t\tSave :yref:`facets<Facet>` positions (vertices).\n\t``intr``\n\t\tStore interactions as lines between nodes at respective particles positions. Additionally stores magnitude of normal (``forceN``) and shear (``absForceT``) forces on interactions (the :yref:`geom<Interaction.geom> must be of type :yref:`NormShearPhys`). \n\n.. admonition:: Generic recorders\n\n\tGeneric recorders do not depend on specific model being used and save commonly useful data.\n\n\t``id``\n\t\tSaves id's (field ``id``) of spheres; active only if ``spheres`` is active.\n\t``clumpId``\n\t\tSaves id's of clumps to which each sphere belongs (field ``clumpId``); active only if ``spheres`` is active.\n\t``colors``\n\t\tSaves colors of :yref:`spheres<Sphere>` and of :yref:`facets<Facet>` (field ``color``); only active if ``spheres`` or ``facets`` are activated.\n\t``mask``\n\t\tSaves groupMasks of :yref:`spheres<Sphere>` and of :yref:`facets<Facet>` (field ``mask``); only active if ``spheres`` or ``facets`` are activated.\n\t``materialId``\n\t\tSaves materialID of :yref:`spheres<Sphere>` and of :yref:`facets<Facet>`; only active if ``spheres`` or ``facets`` are activated.\n\t``velocity``\n\t\tSaves linear and angular velocities of spherical particles as Vector3 and length(fields ``linVelVec``, ``linVelLen`` and ``angVelVec``, ``angVelLen`` respectively``); only effective with ``spheres``.\n\t``stress``\n\t\tSaves stresses of :yref:`spheres<Sphere>` and of :yref:`facets<Facet>` as Vector3 and length; only active if ``spheres`` or ``facets`` are activated.\n\n.. admonition:: Specific recorders\n\n\tThe following should only be activated in appropriate cases, otherwise crashes can occur due to violation of type presuppositions.\n\n\t``cpm``\n\t\tSaves data pertaining to the :yref:`concrete model<Law2_Dem3DofGeom_CpmPhys_Cpm>`: ``cpmDamage`` (normalized residual strength averaged on particle), ``cpmSigma`` (stress on particle, normal components), ``cpmTau`` (shear components of stress on particle), ``cpmSigmaM`` (mean stress around particle); ``intr`` is activated automatically by ``cpm``\n\t``rpm``\n\t\tSaves data pertaining to the :yref:`rock particle model<Law2_Dem3DofGeom_RockPMPhys_Rpm>`: ``rpmSpecNum`` shows different pieces of separated stones, only ids. ``rpmSpecMass`` shows masses of separated stones.\n\n"))((int, mask, 0,,"If mask defined, only bodies with corresponding groupMask will be exported. If 0, all bodies will be exported.")), initRun=true;)

Static Public Member Functions

static Real getClock ()

Public Attributes

shared_ptr< TimingDeltastimingDeltas
 precise profiling information (timing of fragments of the engine)
TimingInfo timingInfo
 high-level profiling information; not serializable

Detailed Description

Definition at line 10 of file VTKRecorder.hpp.

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

Generated by  Doxygen 1.6.0   Back to index