yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #03923
[Branch ~yade-dev/yade/trunk] Rev 2137: 1. Rename viscoelastic classes as discussed on the mailing list
------------------------------------------------------------
revno: 2137
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Sat 2010-04-10 17:11:48 +0200
message:
1. Rename viscoelastic classes as discussed on the mailing list
2. FIx some docstrings.
modified:
examples/STLImporterTest.py
examples/buldozerVTK.py
examples/dynamic_simulation_tests/ringSimpleViscoelastic.py
pkg/dem/Engine/PartialEngine/KinemCNSEngine.hpp
pkg/dem/Engine/PartialEngine/ThreeDTriaxialEngine.hpp
pkg/dem/Engine/PartialEngine/TriaxialStateRecorder.hpp
pkg/dem/meta/Shop.cpp
pkg/dem/meta/Shop.hpp
pkg/dem/meta/ViscoelasticPM.cpp
pkg/dem/meta/ViscoelasticPM.hpp
py/_utils.cpp
py/plot.py
py/system.py
py/utils.py
py/yadeWrapper/yadeWrapper.cpp
scripts/test/ResetRandomPosition.py
scripts/test/clump-hopper-viscoelastic.py
scripts/test/clump-inbox-viscoelastic.py
scripts/test/clump-viscoelastic.py
--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'examples/STLImporterTest.py'
--- examples/STLImporterTest.py 2010-03-23 18:06:16 +0000
+++ examples/STLImporterTest.py 2010-04-10 15:11:48 +0000
@@ -11,8 +11,8 @@
## Import wall's geometry
params=utils.getViscoelasticFromSpheresInteraction(10e3,tc,en,es)
-facetMat=O.materials.append(SimpleViscoelasticMat(frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
-sphereMat=O.materials.append(SimpleViscoelasticMat(density=Density,frictionAngle=frictionAngle,**params))
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
+sphereMat=O.materials.append(ViscElMat(density=Density,frictionAngle=frictionAngle,**params))
from yade import ymport
fctIds=O.bodies.append(ymport.stl('baraban.stl',color=(1,0,0),material=facetMat))
## Spheres
@@ -46,7 +46,7 @@
## Create geometry information about each potential collision.
[Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
## Create physical information about the interaction.
- [Ip2_SimleViscoelasticMat_SimpleViscoelasticMat_SimpleViscoelasticPhys()],
+ [Ip2_ViscElMat_ViscElMat_ViscElPhys()],
## Constitutive law
[Law2_Spheres_Viscoelastic_SimpleViscoelastic()],
),
=== modified file 'examples/buldozerVTK.py'
--- examples/buldozerVTK.py 2010-03-07 19:53:42 +0000
+++ examples/buldozerVTK.py 2010-04-10 15:11:48 +0000
@@ -25,8 +25,8 @@
## Materials
params=utils.getViscoelasticFromSpheresInteraction(10e3,tc,en,es)
-facetMat=O.materials.append(SimpleViscoelasticMat(frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
-sphereMat=O.materials.append(SimpleViscoelasticMat(density=Density,frictionAngle=frictionAngle,**params))
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
+sphereMat=O.materials.append(ViscElMat(density=Density,frictionAngle=frictionAngle,**params))
### Creating the Buldozer Knife
### from facets, using GTS
@@ -68,7 +68,7 @@
InsertionSortCollider(),
InteractionDispatchers(
[Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
- [Ip2_SimleViscoelasticMat_SimpleViscoelasticMat_SimpleViscoelasticPhys()],
+ [Ip2_ViscElMat_ViscElMat_ViscElPhys()],
[Law2_Spheres_Viscoelastic_SimpleViscoelastic()],
),
GravityEngine(gravity=[0,0,-9.8]),
=== modified file 'examples/dynamic_simulation_tests/ringSimpleViscoelastic.py'
--- examples/dynamic_simulation_tests/ringSimpleViscoelastic.py 2010-03-07 19:53:42 +0000
+++ examples/dynamic_simulation_tests/ringSimpleViscoelastic.py 2010-04-10 15:11:48 +0000
@@ -16,8 +16,8 @@
## Import wall's geometry
params=utils.getViscoelasticFromSpheresInteraction(10e3,tc,en,es)
-facetMat=O.materials.append(SimpleViscoelasticMat(frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
-sphereMat=O.materials.append(SimpleViscoelasticMat(density=Density,frictionAngle=frictionAngle,**params))
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
+sphereMat=O.materials.append(ViscElMat(density=Density,frictionAngle=frictionAngle,**params))
walls = O.bodies.append(ymport.stl('ring.stl',material=facetMat))
@@ -66,7 +66,7 @@
## Create geometry information about each potential collision.
[Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
## Create physical information about the interaction.
- [Ip2_SimleViscoelasticMat_SimpleViscoelasticMat_SimpleViscoelasticPhys()],
+ [Ip2_ViscElMat_ViscElMat_ViscElPhys()],
## Constitutive law
[Law2_Spheres_Viscoelastic_SimpleViscoelastic()],
),
=== modified file 'pkg/dem/Engine/PartialEngine/KinemCNSEngine.hpp'
--- pkg/dem/Engine/PartialEngine/KinemCNSEngine.hpp 2010-04-08 09:14:11 +0000
+++ pkg/dem/Engine/PartialEngine/KinemCNSEngine.hpp 2010-04-10 15:11:48 +0000
@@ -48,7 +48,7 @@
void computeStiffness();
YADE_CLASS_BASE_DOC_ATTRS_CTOR(KinemCNSEngine,PartialEngine,
- "To apply a constant normal rigidity shear for a parallelogram box (simple shear)\n\nThis engine, useable in simulations implying one deformable parallelepipedic box (e.g. :yref:`SimpleShear` Preprocessor), allows to translate horizontally the upper plate while the lateral ones rotate so that they always keep contact with the lower and upper walls. The upper plate can move not only horizontally but also vertically, so that the normal rigidity defined by DeltaF(upper plate)/DeltaU(upper plate) = constant (= *KnC* defined by the user).\n The movement is moreover controlled by the user via a *shearSpeed* which is the horizontal speed of the upper wall, and by a maximum value of horizontal displacement *gammalim* (of the upper plate), after which the shear stops.\n\n note::\n\t not only the positions of walls are updated but also their speeds, which is all but useless considering the fact that in the contact laws these velocities of bodies are used to compute values of tangential relative displacements. \n warning::\n\tBut, because of this last point, if you want to use later saves of simulations executed with this Engine, but without that stopMovement was executed, your boxes will keep their speeds => you will have to cancel them by hand in the .xml",
+ "To apply a constant normal rigidity shear for a parallelogram box (simple shear)\n\nThis engine, useable in simulations implying one deformable parallelepipedic box (e.g. :yref:`SimpleShear` Preprocessor), allows to translate horizontally the upper plate while the lateral ones rotate so that they always keep contact with the lower and upper walls. The upper plate can move not only horizontally but also vertically, so that the normal rigidity defined by DeltaF(upper plate)/DeltaU(upper plate) = constant (= *KnC* defined by the user).\n\nThe movement is moreover controlled by the user via a *shearSpeed* which is the horizontal speed of the upper wall, and by a maximum value of horizontal displacement *gammalim* (of the upper plate), after which the shear stops.\n\n.. note::\n\t not only the positions of walls are updated but also their speeds, which is all but useless considering the fact that in the contact laws these velocities of bodies are used to compute values of tangential relative displacements.\n\n.. warning::\n\tBut, because of this last point, if you want to use later saves of simulations executed with this Engine, but without that stopMovement was executed, your boxes will keep their speeds => you will have to cancel them by hand in the .xml",
((Real,shearSpeed,0.0,"the speed at wich the shearing is performed : speed of the upper plate [m/s]"))
((Real,gammalim,0.0,"the value of tangential displacement (of upper plate) at wich the shearing is stopped [m]"))
((Real,gamma,0.0,"current value of tangential displacement [m]"))
=== modified file 'pkg/dem/Engine/PartialEngine/ThreeDTriaxialEngine.hpp'
--- pkg/dem/Engine/PartialEngine/ThreeDTriaxialEngine.hpp 2010-04-01 06:53:09 +0000
+++ pkg/dem/Engine/PartialEngine/ThreeDTriaxialEngine.hpp 2010-04-10 15:11:48 +0000
@@ -49,7 +49,7 @@
ThreeDTriaxialEngine,TriaxialStressController,
"The engine perform a triaxial compression with a control in direction 'i' in stress (if stressControl_i) else in strain.\n\n"
"For a stress control the imposed stress is specified by 'sigma_i' with a 'max_veli' depending on 'strainRatei'. To obtain the same strain rate in stress control than in strain control you need to set 'wallDamping = 0.8'.\n"
- " For a strain control the imposed strain is specified by 'strainRatei'.\n"
+ "For a strain control the imposed strain is specified by 'strainRatei'.\n"
"With this engine you can also perform internal compaction by growing the size of particles by using :yref:`TriaxialStressController::controlInternalStress`. For that, just switch on 'internalCompaction=1' and fix sigma_iso=value of mean pressure that you want at the end of the internal compaction.\n"
,
((Real, strainRate1,0,"target strain rate in direction 1 (./s)"))
=== modified file 'pkg/dem/Engine/PartialEngine/TriaxialStateRecorder.hpp'
--- pkg/dem/Engine/PartialEngine/TriaxialStateRecorder.hpp 2010-04-01 06:53:09 +0000
+++ pkg/dem/Engine/PartialEngine/TriaxialStateRecorder.hpp 2010-04-10 15:11:48 +0000
@@ -32,7 +32,7 @@
virtual ~TriaxialStateRecorder ();
virtual void action();
- YADE_CLASS_BASE_DOC_ATTRS_CTOR(TriaxialStateRecorder,Recorder,"Engine recording triaxial variables (needs :yref:`TriaxialCompressionEngin`e or :yref:`ThreeDTriaxialEngine` present in the simulation).",
+ YADE_CLASS_BASE_DOC_ATTRS_CTOR(TriaxialStateRecorder,Recorder,"Engine recording triaxial variables (needs :yref:`TriaxialCompressionEngine` or :yref:`ThreeDTriaxialEngine` present in the simulation).",
((Real,porosity,1,"porosity of the packing [-]")), //Is it really needed to have this value as a serializable?
initRun=true;
);
=== modified file 'pkg/dem/meta/Shop.cpp'
--- pkg/dem/meta/Shop.cpp 2010-03-18 15:11:10 +0000
+++ pkg/dem/meta/Shop.cpp 2010-04-10 15:11:48 +0000
@@ -1133,7 +1133,7 @@
return v0+((v2-v0)*(v1-v0).Length()+(v1-v0)*(v2-v0).Length())/((v1-v0).Length()+(v2-v1).Length()+(v0-v2).Length());
}
-void Shop::getViscoelasticFromSpheresInteraction( Real m, Real tc, Real en, Real es, shared_ptr<SimpleViscoelasticMat> b)
+void Shop::getViscoelasticFromSpheresInteraction( Real m, Real tc, Real en, Real es, shared_ptr<ViscElMat> b)
{
b->kn = m/tc/tc * ( Mathr::PI*Mathr::PI + Mathr::Pow(Mathr::Log(en),2) );
b->cn = -2.0*m/tc * Mathr::Log(en);
=== modified file 'pkg/dem/meta/Shop.hpp'
--- pkg/dem/meta/Shop.hpp 2010-03-18 15:11:10 +0000
+++ pkg/dem/meta/Shop.hpp 2010-04-10 15:11:48 +0000
@@ -23,7 +23,7 @@
class Scene;
class Body;
class SimpleViscoelasticBodyParameters;
-class SimpleViscoelasticMat;
+class ViscElMat;
class FrictMat;
using namespace std;
@@ -97,7 +97,7 @@
/// Get viscoelastic parameters kn,cn,ks,cs from analytical solution of
/// a problem of interaction of pair spheres with mass m, collision
/// time tc and restitution coefficients en,es.
- static void getViscoelasticFromSpheresInteraction(Real m, Real tc, Real en, Real es, shared_ptr<SimpleViscoelasticMat> b);
+ static void getViscoelasticFromSpheresInteraction(Real m, Real tc, Real en, Real es, shared_ptr<ViscElMat> b);
//! Get unbalanced force of the whole simulation
static Real unbalancedForce(bool useMaxForce=false, Scene* _rb=NULL);
=== modified file 'pkg/dem/meta/ViscoelasticPM.cpp'
--- pkg/dem/meta/ViscoelasticPM.cpp 2010-03-25 20:47:48 +0000
+++ pkg/dem/meta/ViscoelasticPM.cpp 2010-04-10 15:11:48 +0000
@@ -5,20 +5,20 @@
#include<yade/core/Omega.hpp>
#include<yade/core/Scene.hpp>
-YADE_PLUGIN((SimpleViscoelasticMat)(SimpleViscoelasticPhys)(Ip2_SimleViscoelasticMat_SimpleViscoelasticMat_SimpleViscoelasticPhys)(Law2_Spheres_Viscoelastic_SimpleViscoelastic));
-
-/* SimpleViscoelasticMat */
-SimpleViscoelasticMat::~SimpleViscoelasticMat(){}
-
-/* SimpleViscoelasticPhys */
-SimpleViscoelasticPhys::~SimpleViscoelasticPhys(){}
-
-/* Ip2_SimleViscoelasticMat_SimpleViscoelasticMat_SimpleViscoelasticPhys */
-void Ip2_SimleViscoelasticMat_SimpleViscoelasticMat_SimpleViscoelasticPhys::go(const shared_ptr<Material>& b1, const shared_ptr<Material>& b2, const shared_ptr<Interaction>& interaction) {
+YADE_PLUGIN((ViscElMat)(ViscElPhys)(Ip2_ViscElMat_ViscElMat_ViscElPhys)(Law2_ScGeom_ViscElPhys_Basic));
+
+/* ViscElMat */
+ViscElMat::~ViscElMat(){}
+
+/* ViscElPhys */
+ViscElPhys::~ViscElPhys(){}
+
+/* Ip2_ViscElMat_ViscElMat_ViscElPhys */
+void Ip2_ViscElMat_ViscElMat_ViscElPhys::go(const shared_ptr<Material>& b1, const shared_ptr<Material>& b2, const shared_ptr<Interaction>& interaction) {
if(interaction->interactionPhysics) return;
- SimpleViscoelasticMat* sdec1 = static_cast<SimpleViscoelasticMat*>(b1.get());
- SimpleViscoelasticMat* sdec2 = static_cast<SimpleViscoelasticMat*>(b2.get());
- SimpleViscoelasticPhys* phys = new SimpleViscoelasticPhys();
+ ViscElMat* sdec1 = static_cast<ViscElMat*>(b1.get());
+ ViscElMat* sdec2 = static_cast<ViscElMat*>(b2.get());
+ ViscElPhys* phys = new ViscElPhys();
phys->kn = sdec1->kn * sdec2->kn / (sdec1->kn + sdec2->kn);
phys->ks = sdec1->ks * sdec2->ks / (sdec1->ks + sdec2->ks);
phys->cn = ( (sdec1->cn==0) ? 0 : 1/sdec1->cn ) + ( (sdec2->cn==0) ? 0 : 1/sdec2->cn );
@@ -28,14 +28,14 @@
phys->tangensOfFrictionAngle = std::tan(std::min(sdec1->frictionAngle, sdec2->frictionAngle));
phys->shearForce = Vector3r(0,0,0);
phys->prevNormal = Vector3r(0,0,0);
- interaction->interactionPhysics = shared_ptr<SimpleViscoelasticPhys>(phys);
+ interaction->interactionPhysics = shared_ptr<ViscElPhys>(phys);
}
-/* Law2_Spheres_Viscoelastic_SimpleViscoelastic */
-void Law2_Spheres_Viscoelastic_SimpleViscoelastic::go(shared_ptr<InteractionGeometry>& _geom, shared_ptr<InteractionPhysics>& _phys, Interaction* I, Scene* rootBody){
+/* Law2_ScGeom_ViscElPhys_Basic */
+void Law2_ScGeom_ViscElPhys_Basic::go(shared_ptr<InteractionGeometry>& _geom, shared_ptr<InteractionPhysics>& _phys, Interaction* I, Scene* rootBody){
const ScGeom& geom=*static_cast<ScGeom*>(_geom.get());
- SimpleViscoelasticPhys& phys=*static_cast<SimpleViscoelasticPhys*>(_phys.get());
+ ViscElPhys& phys=*static_cast<ViscElPhys*>(_phys.get());
const int id1 = I->getId1();
const int id2 = I->getId2();
=== modified file 'pkg/dem/meta/ViscoelasticPM.hpp'
--- pkg/dem/meta/ViscoelasticPM.hpp 2010-04-05 10:43:04 +0000
+++ pkg/dem/meta/ViscoelasticPM.hpp 2010-04-10 15:11:48 +0000
@@ -13,10 +13,10 @@
/// Material
/// Note: Shop::getViscoelasticFromSpheresInteraction can get kn,cn,ks,cs from a analytical solution of a pair spheres interaction problem.
-class SimpleViscoelasticMat : public Material {
+class ViscElMat : public Material {
public:
- virtual ~SimpleViscoelasticMat();
- YADE_CLASS_BASE_DOC_ATTRS_CTOR(SimpleViscoelasticMat,Material,"Material for simple viscoelastic model of contact.\n\n.. note::\n\t ``Shop::getViscoelasticFromSpheresInteraction`` (and :yref:`yade.utils.getViscoelasticFromSpheresInteraction` in python) compute :yref:`kn<SimpleViscoelasticMat::kn>`, :yref:`cn<SimpleViscoelasticMat::cn>`, :yref:`ks<SimpleViscoelasticMat::ks>`, :yref:`cs<SimpleViscoelasticMat::cs>` from analytical solution of a pair spheres interaction problem.",
+ virtual ~ViscElMat();
+ YADE_CLASS_BASE_DOC_ATTRS_CTOR(ViscElMat,Material,"Material for simple viscoelastic model of contact.\n\n.. note::\n\t ``Shop::getViscoelasticFromSpheresInteraction`` (and :yref:`yade.utils.getViscoelasticFromSpheresInteraction` in python) compute :yref:`kn<ViscElMat::kn>`, :yref:`cn<ViscElMat::cn>`, :yref:`ks<ViscElMat::ks>`, :yref:`cs<ViscElMat::cs>` from analytical solution of a pair spheres interaction problem.",
((Real,kn,NaN,"Normal elastic stiffness"))
((Real,cn,NaN,"Normal viscous constant"))
((Real,ks,NaN,"Shear elastic stiffness"))
@@ -24,42 +24,42 @@
((Real,frictionAngle,NaN,"Friction angle [rad]")),
createIndex();
);
- REGISTER_CLASS_INDEX(SimpleViscoelasticMat,Material);
+ REGISTER_CLASS_INDEX(ViscElMat,Material);
};
-REGISTER_SERIALIZABLE(SimpleViscoelasticMat);
+REGISTER_SERIALIZABLE(ViscElMat);
/// Interaction physics
-class SimpleViscoelasticPhys : public FrictPhys {
+class ViscElPhys : public FrictPhys {
public:
- virtual ~SimpleViscoelasticPhys();
- YADE_CLASS_BASE_DOC_ATTRS_CTOR(SimpleViscoelasticPhys,FrictPhys,"InteractionPhysics created from :yref:`SimpleViscoelasticMat`, for use with :yref:`Law2_Spheres_Viscoelastic_SimpleViscoelastic`.",
+ virtual ~ViscElPhys();
+ YADE_CLASS_BASE_DOC_ATTRS_CTOR(ViscElPhys,FrictPhys,"InteractionPhysics created from :yref:`ViscElMat`, for use with :yref:`Law2_ScGeom_ViscElPhys_Basic`.",
((Real,cn,NaN,"Normal viscous constant"))
((Real,cs,NaN,"Shear viscous constant")),
createIndex();
)
};
-REGISTER_SERIALIZABLE(SimpleViscoelasticPhys);
+REGISTER_SERIALIZABLE(ViscElPhys);
/// Convert material to interaction physics.
// Uses the rule of consecutively connection.
-class Ip2_SimleViscoelasticMat_SimpleViscoelasticMat_SimpleViscoelasticPhys: public InteractionPhysicsFunctor {
+class Ip2_ViscElMat_ViscElMat_ViscElPhys: public InteractionPhysicsFunctor {
public :
virtual void go(const shared_ptr<Material>& b1,
const shared_ptr<Material>& b2,
const shared_ptr<Interaction>& interaction);
- YADE_CLASS_BASE_DOC(Ip2_SimleViscoelasticMat_SimpleViscoelasticMat_SimpleViscoelasticPhys,InteractionPhysicsFunctor,"Convert 2 instances of :yref:`SimpleViscoelasticMat` to :yref:`SimpleViscoelasticPhys` using the rule of consecutive connection.");
- FUNCTOR2D(SimpleViscoelasticMat,SimpleViscoelasticMat);
+ YADE_CLASS_BASE_DOC(Ip2_ViscElMat_ViscElMat_ViscElPhys,InteractionPhysicsFunctor,"Convert 2 instances of :yref:`ViscElMat` to :yref:`ViscElPhys` using the rule of consecutive connection.");
+ FUNCTOR2D(ViscElMat,ViscElMat);
};
-REGISTER_SERIALIZABLE(Ip2_SimleViscoelasticMat_SimpleViscoelasticMat_SimpleViscoelasticPhys);
+REGISTER_SERIALIZABLE(Ip2_ViscElMat_ViscElMat_ViscElPhys);
/// Constitutive law
/// This class provides linear viscoelastic contact model
-class Law2_Spheres_Viscoelastic_SimpleViscoelastic: public LawFunctor {
+class Law2_ScGeom_ViscElPhys_Basic: public LawFunctor {
public :
virtual void go(shared_ptr<InteractionGeometry>&, shared_ptr<InteractionPhysics>&, Interaction*, Scene*);
- FUNCTOR2D(ScGeom,SimpleViscoelasticPhys);
- YADE_CLASS_BASE_DOC(Law2_Spheres_Viscoelastic_SimpleViscoelastic,LawFunctor,"Linear viscoelastic model operating on :yref:`ScGeom` and :yref:`SimpleViscoelasticPhys`.");
+ FUNCTOR2D(ScGeom,ViscElPhys);
+ YADE_CLASS_BASE_DOC(Law2_ScGeom_ViscElPhys_Basic,LawFunctor,"Linear viscoelastic model operating on :yref:`ScGeom` and :yref:`ViscElPhys`.");
};
-REGISTER_SERIALIZABLE(Law2_Spheres_Viscoelastic_SimpleViscoelastic);
+REGISTER_SERIALIZABLE(Law2_ScGeom_ViscElPhys_Basic);
=== modified file 'py/_utils.cpp'
--- py/_utils.cpp 2010-04-03 16:40:33 +0000
+++ py/_utils.cpp 2010-04-10 15:11:48 +0000
@@ -173,7 +173,7 @@
}
py::dict getViscoelasticFromSpheresInteraction(Real m, Real tc, Real en, Real es)
{
- shared_ptr<SimpleViscoelasticMat> b = shared_ptr<SimpleViscoelasticMat>(new SimpleViscoelasticMat());
+ shared_ptr<ViscElMat> b = shared_ptr<ViscElMat>(new ViscElMat());
Shop::getViscoelasticFromSpheresInteraction(m,tc,en,es,b);
py::dict d;
d["kn"]=b->kn;
@@ -443,5 +443,5 @@
py::def("wireAll",wireAll,"Set :yref:`Shape::wire` on all bodies to True, rendering them with wireframe only.");
py::def("wireNone",wireNone,"Set :yref:`Shape::wire` on all bodies to False, rendering them as solids.");
py::def("wireNoSpheres",wireNoSpheres,"Set :yref:`Shape::wire` to True on non-spherical bodies (:yref:`Facets<Facet>`, :yref:`Walls<Wall>`).");
- py::def("flipCell",&Shop::flipCell,(py::arg("flip")=Matrix3r::ZERO));
+ py::def("flipCell",&Shop::flipCell,(py::arg("flip")=Matrix3r::ZERO),"Flip periodic cell so that angles between $R^3$ axes and transformed axes are as small as possible. This function relies on the fact that periodic cell defines by repetition or its corners regular grid of points in $R^3$; however, all cells generating identical grid are equivalent and can be flipped one over another. This necessiatates adjustment of :yref:`Interaction.cellDist` for interactions that cross boundary and didn't before (or vice versa), and re-initialization of collider. The *flip* argument can be used to specify desired flip: integers, each column for one axis; if zero matrix, best fit (minimizing the angles) is computed automatically.\n\nIn c++, this function is accessible as ``Shop::flipCell``.\n\n.. warning::\n\t This function is currently broken and should not be used.");
}
=== modified file 'py/plot.py'
--- py/plot.py 2010-04-01 06:53:09 +0000
+++ py/plot.py 2010-04-10 15:11:48 +0000
@@ -124,18 +124,25 @@
updatePeriod=0
def saveGnuplot(baseName,term='wxt',extension=None,timestamp=False,comment=None,title=None,varData=False):
- """baseName: used for creating baseName.gnuplot (command file for gnuplot),
- associated baseName.data (data) and output files (if applicable) in the form baseName.[plot number].extension
- term: specify the gnuplot terminal;
- defaults to x11, in which case gnuplot will draw persistent windows to screen and terminate
- other useful terminals are 'png', 'cairopdf' and so on
- extension: defaults to terminal name
- fine for png for example; if you use 'cairopdf', you should also say extension='pdf' however
- timestamp: append numeric time to the basename
- varData: whether file to plot will be declared as variable or be in-place in the plot expression
- comment: a user comment (may be multiline) that will be embedded in the control file
-
- Returns name fo the gnuplot file created.
+ """Save data added with :yref:`yade.plot.addData` into (compressed) file and create .gnuplot file that attempts to mimick plots specified with :yref:`yade.plot.plots`.
+
+:parameters:
+ baseName:
+ used for creating baseName.gnuplot (command file for gnuplot),
+ associated baseName.data (data) and output files (if applicable) in the form baseName.[plot number].extension
+ term:
+ specify the gnuplot terminal;
+ defaults to x11, in which case gnuplot will draw persistent windows to screen and terminate; other useful terminals are 'png', 'cairopdf' and so on
+ extension:
+ defaults to terminal name; fine for png for example; if you use 'cairopdf', you should also say extension='pdf' however
+ timestamp:
+ append numeric time to the basename
+ varData:
+ whether file to plot will be declared as variable or be in-place in the plot expression
+ comment:
+ a user comment (may be multiline) that will be embedded in the control file
+
+Returns name fo the gnuplot file created.
"""
import time,bz2
if len(data.keys())==0: raise RuntimeError("No data for plotting were saved.")
=== modified file 'py/system.py'
--- py/system.py 2010-03-31 00:06:48 +0000
+++ py/system.py 2010-04-10 15:11:48 +0000
@@ -135,6 +135,10 @@
'CapillaryParameters':'CapillaryPhys', # Wed Mar 31 09:25:03 2010, sch50p@fluent-ph
'Ip2_FrictMat_FrictMat_CapillaryLawPhys':'Ip2_FrictMat_FrictMat_CapillaryPhys', # Wed Mar 31 09:26:04 2010, sch50p@fluent-ph
'Ip2_Frictmat_FrictMat_CapillaryLawPhys':'Ip2_FrictMat_FrictMat_CapillaryPhys', # Wed Mar 31 09:26:56 2010, sch50p@fluent-ph
+ 'SimpleViscoelasticMat':'ViscElMat', # Fri Apr 9 19:25:38 2010, vaclav@flux
+ 'SimpleViscoelasticPhys':'ViscElPhys', # Fri Apr 9 19:26:34 2010, vaclav@flux
+ 'Law2_Spheres_Viscoelastic_SimpleViscoelastic':'Law2_ScGeom_ViscElPhys_Basic', # Fri Apr 9 19:28:02 2010, vaclav@flux
+ 'Ip2_SimleViscoelasticMat_SimpleViscoelasticMat_SimpleViscoelasticPhys':'Ip2_ViscElMat_ViscElMat_ViscElPhys', # Fri Apr 9 19:28:48 2010, vaclav@flux
### END_RENAMED_CLASSES_LIST ### (do not delete this line; scripts/rename-class.py uses it
}
=== modified file 'py/utils.py'
--- py/utils.py 2010-04-09 11:25:18 +0000
+++ py/utils.py 2010-04-10 15:11:48 +0000
@@ -536,15 +536,12 @@
def uniaxialTestFeatures(filename=None,areaSections=10,axis=-1,**kw):
"""Get some data about the current packing useful for uniaxial test:
-
+
#. Find the dimensions that is the longest (uniaxial loading axis)
-#. Find the minimum cross-section area of the speciment by examining several (areaSections)
- sections perpendicular to axis, computing area of the convex hull for each one. This will
- work also for non-prismatic specimen.
+#. Find the minimum cross-section area of the specimen by examining several (areaSections) sections perpendicular to axis, computing area of the convex hull for each one. This will work also for non-prismatic specimen.
-#. Find the bodies that are on the negative/positive boundary, to which the straining condition
- should be applied.
+#. Find the bodies that are on the negative/positive boundary, to which the straining condition should be applied.
:parameters:
`filename`:
=== modified file 'py/yadeWrapper/yadeWrapper.cpp'
--- py/yadeWrapper/yadeWrapper.cpp 2010-03-28 21:22:25 +0000
+++ py/yadeWrapper/yadeWrapper.cpp 2010-04-10 15:11:48 +0000
@@ -534,7 +534,7 @@
.def("reset",&pyOmega::reset,"Reset simulations completely (including another scene!).")
.def("resetThisScene",&pyOmega::resetThisScene,"Reset current scene.")
.def("switchScene",&pyOmega::switchScene,"Switch to alternative simulation (while keeping the old one). Calling the function again switches back to the first one. Note that most variables from the first simulation will still refer to the first simulation even after the switch\n(e.g. b=O.bodies[4]; O.switchScene(); [b still refers to the body in the first simulation here])")
- .def("labeledEngine",&pyOmega::labeled_engine_get,"Return instance of engine/functor with the given label. This function shouldn't be called by the user directly; every ehange in O.engines will assign respective global python variables according to labels.\n For example: \n\tO.engines=[InsertionSortCollider(label='collider')]\n\tcollider.nBins=5 ## collider has become a variable after assignment to O.engines automatically)")
+ .def("labeledEngine",&pyOmega::labeled_engine_get,"Return instance of engine/functor with the given label. This function shouldn't be called by the user directly; every ehange in O.engines will assign respective global python variables according to labels.\n\nFor example::\n\tO.engines=[InsertionSortCollider(label='collider')]\n\tcollider.nBins=5 ## collider has become a variable after assignment to O.engines automatically)")
.def("resetTime",&pyOmega::resetTime,"Reset simulation time: step number, virtual and real time. (Doesn't touch anything else, including timings).")
.def("plugins",&pyOmega::plugins_get,"Return list of all plugins registered in the class factory.")
.add_property("engines",&pyOmega::engines_get,&pyOmega::engines_set,"List of engines in the simulation (Scene::engines).")
=== modified file 'scripts/test/ResetRandomPosition.py'
--- scripts/test/ResetRandomPosition.py 2009-12-25 14:46:48 +0000
+++ scripts/test/ResetRandomPosition.py 2010-04-10 15:11:48 +0000
@@ -16,9 +16,9 @@
kw=utils.getViscoelasticFromSpheresInteraction(10e3,tc,en,es)
params=utils.getViscoelasticFromSpheresInteraction(10e3,tc,en,es)
# facets material
-facetMat=O.materials.append(SimpleViscoelasticMat(frictionAngle=frictionAngle,**params))
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,**params))
# default spheres material
-dfltSpheresMat=O.materials.append(SimpleViscoelasticMat(density=density,frictionAngle=frictionAngle))
+dfltSpheresMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle))
O.dt=.2*tc # time step
@@ -50,7 +50,7 @@
InsertionSortCollider(),
InteractionDispatchers(
[Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
- [Ip2_SimleViscoelasticMat_SimpleViscoelasticMat_SimpleViscoelasticPhys()],
+ [Ip2_ViscElMat_ViscElMat_ViscElPhys()],
[Law2_Spheres_Viscoelastic_SimpleViscoelastic()],
),
GravityEngine(gravity=[0,0,-9.81]),
=== modified file 'scripts/test/clump-hopper-viscoelastic.py'
--- scripts/test/clump-hopper-viscoelastic.py 2009-12-25 14:46:48 +0000
+++ scripts/test/clump-hopper-viscoelastic.py 2010-04-10 15:11:48 +0000
@@ -15,9 +15,9 @@
density=2700
# facets material
params=utils.getViscoelasticFromSpheresInteraction(10e3,tc,en,es)
-facetMat=O.materials.append(SimpleViscoelasticMat(frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
# default spheres material
-dfltSpheresMat=O.materials.append(SimpleViscoelasticMat(density=density,frictionAngle=frictionAngle))
+dfltSpheresMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle))
O.dt=.1*tc # time step
@@ -75,7 +75,7 @@
InsertionSortCollider(nBins=5,sweepLength=.1*Rs),
InteractionDispatchers(
[Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
- [Ip2_SimleViscoelasticMat_SimpleViscoelasticMat_SimpleViscoelasticPhys()],
+ [Ip2_ViscElMat_ViscElMat_ViscElPhys()],
[Law2_Spheres_Viscoelastic_SimpleViscoelastic()],
),
GravityEngine(gravity=[0,0,-9.81]),
=== modified file 'scripts/test/clump-inbox-viscoelastic.py'
--- scripts/test/clump-inbox-viscoelastic.py 2009-12-25 14:46:48 +0000
+++ scripts/test/clump-inbox-viscoelastic.py 2010-04-10 15:11:48 +0000
@@ -15,9 +15,9 @@
density=2700
# facets material
params=utils.getViscoelasticFromSpheresInteraction(10e3,tc,en,es)
-facetMat=O.materials.append(SimpleViscoelasticMat(frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
# default spheres material
-dfltSpheresMat=O.materials.append(SimpleViscoelasticMat(density=density,frictionAngle=frictionAngle))
+dfltSpheresMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle))
O.dt=.1*tc # time step
@@ -64,7 +64,7 @@
InsertionSortCollider(),
InteractionDispatchers(
[Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
- [Ip2_SimleViscoelasticMat_SimpleViscoelasticMat_SimpleViscoelasticPhys()],
+ [Ip2_ViscElMat_ViscElMat_ViscElPhys()],
[Law2_Spheres_Viscoelastic_SimpleViscoelastic()],
),
GravityEngine(gravity=[0,0,-9.81]),
=== modified file 'scripts/test/clump-viscoelastic.py'
--- scripts/test/clump-viscoelastic.py 2009-12-25 14:46:48 +0000
+++ scripts/test/clump-viscoelastic.py 2010-04-10 15:11:48 +0000
@@ -15,9 +15,9 @@
density=2700
# facets material
params=utils.getViscoelasticFromSpheresInteraction(10e3,tc,en,es)
-facetMat=O.materials.append(SimpleViscoelasticMat(frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
+facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,**params)) # **params sets kn, cn, ks, cs
# default spheres material
-dfltSpheresMat=O.materials.append(SimpleViscoelasticMat(density=density,frictionAngle=frictionAngle))
+dfltSpheresMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle))
O.dt=.01*tc # time step
@@ -44,7 +44,7 @@
InsertionSortCollider(),
InteractionDispatchers(
[Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
- [Ip2_SimleViscoelasticMat_SimpleViscoelasticMat_SimpleViscoelasticPhys()],
+ [Ip2_ViscElMat_ViscElMat_ViscElPhys()],
[Law2_Spheres_Viscoelastic_SimpleViscoelastic()],
),
GravityEngine(gravity=[0,0,-9.81]),