~ubuntu-branches/ubuntu/wily/yade/wily

« back to all changes in this revision

Viewing changes to pkg/dem/VTKRecorder.cpp

  • Committer: Package Import Robot
  • Author(s): Dmitry Shachnev
  • Date: 2014-11-14 12:54:52 UTC
  • mfrom: (20.1.23 sid)
  • Revision ID: package-import@ubuntu.com-20141114125452-t16anreumu4ybg2s
Tags: 1.12.0-2ubuntu1
Add allow-stderr restriction to autopkgtest, to silence a warning
printed by new matplotlib.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
  #include<vtkMultiBlockDataSet.h>
23
23
#endif
24
24
 
25
 
#include<yade/core/Scene.hpp>
26
 
#include<yade/pkg/common/Sphere.hpp>
27
 
#include<yade/pkg/common/Facet.hpp>
28
 
#include<yade/pkg/common/Box.hpp>
29
 
#include<yade/pkg/dem/ConcretePM.hpp>
30
 
#include<yade/pkg/dem/WirePM.hpp>
31
 
#include<yade/pkg/dem/JointedCohesiveFrictionalPM.hpp>
32
 
#include<yade/pkg/dem/Shop.hpp>
 
25
#include<core/Scene.hpp>
 
26
#include<pkg/common/Sphere.hpp>
 
27
#include<pkg/common/Facet.hpp>
 
28
#include<pkg/common/Box.hpp>
 
29
#include<pkg/dem/ConcretePM.hpp>
 
30
#include<pkg/dem/WirePM.hpp>
 
31
#include<pkg/dem/JointedCohesiveFrictionalPM.hpp>
 
32
#include<pkg/dem/Shop.hpp>
33
33
#ifdef YADE_LIQMIGRATION
34
 
        #include<yade/pkg/dem/ViscoelasticCapillarPM.hpp>
 
34
        #include<pkg/dem/ViscoelasticCapillarPM.hpp>
35
35
#endif
36
36
 
37
37
YADE_PLUGIN((VTKRecorder));
662
662
                        const Box* box = dynamic_cast<Box*>(b->shape.get()); 
663
663
                        if (box){
664
664
 
665
 
                                if(recActive[REC_FORCE]){
666
 
                                        scene->forces.sync();
667
 
                                        const Vector3r& f = scene->forces.getForce(b->getId());
668
 
                                        const Vector3r& t = scene->forces.getTorque(b->getId());
669
 
                                        Real ff[3] = { (Real)  f[0], (Real) f[1], (Real) f[2] };
670
 
                                        Real tt[3] = { (Real)  t[0], (Real) t[1], (Real) t[2] };
671
 
                                        Real fn = f.norm();
672
 
                                        Real tn = t.norm();
673
 
                                        boxesForceVec->InsertNextTupleValue(ff);
674
 
                                        boxesForceLen->InsertNextValue(fn);
675
 
                                        boxesTorqueVec->InsertNextTupleValue(tt);
676
 
                                        boxesTorqueLen->InsertNextValue(tn);
677
 
                                }
678
 
 
679
665
                                Vector3r pos(scene->isPeriodic ? scene->cell->wrapShearedPt(b->state->pos) : b->state->pos);
680
666
                                Vector3r ext(box->extents);
681
667
                                vtkSmartPointer<vtkQuad> boxes = vtkSmartPointer<vtkQuad>::New();