[Yade-dev] maxDataLen in plot.py

2009-08-12 Thread Anton Gladky
Is it possible to change maxDataLen in plot.py without editing plot.py?

Thank you
__
[ENG] Best Regards
[GER] Mit freundlichen Grüßen
[RUS] С наилучшими пожеланиями
[UKR] З найкращими побажаннями

Anton Gladkyy
___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] maxDataLen in plot.py

2009-08-12 Thread Václav Šmilauer

 Is it possible to change maxDataLen in plot.py without editing
  plot.py?

from yade import plot
plot.maxDataLen=1

(it is a variable like any other, that happens to live in the yade.plot
namespace)

V.


___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] maxDataLen in plot.py

2009-08-12 Thread Anton Gladky
Thank you!
__
[ENG] Best Regards
[GER] Mit freundlichen Grüßen
[RUS] С наилучшими пожеланиями
[UKR] З найкращими побажаннями

Anton Gladkyy


2009/8/12 Václav Šmilauer eudo...@arcig.cz


  Is it possible to change maxDataLen in plot.py without editing
   plot.py?

 from yade import plot
 plot.maxDataLen=1

 (it is a variable like any other, that happens to live in the yade.plot
 namespace)

 V.


 ___
 Mailing list: 
 https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
 Post to : yade-dev@lists.launchpad.net
 Unsubscribe : 
 https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
 More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Facet Highlight

2009-08-12 Thread Anton Gladky
I have tried this, but it does not highlight facets.

Please, check the attached script.
__
[ENG] Best Regards
[GER] Mit freundlichen Grüßen
[RUS] С наилучшими пожеланиями
[UKR] З найкращими побажаннями

Anton Gladkyy


2009/8/11 Václav Šmilauer eudo...@arcig.cz


  Is it possible to highlight facets like boxes do?

 Yes, but the facet must not be drawn as wire. If #3 is facet, do
 something like this:

 bs=O.bodies[3].shape
 shape['wire']=False
 shape['highlight']=True

 (translated straightforwardly to c++)

 Note that if you define onBodySelected function in python, it is called
 as callback when you select a body with shift+right mouse button:
 scripts/simple-scene.py shows that. In that functions, you can do other
 things; I used it to dump all interaction properties of that body to the
 console etc, for debugging.

 HTH, Vaclav

  __
  [ENG] Best Regards
  [GER] Mit freundlichen Grüßen
  [RUS] С наилучшими пожеланиями
  [UKR] З найкращими побажаннями
 
  Anton Gladkyy
  ___
  Mailing list: 
  https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
  Post to : yade-dev@lists.launchpad.net
  Unsubscribe : 
  https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
  More help   : https://help.launchpad.net/ListHelp


 ___
 Mailing list: 
 https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
 Post to : yade-dev@lists.launchpad.net
 Unsubscribe : 
 https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
 More help   : https://help.launchpad.net/ListHelp



fp.tgz
Description: GNU Zip compressed data
___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] Python script. different behavior

2009-08-12 Thread Anton Gladky
Hi,

I have found an interesting thing for me.

I have a python script, which simulates press.

So when I start it, it begins to press the specimen. At the end of the
process the specimen explodes. It is abnormal behavior.
But when I start the script, before the simulation starts I press reload
button and then start the script - the specimen has a normal destruction.

Why can it be so?

Thanks!

__
[ENG] Best Regards
[GER] Mit freundlichen Grüßen
[RUS] С наилучшими пожеланиями
[UKR] З найкращими побажаннями

Anton Gladkyy
___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Python script. different behavior

2009-08-12 Thread Anton Gladky
Hmm, the problem seems in that distanceFactor and 2 artificial steps to find
all cohesive contacts.


__
[ENG] Best Regards
[GER] Mit freundlichen Grüßen
[RUS] С наилучшими пожеланиями
[UKR] З найкращими побажаннями

Anton Gladkyy


2009/8/12 Anton Gladky gladky.an...@gmail.com

 Hi,

 I have found an interesting thing for me.

 I have a python script, which simulates press.

 So when I start it, it begins to press the specimen. At the end of the
 process the specimen explodes. It is abnormal behavior.
 But when I start the script, before the simulation starts I press reload
 button and then start the script - the specimen has a normal destruction.

 Why can it be so?

 Thanks!

 __
 [ENG] Best Regards
 [GER] Mit freundlichen Grüßen
 [RUS] С наилучшими пожеланиями
 [UKR] З найкращими побажаннями

 Anton Gladkyy

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [svn] r1939 - in trunk: pkg/dem/DataClass pkg/dem/PreProcessor pkg/dem/meta py

2009-08-12 Thread eudoxos at BerliOS
Author: eudoxos
Date: 2009-08-12 23:12:21 +0200 (Wed, 12 Aug 2009)
New Revision: 1939

Modified:
   trunk/pkg/dem/DataClass/SpherePack.hpp
   trunk/pkg/dem/PreProcessor/TetraTestGen.cpp
   trunk/pkg/dem/meta/Tetra.cpp
   trunk/pkg/dem/meta/Tetra.hpp
   trunk/py/utils.py
Log:
1. Add #pragma once to SpherePack.hpp (possibly cause of 
https://bugs.launchpad.net/bugs/412442)
2. Fix crash in TetraTestGen (finally, I think), closing 
https://bugs.launchpad.net/bugs/408422
3. Add highlight parameter to utils.{facet,sphere,box}, passed to 
Body::geometricalModel 


Modified: trunk/pkg/dem/DataClass/SpherePack.hpp
===
--- trunk/pkg/dem/DataClass/SpherePack.hpp  2009-08-12 09:27:41 UTC (rev 
1938)
+++ trunk/pkg/dem/DataClass/SpherePack.hpp  2009-08-12 21:12:21 UTC (rev 
1939)
@@ -1,5 +1,7 @@
 // © 2009 Václav Šmilauer eudo...@arcig.cz
 
+#pragma once
+
 #includevector
 #includestring   
 using namespace std; // sorry

Modified: trunk/pkg/dem/PreProcessor/TetraTestGen.cpp
===
--- trunk/pkg/dem/PreProcessor/TetraTestGen.cpp 2009-08-12 09:27:41 UTC (rev 
1938)
+++ trunk/pkg/dem/PreProcessor/TetraTestGen.cpp 2009-08-12 21:12:21 UTC (rev 
1939)
@@ -2,6 +2,14 @@
 #includeyade/core/MetaBody.hpp
 #includeyade/pkg-dem/Shop.hpp
 
+#includeyade/pkg-common/BoundingVolumeMetaEngine.hpp
+#includeyade/pkg-common/InteractionGeometryMetaEngine.hpp
+#includeyade/pkg-common/PhysicalActionContainerReseter.hpp
+#includeyade/pkg-common/InsertionSortCollider.hpp
+#includeyade/pkg-common/MetaInteractingGeometry2AABB.hpp
+#includeyade/pkg-common/GravityEngines.hpp
+#includeyade/pkg-dem/NewtonsDampedLaw.hpp
+
 #includeTetraTestGen.hpp
 
 #includeyade/pkg-dem/Tetra.hpp
@@ -12,7 +20,27 @@
Shop::setDefaultint(param_timeStepUpdateInterval,-1);
 
rootBody=Shop::rootBody();
-   Shop::rootBodyActors(rootBody);
+
+   shared_ptrBoundingVolumeMetaEngine boundingVolumeDispatcher   = 
shared_ptrBoundingVolumeMetaEngine(new BoundingVolumeMetaEngine);
+   boundingVolumeDispatcher-add(new TetraAABB);
+   boundingVolumeDispatcher-add(new MetaInteractingGeometry2AABB);
+   rootBody-initializers.push_back(boundingVolumeDispatcher);
+   rootBody-engines.clear();
+   rootBody-engines.push_back(shared_ptrEngine(new BexResetter));
+   rootBody-engines.push_back(boundingVolumeDispatcher);
+   rootBody-engines.push_back(shared_ptrEngine(new 
InsertionSortCollider));
+   shared_ptrInteractionGeometryMetaEngine 
interactionGeometryDispatcher(new InteractionGeometryMetaEngine);
+   interactionGeometryDispatcher-add(new Tetra2TetraBang);
+   rootBody-engines.push_back(interactionGeometryDispatcher);
+   // do not add any InteractionPhysicsMetaEngine
+   shared_ptrTetraLaw constitutiveLaw(new TetraLaw);
+   rootBody-engines.push_back(constitutiveLaw);
+
+   shared_ptrGravityEngine gravityCondition(new GravityEngine);
+   gravityCondition-gravity=Vector3r(0,0,-9.81);
+   rootBody-engines.push_back(gravityCondition);
+   rootBody-engines.push_back(shared_ptrEngine(new NewtonsDampedLaw));
+
rootBody-dt=1e-5;

#if 0

Modified: trunk/pkg/dem/meta/Tetra.cpp
===
--- trunk/pkg/dem/meta/Tetra.cpp2009-08-12 09:27:41 UTC (rev 1938)
+++ trunk/pkg/dem/meta/Tetra.cpp2009-08-12 21:12:21 UTC (rev 1939)
@@ -373,16 +373,17 @@
 
 /*! Apply forces on tetrahedra in collision based on geometric configuration 
provided by Tetra2TetraBang.
  *
+ * DO NOT USE, probably doesn't work.
  * Comments on functionality limitations are in the code. It has not been 
tested at all!!! */
 void TetraLaw::action(MetaBody* rootBody)
 {
-
-   for(InteractionContainer::iterator 
contactI=rootBody-transientInteractions-begin(); 
contactI!=rootBody-transientInteractions-end(); ++contactI){
-   if (!(*contactI)-isReal()) continue; // Tetra2TetraBang::go 
returned false for this interaction, skip it
-   const shared_ptrTetraBang 
contactGeom(dynamic_pointer_castTetraBang((*contactI)-interactionGeometry));
+   FOREACH(const shared_ptrInteraction I, *rootBody-interactions){
+   // normally, we would test isReal(), but TetraLaw doesn't use 
interactionPhysics at all
+   if (!I-interactionGeometry) continue; // Tetra2TetraBang::go 
returned false for this interaction, skip it
+   const shared_ptrTetraBang 
contactGeom(dynamic_pointer_castTetraBang(I-interactionGeometry));
if(!contactGeom) continue;
 
-   const body_id_t idA=(*contactI)-getId1(), 
idB=(*contactI)-getId2();
+   const body_id_t idA=I-getId1(), idB=I-getId2();
const shared_ptrBody A=Body::byId(idA), B=Body::byId(idB);


Re: [Yade-dev] Facet Highlight

2009-08-12 Thread Václav Šmilauer

 I have tried this, but it does not highlight facets.
 
 Please, check the attached script.

Eh, you are passing highlight to utils.facet... that is something
different from what I said. I added that parameter in r1939 though so it
works now as you expect.

The trick is that the **kw params are passed to
Body::physicalParameters, whereas highlight is property of
Body::geometricalModel, therefor has to be passed separately.

Anyways, I would like to remove the obnoxious difference of
GeometricalModel and InteractingGeometry at some point... But that would
need larger discussion.

V.


___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Python script. different behavior

2009-08-12 Thread Václav Šmilauer

 Hmm, the problem seems in that distanceFactor and 2 artificial steps
 to find all cohesive contacts.

Yes, that is not saved to .xml at all. XML files describe the current
simulation setup, but python scripts describe how to manipulate
simulation (including its creation), which is more in the semantical
sense.



___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp