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

« back to all changes in this revision

Viewing changes to pkg/dem/Shop_01.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:
2
2
#include"Shop.hpp"
3
3
#include<boost/tokenizer.hpp>
4
4
 
5
 
#include"yade/core/Scene.hpp"
6
 
#include"yade/core/Body.hpp"
7
 
#include"yade/core/Interaction.hpp"
8
 
 
9
 
#include"yade/pkg/common/Aabb.hpp"
10
 
#include"yade/core/Clump.hpp"
11
 
#include"yade/pkg/common/InsertionSortCollider.hpp"
12
 
 
13
 
#include"yade/pkg/common/Box.hpp"
14
 
#include"yade/pkg/common/Sphere.hpp"
15
 
#include"yade/pkg/common/ElastMat.hpp"
16
 
#include"yade/pkg/dem/ViscoelasticPM.hpp"
17
 
#include"yade/pkg/dem/CapillaryPhys.hpp"
18
 
 
19
 
#include"yade/pkg/common/Bo1_Aabb.hpp"
20
 
#include"yade/pkg/dem/NewtonIntegrator.hpp"
21
 
#include"yade/pkg/dem/Ig2_Sphere_Sphere_ScGeom.hpp"
22
 
#include"yade/pkg/dem/Ig2_Box_Sphere_ScGeom.hpp"
23
 
#include"yade/pkg/dem/FrictPhys.hpp"
24
 
 
25
 
#include"yade/pkg/common/ForceResetter.hpp"
26
 
 
27
 
#include"yade/pkg/common/Dispatching.hpp"
28
 
#include"yade/pkg/common/InteractionLoop.hpp"
29
 
#include"yade/pkg/common/GravityEngines.hpp"
30
 
 
31
 
#include"yade/pkg/dem/GlobalStiffnessTimeStepper.hpp"
32
 
#include"yade/pkg/dem/ElasticContactLaw.hpp"
33
 
 
34
 
#include"yade/pkg/dem/ScGeom.hpp"
35
 
#include"yade/pkg/dem/FrictPhys.hpp"
36
 
 
37
 
#include"yade/pkg/common/Grid.hpp"
38
 
 
39
 
#include"yade/pkg/dem/Tetra.hpp"
 
5
#include"core/Scene.hpp"
 
6
#include"core/Body.hpp"
 
7
#include"core/Interaction.hpp"
 
8
 
 
9
#include"pkg/common/Aabb.hpp"
 
10
#include"core/Clump.hpp"
 
11
#include"pkg/common/InsertionSortCollider.hpp"
 
12
 
 
13
#include"pkg/common/Box.hpp"
 
14
#include"pkg/common/Sphere.hpp"
 
15
#include"pkg/common/ElastMat.hpp"
 
16
#include"pkg/dem/ViscoelasticPM.hpp"
 
17
#include"pkg/dem/CapillaryPhys.hpp"
 
18
 
 
19
#include"pkg/common/Bo1_Aabb.hpp"
 
20
#include"pkg/dem/NewtonIntegrator.hpp"
 
21
#include"pkg/dem/Ig2_Sphere_Sphere_ScGeom.hpp"
 
22
#include"pkg/dem/Ig2_Box_Sphere_ScGeom.hpp"
 
23
#include"pkg/dem/FrictPhys.hpp"
 
24
 
 
25
#include"pkg/common/ForceResetter.hpp"
 
26
 
 
27
#include"pkg/common/Dispatching.hpp"
 
28
#include"pkg/common/InteractionLoop.hpp"
 
29
#include"pkg/common/GravityEngines.hpp"
 
30
 
 
31
#include"pkg/dem/GlobalStiffnessTimeStepper.hpp"
 
32
#include"pkg/dem/ElasticContactLaw.hpp"
 
33
 
 
34
#include"pkg/dem/ScGeom.hpp"
 
35
#include"pkg/dem/FrictPhys.hpp"
 
36
 
 
37
#include"pkg/common/Grid.hpp"
 
38
 
 
39
#include"pkg/dem/Tetra.hpp"
40
40
 
41
41
#ifdef YADE_OPENGL
42
 
        #include"yade/pkg/common/Gl1_NormPhys.hpp"
 
42
        #include"pkg/common/Gl1_NormPhys.hpp"
43
43
#endif
44
44
 
 
45
#include "py/_utils.hpp"
 
46
 
 
47
 
45
48
CREATE_LOGGER(Shop);
46
49
 
47
50
/*! Flip periodic cell by given number of cells.
320
323
        const shared_ptr<Scene> scene=(_scene?_scene:Omega::instance().getScene());
321
324
        Real V;
322
325
        if(!scene->isPeriodic){
323
 
                if(_volume<=0) throw std::invalid_argument("utils.porosity must be given (positive) *volume* for aperiodic simulations.");
324
 
                V=_volume;
 
326
                if(_volume<=0){// throw std::invalid_argument("utils.porosity must be given (positive) *volume* for aperiodic simulations.");
 
327
                  py::tuple extrema = aabbExtrema();
 
328
                  V = py::extract<Real>( (extrema[1][0] - extrema[0][0])*(extrema[1][1] - extrema[0][1])*(extrema[1][2] - extrema[0][2]) );
 
329
                }
 
330
                else
 
331
                  V=_volume;
325
332
        } else {
326
333
                V=scene->cell->getVolume();
327
334
        }