yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #10390
[Branch ~yade-pkg/yade/git-trunk] Rev 3789: Merge branch 'master' of github.com:yade/trunk
Merge authors:
Anton Gladky (gladky-anton)
Anton Gladky (gladky-anton)
Bruno Chareyre (bruno-chareyre)
Kneib François (francois-kneib)
------------------------------------------------------------
revno: 3789 [merge]
committer: Bruno Chareyre <bruno.chareyre@xxxxxxxxxxxxxxx>
timestamp: Tue 2014-01-14 23:07:49 +0100
message:
Merge branch 'master' of github.com:yade/trunk
removed:
scripts/ppa/createtar.py
added:
scripts/ppa/buildppa.py
modified:
CMakeLists.txt
ChangeLog
INSTALL
README.rst
core/main/main.py.in
doc/references.bib
doc/sphinx/citing.rst
doc/sphinx/installation.rst
doc/sphinx/publications.rst.in
doc/yade-articles.bib
doc/yade-conferences.bib
examples/packs/packs.py
gui/qt4/GLViewerMouse.cpp
pkg/common/Wall.cpp
pkg/dem/Ip2_FrictMat_FrictMat_FrictPhys.cpp
pkg/dem/ViscoelasticPM.cpp
pkg/dem/ViscoelasticPM.hpp
py/geom.py
py/pack/pack.py
py/runtime.py
py/utils.py
scripts/checks-and-tests/checks/checkWeight.py
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2013-11-21 22:57:34 +0000
+++ CMakeLists.txt 2014-01-07 07:32:51 +0000
@@ -52,6 +52,12 @@
ENDIF()
#===========================================================
+
+IF ("${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-512")
+ENDIF()
+
+#===========================================================
ADD_DEFINITIONS(" -DYADE_PTR_CAST=static_pointer_cast -DYADE_CAST=static_cast ")
IF (CMAKE_CXX_FLAGS)
#If flags are set, add only neccessary flags
=== modified file 'ChangeLog'
--- ChangeLog 2013-10-28 18:49:33 +0000
+++ ChangeLog 2014-01-10 20:30:37 +0000
@@ -1,6 +1,105 @@
==================================================
+yade-1.07.0
+Fri, 10 Jan 2014 21:23:33 +0100
+
+Anton Gladky (37):
+ Remove RELEASE file.
+ Add -ftrack-macro-expansion=0, if gcc>=4.8
+ Provide VTK6-support.
+ Use ADD_DEFINITIONS instead of adding those directly in CXX_FLAGS.
+ Remove information about yade-stable from Readme.
+ Add BicyclePedalEngine as a new kinematic motion.
+ Add -save-temps if GCC-4.8 is used.
+ Split Grid into Grid and Grid_GUI.
+ Add information about missing packages in documentation and external PPA. Closes: LP:1250928
+ Add notice about using libqglviewer-qt4-dev instead of libqglviewer-dev on older Ubuntu versions.
+ Add script to create PPA-packages. (Not finished)
+ Use othermirror for some ubuntu versions.
+ Add stl-gts example.
+ Add qt.View() to clumps-example.
+ Add one more check-script to check the functionality of ViscoElastic PM.
+ Consider massMultiply-parameter, calculating parameters in ViscoElasticPM.
+ Add functions to save and load clumps.
+ Set the higher pripority in sys.path to self-compiled modules. Closes LP:1254708
+ Fix volume calculation. Closes LP:1261415
+ Set the higher pripority in sys.path to self-compiled modules in yade-batch.
+ Update scripts for PPA.
+ Add configuration files, needed for PPA.
+ Minor update of PPA scripts.
+ Update information about yadedaily prebuilt packages.
+ Add support for qglviewer>=2.5.0.
+ Open GUI in packs/packs.py after 1 step to show all elements.
+ Raise warning, if no spheres are produced by regular* commands.
+ Update information about daily-packages.
+ Set one more paramter -ftemplate-depth-512 for clang
+ Prevent attraction forces in ViscPM due to viscosity
+ Add some more steps to checkWeight-script.
+ Minor formatting in references.
+ Remove cout accidentally added in a prev. commit.
+ Minor change of setFromTwoVectors in utils.py.
+ Rename createtar.py to buildppa.py.
+ Minor fix in docs.
+ Add RELEASE-file.
+
+Bruno Chareyre (17):
+ a function to increase the size of a single sphere (~>Thomas swelling)
+ easier manipulation of state files in TesselationWrapper
+ restore the python wrapping of utils.growParticles() as it was before fb02a74 (changed by mistake, sorry Christian)
+ give unique identifiers to trangulation's cells
+ FlowEngine::nCells retruns the number of finite cells; FlowEngine::getVertices returns the vertices of a cell defined by its id
+ make cmake output more consistent when missing dependency for LinSolv
+ Fix the behavior of FlowEngine.updateTriangulation=True
+ FlowEngine: increment a counter correctly
+ small changes in the installation section regarding suitesparse and related libs
+ installation.rst: smallfix in indentation
+ remove a not necessary sorting in FlowEngine, as it triggers a critical bug in the STL (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58800)
+ correct target values of the DEM-PFV checktest
+ Fix paths to online and packaged documentation (fix url error with GUI's hyperlinks)
+ DEM Background chapter: a note on the semantic strain vs. displacement for contact kinematics
+ Merge branch 'master' of github.com:yade/trunk
+ fix undefined "key" in triax-tutorial/script-session1.py
+ +1 published paper
+
+Christian Jakob (1):
+ small fix in an example script tetra/oneTetra.py
+
+Francois (3):
+ Fix missing REGISTER_CLASS_INDEX(...) into ViscElPhys. This macro is essential for a right law dispatch !
+ Corrected a minor mistake in code comments : k=2*r*E
+ Allow the contact between (coh)frictMat and viscElMat as frictPhys. Almost everything was done by inheritance, just had to convert stiffnesses to modulus and modulus to stiffnesses to ensure material compatibility. Note that for the moment the timeStepper cannot handle this kind of simulations -> will be fixed soon.
+
+Jan Stransky (4):
+ Modified error message if not yade.runtime.hasDisplay (bug #1241817)
+ fixed SyntaxError from previous commit
+ uncomment and modify utils.forcesOnCoordPlane function
+ corrected mistake in examples/test/triax.py
+
+Jerome Duriez (15):
+ - Introducing (uncommenting in fact) tens/shearBreakRel variables in JCFpmState : relative part of broken interactions per body (instead of absolute number). - Few changes in some doc of JCFpm variables.
+ Quite important changes in JCFpm code
+ Modifying JCFpm example scripts so that they still work after previous commit
+ Re-put some commented lines, after discussion of this thread (https://lists.launchpad.net/yade-dev/msg10185.html), thanks Anton. The comments solution is (at the moment ?) finally still used to avoid putting a new variable in VTKRecorder..
+ A script example for JCFpm : two rock parts with one joint in the middle, like in laboratory experiments
+ Some forgotten corrections in some example scripts, so that they still work after changes of today in JCFpm
+ Some corrections in the JCFpm doc (hyperlinks...)
+ (Hopefully) Fixing some rst links in DEM Background doc
+ Some changes in the doc of getStress() function, to be consistent with the source code (https://answers.launchpad.net/yade/+question/239919)
+ Merge branch 'master' of github.com:yade/trunk
+ Idem as previous commit
+ Restoring the 2d version of growParticle previously erased by mistake..
+ Some hyperlinks in JCFpm doc corrected
+ Typos and hyperlinks corrected in Peri3dController doc
+ Correction of a link in TesselationWrapper() doc
+
+Klaus Thoeni (1):
+ add CGAL link and delete libgmp3 from install list
+
+Raphael Maurin (1):
+ Change in the calculation of the normal and tangential stiffness and damping. The change affects only the behavior when one of the two parameters is zero, e.g. for two particles with different stiffness k1 and k2, the contact stiffness will always be k = k1*k2/(k1+k2). Before it gave the same except when k2 = 0 (respectively k1 = 0), where it gave k = k1 (resp. k=k2). This is done to ensure continuity in the behavior when one of the two parameter tend to zero. Add a function contactParameterCalculation in Ip2_ViscElMat_ViscElMat_ViscElPhys to avoid code duplication.
+
+==================================================
yade-1.05.0
-Mon Oct 28 19:49:48 2013 +0200
+Mon, Oct 28 19:49:48 2013 +0200
Anton Gladky (19):
Add system-component of boost to be linked.
@@ -76,7 +175,7 @@
==================================================
yade-1.00.0
-Sun Sep 29 23:10:48 2013 +0200
+Sun, Sep 29 23:10:48 2013 +0200
Anton Gladky (64):
Remove release file.
@@ -302,7 +401,7 @@
==================================================
yade-0.97.0
-Sun May 12 14:48:29 2013 +0200
+Sun, May 12 14:48:29 2013 +0200
Anton Gladky (42):
Remove release-file.
@@ -447,7 +546,7 @@
==================================================
yade-0.95.0
-Tue Mar 5 20:36:40 2013 +0100
+Tue, Mar 5 20:36:40 2013 +0100
Anton Gladky (41):
Remove RELEASE file.
@@ -640,7 +739,7 @@
==================================================
yade-0.90.0
-Sat Oct 13 15:16:55 2012 +0200
+Sat, Oct 13 15:16:55 2012 +0200
Anton Gladky (142):
Remove RELEASE file.
@@ -912,7 +1011,7 @@
==================================================
yade-0.80.0
-Wed May 2 21:05:12 2012 +0200
+Wed, May 2 21:05:12 2012 +0200
Anton Gladky (81):
Add forgotten format to ymport.textExt
@@ -1123,7 +1222,7 @@
==================================================
yade-0.70.0
-Sun Oct 23 16:49:34 2011 +0200
+Sun, Oct 23 16:49:34 2011 +0200
Anton Gladky (129):
1. Prediction of simulation finish time is added to HTTP-batch server.
@@ -1591,7 +1690,7 @@
==================================================
yade-0.60.0
-Sun Nov 7 09:55:43 2010 +0100
+Sun, Nov 7 09:55:43 2010 +0100
Anton Gladky (54):
1. utils.facetCylinder and utils.facetBox orientations are changed according to https://lists.launchpad.net/yade-dev/msg04886.html
@@ -1864,7 +1963,7 @@
==================================================
yade-0.50.0
-Wed Jun 9 08:30:02 2010 +0200
+Wed, Jun 9 08:30:02 2010 +0200
Anton Gladky (77):
Added an example of VTK-recorder using. Thanks Sergei Doroffenko aka Sega
@@ -2464,7 +2563,7 @@
==================================================
yade-0.20.2
-Sat Sep 19 21:41:52 2009 +0200
+Sat, Sep 19 21:41:52 2009 +0200
Anton Gladky (34):
1. This is my first test commit 2. Added some initial files for mining rocks classes simulation
@@ -2999,7 +3098,7 @@
==================================================
yade-0.20.0
-Sat Sep 19 21:41:52 2009 +0200
+Sat, Sep 19 21:41:52 2009 +0200
Anton Gladky (33):
1. This is my first test commit 2. Added some initial files for mining rocks classes simulation
@@ -3452,7 +3551,7 @@
==================================================
yade-0.12.1
-Sat Nov 22 22:48:27 2008 +0000
+Sat, Nov 22 22:48:27 2008 +0000
Bruno Chareyre (6):
A wrong comment on contact laws in PFC3D is removed.
@@ -3551,7 +3650,7 @@
==================================================
yade-0.12.0
-Wed Aug 20 14:37:02 2008 +0000
+Wed, Aug 20 14:37:02 2008 +0000
Janek Kozicki (8):
testing if SVN commit messages can go to launchpad
@@ -3592,7 +3691,7 @@
==================================================
yade-0.12.0rc1
-Sun Jul 27 10:52:50 2008 +0000
+Sun, Jul 27 10:52:50 2008 +0000
Bruno Chareyre (69):
Modifications in the equations of "non-viscous" damping. The equations are now as defined by Cundall.
=== modified file 'INSTALL'
--- INSTALL 2011-10-23 14:49:34 +0000
+++ INSTALL 2014-01-13 17:49:26 +0000
@@ -1,1 +1,9 @@
+Installation instructions are updating regularly.
+The most actual instruction can be found on the
+website:
+
http://www.yade-dem.org/doc/installation.html
+
+which is generated from the following file:
+
+doc/sphinx/installation.rst
=== modified file 'README.rst'
--- README.rst 2013-11-10 21:23:19 +0000
+++ README.rst 2014-01-06 14:13:01 +0000
@@ -16,9 +16,9 @@
**Downloads:**
-- Packages for Ubuntu:
+- Packages for Ubuntu and Debian:
- - Daily-builds: https://launchpad.net/~yade-pkg/+archive/snapshots
+ - https://yade-dem.org/doc/installation.html#packages
- External packages: https://launchpad.net/~yade-users/+archive/external
- Tarballs of different versions:
=== modified file 'core/main/main.py.in'
--- core/main/main.py.in 2013-12-12 13:52:40 +0000
+++ core/main/main.py.in 2014-01-14 18:37:09 +0000
@@ -220,7 +220,10 @@
ipshell=InteractiveShellEmbed()
ipshell()
elif yade.runtime.ipython_version>=12:
- from IPython.frontend.terminal.embed import InteractiveShellEmbed
+ if yade.runtime.ipython_version>=100:
+ from IPython.terminal.embed import InteractiveShellEmbed
+ else:
+ from IPython.frontend.terminal.embed import InteractiveShellEmbed
from IPython.config.loader import Config
cfg = Config()
prompt_config = cfg.PromptManager
=== modified file 'doc/references.bib'
--- doc/references.bib 2013-10-04 12:35:58 +0000
+++ doc/references.bib 2014-01-07 15:41:53 +0000
@@ -621,12 +621,38 @@
}
@article{Ivars2011,
-title = "The synthetic rock mass approach for jointed rock mass modelling ",
-journal = "International Journal of Rock Mechanics and Mining Sciences ",
-volume = "48",
-number = "2",
-pages = "219 - 244",
-year = "2011",
-doi = "10.1016/j.ijrmms.2010.11.014",
-author = "Diego Mas Ivars and Matthew E. Pierce and Caroline Darcel and Juan Reyes-Montes and David O. Potyondy and R. Paul Young and Peter A. Cundall"
+ title = "The synthetic rock mass approach for jointed rock mass modelling ",
+ journal = "International Journal of Rock Mechanics and Mining Sciences ",
+ volume = "48",
+ number = "2",
+ pages = "219 - 244",
+ year = "2011",
+ doi = "10.1016/j.ijrmms.2010.11.014",
+ author = "Diego Mas Ivars and Matthew E. Pierce and Caroline Darcel and Juan Reyes-Montes and David O. Potyondy and R. Paul Young and Peter A. Cundall"
+}
+
+@book{Radjai2011,
+ title={Discrete-Element Modeling of Granular Materials},
+ author={Radjai, F. and Dubois, F.},
+ isbn={9781848212602},
+ lccn={2010051720},
+ url={http://books.google.com/books?id=w2ijcQAACAAJ},
+ year={2011},
+ publisher={John Wiley \& Sons}
+}
+
+@article{Schwager2007,
+ year={2007},
+ issn={1434-5021},
+ journal={Granular Matter},
+ volume={9},
+ number={6},
+ doi={10.1007/s10035-007-0065-z},
+ title={Coefficient of restitution and linear–dashpot model revisited},
+ url={http://dx.doi.org/10.1007/s10035-007-0065-z},
+ publisher={Springer-Verlag},
+ keywords={Particle collisions; Coefficient of restitution},
+ author={Schwager, Thomas and Pöschel, Thorsten},
+ pages={465-469},
+ language={English}
}
=== modified file 'doc/sphinx/citing.rst'
--- doc/sphinx/citing.rst 2012-09-08 01:19:45 +0000
+++ doc/sphinx/citing.rst 2014-01-13 17:49:25 +0000
@@ -16,7 +16,7 @@
Citing chapters of Yade Documentation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-The first edition of Yade documentation is seen as a collection with the three volumes (or "chapters") listed below, also provided as `bibtex entries <http://bazaar.launchpad.net/~yade-dev/yade/trunk/view/head:/doc/citing_yade.bib>`_. Please cite the chapter that is the most relevant in your case. For instance, a paper using one of the documented contact laws will cite the reference documentation [yade:reference]_; if programing concepts are discussed, Yade's manual [yade:manual]_ will be cited; the theoretical background [yade:background]_ can be used as the refence for contact detection, time-step determination, or periodic boundary conditions.
+The first edition of Yade documentation is seen as a collection with the three volumes (or "chapters") listed below, also provided as `bibtex entries <https://github.com/yade/trunk/blob/master/doc/citing_yade.bib>`_. Please cite the chapter that is the most relevant in your case. For instance, a paper using one of the documented contact laws will cite the reference documentation [yade:reference]_; if programing concepts are discussed, Yade's manual [yade:manual]_ will be cited; the theoretical background [yade:background]_ can be used as the refence for contact detection, time-step determination, or periodic boundary conditions.
* The reference documentation includes details on equations and algorithms found at the highest levels of Yade (contact laws, boundary conditions controllers, pre- and post-processing modules,...) `(pdf version) <https://yade-dem.org/w/images/9/98/YadeRefDoc.pdf>`__:
V. Šmilauer, E. Catalano, B. Chareyre, S. Dorofeenko, J. Duriez, A. Gladky, J. Kozicki, C. Modenese, L. Scholtès, L. Sibille, J. Stránský, and K. Thoeni, “Yade Reference Documentation,” in Yade Documentation (V. Šmilauer, ed.), The Yade Project, 1st ed., 2010. http://yade-dem.org/doc/.
=== modified file 'doc/sphinx/installation.rst'
--- doc/sphinx/installation.rst 2013-12-29 22:50:51 +0000
+++ doc/sphinx/installation.rst 2014-01-13 17:49:26 +0000
@@ -25,7 +25,7 @@
sudo apt-get install yadedaily
If you have another distribution, not Ubuntu Precise, be sure to use the
-correct name in the first line (for instanse, jessie, trusty or wheezy).
+correct name in the first line (for instance, jessie, trusty or wheezy).
After that you can normally start Yade using "yadedaily" or "yadedaily-batch" command.
@@ -35,11 +35,13 @@
It uses pbuilder to build packages, so all packages are building in a clean environment.
If you do not need yadedaily-package any more, just remove the
-corresponding line in /etc/apt/sources.list. To remove our key from
-keyring, execute the following commands::
+corresponding line in /etc/apt/sources.list and the package itself::
+
+ sudo apt-get remove yadedaily
+
+To remove our key from keyring, execute the following command::
sudo apt-key remove AA915EEB
- sudo apt-get purge yadedaily
Since 2011 all Ubuntu versions (starting from 11.10, Oneiric) and Debian (starting from Wheezy)
are having already Yade in their main repositories. There are only stable releases are placed.
@@ -47,10 +49,14 @@
sudo apt-get install yade
-To check, what version of Yade is in specific Distribution, check the links
+To check, what version of Yade is in specific distribution, visit the links
for `Ubuntu <https://launchpad.net/ubuntu/+source/yade>`_ and
-`Debian <http://packages.qa.debian.org/y/yade.html>`_.
+`Debian <http://packages.qa.debian.org/y/yade.html>`_.
+`Debian-Backports <http://backports.debian.org/Instructions>`_
+repository is updating regularly to bring the newest Yade to a users of stable
+Debians.
+Daily and stable Yade versions can coexist without any conflicts.
Source code
------------
@@ -120,7 +126,7 @@
distributions. Just copy&paste to the terminal. To perform commands you
should have root privileges
-.. warning:: if you have Ubuntu 12.10 or older, you need to install libqglviewer-qt4-dev
+.. warning:: If you have Ubuntu 12.10 or older, you need to install libqglviewer-qt4-dev
package instead of libqglviewer-dev.
=== modified file 'doc/sphinx/publications.rst.in'
--- doc/sphinx/publications.rst.in 2011-12-02 17:24:35 +0000
+++ doc/sphinx/publications.rst.in 2014-01-13 17:49:25 +0000
@@ -8,7 +8,7 @@
Citing Yade
---------------------
-Corresponding bibtex entries `here <http://bazaar.launchpad.net/~yade-dev/yade/trunk/view/head:/doc/citing_yade.bib>`_. Pdf versions are available for each of them. See also `"Acknowledging Yade" <citing.html>`_.
+Corresponding bibtex entries `here <https://github.com/yade/trunk/blob/master/doc/citing_yade.bib>`_. Pdf versions are available for each of them. See also `"Acknowledging Yade" <citing.html>`_.
@bib2rst.bib2rst('../yade-docref.bib')@
=== modified file 'doc/yade-articles.bib'
--- doc/yade-articles.bib 2013-08-26 21:57:21 +0000
+++ doc/yade-articles.bib 2014-01-06 09:35:37 +0000
@@ -587,4 +587,17 @@
pages={221--235}
}
-
+@article{Hilton2013,
+ title = {Drag force on a spherical intruder in a granular bed at low Froude number},
+ author = {Hilton, J. E. and Tordesillas, A.},
+ journal = {Phys. Rev. E},
+ volume = {88},
+ issue = {6},
+ pages = {062203},
+ numpages = {8},
+ year = {2013},
+ month = {Dec},
+ publisher = {American Physical Society},
+ doi = {10.1103/PhysRevE.88.062203},
+ url = {http://link.aps.org/doi/10.1103/PhysRevE.88.062203}
+}
=== modified file 'doc/yade-conferences.bib'
--- doc/yade-conferences.bib 2013-08-26 21:53:51 +0000
+++ doc/yade-conferences.bib 2014-01-13 17:49:25 +0000
@@ -592,12 +592,22 @@
}
@InProceedings{Maurin2013,
- title={Discrete element modelling of bedload transport},
- author={Maurin, Raphael and Chareyre, Bruno and Chauchat, Julien and Frey, Philippe},
- booktitle={Proceedings of THESIS 2013, Two-pHase modElling for Sediment dynamIcS in Geophysical Flows},
- adress = {Chatou, France},
- pages={6p},
- url = {https://www.yade-dem.org/publi/Maurin_et_al_THESIS_meta.pdf},
- year={2013}
+ title={Discrete element modelling of bedload transport},
+ author={Maurin, Raphael and Chareyre, Bruno and Chauchat, Julien and Frey, Philippe},
+ booktitle={Proceedings of THESIS 2013, Two-pHase modElling for Sediment dynamIcS in Geophysical Flows},
+ adress = {Chatou, France},
+ pages={6p},
+ url = {https://www.yade-dem.org/publi/Maurin_et_al_THESIS_meta.pdf},
+ year={2013}
}
+@InProceedings{Elias2013,
+ author={Eliáš, J.},
+ title={Dem simulation of railway ballast using polyhedral elemental shapes},
+ journal={Particle-Based Methods III: Fundamentals and Applications - Proceedings of the 3rd International Conference on Particle-based MethodsFundamentals and Applications, Particles 2013},
+ year={2013},
+ pages={247-256},
+ url={https://www.vutbr.cz/www_base/gigadisk.php?i=95194aa9a},
+ document_type={Conference Paper},
+ source={Scopus},
+}
=== modified file 'examples/packs/packs.py'
--- examples/packs/packs.py 2013-10-04 11:58:44 +0000
+++ examples/packs/packs.py 2014-01-06 13:59:54 +0000
@@ -112,11 +112,6 @@
O.bodies.append(wall((0,0,-10),axis=2))
-try:
- from yade import qt
- qt.Controller()
- qt.View()
-except ImportError: pass
O.engines=[
#SubdomainBalancer(colorize=True,initRun=True,iterPeriod=100),
@@ -153,6 +148,12 @@
# we don't care about physical accuracy here, (over)critical step is fine as long as the simulation doesn't explode
O.dt=PWaveTimeStep()
+O.run(1,True)
+try:
+ from yade import qt
+ qt.Controller()
+ qt.View()
+except ImportError: pass
O.saveTmp()
O.timingEnabled=True
#O.run(10000,True)
=== modified file 'gui/qt4/GLViewerMouse.cpp'
--- gui/qt4/GLViewerMouse.cpp 2013-10-16 05:48:14 +0000
+++ gui/qt4/GLViewerMouse.cpp 2014-01-06 13:57:32 +0000
@@ -36,20 +36,34 @@
#endif
void GLViewer::mouseMovesCamera(){
- camera()->frame()->setWheelSensitivity(-1.0f);
-
- setMouseBinding(Qt::SHIFT + Qt::LeftButton, SELECT);
- //setMouseBinding(Qt::RightButton, NO_CLICK_ACTION);
- setMouseBinding(Qt::SHIFT + Qt::LeftButton + Qt::RightButton, FRAME, ZOOM);
- setMouseBinding(Qt::SHIFT + Qt::MidButton, FRAME, TRANSLATE);
- setMouseBinding(Qt::SHIFT + Qt::RightButton, FRAME, ROTATE);
- setWheelBinding(Qt::ShiftModifier , FRAME, ZOOM);
-
- setMouseBinding(Qt::LeftButton + Qt::RightButton, CAMERA, ZOOM);
- setMouseBinding(Qt::MidButton, CAMERA, ZOOM);
- setMouseBinding(Qt::LeftButton, CAMERA, ROTATE);
- setMouseBinding(Qt::RightButton, CAMERA, TRANSLATE);
- setWheelBinding(Qt::NoModifier, CAMERA, ZOOM);
+ camera()->frame()->setWheelSensitivity(-1.0f);
+
+ setWheelBinding(Qt::ShiftModifier , FRAME, ZOOM);
+ setWheelBinding(Qt::NoModifier, CAMERA, ZOOM);
+
+#if QGLVIEWER_VERSION>=0x020500
+ setMouseBinding(Qt::ShiftModifier, Qt::LeftButton, SELECT);
+
+ setMouseBinding(Qt::ShiftModifier, Qt::LeftButton | Qt::RightButton, FRAME, ZOOM);
+ setMouseBinding(Qt::ShiftModifier, Qt::MidButton, FRAME, TRANSLATE);
+ setMouseBinding(Qt::ShiftModifier, Qt::RightButton, FRAME, ROTATE);
+
+ setMouseBinding(Qt::NoModifier, Qt::RightButton, CAMERA, ZOOM);
+ setMouseBinding(Qt::NoModifier, Qt::MidButton, CAMERA, ZOOM);
+ setMouseBinding(Qt::NoModifier, Qt::LeftButton, CAMERA, ROTATE);
+ setMouseBinding(Qt::NoModifier, Qt::RightButton, CAMERA, TRANSLATE);
+#else
+ setMouseBinding(Qt::SHIFT + Qt::LeftButton, SELECT);
+
+ setMouseBinding(Qt::SHIFT + Qt::LeftButton + Qt::RightButton, FRAME, ZOOM);
+ setMouseBinding(Qt::SHIFT + Qt::MidButton, FRAME, TRANSLATE);
+ setMouseBinding(Qt::SHIFT + Qt::RightButton, FRAME, ROTATE);
+
+ setMouseBinding(Qt::LeftButton + Qt::RightButton, CAMERA, ZOOM);
+ setMouseBinding(Qt::MidButton, CAMERA, ZOOM);
+ setMouseBinding(Qt::LeftButton, CAMERA, ROTATE);
+ setMouseBinding(Qt::RightButton, CAMERA, TRANSLATE);
+#endif
};
void GLViewer::mouseMovesManipulatedFrame(qglviewer::Constraint* c){
=== modified file 'pkg/common/Wall.cpp'
--- pkg/common/Wall.cpp 2010-11-12 08:03:16 +0000
+++ pkg/common/Wall.cpp 2014-01-13 09:23:51 +0000
@@ -39,6 +39,7 @@
a1[ax0]=b1[ax0]=a2[ax0]=b2[ax0]=0;
a1[ax1]=mn1-step; a2[ax2]=mn2-step;
b1[ax1]=mn1+step*(div+2); b2[ax2]=mn2+step*(div+2);
+ glColor3v(cm->color);
glBegin(GL_LINES);
for(int i=0; i<=div; i++){
a1[ax2]=b1[ax2]=mn1+i*step;
=== modified file 'pkg/dem/Ip2_FrictMat_FrictMat_FrictPhys.cpp'
--- pkg/dem/Ip2_FrictMat_FrictMat_FrictPhys.cpp 2013-12-18 14:45:51 +0000
+++ pkg/dem/Ip2_FrictMat_FrictMat_FrictPhys.cpp 2014-01-08 14:36:59 +0000
@@ -13,6 +13,7 @@
#include<yade/core/Omega.hpp>
#include<yade/core/Scene.hpp>
#include<yade/pkg/common/ElastMat.hpp>
+#include<yade/pkg/dem/ViscoelasticPM.hpp>
#include <cassert>
@@ -22,8 +23,32 @@
, const shared_ptr<Interaction>& interaction)
{
if(interaction->phys) return;
+
const shared_ptr<FrictMat>& mat1 = YADE_PTR_CAST<FrictMat>(b1);
const shared_ptr<FrictMat>& mat2 = YADE_PTR_CAST<FrictMat>(b2);
+
+ Real Ra,Rb;//Vector3r normal;
+ assert(dynamic_cast<GenericSpheresContact*>(interaction->geom.get()));//only in debug mode
+ GenericSpheresContact* sphCont=YADE_CAST<GenericSpheresContact*>(interaction->geom.get());
+ Ra=sphCont->refR1>0?sphCont->refR1:sphCont->refR2;
+ Rb=sphCont->refR2>0?sphCont->refR2:sphCont->refR1;
+
+ //The two contitions above are used in the case of a ViscElMat/FrictMat contact, if kn and ks are set for the ViscElMat. Young and Poisson are deduced. This is not a perfect solution and the user should set young/poisson only.
+ if( b1->getClassIndex()==ViscElMat::getClassIndexStatic()){
+ const shared_ptr<ViscElMat>& mat1 = YADE_PTR_CAST<ViscElMat>(b1);
+ if( (!isnan(mat1->kn)) && (!isnan(mat1->ks)) ){
+ mat1->young=mat1->kn/(2.*Ra);
+ mat1->poisson=mat1->ks/mat1->kn;
+ }
+ }
+ if( b2->getClassIndex()==ViscElMat::getClassIndexStatic()){
+ const shared_ptr<ViscElMat>& mat2 = YADE_PTR_CAST<ViscElMat>(b2);
+ if( (!isnan(mat2->kn)) && (!isnan(mat2->ks)) ){
+ mat2->young=mat2->kn/(2.*Rb);
+ mat2->poisson=mat2->ks/mat2->kn;
+ }
+ }
+
interaction->phys = shared_ptr<FrictPhys>(new FrictPhys());
const shared_ptr<FrictPhys>& contactPhysics = YADE_PTR_CAST<FrictPhys>(interaction->phys);
Real Ea = mat1->young;
@@ -31,12 +56,6 @@
Real Va = mat1->poisson;
Real Vb = mat2->poisson;
- Real Ra,Rb;//Vector3r normal;
- assert(dynamic_cast<GenericSpheresContact*>(interaction->geom.get()));//only in debug mode
- GenericSpheresContact* sphCont=YADE_CAST<GenericSpheresContact*>(interaction->geom.get());
- Ra=sphCont->refR1>0?sphCont->refR1:sphCont->refR2;
- Rb=sphCont->refR2>0?sphCont->refR2:sphCont->refR1;
-
//harmonic average of the two stiffnesses when (2*Ri*Ei) is the stiffness of a contact point on sphere "i"
Real Kn = 2*Ea*Ra*Eb*Rb/(Ea*Ra+Eb*Rb);
//same for shear stiffness
=== modified file 'pkg/dem/ViscoelasticPM.cpp'
--- pkg/dem/ViscoelasticPM.cpp 2013-12-04 19:25:29 +0000
+++ pkg/dem/ViscoelasticPM.cpp 2014-01-09 07:12:14 +0000
@@ -42,12 +42,22 @@
mass2 = Body::byId(interaction->getId2())->state->mass;
}
- const Real kn1 = mat1->kn*mass1; const Real cn1 = mat1->cn*mass1;
- const Real ks1 = mat1->ks*mass1; const Real cs1 = mat1->cs*mass1;
+ GenericSpheresContact* sphCont=YADE_CAST<GenericSpheresContact*>(interaction->geom.get());
+ Real R1=sphCont->refR1>0?sphCont->refR1:sphCont->refR2;
+ Real R2=sphCont->refR2>0?sphCont->refR2:sphCont->refR1;
+
+ const Real kn1 = isnan(mat1->kn)?2*mat1->young*R1:mat1->kn*mass1;
+ const Real cn1 = mat1->cn*mass1;
+ const Real ks1 = isnan(mat1->ks)?kn1*mat1->poisson:mat1->ks*mass1;
+ const Real cs1 = mat1->cs*mass1;
+
const Real mR1 = mat1->mR; const Real mR2 = mat2->mR;
const int mRtype1 = mat1->mRtype; const int mRtype2 = mat2->mRtype;
- const Real kn2 = mat2->kn*mass2; const Real cn2 = mat2->cn*mass2;
- const Real ks2 = mat2->ks*mass2; const Real cs2 = mat2->cs*mass2;
+
+ const Real kn2 = isnan(mat2->kn)?2*mat2->young*R2:mat2->kn*mass2;
+ const Real cn2 = mat2->cn*mass2;
+ const Real ks2 = isnan(mat2->ks)?kn2*mat2->poisson:mat2->ks*mass2;
+ const Real cs2 = mat2->cs*mass2;
ViscElPhys* phys = new ViscElPhys();
@@ -176,8 +186,16 @@
shearForce += phys.ks*dt*shearVelocity; // the elastic shear force have a history, but
Vector3r shearForceVisc = Vector3r::Zero(); // the viscous shear damping haven't a history because it is a function of the instant velocity
- phys.normalForce = ( phys.kn * geom.penetrationDepth + phys.cn * normalVelocity ) * geom.normal;
+ // Prevent appearing of attraction forces due to a viscous component
+ // [Radjai2011], page 3, equation [1.7]
+ // [Schwager2007]
+ const Real normForceReal = phys.kn * geom.penetrationDepth + phys.cn * normalVelocity;
+ if (normForceReal < 0) {
+ phys.normalForce = Vector3r::Zero();
+ } else {
+ phys.normalForce = normForceReal * geom.normal;
+ }
Vector3r momentResistance = Vector3r::Zero();
if (phys.mR>0.0) {
=== modified file 'pkg/dem/ViscoelasticPM.hpp'
--- pkg/dem/ViscoelasticPM.hpp 2013-12-18 08:04:27 +0000
+++ pkg/dem/ViscoelasticPM.hpp 2014-01-09 07:12:14 +0000
@@ -4,24 +4,24 @@
#pragma once
-#include<yade/core/Material.hpp>
+#include<yade/pkg/common/ElastMat.hpp>
#include<yade/pkg/dem/FrictPhys.hpp>
#include<yade/pkg/common/Dispatching.hpp>
#include<yade/pkg/dem/ScGeom.hpp>
+#include<yade/pkg/dem/DemXDofGeom.hpp>
/* Simple viscoelastic model */
/// Material
/// Note: Shop::getViscoelasticFromSpheresInteraction can get kn,cn,ks,cs from a analytical solution of a pair spheres interaction problem.
-class ViscElMat : public Material {
+class ViscElMat : public FrictMat {
public:
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.",
+ YADE_CLASS_BASE_DOC_ATTRS_CTOR(ViscElMat,FrictMat,"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"))
((Real,cs,NaN,,"Shear viscous constant"))
- ((Real,frictionAngle,NaN,,"Friction angle [rad]"))
((bool,massMultiply,true,,"Stiffness and viscosity are multiplied by the reduced mass. If massMultiply=false, these parameter are set explicitly without mass multiplication"))
((Real,mR,0.0,,"Rolling resistance, see [Zhou1999536]_."))
((unsigned int,mRtype,1,,"Rolling resistance type, see [Zhou1999536]_. mRtype=1 - equation (3) in [Zhou1999536]_; mRtype=2 - equation (4) in [Zhou1999536]_."))
@@ -32,7 +32,7 @@
((std::string,CapillarType,"",,"Different types of capillar interaction: Willett_numeric, Willett_analytic [Willett2000]_ , Weigert [Weigert1999]_ , Rabinovich [Rabinov2005]_ ")),
createIndex();
);
- REGISTER_CLASS_INDEX(ViscElMat,Material);
+ REGISTER_CLASS_INDEX(ViscElMat,FrictMat);
};
REGISTER_SERIALIZABLE(ViscElMat);
@@ -81,7 +81,9 @@
virtual void go(shared_ptr<IGeom>&, shared_ptr<IPhys>&, Interaction*);
private:
Real calculateCapillarForce(const ScGeom& geom, ViscElPhys& phys);
+ public :
FUNCTOR2D(ScGeom,ViscElPhys);
YADE_CLASS_BASE_DOC(Law2_ScGeom_ViscElPhys_Basic,LawFunctor,"Linear viscoelastic model operating on :yref:`ScGeom` and :yref:`ViscElPhys`. The model is mostly based on the paper for For details see Pournin [Pournin2001]_ .");
+ DECLARE_LOGGER;
};
REGISTER_SERIALIZABLE(Law2_ScGeom_ViscElPhys_Basic);
=== modified file 'py/geom.py'
--- py/geom.py 2013-03-08 21:26:47 +0000
+++ py/geom.py 2014-01-14 18:37:09 +0000
@@ -90,7 +90,10 @@
return ret
#facetCylinder==========================================================
-def facetCylinder(center,radius,height,orientation=Quaternion.Identity,segmentsNumber=10,wallMask=7,angleRange=None,closeGap=False,**kw):
+def facetCylinder(center,radius,height,orientation=Quaternion.Identity,
+ segmentsNumber=10,wallMask=7,angleRange=None,closeGap=False,
+ radiusTopInner=-1, radiusBottomInner=-1,
+ **kw):
"""
Create arbitrarily-aligned cylinder composed of facets, with given center, radius, height and orientation.
Return List of facets forming the cylinder;
@@ -98,6 +101,8 @@
:param Vector3 center: center of the created cylinder
:param float radius: cylinder radius
:param float height: cylinder height
+ :param float radiusTopInner: inner radius of cylinders top, -1 by default
+ :param float radiusBottomInner: inner radius of cylinders bottom, -1 by default
:param Quaternion orientation: orientation of the cylinder; the reference orientation has axis along the $+x$ axis.
:param int segmentsNumber: number of edges on the cylinder surface (>=5)
:param bitmask wallMask: determines which walls will be created, in the order up (1), down (2), side (4). The numbers are ANDed; the default 7 means to create all walls
@@ -109,7 +114,11 @@
if (radius<=0): raise RuntimeError("The radius should have the positive value");
if (height<=0): wallMask = 1;
- return facetCylinderConeGenerator(center=center,radiusTop=radius,height=height,orientation=orientation,segmentsNumber=segmentsNumber,wallMask=wallMask,angleRange=angleRange,closeGap=closeGap,**kw)
+ return facetCylinderConeGenerator(center=center,radiusTop=radius,height=height,
+ orientation=orientation,segmentsNumber=segmentsNumber,wallMask=wallMask,
+ angleRange=angleRange,closeGap=closeGap,
+ radiusTopInner=radiusTopInner, radiusBottomInner=radiusBottomInner,
+ **kw)
#facetSphere==========================================================
def facetSphere(center,radius,thetaResolution=8,phiResolution=8,returnElementMap=False,**kw):
@@ -155,7 +164,10 @@
#facetCone==============================================================
-def facetCone(center,radiusTop,radiusBottom,height,orientation=Quaternion.Identity,segmentsNumber=10,wallMask=7,angleRange=None,closeGap=False,**kw):
+def facetCone(center,radiusTop,radiusBottom,height,orientation=Quaternion.Identity,
+ segmentsNumber=10,wallMask=7,angleRange=None,closeGap=False,
+ radiusTopInner=-1, radiusBottomInner=-1,
+ **kw):
"""
Create arbitrarily-aligned cone composed of facets, with given center, radius, height and orientation.
Return List of facets forming the cone;
@@ -163,6 +175,8 @@
:param Vector3 center: center of the created cylinder
:param float radiusTop: cone top radius
:param float radiusBottom: cone bottom radius
+ :param float radiusTopInner: inner radius of cones top, -1 by default
+ :param float radiusBottomInner: inner radius of cones bottom, -1 by default
:param float height: cone height
:param Quaternion orientation: orientation of the cone; the reference orientation has axis along the $+x$ axis.
:param int segmentsNumber: number of edges on the cone surface (>=5)
@@ -174,7 +188,11 @@
# check zero dimentions
if ((radiusBottom<=0) and (radiusTop<=0)): raise RuntimeError("The radiusBottom or radiusTop should have the positive value");
- return facetCylinderConeGenerator(center=center,radiusTop=radiusTop,radiusBottom=radiusBottom,height=height,orientation=orientation,segmentsNumber=segmentsNumber,wallMask=wallMask,angleRange=angleRange,closeGap=closeGap,**kw)
+ return facetCylinderConeGenerator(center=center,radiusTop=radiusTop,
+ radiusBottom=radiusBottom,height=height,orientation=orientation,segmentsNumber=segmentsNumber,
+ wallMask=wallMask,angleRange=angleRange,closeGap=closeGap,
+ radiusTopInner=radiusTopInner, radiusBottomInner=radiusBottomInner,
+ **kw)
#facetPolygon===========================================================
def facetPolygon(center,radiusOuter,orientation=Quaternion.Identity,segmentsNumber=10,angleRange=None,radiusInner=0,**kw):
@@ -324,7 +342,12 @@
#facetCylinderConeGenerator=============================================
-def facetCylinderConeGenerator(center,radiusTop,height,orientation=Quaternion.Identity,segmentsNumber=10,wallMask=7,angleRange=None,closeGap=False,radiusBottom=-1,**kw):
+def facetCylinderConeGenerator(center,radiusTop,height,orientation=Quaternion.Identity,
+ segmentsNumber=10,wallMask=7,angleRange=None,closeGap=False,
+ radiusBottom=-1,
+ radiusTopInner=-1,
+ radiusBottomInner=-1,
+ **kw):
"""
Please, do not use this function directly! Use geom.facetCylinder and geom.facetCone instead.
This is the base function for generating cylinders and cones from facets.
@@ -336,6 +359,9 @@
#For cylinders top and bottom radii are equal
if (radiusBottom == -1):
radiusBottom = radiusTop
+
+ if ((radiusTopInner > 0 and radiusTopInner > radiusTop) or (radiusBottomInner > 0 and radiusBottomInner > radiusBottom)):
+ raise RuntimeError("The internal radius cannot be larger than outer");
# check zero dimentions
if (segmentsNumber<3): raise RuntimeError("The segmentsNumber should be at least 3");
if (height<0): raise RuntimeError("The height should have the positive value");
@@ -350,26 +376,47 @@
anglesInRad = numpy.linspace(angleRange[0], angleRange[1], segmentsNumber+1, endpoint=True)
PTop=[]; PTop.append(Vector3(0,0,+height/2))
+ PTopIn=[]; PTopIn.append(Vector3(0,0,+height/2))
+
PBottom=[]; PBottom.append(Vector3(0,0,-height/2))
-
+ PBottomIn=[]; PBottomIn.append(Vector3(0,0,-height/2))
+
for i in anglesInRad:
XTop=radiusTop*math.cos(i); YTop=radiusTop*math.sin(i);
PTop.append(Vector3(XTop,YTop,+height/2))
+ if (radiusTopInner > 0):
+ XTopIn=radiusTopInner*math.cos(i); YTopIn=radiusTopInner*math.sin(i);
+ PTopIn.append(Vector3(XTopIn,YTopIn,+height/2))
XBottom=radiusBottom*math.cos(i); YBottom=radiusBottom*math.sin(i);
PBottom.append(Vector3(XBottom,YBottom,-height/2))
+ if (radiusBottomInner > 0):
+ XBottomIn=radiusBottomInner*math.cos(i); YBottomIn=radiusBottomInner*math.sin(i);
+ PBottomIn.append(Vector3(XBottomIn,YBottomIn,-height/2))
for i in range(0,len(PTop)):
PTop[i]=orientation*PTop[i]+center
PBottom[i]=orientation*PBottom[i]+center
+ if (len(PTopIn)>1):
+ PTopIn[i]=orientation*PTopIn[i]+center
+ if (len(PBottomIn)>1):
+ PBottomIn[i]=orientation*PBottomIn[i]+center
ret=[]
for i in range(2,len(PTop)):
if (wallMask&1)and(radiusTop!=0):
- ret.append(utils.facet((PTop[0],PTop[i],PTop[i-1]),**kw))
+ if (len(PTopIn)>1):
+ ret.append(utils.facet((PTop[i-1],PTopIn[i],PTopIn[i-1]),**kw))
+ ret.append(utils.facet((PTop[i-1],PTop[i],PTopIn[i]),**kw))
+ else:
+ ret.append(utils.facet((PTop[0],PTop[i],PTop[i-1]),**kw))
if (wallMask&2)and(radiusBottom!=0):
- ret.append(utils.facet((PBottom[0],PBottom[i-1],PBottom[i]),**kw))
+ if (len(PBottomIn)>1):
+ ret.append(utils.facet((PBottom[i-1],PBottomIn[i],PBottomIn[i-1]),**kw))
+ ret.append(utils.facet((PBottom[i-1],PBottom[i],PBottomIn[i]),**kw))
+ else:
+ ret.append(utils.facet((PBottom[0],PBottom[i-1],PBottom[i]),**kw))
if wallMask&4:
if (radiusBottom!=0):
=== modified file 'py/pack/pack.py'
--- py/pack/pack.py 2013-12-16 15:05:33 +0000
+++ py/pack/pack.py 2014-01-06 14:10:07 +0000
@@ -264,6 +264,8 @@
xx,yy,zz=[arange(mn[i]+radius,mx[i]-radius,2*radius+gap) for i in 0,1,2]
for xyz in itertools.product(xx,yy,zz):
if predicate(xyz,radius): ret+=[utils.sphere(xyz,radius=radius,**kw)]
+ if (len(ret)==0):
+ warnings.warn('No spheres are produced by regularOrtho-function',category=RuntimeWarning)
return ret
def regularHexa(predicate,radius,gap,**kw):
@@ -283,6 +285,8 @@
if j%2==0: x+= a/2. if k%2==0 else -a/2.
if k%2!=0: x+=a/2.; y+=hy/2.
if predicate((x,y,z),radius): ret+=[utils.sphere((x,y,z),radius=radius,**kw)]
+ if (len(ret)==0):
+ warnings.warn('No spheres are produced by regularHexa-function',category=RuntimeWarning)
return ret
def filterSpherePack(predicate,spherePack,returnSpherePack=None,**kw):
=== modified file 'py/runtime.py'
--- py/runtime.py 2012-07-09 18:23:32 +0000
+++ py/runtime.py 2014-01-14 18:37:09 +0000
@@ -7,7 +7,7 @@
# find out about which ipython version we use -- 0.10* and 0.11 are supported, but they have different internals
import IPython
try: # attempt to get numerical version
- ipython_version=int(IPython.__version__.split('.',2)[1]) ## convert '0.10' to 10, '0.11.alpha1.bzr.r1223' to 11
+ ipython_version=int(IPython.__version__.split('.')[0])*100 + int(IPython.__version__.split('.')[1])
except ValueError:
print 'WARN: unable to extract IPython version from %s, defaulting to 10'%(IPython.__version__)
ipython_version=10
=== modified file 'py/utils.py'
--- py/utils.py 2013-10-15 17:11:37 +0000
+++ py/utils.py 2014-01-09 12:39:24 +0000
@@ -254,7 +254,7 @@
_commonBodySetup(b,V,Vector3(geomInert,geomInert,geomInert),material,pos=begin,resetState=False,dynamic=dynamic,fixed=fixed)
b.mask=mask
b.bound=Aabb(color=[0,1,0])
- b.state.ori=b.state.ori.setFromTwoVectors(Vector3(0.,0.,1.),segment)
+ b.state.ori.setFromTwoVectors(Vector3(0.,0.,1.),segment)
if (end == begin): b.state.ori = Quaternion((1,0,0),0)
return b
=== modified file 'scripts/checks-and-tests/checks/checkWeight.py'
--- scripts/checks-and-tests/checks/checkWeight.py 2012-04-13 16:27:00 +0000
+++ scripts/checks-and-tests/checks/checkWeight.py 2014-01-07 15:38:15 +0000
@@ -43,7 +43,7 @@
]
-O.run(10000)
+O.run(25000)
O.wait()
curForce = utils.sumForces(ids=floorId,direction=Vector3(0,0,1))*(-1)
print ("Precalculated weight %f" % sphMass)
=== added file 'scripts/ppa/buildppa.py'
--- scripts/ppa/buildppa.py 1970-01-01 00:00:00 +0000
+++ scripts/ppa/buildppa.py 2014-01-10 20:03:14 +0000
@@ -0,0 +1,120 @@
+#!/usr/bin/env python
+import argparse, os, git, shutil, sys, time
+
+
+parser = argparse.ArgumentParser(description='Process some integers.')
+parser.add_argument("-i", help="config file")
+parser.add_argument("-u","--update", help="update tarballs, if they are exist", action='store_true')
+parser.add_argument("-j", help="number of processors to build",dest='jobsNumber',default=6, type=int)
+args = parser.parse_args()
+
+
+configfile = args.i
+jobsNumber = args.jobsNumber
+
+infileconf = open(configfile)
+linesconf = infileconf.readlines()
+gitdebdir = linesconf[1].strip()
+pbdir = linesconf[4].strip()
+gitupsdir = linesconf[7].strip()
+userg = linesconf[10].strip()
+groupg = linesconf[13].strip()
+dputg = linesconf[16].strip()
+keyg = linesconf[19].strip()
+keypasspath = linesconf[22].strip()
+keysecrpath = linesconf[25].strip()
+patharchive = linesconf[28].strip()
+
+if not(os.path.isdir(gitdebdir)):
+ raise RuntimeError('Git-debian-directory does not exists')
+
+if not(os.path.isdir(gitupsdir)):
+ raise RuntimeError('Git-upstream-directory does not exists')
+
+if not(os.path.isdir(pbdir)):
+ print ('Pbuilder-directory does not exists. Creating')
+ os.mkdir(pbdir)
+
+repodeb = git.Repo(gitdebdir)
+repoups = git.Repo(gitupsdir)
+assert repodeb.bare == False
+assert repoups.bare == False
+
+if (repodeb.is_dirty()):
+ raise RuntimeError('Git-debian-repo has an uncommitted changes. Exiting.')
+
+if (repoups.is_dirty()):
+ raise RuntimeError('Git-upstream-repo has an uncommitted changes. Exiting.')
+
+for branch in repodeb.branches:
+ branchstr = str(branch)
+ if (branchstr<>'master'):
+ print "Switching to branch %s"%(branch)
+ repodeb.git.checkout(branch)
+ infile = open(gitdebdir+"/pbuilder")
+ lines = infile.readlines()
+ mirror = lines[0].strip()
+ components = lines[1].strip()
+ archs = lines[2].split()
+ keyringuse = lines[3].strip()
+ othermirror = lines[4].strip()
+ infile.close()
+ for a in archs:
+ tarball = "%s/%s_%s.tgz"%(pbdir, branchstr, a.strip())
+ addAllowuntrusted = ""
+ if (othermirror!="#"):
+ addAllowuntrusted = " --allow-untrusted "
+ if not(os.path.isfile(tarball)):
+ createPbTar = ('sudo pbuilder --create --distribution %s --mirror %s --components "%s" --architecture %s --debootstrapopts "--keyring=%s" --basetgz %s'%
+ (branchstr, mirror, components, a, keyringuse, tarball))
+ if (othermirror!="#"):
+ createPbTar += ' --othermirror "' + othermirror + '"'
+ addAllowuntrusted = " --allow-untrusted "
+ print createPbTar
+
+ print "Creating tarball %s"%(tarball)
+ os.system(createPbTar)
+ else:
+ print "Tarball %s exists"%(tarball)
+ if (args.update):
+ print "Updating %s as requested" %(tarball)
+ updatePbTar = ('sudo pbuilder --update --basetgz %s'%(tarball))
+ os.system(updatePbTar)
+
+ # Creating dir for building
+
+ builddirup="%s_%s/"%(branchstr, a)
+ builddirdeb="%s/build/"%(builddirup)
+ builddirres="%s/result/"%(builddirup)
+ #shutil.rmtree(builddirdeb,ignore_errors=True)
+ shutil.rmtree(builddirup,ignore_errors=True)
+ shutil.copytree(gitupsdir, builddirdeb )
+ shutil.rmtree(builddirdeb+".git")
+ # Get package version
+ versiondebian = repoups.git.describe()[0:-8] + repoups.head.commit.hexsha[0:7] + "~" + branchstr
+
+ # Get package name
+ infilepname = open(gitdebdir+"/changelog"); sourcePackName = infilepname.readlines()[0].split()[0]
+ print sourcePackName
+
+ os.system('cd %s; apack %s_%s.orig.tar.xz build'%(builddirup,sourcePackName,versiondebian))
+ shutil.copytree(gitdebdir, builddirdeb+"/debian")
+
+ os.system('sed -i.bak -e s/VERSION/%s/ -e s/DISTRIBUTION/%s/ %s/debian/changelog'%(versiondebian,branch,builddirdeb))
+ os.system('sed -i.bak -e s/VERSIONYADEREPLACE/%s/ %s/debian/rules'%(versiondebian,builddirdeb))
+ os.system('cd %s; dpkg-source -b -I build'%(builddirup))
+ os.mkdir(builddirres)
+ print "Building package %s_%s"%(sourcePackName, versiondebian)
+ buildPackage = ('sudo pbuilder --build --architecture %s --basetgz %s %s --logfile %s/pbuilder.log --debbuildopts "-j%d" --buildresult %s %s/*.dsc'%
+ (a, tarball, addAllowuntrusted, builddirup, jobsNumber, builddirres, builddirup))
+ print buildPackage
+ os.system(buildPackage)
+ os.system('sudo chown %s:%s %s * -R'%(userg, groupg, builddirup))
+ os.system('sudo chown %s:%s %s * -R'%(userg, groupg, gitdebdir))
+ os.system('sudo chown %s:%s %s * -R'%(userg, groupg, gitupsdir))
+ os.system('cd %s ; su %s -c \'dput %s *.changes\''%(builddirres, userg, dputg))
+
+for branch in repodeb.branches:
+ branchstr = str(branch)
+ if (branchstr<>'master'):
+ os.system('rm %s/%s/Release.gpg ; su %s -c \'gpg --no-tty --batch --default-key "%s" --detach-sign --passphrase-fd=0 --passphrase-file=%s -o %s/%s/Release.gpg %s/%s/Release\''%(patharchive, branch, userg, keyg, keypasspath, patharchive, branch, patharchive, branch))
=== removed file 'scripts/ppa/createtar.py'
--- scripts/ppa/createtar.py 2013-12-21 07:25:49 +0000
+++ scripts/ppa/createtar.py 1970-01-01 00:00:00 +0000
@@ -1,120 +0,0 @@
-#!/usr/bin/env python
-import argparse, os, git, shutil, sys, time
-
-
-parser = argparse.ArgumentParser(description='Process some integers.')
-parser.add_argument("-i", help="config file")
-parser.add_argument("-u","--update", help="update tarballs, if they are exist", action='store_true')
-parser.add_argument("-j", help="number of processors to build",dest='jobsNumber',default=6, type=int)
-args = parser.parse_args()
-
-
-configfile = args.i
-jobsNumber = args.jobsNumber
-
-infileconf = open(configfile)
-linesconf = infileconf.readlines()
-gitdebdir = linesconf[1].strip()
-pbdir = linesconf[4].strip()
-gitupsdir = linesconf[7].strip()
-userg = linesconf[10].strip()
-groupg = linesconf[13].strip()
-dputg = linesconf[16].strip()
-keyg = linesconf[19].strip()
-keypasspath = linesconf[22].strip()
-keysecrpath = linesconf[25].strip()
-patharchive = linesconf[28].strip()
-
-if not(os.path.isdir(gitdebdir)):
- raise RuntimeError('Git-debian-directory does not exists')
-
-if not(os.path.isdir(gitupsdir)):
- raise RuntimeError('Git-upstream-directory does not exists')
-
-if not(os.path.isdir(pbdir)):
- print ('Pbuilder-directory does not exists. Creating')
- os.mkdir(pbdir)
-
-repodeb = git.Repo(gitdebdir)
-repoups = git.Repo(gitupsdir)
-assert repodeb.bare == False
-assert repoups.bare == False
-
-if (repodeb.is_dirty()):
- raise RuntimeError('Git-debian-repo has an uncommitted changes. Exiting.')
-
-if (repoups.is_dirty()):
- raise RuntimeError('Git-upstream-repo has an uncommitted changes. Exiting.')
-
-for branch in repodeb.branches:
- branchstr = str(branch)
- if (branchstr<>'master'):
- print "Switching to branch %s"%(branch)
- repodeb.git.checkout(branch)
- infile = open(gitdebdir+"/pbuilder")
- lines = infile.readlines()
- mirror = lines[0].strip()
- components = lines[1].strip()
- archs = lines[2].split()
- keyringuse = lines[3].strip()
- othermirror = lines[4].strip()
- infile.close()
- for a in archs:
- tarball = "%s/%s_%s.tgz"%(pbdir, branchstr, a.strip())
- addAllowuntrusted = ""
- if (othermirror!="#"):
- addAllowuntrusted = " --allow-untrusted "
- if not(os.path.isfile(tarball)):
- createPbTar = ('sudo pbuilder --create --distribution %s --mirror %s --components "%s" --architecture %s --debootstrapopts "--keyring=%s" --basetgz %s'%
- (branchstr, mirror, components, a, keyringuse, tarball))
- if (othermirror!="#"):
- createPbTar += ' --othermirror "' + othermirror + '"'
- addAllowuntrusted = " --allow-untrusted "
- print createPbTar
-
- print "Creating tarball %s"%(tarball)
- os.system(createPbTar)
- else:
- print "Tarball %s exists"%(tarball)
- if (args.update):
- print "Updating %s as requested" %(tarball)
- updatePbTar = ('sudo pbuilder --update --basetgz %s'%(tarball))
- os.system(updatePbTar)
-
- # Creating dir for building
-
- builddirup="%s_%s/"%(branchstr, a)
- builddirdeb="%s/build/"%(builddirup)
- builddirres="%s/result/"%(builddirup)
- #shutil.rmtree(builddirdeb,ignore_errors=True)
- shutil.rmtree(builddirup,ignore_errors=True)
- shutil.copytree(gitupsdir, builddirdeb )
- shutil.rmtree(builddirdeb+".git")
- # Get package version
- versiondebian = repoups.git.describe() + "~" + branchstr
-
- # Get package name
- infilepname = open(gitdebdir+"/changelog"); sourcePackName = infilepname.readlines()[0].split()[0]
- print sourcePackName
-
- os.system('cd %s; apack %s_%s.orig.tar.xz build'%(builddirup,sourcePackName,versiondebian))
- shutil.copytree(gitdebdir, builddirdeb+"/debian")
-
- os.system('sed -i.bak -e s/VERSION/%s/ -e s/DISTRIBUTION/%s/ %s/debian/changelog'%(versiondebian,branch,builddirdeb))
- os.system('sed -i.bak -e s/VERSIONYADEREPLACE/%s/ %s/debian/rules'%(versiondebian,builddirdeb))
- os.system('cd %s; dpkg-source -b -I build'%(builddirup))
- os.mkdir(builddirres)
- print "Building package %s_%s"%(sourcePackName, versiondebian)
- buildPackage = ('sudo pbuilder --build --architecture %s --basetgz %s %s --logfile %s/pbuilder.log --debbuildopts "-j%d" --buildresult %s %s/*.dsc'%
- (a, tarball, addAllowuntrusted, builddirup, jobsNumber, builddirres, builddirup))
- print buildPackage
- os.system(buildPackage)
- os.system('sudo chown %s:%s %s * -R'%(userg, groupg, builddirup))
- os.system('sudo chown %s:%s %s * -R'%(userg, groupg, gitdebdir))
- os.system('sudo chown %s:%s %s * -R'%(userg, groupg, gitupsdir))
- os.system('cd %s ; su %s -c \'dput %s *.changes\''%(builddirres, userg, dputg))
-
-for branch in repodeb.branches:
- branchstr = str(branch)
- if (branchstr<>'master'):
- os.system('rm %s/%s/Release.gpg ; su %s -c \'gpg --no-tty --batch --default-key "%s" --detach-sign --passphrase-fd=0 --passphrase-file=%s -o %s/%s/Release.gpg %s/%s/Release\''%(patharchive, branch, userg, keyg, keypasspath, patharchive, branch, patharchive, branch))