https://yade-dem.org/w/api.php?action=feedcontributions&user=Richefeu&feedformat=atomYade - User contributions [en]2024-03-29T02:21:21ZUser contributionsMediaWiki 1.35.13https://yade-dem.org/w/index.php?title=Installation_of_yade_on_MacOSX_Leopard&diff=712Installation of yade on MacOSX Leopard2010-03-10T21:55:27Z<p>Richefeu: /* install boost from sources */</p>
<hr />
<div>WARNING NOT YET READY!<br />
<br />
== Tools needed for Yade installation ==<br />
<br />
=== Bazaar ===<br />
We need bazaar (http://bazaar-vcs.org/Download) to get the sources of Yade. For installation from sources, simply type in bazaar's folder the following line: <br />
<br />
$ sudo python setup.py install<br />
<br />
Enter then your password. Note that python does not need to be installed.<br />
<br />
=== MacPorts ===<br />
<br />
You can get the pkg at http://www.macports.org/install.php. After installation type:<br />
<br />
$ sudo port -v selfupdate<br />
<br />
=== Apple X11 ===<br />
<br />
1. Insert the "Mac OS X Install DVD" and run the package named "Optional Installs".<br />
2. At the software selection window expand the Applications category and click the check box beside X11 (and nothing else).<br />
3. Click Install to install X11.<br />
<br />
=== DeveloperTools ===<br />
<br />
- install last version of xcode (DeveloperTools, mpkg): http://developer.apple.com/technology/xcode.html (need ADC Member Apple ID and password)<br />
<br />
<br />
=== Scons ===<br />
<br />
- install scons (sudo python setup.py install): http://www.scons.org/download.php<br />
<br />
<br />
== Installing dependencies ==<br />
<br />
=== install boost from sources ===<br />
<br />
Since version 0.41, boost can easily be compiled in Snow Leopard thanks to macports:<br />
<br />
$ sudo port install boost<br />
<br />
Otherwise, in the source folder of boost, type:<br />
<br />
$ export BOOST=`pwd`<br />
$ cd tools/jam/src<br />
$ ./build.sh darwin<br />
$ cd bin.macosxx86/<br />
$ export PATH=`pwd`:$PATH<br />
$ cd $BOOST<br />
$ bjam --toolset=darwin --with-thread --with-filesystem --with-iostreams --with-regex --with-program_options --with-python --with-system --with-date_time --with-serialization stage<br />
$ sudo bjam --toolset=darwin --with-thread --with-filesystem --with-iostreams --with-regex --with-program_options --with-python --with-system --with-date_time --with-serialization install<br />
<br />
Then add some symbolic links (the example is for boost 1.39)<br />
<br />
ln -s /usr/local/lib/libboost-filesystem-mt-1_39.dylib /usr/local/lib/libboost-filesystem-mt.dylib<br />
ln -s /usr/local/lib/libboost-python-mt-1_39.dylib /usr/local/lib/libboost-python-mt.dylib<br />
...<br />
ln -s /usr/local/include/boost-1_39 /usr/local/include/boost<br />
<br />
=== CGAL (version >= 3.4) ===<br />
<br />
Get the sources here http://www.cgal.org/download.html<br />
<br />
Specify the boost include directory. For example:<br />
export BOOST_INCLUDEDIR=/usr/local/include/boost<br />
Configure with cmake (that can be installed with sudo port install cmake):<br />
cmake .<br />
Then, build and install CGAL:<br />
make<br />
sudo make install<br />
<br />
=== example of scons.profile-default ==<br />
<br />
PREFIX = '/Users/richefeu/Documents/YADE'<br />
exclude = 'none'<br />
features = 'gts,log4cxx,opengl,openmp,python'<br />
version = 'vr'<br />
QTDIR = ['/usr/share/qt3', '/usr/lib/qt', '/usr/lib/qt3', '/usr/qt/3', '/usr/lib/qt-3.3']<br />
CXXFLAGS = ['-I/usr/local/include/boost-1_39', '-L/usr/local/bin']<br />
SHCCFLAGS = ['-fPIC']<br />
<br />
- install gnuplot: sudo port install gnuplot<br />
<br />
- install glib2 (macports)<br />
- need g++ >= 4.2 (and g++ >= 4.3 for openMP support)<br />
<br />
<br />
<br />
== Compilation ==<br />
<br />
<br />
TODO<br />
[[Category:Installation]]</div>Richefeuhttps://yade-dem.org/w/index.php?title=Installation_of_yade_on_MacOSX_Leopard&diff=711Installation of yade on MacOSX Leopard2010-03-10T21:54:06Z<p>Richefeu: /* install boost from sources */</p>
<hr />
<div>WARNING NOT YET READY!<br />
<br />
== Tools needed for Yade installation ==<br />
<br />
=== Bazaar ===<br />
We need bazaar (http://bazaar-vcs.org/Download) to get the sources of Yade. For installation from sources, simply type in bazaar's folder the following line: <br />
<br />
$ sudo python setup.py install<br />
<br />
Enter then your password. Note that python does not need to be installed.<br />
<br />
=== MacPorts ===<br />
<br />
You can get the pkg at http://www.macports.org/install.php. After installation type:<br />
<br />
$ sudo port -v selfupdate<br />
<br />
=== Apple X11 ===<br />
<br />
1. Insert the "Mac OS X Install DVD" and run the package named "Optional Installs".<br />
2. At the software selection window expand the Applications category and click the check box beside X11 (and nothing else).<br />
3. Click Install to install X11.<br />
<br />
=== DeveloperTools ===<br />
<br />
- install last version of xcode (DeveloperTools, mpkg): http://developer.apple.com/technology/xcode.html (need ADC Member Apple ID and password)<br />
<br />
<br />
=== Scons ===<br />
<br />
- install scons (sudo python setup.py install): http://www.scons.org/download.php<br />
<br />
<br />
== Installing dependencies ==<br />
<br />
=== install boost from sources ===<br />
<br />
Since version 0.41, boost can be compiled by:<br />
$ sudo port install boost<br />
<br />
Otherwise, in the source folder of boost, type:<br />
<br />
$ export BOOST=`pwd`<br />
$ cd tools/jam/src<br />
$ ./build.sh darwin<br />
$ cd bin.macosxx86/<br />
$ export PATH=`pwd`:$PATH<br />
$ cd $BOOST<br />
$ bjam --toolset=darwin --with-thread --with-filesystem --with-iostreams --with-regex --with-program_options --with-python --with-system --with-date_time --with-serialization stage<br />
$ sudo bjam --toolset=darwin --with-thread --with-filesystem --with-iostreams --with-regex --with-program_options --with-python --with-system --with-date_time --with-serialization install<br />
<br />
Then add some symbolic links (the example is for boost 1.39)<br />
<br />
ln -s /usr/local/lib/libboost-filesystem-mt-1_39.dylib /usr/local/lib/libboost-filesystem-mt.dylib<br />
ln -s /usr/local/lib/libboost-python-mt-1_39.dylib /usr/local/lib/libboost-python-mt.dylib<br />
...<br />
ln -s /usr/local/include/boost-1_39 /usr/local/include/boost<br />
<br />
=== CGAL (version >= 3.4) ===<br />
<br />
Get the sources here http://www.cgal.org/download.html<br />
<br />
Specify the boost include directory. For example:<br />
export BOOST_INCLUDEDIR=/usr/local/include/boost<br />
Configure with cmake (that can be installed with sudo port install cmake):<br />
cmake .<br />
Then, build and install CGAL:<br />
make<br />
sudo make install<br />
<br />
=== example of scons.profile-default ==<br />
<br />
PREFIX = '/Users/richefeu/Documents/YADE'<br />
exclude = 'none'<br />
features = 'gts,log4cxx,opengl,openmp,python'<br />
version = 'vr'<br />
QTDIR = ['/usr/share/qt3', '/usr/lib/qt', '/usr/lib/qt3', '/usr/qt/3', '/usr/lib/qt-3.3']<br />
CXXFLAGS = ['-I/usr/local/include/boost-1_39', '-L/usr/local/bin']<br />
SHCCFLAGS = ['-fPIC']<br />
<br />
- install gnuplot: sudo port install gnuplot<br />
<br />
- install glib2 (macports)<br />
- need g++ >= 4.2 (and g++ >= 4.3 for openMP support)<br />
<br />
<br />
<br />
== Compilation ==<br />
<br />
<br />
TODO<br />
[[Category:Installation]]</div>Richefeuhttps://yade-dem.org/w/index.php?title=Publications&diff=685Publications2010-02-03T16:28:15Z<p>Richefeu: /* Publications about YADE please cite this in your articles */</p>
<hr />
<div>__NOTOC__<br />
<div style="font-size: 90%;color: #444;">Please add here all your '''english language''' publications that you have written using results from YADE or its progenitor SDEC. '''If you can, please upload a <tt>.pdf</tt>'''. Use license '''<nowiki>{{</nowiki>'''Attribution'''<nowiki>}}</nowiki>''' (third from the bottom in that drop-down menu):</div><div style="font-size: 90%;color: #300;">''This is copyrighted, but use is permitted if the copyright holder is properly attributed''.</div><br />
<div style="font-size: 90%;color: #444;">Citations are written using [[Template:Ref|the ref template]].</div><br />
<br />
<br />
Publications are divided into several categories below, '''sorted by year'''.<br />
=Publications about YADE <small><span style="color:#bb0066;">please cite this in your articles</span></small>=<br />
# [[Media:CMAME_YADE_2008.pdf|{{ref|J. Kozicki, F.V. Donzé|A new open-source software developed for numerical simulations using discrete modeling methods|Computer Methods in Applied Mechanics and Engineering|Vol:197, pages 4429-4443,|2008}}]] <sup>1</sup> [http://dx.doi.org/10.1016/j.cma.2008.05.023 DOJ]<br />
# [[Media:EC_YADE_2008.pdf|{{ref|J. Kozicki, F.V. Donzé|YADE-OPEN DEM: an open-source software using a discrete element method to simulate granular material|Engineering Computations|Vol:26, Issue 7, pages 786-805|2008}}]]<br />
<br />
If you use the triaxial test and you want to give a reference to a paper describing algorithms, (almost) everything was explained in this paper :<br />
# {{ref|Chareyre, B., Briancon, L., and Villard, P.|"Theoretical versus experimental modeling of the anchorage capacity of geotextiles in trenches."| Geosynthetics International| 9(2), 97–123.| (2002)}}<br />
<br />
If you use the packing algorithm, please cite this paper:<br />
# {{ref|Jerier, J.-F., Richefeu, V., Imbault, D., Doné, V.F.|"Packing spherical discrete elements for large scale simulations."| Computer Methods in Applied Mechanics and Engineering| to be published | (2010)}}<br />
<br />
<small><sup>1</sup>A pre-submission version with extended OO-design section. The FEM/DEM coupling part described in the paper is not committed yet to yade SVN repository.</small><br />
<br />
<small>'''NOTE:''' the articles are using [[Future plans|new class names]].</small><br />
<br />
=Publications in journals from ISI Master Journal List<sup>*</sup>=<br />
<br />
# {{ref|L. Scholtès, B. Chareyre, F. Nicot, F. Darve|Micromechanics of granular materials with capillary effects|International Journal of Engineering Science|Volume 47, Issue 1, Pages 64-75|2009.}}<br />
# {{ref|L. Scholtès, P.-Y. Hicher, F. Nicot, B. Chareyre, F. Darve|On the capillary stress tensor in wet granular materials| International Journal for Numerical and Analytical Methods in Geomechanics|Volume 33 Issue 10, Pages 1289 - 1313| 2009.}}<br />
# {{ref|L. Sibille, F.-V. Donzé, F. Nicot, B. Chareyre, F. Darve|From bifurcation to failure in a granular material: a DEM analysis|Acta Geotechnica|Volume 3, Number 1, pp. 15-24| 2008.}}<br />
# {{ref|Feng Chen, Eric. C. Drumm, and Georges Guiochon|Prediction/Verification of Particle Motion in One Dimension with the Discrete-Element Method|International Journal of Geomechanics, ASCE|Volume 7, Issue 5, pp. 344-352|2007}}<br />
# {{ref|Nicot, F., L. Sibille, F.V. Donzé, F. Darve|From microscopic to macroscopic second-order work in granular assemblies|Int. J. Mech. Mater.|39 (7), 664-684|2007}}<br />
# {{ref|L. Sibille, F. Nicot, F.V. Donzé, F. Darve|Material instability in granular assemblies from fundamentally different models|International Journal For Numerical and Analytical Methods in Geomechanics|vol:31, 457-481|2007}}<br />
# [[Media:ams_2007_kozicki_tejchman.pdf|{{ref|J. Kozicki, J. Tejchman|Effect of aggregate structure on fracture process in concrete using 2D lattice model|Archives of Mechanics|Vol. 59, No 4–5, pages 365–384|2007}}]]<br />
# {{ref|Chareyre, B., Villard, P.| Dynamic Spar Elements and Discrete Element Methods in Two Dimensions for the Modeling of Soil-Inclusion Problems| J. Engrg. Mech.| Volume 131, Issue 7| 2005.}}<br />
# {{ref|S. Hentz,F.V. Donzé, L.Daudeville|Discrete element modelling of concrete submitted to dynamic loading at high strain rates|Computers and Structures|vol: 82 No 29-30 pp.2509-2524|2004}}<br />
# {{ref|S. Hentz, L. Daudeville, F.V. Donzé|Identification and Validation of a Discrete Element Model for Concrete|ASCE Journal of Engineering Mechanics|vol:130 No 6 pp.709-719|2004}}<br />
# {{ref|Villard P., Chareyre B.| Design methods for geosynthetic anchor trenches on the basis of true scale experiments and discrete element modelling| Canadian Geotechnical Journal| 41 pp 1193-1205| 2004}}<br />
# {{ref|F. Camborde, C. Mariotti, F.V. Donzé|Numerical study of rock and Concrete behaviour by discrete element modelling|Computers and Geotechnics|27 : 225-247|2000}}<br />
# {{ref|F.V. Donzé, S.A. Magnier, L. Daudeville, C. Mariotti, L. Davenne|Study of the behavior of concrete at high strain rate compressions by a discrete element method|ASCE J. of Eng. Mech|125 (10) : 1154-1163|1999}}<br />
# {{ref|S.A. Magnier, F.V. Donzé|Numerical simulation of impacts using a discrete element method|Mech. Cohes.-frict. Mater.|3, 257-276|1998}}<br />
# {{ref|F.V. Donzé, S.A. Magnier|Formulation of a three-dimensional numerical model of brittle behavior|Geophys. J. Int.|122, 790-802|1995}}<br />
# {{ref|F.V. Donzé, P. Mora, S.A. Magnier|Numerical simulation of faults and shear zones|Geophys. J. Int.|116, 46-52|1994}}<br />
# {{ref|Chareyre B, Villard P.|Theoretical versus experimental modeling of the anchorage capacity of geotextiles in trenches| Geosynthetics International| Vol.9-2, pp. 97 - 122.|2002 }}<br />
# {{ref|Chareyre, B., Briancon, L., and Villard, P.|"Theoretical versus experimental modeling of the anchorage capacity of geotextiles in trenches."| Geosynthet. Int.| 9(2), 97–123.| (2002)}}<br />
<br />
<br />
<br />
<br />
<br><small><sup>*</sup>Institute for Scientific Information Master Journal List is also known under name „Philadelphian List”, see [http://scientific.thomson.com/mjl/]</small><br />
<br />
=Publications in peer─reviewed journals=<br />
# [[Media:smilauer-the_splendors_and_miseries_of_yade_design-2007.pdf|{{ref|V. Šmilauer|The Splendors and Miseries of Yade design| Discrete Element Group for Hazard Mitigation Annual Report 3, Grenoble University of Joseph Fourier, France|K1--K13|2007}}]]<br />
# [[Media:ahem_2006_kozicki.pdf|{{ref|J. Kozicki, J. Tejchman|2D Lattice Model for Fracture in Brittle Materials|Archives of Hydro-Engineering and Environmental Mechanics|vol 53, no 2, 71-88|2006}}]]<br />
# [[Media:discrete_lattice_model_DEM_risk_mitigation_kozicki.pdf|{{ref|J. Kozicki|Discrete lattice model used to describe the fracture process of concrete|Discrete Element Group for Risk Mitigation Annual Report 1, Grenoble University of Joseph Fourier, France|95--101|2005}}]]<br />
# {{ref|S. Hentz, F.V. Donzé, L.Daudeville|Discrete elements modeling of a reinforced concrete structure submitted to a rock impact|Italian Geotechnical Journal, XXXIX|n°4, 83-94|2005}}<br />
# {{ref|F.V. Donzé, P. Bernasconi|Simulation of the Blasting Patterns in Shaft Sinking Using a Discrete Element Method|Electronic Journal of Geotechnical Engineering|vol:9 No B pp.1-44|2004}}<br />
<br />
=PhD theses=<br />
<br />
# [http://janek.kozicki.pl/phdthesis/kozicki_2007_PhD.pdf {{ref|J. Kozicki|Application of Discrete Models to Describe the Fracture Process in Brittle Materials|Gdansk University of Technology, PhD thesis| |2007}}]<br />
<br />
=Master theses=<br />
<br />
# [[Media:SlopeStability.pdf|{{ref|E. Catalano|Infiltration effects on a partially saturated slope - An application of the Discrete Element Method and its implementation in the open-source software YADE|UJF-Grenoble||2008}}]]<br />
<br />
=Conference materials=<br />
# {{ref|Chen, F., Drumm, E.C., Guiochon, G.|3D DEM Analysis Of Graded Rock Fill Sinkhole Repair: Particle Size Effects On The Probability Of Stability|2009 Transportation Research Board Conference |Washington DC |January 2009}}<br />
# [[Media:yade-python-aussois-2008.pdf|{{ref|V. Šmilauer|Commanding c++ with python|ALERT Doctoral school talk (unpublished)|Aussois|2008}}]]<br />
# {{ref|Chen, F., Drumm, E.C., Guiochon, G., and Suzuki, K.|Discrete Element Simulation of 1D Upward Seepage Flow with Particle-Fluid Interaction Using Coupled Open Source Software|Proceedings of The 12th International Conference of the International Association for Computer Methods and Advances in Geomechanics (IACMAG) Goa|India, 1-6|October 2008}}<br />
# {{ref|Dang, H.K. and Mohamed, M.A.|An algorithm to generate a specimen for Discrete Element simulations with a predefined grain size distribution.| 61th Canadian Geotechnical Conference|Edmonton, Alberta|September 2008}}<br />
# {{ref|Dang, H.K. and Mohamed, M.A.|3D simulation of the trap door problem using the Discrete Element Method.| 61th Canadian Geotechnical Conference|Edmonton, Alberta|September 2008}}<br />
# {{ref|L. Scholtès, B. Chareyre, F. Nicot, F. Darve|Capillary Effects Modelling in Unsaturated Granular Materials|8th World Congress on Computational Mechanics - 5th European Congress on Computational Methods in Applied Sciences and Engineering|Venice|July 2008}}<br />
# {{ref|L. Scholtès, P.-Y. Hicher, F.Nicot, B. Chareyre, F. Darve|On the Capillary Stress Tensor in unsaturated granular materials|EM08: Inaugural International Conference of the Engineering Mechanics Institute|Minneapolis|April 2008}}<br />
# {{ref|L. Scholtès, B. Chareyre, F. Nicot, F. Darve|Micromechanical Modelling of Unsaturated Granular Media|Proceedings ECCOMAS-MHM07|Prague|June 2007}}<br />
# {{ref|W. Shiu, F.V. Donze, L. Daudeville|Discrete element modelling of missile impacts on a reinforced concrete target|Int. Conf. on Computational Fracture and Failure of Materials and Structures (CFRAC 2007)|Nantes, 11--13|June 2007}}<br />
# [[Media:smilauer-discrete_and_hybrid_models_for_concrete-2007.pdf|{{ref|V. Šmilauer|Discrete and hybrid models: Applications to concrete damage| (unpublished) | |June 2007}}]] <br />
# [[Media:nantes_2007_kozicki.pdf|{{ref|J. Kozicki, J. Tejchman|Simulations of fracture processes in concrete using a 3D lattice model|Int. Conf. on Computational Fracture and Failure of Materials and Structures (CFRAC 2007)|Nantes, 11--13|June 2007}}]] <br />
# {{ref|J. Kozicki, J. Tejchman|Effect of aggregate density on fracture process in concrete using 2D discrete lattice model|Proc. Conf. Computer Methods in Mechanics (CMM 2007)|Lodz-Spala 19-22|June 2007}}<br />
# {{ref|J. Kozicki, J. Tejchman|Modelling of a direct shear test in granular bodies with a continuum and a discrete approach|Proc. Conf. Computer Methods in Mechanics (CMM 2007)|Lodz-Spala 19-22|June 2007}}<br />
# {{ref|J. Kozicki, J. Tejchman|Investigations of size effect in tensile fracture of concrete using a lattice model|Proc. Conf. Modelling of Heterogeneous Materials with Applications in Construction and Biomedical Engineering (MHM 2007)|246--249, Prague, 24--27|June 2007}}<br />
# {{ref|J. Kozicki, J. Tejchman|Modelling of fracture process in brittle materials using a lattice model|Computational Modelling of Concrete Structures, EURO-C (eds.: G. Meschke, R. de Borst, H. Mang and N. Bicanic), Taylor anf Francis|139--145|2006}}<br />
# {{ref|J. Kozicki, J. Tejchman|Lattice type fracture model for brittle materials|35th Solid Mechanics Conference (SOLMECH 2006)|215--216, Krakow, 4--8 September|2006}}<br />
# {{ref|J. Kozicki, J. Tejchman|Simulations of fracture in concrete elements using a discrete lattice model|Proc. Conf. Computer Methods in Mechanics (CMM 2005)|Czestochowa, Poland, June 21--24|2005}}<br />
# {{ref|J. Kozicki, J. Tejchman|Simulation of the crack propagation in concrete with a discrete lattice model|Proc. Conf. Analytical Models and New Concepts in Concrete and Masonry Structures (AMCM 2005)|Gliwice, Poland, June 12--14|2005}}<br />
# {{ref|J. Kozicki, J. Tejchman|Study of Fracture Process in Concrete using a Discrete Lattice Model|CURE Workshop, Simulations in Urban Engineering| Gdansk September 20--22|2004}}<br />
# {{ref|J. Kozicki, J. Tejchman|Discrete methods to describe the behaviour of quasi-brittle and granular materials|16th Engineering Mechanics Conference, University of Washington, Seattle|CD--ROM, July 16--18|2003}}<br />
# {{ref|J. Kozicki, J. Tejchman|Lattice method to describe the behaviour of quasi-brittle materials|CURE Workshop, Effective use of building materials|pages 131--134, Sopot October 8-9| 2003}}<br />
# {{ref|Chareyre, B., and Villard, P.| "Discrete element modeling of curved geosynthetic anchorages with known macro-properties." |Proc., First Int. PFC Symposium, Gelsenkirchen, Germany| pp. 197–203|(2002).}}<br />
[[Category:Overview]]</div>Richefeuhttps://yade-dem.org/w/index.php?title=Installation_details&diff=559Installation details2009-09-18T08:28:47Z<p>Richefeu: /* Bazaar and scons installation */</p>
<hr />
<div>[[Category:Installation]]{{Installation quick access}}<br />
<br />
= Bazaar and scons installation =<br />
<br />
In order to install yade on a computeur, it is first necessary to get the sources. This is achieved through the python software called bazaar (version >= 1.7). Yade "modules" are then compiled with an other python software called scons.<br />
Most recent stable versions of these softwares can easily be downloaded on their respective sites: bazaar(http://bazaar-vcs.org/Download) and scons(http://www.scons.org/download.php).<br />
Assuming that python is ok, the installation is also simple. cd into the downloaded folder and type:<br />
$ sudo python setup.py install<br />
<br />
= Systemwide installation as root =<br />
<br />
By default yade installs in directory <tt>/usr/local</tt>, but to install there you need a root access. So running just <tt>scons ''some options''</tt> should be enough. However, since you want to install yade systemwide as root, it might be better if you built a debian package instead.<br />
<br />
= Installing from debian source packages =<br />
<br />
[http://geo.hmg.inpg.fr/~smilauer/yade This repository] contains weekly snapshots from svn in the form of debian source packages. To compile and install these (assuming that you already have [[Installation#Required_packages|required packages]] installed), you need to add repository source do your '<tt>/etc/apt/sources.list</tt>':<br />
<br />
deb-src http://geo.hmg.inpg.fr/~smilauer/yade ./<br />
<br />
Pick a revision number you want (eg. 1234), based on the repository contents - see http://geo.hmg.inpg.fr/~smilauer/yade, then run:<br />
<br />
apt-get source yade-svn1234<br />
sudo apt-get build-dep yade-svn1234<br />
cd yade-svn1234-1<br />
fakeroot-tcp debian/rules binary<br />
<br />
Once compiled, you will have optimized (yade-svn1234), debug (yade-svn1234-dbg) and development (yade-svn1234-dev) packages in <tt>../</tt>, which you can install by:<br />
<br />
sudo dpkg -i ../yade-svn1234*.deb<br />
<br />
=Scons options=<br />
<br />
[http://www.scons.org Scons] is the tool used to build and install yade. Always run it from the top directory of yade.<br />
<br />
{| border="1" style="border-collapse:collapse;" cellpadding="7"<br />
|+ Scons options<br />
! ''parameter''<br />
! ''default&nbsp;value''<br />
! ''description''<br />
|-<br />
|| <tt>PREFIX</tt><br />
|| <tt>/usr/local</tt><br />
|| The directory where yade will be installed. Different yade versions '''will not overwrite each other''' in <tt>PREFIX</tt> directory. See version and variant below. This parameter is passed to the preprocessor as <tt>PREFIX</tt> macro (expands to quoted string). <br />
|-<br />
|| <tt>version</tt><br />
|| <tt>''auto''</tt><br />
|| Scons autodetects svn revision or release number, so it will be "<tt>svn1144</tt>" or "<tt>0.11.0</tt>", for example. If this fails, it will be "unknown". It is used to build `<tt>SUFFIX</tt>` (see `<tt>variant</tt>`).<br />
|-<br />
|| <tt>variant</tt><br />
|| <tt>''empty''</tt><br />
|| Free-form name that describes variant of this version (usually something like "<tt>-debug</tt>", "<tt>-optimized</tt>" etc. May be empty. <tt>SUFFIX</tt> is a macro defined by the preprocessor (as quoted string) that has the form "<tt>$version$variant</tt>", i.e. <tt>svn1144-debug</tt> if <tt>version=svn1144</tt> and <tt>variant=debug</tt>. <br />
|-<br />
|| <tt>debug</tt><br />
|| <tt>1</tt><br />
|| Pass debugging flags to the compiler (generates debugging symbols in binaries), defines <tt>YADE_DEBUG</tt> symbols. Defaults to '''''true'''''.<br />
|-<br />
|| <tt>optimize</tt><br />
|| <tt>0</tt><br />
|| Defines <tt>YADE_CAST</tt> (<tt>YADE_PTR_CAST</tt>) as <tt>static_cast</tt> (<tt>static_pointer_cast</tt>) and pass optimization flags to the compiler. Use together with <tt>debug</tt> to get fast code with debug symbols included. Defaults to '''''false'''''.<br />
|-<br />
|| <tt>buildPrefix</tt><br />
|| <tt>..</tt><br />
|| Specify where to put the <tt>build-0.11.0</tt> directory, which will hold all files created during compilation. This ensures that the source tree remains clean and that different builds (like optimized and debugging) are strictly separated, like <tt>build-0.11.0</tt> and <tt>build-0.11.0-debug</tt><br />
|-<br />
|| <tt>jobs</tt><br />
|| <tt>4</tt><br />
|| How many compilations should run in parallel. Defaults to '''''four''''', if your computer is weak you may want a lower number. Equivalent to make -j4<br />
|-<br />
|| <tt>CXX</tt><br />
|| <tt>g++</tt><br />
|| C++ compiler you want to use. You can say <tt>CXX="distcc g++"</tt> to have distributed build, if that is configured. <br />
|-<br />
|| <tt>CPPPATH</tt><br />
|| <tt>''empty''</tt><br />
|| Additional paths for the c proprocessor (whitespace separated). Use it for locally-installed libraries, eg.: <tt>CPPPATH="/usr/local/include /home/fred/build/log4cxx/include"</tt> <br />
|-<br />
|| <tt>LIBPATH</tt><br />
|| <tt>''empty''</tt><br />
|| Additional paths for linker (whitespace separated). <br />
|}<br />
<br />
To see all the options, along with their default and current values, say `<tt>scons -h</tt>`.<br />
<br />
As an example, to compile yade I use following command<br />
<br />
scons jobs=10 pretty=0 debug=1 optimize=0 profile=0 CXX="distcc g++" PREFIX=/home/janek/YADE useMiniWm3=0 CPPPATH=/usr/include/wm3<br />
<br />
The last two options are related to [[Installation_details#Installing_the_wildmagic_3_library_on_debian|the wildmagic 3 library]]. All options are stored inside <tt>scons.config</tt> file, so the next time you compile yade, you can really just issue <tt>scons</tt> command, unless you want to change something.<br />
<br />
= Automatic library detection =<br />
<br />
Scons will attempt detection of necessary libraries on your system at every run. If it fails, you can look at the <tt>$buildDir/config.log</tt> (eg.: <tt>../build-0.11.0/config.log</tt>) file to see what went wrong. If you have some of the dependencies (like lib3dviewer) installed locally in /usr/local, you will have to use:<br />
scons CPPPATH=/usr/local/include/wm3 LIBPATH=/usr/local/lib<br />
so that scons will find it.<br />
<br />
= Installing the wildmagic 3 library on debian =<br />
<br />
The [http://www.geometrictools.com/Downloads/Downloads.html wildmagic 3.11 library] is used by Lattice Geometrical Model when it's available. It's only to have dalaunay triangulation in 2D and 3D during specimen generation.<br />
<br />
Add the following line at the end of your <tt>/etc/apt/sources.list</tt>:<br />
<br />
deb-src http://geo.hmg.inpg.fr/~smilauer/yade ./<br />
<br />
Then donwload, compile and install wildmagic library:<br />
<br />
sudo apt-get update <br />
apt-get source wildmagic <br />
sudo apt-get build-dep wildmagic <br />
cd wildmagic-3p11/ <br />
fakeroot debian/rules binary <br />
sudo dpkg -i ../wildmagic-dev*.deb<br />
<br />
To tell scons that wildmagic is installed you need to add those parameters to scons: <tt>useMiniWm3=0</tt>.<br />
<br />
=Backward compatibility options=<br />
<br />
If you have older software installed, you can use:<br />
<br />
{| border="1" style="border-collapse:collapse;" cellpadding="7"<br />
|+ Compatibility options<br />
! ''parameter''<br />
! ''description''<br />
|-<br />
|| <tt>CXXFLAGS='-DNO_GLUTINIT'</tt><br />
|| Older versions of libglut do not have function glutInit(), you should use this compilation flag then. <br />
|-<br />
|| <tt>CXXFLAGS='-DQGLVIEWER20'</tt><br />
|| If you are using older QGLViewer (version 2.0) you should use this flag, otherwise you will get error about setFileName().<br />
|-<br />
|| <tt>CXXFLAGS='-pthread&nbsp;-lpthread'</tt><br />
|| If you are compiling with gcc3.3 (an older compiler).<br />
|-<br />
|| <tt>CXXFLAGS='-fPIC'</tt><br />
|| When compiling on AMD64.<br />
|}<br />
<br />
You can connect several <tt>CXXFLAGS</tt> by spaces: <tt>CXXFLAGS='-DNO_GLUTINIT -DQGLVIEWER20'</tt><br />
<br />
=Cleaning and uninstalling=<br />
<br />
To clean the compilation invoke from <tt>yade-0.11.0/</tt>:<br />
<br />
scons -c<br />
<br />
You can remove the compilation directory of yade, usually located in upper directory and starting with name <tt>build</tt>, like this one:<br />
<br />
rm -rf ../build-svn1144<br />
<br />
If yade was installed manually, the you can delete files from <br />
<br />
/usr/local/lib/yade/<br />
/usr/local/include/yade/<br />
/usr/local/bin/yade<br />
<br />
or from (depending where yade was installed):<br />
<br />
/home/''username''/YADE/lib/<br />
/home/''username''/YADE/include/<br />
/home/''username''/YADE/bin/yade<br />
<br />
If yade was installed from debian package, you can simply remove the package, and that's all.<br />
<br />
= Install paths =<br />
<br />
All files installed are versioned so that different versions and variants don't clash with each other - you can have as many version as you want installed at the same time. Supposing that we have <tt>variant=-dbg</tt> and <tt>version=svn1234</tt> (note that <tt>$SUFFIX=-$version$variant</tt>) and <tt>PREFIX=/usr/local</tt>, we have<br />
<br />
{| border="1" style="border-collapse:collapse;" cellpadding="7"<br />
|+ Paths<br />
! ''what kind''<br />
! ''path used''<br />
! ''example''<br />
|-<br />
|| executable <br />
|| <tt>$PREFIX/bin/yade$SUFFIX</tt><br />
|| <tt>/usr/local/bin/yade-svn1144-debug</tt><br />
|-<br />
|| default plugins <br />
|| <tt>$PREFIX/lib/yade$SUFFIX/lib/*/lib*.so</tt><br />
|| <tt>/usr/local/lib/yade-svn1144-debug/*/lib*.so</tt><br />
|-<br />
|| pkg-config script <br />
|| <tt>$PREFIX/lib/pkgconfig/yade$SUFFIX</tt><br />
|| <tt>/usr/local/lib/pkgconfig/yade-svn1144-debug.pc</tt><br />
|-<br />
|| user configuration directory <br />
|| <tt>$HOME/.yade$SUFFIX</tt><br />
|| <tt>/home/fred/.yade-svn1144-debug</tt><br />
|-<br />
|| headers (note: common for a particular version, regardless of variant) <br />
|| <tt>$PREFIX/include/yade$version/yade/*/*.hpp</tt><br />
|| <tt>/usr/local/include/yade-svn1144/yade/*/*.hpp</tt><br />
|}<br />
<br />
<br />
= See also =<br />
<br />
* '''[[Installation]]'''<br />
* [[Reported problems]]<br />
* [[Quick subversion tutorial]]<br />
* [[New to linux?]]</div>Richefeuhttps://yade-dem.org/w/index.php?title=Installation_details&diff=558Installation details2009-09-18T08:28:01Z<p>Richefeu: /* Bazaar and scons installation */</p>
<hr />
<div>[[Category:Installation]]{{Installation quick access}}<br />
<br />
= Bazaar and scons installation =<br />
<br />
In order to install yade on a computeur, it is first necessary to get the sources. This is achieved through the python software called bazaar (version >= 1.7). Yade "modules" are then compiled with an other python software called scons.<br />
Most recent stable versions of these softwares can easily be downloaded on their respective sites: bazaar(http://bazaar-vcs.org/Download) and scons().<br />
Assuming that python is ok, the installation is also simple. cd into the downloaded folder and type:<br />
$ sudo python setup.py install<br />
<br />
= Systemwide installation as root =<br />
<br />
By default yade installs in directory <tt>/usr/local</tt>, but to install there you need a root access. So running just <tt>scons ''some options''</tt> should be enough. However, since you want to install yade systemwide as root, it might be better if you built a debian package instead.<br />
<br />
= Installing from debian source packages =<br />
<br />
[http://geo.hmg.inpg.fr/~smilauer/yade This repository] contains weekly snapshots from svn in the form of debian source packages. To compile and install these (assuming that you already have [[Installation#Required_packages|required packages]] installed), you need to add repository source do your '<tt>/etc/apt/sources.list</tt>':<br />
<br />
deb-src http://geo.hmg.inpg.fr/~smilauer/yade ./<br />
<br />
Pick a revision number you want (eg. 1234), based on the repository contents - see http://geo.hmg.inpg.fr/~smilauer/yade, then run:<br />
<br />
apt-get source yade-svn1234<br />
sudo apt-get build-dep yade-svn1234<br />
cd yade-svn1234-1<br />
fakeroot-tcp debian/rules binary<br />
<br />
Once compiled, you will have optimized (yade-svn1234), debug (yade-svn1234-dbg) and development (yade-svn1234-dev) packages in <tt>../</tt>, which you can install by:<br />
<br />
sudo dpkg -i ../yade-svn1234*.deb<br />
<br />
=Scons options=<br />
<br />
[http://www.scons.org Scons] is the tool used to build and install yade. Always run it from the top directory of yade.<br />
<br />
{| border="1" style="border-collapse:collapse;" cellpadding="7"<br />
|+ Scons options<br />
! ''parameter''<br />
! ''default&nbsp;value''<br />
! ''description''<br />
|-<br />
|| <tt>PREFIX</tt><br />
|| <tt>/usr/local</tt><br />
|| The directory where yade will be installed. Different yade versions '''will not overwrite each other''' in <tt>PREFIX</tt> directory. See version and variant below. This parameter is passed to the preprocessor as <tt>PREFIX</tt> macro (expands to quoted string). <br />
|-<br />
|| <tt>version</tt><br />
|| <tt>''auto''</tt><br />
|| Scons autodetects svn revision or release number, so it will be "<tt>svn1144</tt>" or "<tt>0.11.0</tt>", for example. If this fails, it will be "unknown". It is used to build `<tt>SUFFIX</tt>` (see `<tt>variant</tt>`).<br />
|-<br />
|| <tt>variant</tt><br />
|| <tt>''empty''</tt><br />
|| Free-form name that describes variant of this version (usually something like "<tt>-debug</tt>", "<tt>-optimized</tt>" etc. May be empty. <tt>SUFFIX</tt> is a macro defined by the preprocessor (as quoted string) that has the form "<tt>$version$variant</tt>", i.e. <tt>svn1144-debug</tt> if <tt>version=svn1144</tt> and <tt>variant=debug</tt>. <br />
|-<br />
|| <tt>debug</tt><br />
|| <tt>1</tt><br />
|| Pass debugging flags to the compiler (generates debugging symbols in binaries), defines <tt>YADE_DEBUG</tt> symbols. Defaults to '''''true'''''.<br />
|-<br />
|| <tt>optimize</tt><br />
|| <tt>0</tt><br />
|| Defines <tt>YADE_CAST</tt> (<tt>YADE_PTR_CAST</tt>) as <tt>static_cast</tt> (<tt>static_pointer_cast</tt>) and pass optimization flags to the compiler. Use together with <tt>debug</tt> to get fast code with debug symbols included. Defaults to '''''false'''''.<br />
|-<br />
|| <tt>buildPrefix</tt><br />
|| <tt>..</tt><br />
|| Specify where to put the <tt>build-0.11.0</tt> directory, which will hold all files created during compilation. This ensures that the source tree remains clean and that different builds (like optimized and debugging) are strictly separated, like <tt>build-0.11.0</tt> and <tt>build-0.11.0-debug</tt><br />
|-<br />
|| <tt>jobs</tt><br />
|| <tt>4</tt><br />
|| How many compilations should run in parallel. Defaults to '''''four''''', if your computer is weak you may want a lower number. Equivalent to make -j4<br />
|-<br />
|| <tt>CXX</tt><br />
|| <tt>g++</tt><br />
|| C++ compiler you want to use. You can say <tt>CXX="distcc g++"</tt> to have distributed build, if that is configured. <br />
|-<br />
|| <tt>CPPPATH</tt><br />
|| <tt>''empty''</tt><br />
|| Additional paths for the c proprocessor (whitespace separated). Use it for locally-installed libraries, eg.: <tt>CPPPATH="/usr/local/include /home/fred/build/log4cxx/include"</tt> <br />
|-<br />
|| <tt>LIBPATH</tt><br />
|| <tt>''empty''</tt><br />
|| Additional paths for linker (whitespace separated). <br />
|}<br />
<br />
To see all the options, along with their default and current values, say `<tt>scons -h</tt>`.<br />
<br />
As an example, to compile yade I use following command<br />
<br />
scons jobs=10 pretty=0 debug=1 optimize=0 profile=0 CXX="distcc g++" PREFIX=/home/janek/YADE useMiniWm3=0 CPPPATH=/usr/include/wm3<br />
<br />
The last two options are related to [[Installation_details#Installing_the_wildmagic_3_library_on_debian|the wildmagic 3 library]]. All options are stored inside <tt>scons.config</tt> file, so the next time you compile yade, you can really just issue <tt>scons</tt> command, unless you want to change something.<br />
<br />
= Automatic library detection =<br />
<br />
Scons will attempt detection of necessary libraries on your system at every run. If it fails, you can look at the <tt>$buildDir/config.log</tt> (eg.: <tt>../build-0.11.0/config.log</tt>) file to see what went wrong. If you have some of the dependencies (like lib3dviewer) installed locally in /usr/local, you will have to use:<br />
scons CPPPATH=/usr/local/include/wm3 LIBPATH=/usr/local/lib<br />
so that scons will find it.<br />
<br />
= Installing the wildmagic 3 library on debian =<br />
<br />
The [http://www.geometrictools.com/Downloads/Downloads.html wildmagic 3.11 library] is used by Lattice Geometrical Model when it's available. It's only to have dalaunay triangulation in 2D and 3D during specimen generation.<br />
<br />
Add the following line at the end of your <tt>/etc/apt/sources.list</tt>:<br />
<br />
deb-src http://geo.hmg.inpg.fr/~smilauer/yade ./<br />
<br />
Then donwload, compile and install wildmagic library:<br />
<br />
sudo apt-get update <br />
apt-get source wildmagic <br />
sudo apt-get build-dep wildmagic <br />
cd wildmagic-3p11/ <br />
fakeroot debian/rules binary <br />
sudo dpkg -i ../wildmagic-dev*.deb<br />
<br />
To tell scons that wildmagic is installed you need to add those parameters to scons: <tt>useMiniWm3=0</tt>.<br />
<br />
=Backward compatibility options=<br />
<br />
If you have older software installed, you can use:<br />
<br />
{| border="1" style="border-collapse:collapse;" cellpadding="7"<br />
|+ Compatibility options<br />
! ''parameter''<br />
! ''description''<br />
|-<br />
|| <tt>CXXFLAGS='-DNO_GLUTINIT'</tt><br />
|| Older versions of libglut do not have function glutInit(), you should use this compilation flag then. <br />
|-<br />
|| <tt>CXXFLAGS='-DQGLVIEWER20'</tt><br />
|| If you are using older QGLViewer (version 2.0) you should use this flag, otherwise you will get error about setFileName().<br />
|-<br />
|| <tt>CXXFLAGS='-pthread&nbsp;-lpthread'</tt><br />
|| If you are compiling with gcc3.3 (an older compiler).<br />
|-<br />
|| <tt>CXXFLAGS='-fPIC'</tt><br />
|| When compiling on AMD64.<br />
|}<br />
<br />
You can connect several <tt>CXXFLAGS</tt> by spaces: <tt>CXXFLAGS='-DNO_GLUTINIT -DQGLVIEWER20'</tt><br />
<br />
=Cleaning and uninstalling=<br />
<br />
To clean the compilation invoke from <tt>yade-0.11.0/</tt>:<br />
<br />
scons -c<br />
<br />
You can remove the compilation directory of yade, usually located in upper directory and starting with name <tt>build</tt>, like this one:<br />
<br />
rm -rf ../build-svn1144<br />
<br />
If yade was installed manually, the you can delete files from <br />
<br />
/usr/local/lib/yade/<br />
/usr/local/include/yade/<br />
/usr/local/bin/yade<br />
<br />
or from (depending where yade was installed):<br />
<br />
/home/''username''/YADE/lib/<br />
/home/''username''/YADE/include/<br />
/home/''username''/YADE/bin/yade<br />
<br />
If yade was installed from debian package, you can simply remove the package, and that's all.<br />
<br />
= Install paths =<br />
<br />
All files installed are versioned so that different versions and variants don't clash with each other - you can have as many version as you want installed at the same time. Supposing that we have <tt>variant=-dbg</tt> and <tt>version=svn1234</tt> (note that <tt>$SUFFIX=-$version$variant</tt>) and <tt>PREFIX=/usr/local</tt>, we have<br />
<br />
{| border="1" style="border-collapse:collapse;" cellpadding="7"<br />
|+ Paths<br />
! ''what kind''<br />
! ''path used''<br />
! ''example''<br />
|-<br />
|| executable <br />
|| <tt>$PREFIX/bin/yade$SUFFIX</tt><br />
|| <tt>/usr/local/bin/yade-svn1144-debug</tt><br />
|-<br />
|| default plugins <br />
|| <tt>$PREFIX/lib/yade$SUFFIX/lib/*/lib*.so</tt><br />
|| <tt>/usr/local/lib/yade-svn1144-debug/*/lib*.so</tt><br />
|-<br />
|| pkg-config script <br />
|| <tt>$PREFIX/lib/pkgconfig/yade$SUFFIX</tt><br />
|| <tt>/usr/local/lib/pkgconfig/yade-svn1144-debug.pc</tt><br />
|-<br />
|| user configuration directory <br />
|| <tt>$HOME/.yade$SUFFIX</tt><br />
|| <tt>/home/fred/.yade-svn1144-debug</tt><br />
|-<br />
|| headers (note: common for a particular version, regardless of variant) <br />
|| <tt>$PREFIX/include/yade$version/yade/*/*.hpp</tt><br />
|| <tt>/usr/local/include/yade-svn1144/yade/*/*.hpp</tt><br />
|}<br />
<br />
<br />
= See also =<br />
<br />
* '''[[Installation]]'''<br />
* [[Reported problems]]<br />
* [[Quick subversion tutorial]]<br />
* [[New to linux?]]</div>Richefeuhttps://yade-dem.org/w/index.php?title=Installation_details&diff=557Installation details2009-09-18T08:26:39Z<p>Richefeu: </p>
<hr />
<div>[[Category:Installation]]{{Installation quick access}}<br />
<br />
= Bazaar and scons installation =<br />
<br />
In order to install yade on a computeur, it is first necessary to get the sources. This is achieved through the python software called bazaar (version >= 1.7). Yade "modules" are then compiled with an other python software called scons.<br />
Most recent stable versions of these softwares can easily be downloaded on their respective sites: bazaar() and scons().<br />
Assuming that python is ok, the installation is also simple. cd into the downloaded folder and type:<br />
$ sudo ...<br />
<br />
= Systemwide installation as root =<br />
<br />
By default yade installs in directory <tt>/usr/local</tt>, but to install there you need a root access. So running just <tt>scons ''some options''</tt> should be enough. However, since you want to install yade systemwide as root, it might be better if you built a debian package instead.<br />
<br />
= Installing from debian source packages =<br />
<br />
[http://geo.hmg.inpg.fr/~smilauer/yade This repository] contains weekly snapshots from svn in the form of debian source packages. To compile and install these (assuming that you already have [[Installation#Required_packages|required packages]] installed), you need to add repository source do your '<tt>/etc/apt/sources.list</tt>':<br />
<br />
deb-src http://geo.hmg.inpg.fr/~smilauer/yade ./<br />
<br />
Pick a revision number you want (eg. 1234), based on the repository contents - see http://geo.hmg.inpg.fr/~smilauer/yade, then run:<br />
<br />
apt-get source yade-svn1234<br />
sudo apt-get build-dep yade-svn1234<br />
cd yade-svn1234-1<br />
fakeroot-tcp debian/rules binary<br />
<br />
Once compiled, you will have optimized (yade-svn1234), debug (yade-svn1234-dbg) and development (yade-svn1234-dev) packages in <tt>../</tt>, which you can install by:<br />
<br />
sudo dpkg -i ../yade-svn1234*.deb<br />
<br />
=Scons options=<br />
<br />
[http://www.scons.org Scons] is the tool used to build and install yade. Always run it from the top directory of yade.<br />
<br />
{| border="1" style="border-collapse:collapse;" cellpadding="7"<br />
|+ Scons options<br />
! ''parameter''<br />
! ''default&nbsp;value''<br />
! ''description''<br />
|-<br />
|| <tt>PREFIX</tt><br />
|| <tt>/usr/local</tt><br />
|| The directory where yade will be installed. Different yade versions '''will not overwrite each other''' in <tt>PREFIX</tt> directory. See version and variant below. This parameter is passed to the preprocessor as <tt>PREFIX</tt> macro (expands to quoted string). <br />
|-<br />
|| <tt>version</tt><br />
|| <tt>''auto''</tt><br />
|| Scons autodetects svn revision or release number, so it will be "<tt>svn1144</tt>" or "<tt>0.11.0</tt>", for example. If this fails, it will be "unknown". It is used to build `<tt>SUFFIX</tt>` (see `<tt>variant</tt>`).<br />
|-<br />
|| <tt>variant</tt><br />
|| <tt>''empty''</tt><br />
|| Free-form name that describes variant of this version (usually something like "<tt>-debug</tt>", "<tt>-optimized</tt>" etc. May be empty. <tt>SUFFIX</tt> is a macro defined by the preprocessor (as quoted string) that has the form "<tt>$version$variant</tt>", i.e. <tt>svn1144-debug</tt> if <tt>version=svn1144</tt> and <tt>variant=debug</tt>. <br />
|-<br />
|| <tt>debug</tt><br />
|| <tt>1</tt><br />
|| Pass debugging flags to the compiler (generates debugging symbols in binaries), defines <tt>YADE_DEBUG</tt> symbols. Defaults to '''''true'''''.<br />
|-<br />
|| <tt>optimize</tt><br />
|| <tt>0</tt><br />
|| Defines <tt>YADE_CAST</tt> (<tt>YADE_PTR_CAST</tt>) as <tt>static_cast</tt> (<tt>static_pointer_cast</tt>) and pass optimization flags to the compiler. Use together with <tt>debug</tt> to get fast code with debug symbols included. Defaults to '''''false'''''.<br />
|-<br />
|| <tt>buildPrefix</tt><br />
|| <tt>..</tt><br />
|| Specify where to put the <tt>build-0.11.0</tt> directory, which will hold all files created during compilation. This ensures that the source tree remains clean and that different builds (like optimized and debugging) are strictly separated, like <tt>build-0.11.0</tt> and <tt>build-0.11.0-debug</tt><br />
|-<br />
|| <tt>jobs</tt><br />
|| <tt>4</tt><br />
|| How many compilations should run in parallel. Defaults to '''''four''''', if your computer is weak you may want a lower number. Equivalent to make -j4<br />
|-<br />
|| <tt>CXX</tt><br />
|| <tt>g++</tt><br />
|| C++ compiler you want to use. You can say <tt>CXX="distcc g++"</tt> to have distributed build, if that is configured. <br />
|-<br />
|| <tt>CPPPATH</tt><br />
|| <tt>''empty''</tt><br />
|| Additional paths for the c proprocessor (whitespace separated). Use it for locally-installed libraries, eg.: <tt>CPPPATH="/usr/local/include /home/fred/build/log4cxx/include"</tt> <br />
|-<br />
|| <tt>LIBPATH</tt><br />
|| <tt>''empty''</tt><br />
|| Additional paths for linker (whitespace separated). <br />
|}<br />
<br />
To see all the options, along with their default and current values, say `<tt>scons -h</tt>`.<br />
<br />
As an example, to compile yade I use following command<br />
<br />
scons jobs=10 pretty=0 debug=1 optimize=0 profile=0 CXX="distcc g++" PREFIX=/home/janek/YADE useMiniWm3=0 CPPPATH=/usr/include/wm3<br />
<br />
The last two options are related to [[Installation_details#Installing_the_wildmagic_3_library_on_debian|the wildmagic 3 library]]. All options are stored inside <tt>scons.config</tt> file, so the next time you compile yade, you can really just issue <tt>scons</tt> command, unless you want to change something.<br />
<br />
= Automatic library detection =<br />
<br />
Scons will attempt detection of necessary libraries on your system at every run. If it fails, you can look at the <tt>$buildDir/config.log</tt> (eg.: <tt>../build-0.11.0/config.log</tt>) file to see what went wrong. If you have some of the dependencies (like lib3dviewer) installed locally in /usr/local, you will have to use:<br />
scons CPPPATH=/usr/local/include/wm3 LIBPATH=/usr/local/lib<br />
so that scons will find it.<br />
<br />
= Installing the wildmagic 3 library on debian =<br />
<br />
The [http://www.geometrictools.com/Downloads/Downloads.html wildmagic 3.11 library] is used by Lattice Geometrical Model when it's available. It's only to have dalaunay triangulation in 2D and 3D during specimen generation.<br />
<br />
Add the following line at the end of your <tt>/etc/apt/sources.list</tt>:<br />
<br />
deb-src http://geo.hmg.inpg.fr/~smilauer/yade ./<br />
<br />
Then donwload, compile and install wildmagic library:<br />
<br />
sudo apt-get update <br />
apt-get source wildmagic <br />
sudo apt-get build-dep wildmagic <br />
cd wildmagic-3p11/ <br />
fakeroot debian/rules binary <br />
sudo dpkg -i ../wildmagic-dev*.deb<br />
<br />
To tell scons that wildmagic is installed you need to add those parameters to scons: <tt>useMiniWm3=0</tt>.<br />
<br />
=Backward compatibility options=<br />
<br />
If you have older software installed, you can use:<br />
<br />
{| border="1" style="border-collapse:collapse;" cellpadding="7"<br />
|+ Compatibility options<br />
! ''parameter''<br />
! ''description''<br />
|-<br />
|| <tt>CXXFLAGS='-DNO_GLUTINIT'</tt><br />
|| Older versions of libglut do not have function glutInit(), you should use this compilation flag then. <br />
|-<br />
|| <tt>CXXFLAGS='-DQGLVIEWER20'</tt><br />
|| If you are using older QGLViewer (version 2.0) you should use this flag, otherwise you will get error about setFileName().<br />
|-<br />
|| <tt>CXXFLAGS='-pthread&nbsp;-lpthread'</tt><br />
|| If you are compiling with gcc3.3 (an older compiler).<br />
|-<br />
|| <tt>CXXFLAGS='-fPIC'</tt><br />
|| When compiling on AMD64.<br />
|}<br />
<br />
You can connect several <tt>CXXFLAGS</tt> by spaces: <tt>CXXFLAGS='-DNO_GLUTINIT -DQGLVIEWER20'</tt><br />
<br />
=Cleaning and uninstalling=<br />
<br />
To clean the compilation invoke from <tt>yade-0.11.0/</tt>:<br />
<br />
scons -c<br />
<br />
You can remove the compilation directory of yade, usually located in upper directory and starting with name <tt>build</tt>, like this one:<br />
<br />
rm -rf ../build-svn1144<br />
<br />
If yade was installed manually, the you can delete files from <br />
<br />
/usr/local/lib/yade/<br />
/usr/local/include/yade/<br />
/usr/local/bin/yade<br />
<br />
or from (depending where yade was installed):<br />
<br />
/home/''username''/YADE/lib/<br />
/home/''username''/YADE/include/<br />
/home/''username''/YADE/bin/yade<br />
<br />
If yade was installed from debian package, you can simply remove the package, and that's all.<br />
<br />
= Install paths =<br />
<br />
All files installed are versioned so that different versions and variants don't clash with each other - you can have as many version as you want installed at the same time. Supposing that we have <tt>variant=-dbg</tt> and <tt>version=svn1234</tt> (note that <tt>$SUFFIX=-$version$variant</tt>) and <tt>PREFIX=/usr/local</tt>, we have<br />
<br />
{| border="1" style="border-collapse:collapse;" cellpadding="7"<br />
|+ Paths<br />
! ''what kind''<br />
! ''path used''<br />
! ''example''<br />
|-<br />
|| executable <br />
|| <tt>$PREFIX/bin/yade$SUFFIX</tt><br />
|| <tt>/usr/local/bin/yade-svn1144-debug</tt><br />
|-<br />
|| default plugins <br />
|| <tt>$PREFIX/lib/yade$SUFFIX/lib/*/lib*.so</tt><br />
|| <tt>/usr/local/lib/yade-svn1144-debug/*/lib*.so</tt><br />
|-<br />
|| pkg-config script <br />
|| <tt>$PREFIX/lib/pkgconfig/yade$SUFFIX</tt><br />
|| <tt>/usr/local/lib/pkgconfig/yade-svn1144-debug.pc</tt><br />
|-<br />
|| user configuration directory <br />
|| <tt>$HOME/.yade$SUFFIX</tt><br />
|| <tt>/home/fred/.yade-svn1144-debug</tt><br />
|-<br />
|| headers (note: common for a particular version, regardless of variant) <br />
|| <tt>$PREFIX/include/yade$version/yade/*/*.hpp</tt><br />
|| <tt>/usr/local/include/yade-svn1144/yade/*/*.hpp</tt><br />
|}<br />
<br />
<br />
= See also =<br />
<br />
* '''[[Installation]]'''<br />
* [[Reported problems]]<br />
* [[Quick subversion tutorial]]<br />
* [[New to linux?]]</div>Richefeuhttps://yade-dem.org/w/index.php?title=Using_mgpost&diff=556Using mgpost2009-09-15T16:10:19Z<p>Richefeu: /* Compiling mgpost */</p>
<hr />
<div>== Brief description ==<br />
<code>mgpost</code> is a tool for post-processing and visualization of 3D DEM simulations. The source code can be found within yade repository, in the folder extra. A quick user guide is also provided.<br />
<br />
As I sortly said, <code>mgpost</code> is a small soft for viewing 2D or 3D discrete element simulations. These simulations can be performed with the computer code of your choice (I hope it is yade!). The 'comunication' between the simulation code and <code>mgpost</code> is performed through MGP files. It is actually a XML format with specific tags (described in the user guide). <br />
<br />
<code>mgpost</code> uses the standard openGL API for 2D and 3D vectorial graphics. It can currently be compiled on unix-like operating system such as kubuntu or Mac OS X, and have already be builded on windows in the past.<br />
<br />
<code>mgpost</code> uses a very basic C style programming (unlike Yade that is build with a very nice C++ design), but meanwhile a great software for 3D visualization, it just work fine !<br />
<br />
== Compiling mgpost ==<br />
<br />
mgpost is not yet compiled with scons but a simple Makefile. From yade directory type:<br />
$ cd extra/mgpost<br />
For unix-like OS on standard PC type:<br />
$ make<br />
And for Mac OS X type:<br />
$ make macosx<br />
If you want to install mgpost in /usr/local/bin (can be modified in Makefile) type:<br />
$ sudo make install<br />
and enter your password... That's all!<br />
<br />
== Generating MGP files with yade ==<br />
A basic (StandAlone)Engine is provided for this purpose: <code>MGPRecorder</code>. It works only for spheres for the moment.<br />
<br />
<br />
== Screenshots ==<br />
<br />
Here are some screenshots generated with mgpost.<br />
<br />
[[Image:Shot1.png|thumb|left|A meshed tomography for SpherePadder]]<br />
[[Image:Tomo_ceramic2.png|thumb|right|A packing of about 800 000 spheres obtained from the previous tomography]]<br />
[[Image:Polye_forces_close.png|thumb|left|Normal forces between polyhedra]]<br />
[[Image:40000Polye_vit.jpg|thumb|Packing of 40 000 polyhedra (the walls are not shown). The colors correspond to velocity magnitude of the particles]]<br />
[[Category:Developer guide]]</div>Richefeuhttps://yade-dem.org/w/index.php?title=Using_mgpost&diff=555Using mgpost2009-09-15T16:08:13Z<p>Richefeu: </p>
<hr />
<div>== Brief description ==<br />
<code>mgpost</code> is a tool for post-processing and visualization of 3D DEM simulations. The source code can be found within yade repository, in the folder extra. A quick user guide is also provided.<br />
<br />
As I sortly said, <code>mgpost</code> is a small soft for viewing 2D or 3D discrete element simulations. These simulations can be performed with the computer code of your choice (I hope it is yade!). The 'comunication' between the simulation code and <code>mgpost</code> is performed through MGP files. It is actually a XML format with specific tags (described in the user guide). <br />
<br />
<code>mgpost</code> uses the standard openGL API for 2D and 3D vectorial graphics. It can currently be compiled on unix-like operating system such as kubuntu or Mac OS X, and have already be builded on windows in the past.<br />
<br />
<code>mgpost</code> uses a very basic C style programming (unlike Yade that is build with a very nice C++ design), but meanwhile a great software for 3D visualization, it just work fine !<br />
<br />
== Compiling mgpost ==<br />
<br />
mgpost is not yet compiled with scons but a simple Makefile. From yade home directory type:<br />
$ cd extra/mgpost<br />
For unix-like OS on standard PC type:<br />
$ make<br />
And for Mac OS X type:<br />
$ make macosx<br />
If you want to install mgpost in /usr/local/bin by default type:<br />
$ sudo make install<br />
and enter your password... That all.<br />
<br />
== Generating MGP files with yade ==<br />
A basic (StandAlone)Engine is provided for this purpose: <code>MGPRecorder</code>. It works only for spheres for the moment.<br />
<br />
<br />
== Screenshots ==<br />
<br />
Here are some screenshots generated with mgpost.<br />
<br />
[[Image:Shot1.png|thumb|left|A meshed tomography for SpherePadder]]<br />
[[Image:Tomo_ceramic2.png|thumb|right|A packing of about 800 000 spheres obtained from the previous tomography]]<br />
[[Image:Polye_forces_close.png|thumb|left|Normal forces between polyhedra]]<br />
[[Image:40000Polye_vit.jpg|thumb|Packing of 40 000 polyhedra (the walls are not shown). The colors correspond to velocity magnitude of the particles]]<br />
[[Category:Developer guide]]</div>Richefeuhttps://yade-dem.org/w/index.php?title=Using_mgpost&diff=554Using mgpost2009-09-15T12:19:00Z<p>Richefeu: /* Screenshots */</p>
<hr />
<div>== mgpost ==<br />
<code>mgpost</code> is a tool for post-processing and visualization of 3D DEM simulations. The source code can be found within yade repository, in the folder extra. A quick user guide is also provided.<br />
<br />
As I sortly said, <code>mgpost</code> is a small soft for viewing 2D or 3D discrete element simulations. These simulations can be performed with the computer code of your choice (I hope it is yade!). The 'comunication' between the simulation code and <code>mgpost</code> is performed through MGP files. It is actually a XML format with specific tags (described in the user guide). <br />
<br />
<code>mgpost</code> uses the standard openGL API for 2D and 3D vectorial graphics. It can currently be compiled on unix-like operating system such as kubuntu or Mac OS X, and have already be builded on windows in the past.<br />
<br />
<br />
== Generating MGP files with yade ==<br />
A basic (StandAlone)Engine is provided for this purpose: <code>MGPRecorder</code>. It works only for spheres for the moment.<br />
<br />
<br />
== Screenshots ==<br />
<br />
Here are some screenshots generated with mgpost.<br />
<br />
[[Image:Shot1.png|thumb|left|A meshed tomography for SpherePadder]]<br />
[[Image:Tomo_ceramic2.png|thumb|right|A packing of about 800 000 spheres obtained from the previous tomography]]<br />
[[Image:Polye_forces_close.png|thumb|left|Normal forces between polyhedra]]<br />
[[Image:40000Polye_vit.jpg|thumb|Packing of 40 000 polyhedra (the walls are not shown). The colors correspond to velocity magnitude of the particles]]<br />
[[Category:Developer guide]]</div>Richefeuhttps://yade-dem.org/w/index.php?title=Yade&diff=437Yade2009-09-15T07:53:13Z<p>Richefeu: /* Common information */</p>
<hr />
<div> <br />
<br />
Yade is an extensible open-source framework for discrete numerical models, focused on Discrete Element Method. The project started as an offspring from SDEC at Grenoble University, now is being developed at multiple research institutes and has active and helpful user community.<br />
<br />
The computation parts are written in c++ using flexible object model, allowing independent implementation of new alogrithms, interfaces with other software packages (e.g. flow simulation), data import/export routines. Python can be used to create and manipulate the simulation or for postprocessing.<br />
<br />
<!--<br />
{| style="margin:0;padding:0ex;width:100%;"<br />
|valign="top" style="width:17em" | <br />
<strong><br />
* [[News|News about yade]]<br />
* [[Publications|List of publications]]<br />
* [[Reference documentation|Reference documentation]]<br />
* [[Screenshots and videos|Screenshots and videos]]<br />
* [[Installation|Download yade]]<br />
* [[Getting started]]<br />
</strong><br />
|valign="top" style="text-align: justify;" | <br />
<br />
__NOTOC__[[Image:Yade135_less_red.png|right]]<br />
Open source discrete modelling, finite element method, all in one!<br />
<br />
YADE Open-Dem is an Open Source GNU/GPL Software framework designed with dynamic libraries in a way that it is easy to add new numerical models for simulation. It aims to provide versatile means to perform discrete modelling.<br />
<br />
|}<br />
<br />
{| style="margin:0;padding:0;width:100%;"<br />
|valign="top" style="width:67%;text-align: justify;" | <br />
<br />
==Abstract==<br />
|valign="top" style="width:3%" | <br />
&nbsp;<br />
<br />
|valign="top" style="width:30%" | <br />
==Browse yade==<br />
<div style="font-size: 95%;color: #666;">Press '''+''' to expand</div><br />
<categorytree mode=all>Yade</categorytree><br />
|}<br />
<br />
==Some pictures==<br />
<br />
<div style="font-size: 95%;color: #666;">Upload here cool screenshots</div><br />
<br />
[[Image:Yade256.png|150px]]<br />
<br />
== Recent Additions ==<br />
COMMENT -- DPL manual: http://semeb.com/dpldemo --<br />
<br />
'''[[Documentation]]'''<br />
<dpl><br />
categoryregexp=.*documentation<br />
ordermethod=firstedit<br />
order=descending<br />
count=5<br />
mode=userformat<br />
listseparators=,* %DATE% [[%TITLE%]]\n,,<br />
addeditdate=true<br />
userdateformat=d m Y:<br />
</dpl><br />
'''[[Publications]]'''<br />
<dpl><br />
categoryregexp=Publication<br />
ordermethod=firstedit<br />
order=descending<br />
count=5<br />
mode=userformat<br />
listseparators=,* %DATE% [[%TITLE%]]\n,,<br />
addeditdate=true<br />
userdateformat=d m Y:<br />
</dpl><br />
'''[[Patches]] ?????'''<br />
<dpl><br />
categoryregexp=patches<br />
notnamespace=Template<br />
ordermethod=firstedit<br />
order=descending<br />
count=5<br />
mode=userformat<br />
listseparators=,* %DATE% [[%TITLE%]]\n,,<br />
addeditdate=true<br />
userdateformat=d m Y:<br />
</dpl><br />
<br />
'''[[Engines]] ?????'''<br />
<dpl><br />
categoryregexp=Engine<br />
notnamespace=Template<br />
ordermethod=firstedit<br />
order=descending<br />
count=5<br />
mode=userformat<br />
listseparators=,* %DATE% [[%TITLE%]]\n,,<br />
addeditdate=true<br />
userdateformat=d m Y:<br />
</dpl><br />
<br />
==Pros and cons==<br />
<br />
{| style="margin:0;padding:0.2em;width:100%;"<br />
|valign="top" style="width:49%;text-align: justify;" | <br />
''Advantages:''<br />
* allows numerous simulation methods in the single framework, so coupling them becomes possible,<br />
* plugins can import data from other software,<br />
* thoughtful code design promotes code reuse and improvement,<br />
* open source development model allows community feedback.<br />
<br />
|valign="top" style="width:2%" | <br />
&nbsp;<br />
|valign="top" style="width:49%;text-align: justify;" | <br />
<br />
''Disadvantages:''<br />
* implementing models requires adhering to framework design,<br />
* Yade framework is a new emerging software, still in beta phase<br />
* Documentation is lacking, although switching to wiki should help a lot now.<br />
* if you know more disadvantages, let [[Contact|us]] know!<br />
<br />
|}<br />
<br />
==Release status==<br />
<br />
{| style="margin:0;padding:0.2em;width:100%;"<br />
<br />
|valign="top" style="width:19%" |<br />
* release<br />
* version&nbsp;number<br />
* operating&nbsp;systems<br />
|valign="top" style="width:1%" | <br />
&nbsp;<br />
|valign="top" style="width:80%" | <br />
&nbsp;: beta<br><br />
&nbsp;: 0.12.1<br><br />
&nbsp;: linux<br><br />
|}<br />
<br />
--><br />
<br />
==First to read==<br />
===Common information ===<br />
* [[First_steps | First steps. Instruction how to start YADE simple simulation]]<br />
* [[Getting_started | Getting started]]<br />
* [[FAQ | Frequently asked questions (FAQ) on YADE]]<br />
* [https://yade.hmg.inpg.fr/index.php/Category:Screenshots Screenshots]<br />
* [[Screenshots_and_videos | Screenshots and videos]]<br />
<br />
=== Installation ===<br />
* [[Installation | Installation. Common information]]<br />
** [[Installation_details | Installation details]]<br />
** [[Installation_of_yade_on_debian_or_kubuntu | YADE installation on Debian, Kubuntu/Ubuntu]]<br />
** [[Installation_of_yade_on_fedora | YADE installation on Fedora/RedHat]]<br />
** [[Installation_of_yade_on_gentoo | YADE installation on Gentoo]]<br />
** [[Installation_of_yade_on_MacOSX_Leopard | YADE installation on Mac OS X]]<br />
** [[New:Required_packages | Required packages]]<br />
** [[Reported_problems | Reported problems]]<br />
<br />
=== New to Linux? ===<br />
* [[ New_to_linux? | New to Linux?]]<br />
** [[New:3D_graphics | 3D graphics]]<br />
** [[New:Going_further | Going further]]<br />
** [[New:Porting_QGLViewer_to_kubuntu | Porting QGLViewer to Kubuntu]]<br />
=== Physics===<br />
* [[How_it_works | Simple DEM explanation]]<br />
* [[Discrete_Element_Method | Discrete Element Method]]<br />
* [[Lattice_Geometrical_Model | Lattice Geometrical Model]]<br />
<br />
== Yade Community ==<br />
* [[Publications | Publications]]<br />
* [[Contact | Contact]]<br />
* [[News | News]]<br />
* [[Release_NEWS | Release NEWS]]<br />
* [[Authors_and_contributors | Authors and contributors]]<br />
* [[WhoIsDoingWhat | Who Is Doing What]]<br />
* [[Yade_history | Yade history]]<br />
* [[Future_plans | Future plans]]<br />
<br />
==Using YADE==<br />
* [[Usage_details| Explanation how to use graphic YADE interface]]<br />
* [[New:Making_videos | Making videos]]<br />
* [[Mgpost | Using Mgpost]]<br />
==Development==<br />
* [[Coding | Coding]]<br />
* [[Quick_Bazaar_tutorial | Quick Bazaar tutorial]]<br />
* [[Quick_subversion_tutorial | Quick subversion tutorial]]<br />
* [[Reference_documentation | Reference documentation (Doxygen and Epydoc))]]<br />
* [[Development_schedule | Development schedule]]<br />
* [[Development_Summary | Development Summary]]<br />
* [[Version_Numbering | Version Numbering]]<br />
* [[Schedule | Schedule]]<br />
<br />
=== Information on source code ===<br />
* [[Adding_plugin_to_the_source_tree | Adding plugin to the source tree]]<br />
* [[Third_party_plugins | How to add third party plugins]]<br />
* [[ConstitutiveLawHowto | Constitutive Law Howto]]<br />
* [[ConstitutiveLaws | Constitutive Laws]]<br />
* [[Contacts_overview | Contacts overview]]<br />
* [[RegressionsTests | Regressions Tests]]<br />
<br />
=== Examples ===<br />
* [[SimpleSceneTutorial | Simple Scene Tutorial]]<br />
* [[SimpleSceneCpp | Simple Scene Cpp]]<br />
* [[SimpleScenePython | Simple Scene Python]]<br />
<br />
==== Python ====<br />
* [[Python3Intro | Python3Intro]]<br />
* [[PythonPrimer | Python Primer]]<br />
* [[PythonPlotting | Creating simple plots with python]]<br />
* [[ScriptParametricStudy | Script Parametric Study. Explains how to use yade-$version-multi scripts]]<br />
* [[ScriptPlotContactDirectionDistribution | Script Plot Contact Direction Distribution]]<br />
<br />
=== Articles about development and debugging ===<br />
* [[ImplicitBuilds | Implicit Builds]]<br />
* [[DebianPackages | How to build Debian Packages]]<br />
<br />
====Debugging ====<br />
* [[Introduction_to_debugging | Introduction to debugging]]<br />
* [[Debugging_using_Kdevelop | Debugging using Kdevelop]]<br />
* [[Debugging_using_Valgrind | Debugging using Valgrind]]<br />
* [[Debugging_with_Backtrace | Debugging with Backtrace]]<br />
* [[Debugging_and_speed_profiling | Debugging and speed profiling]]<br />
* [[Speed_profiling_using_KCachegrind | Speed profiling using KCachegrind]]<br />
* [[Speed_profiling_using_TimingInfo_and_TimingDeltas_classes | Speed profiling using TimingInfo and TimingDeltas classes]]<br />
<br />
=== Performance and optimization ===<br />
* [[Performance_Tuning | Performance Tuning]]<br />
* [[Triaxial_Test_Parallel | Triaxial Test Parallel]]<br />
* [[Benchmark_revision1253 | Benchmark revision1253]]<br />
* [[Benchmarks | Benchmarks]]<br />
* [[Insertion_Sort_Collider_Stride | Insertion Sort Collider Stride]]<br />
* [[Colliders_performace | Colliders performace]]<br />
<br />
=== Drafts ===<br />
<br />
* [[ExamplesCleanup | Examples Cleanup]]<br />
* [[Sanitizing_Contact_Logic | Sanitizing Contact Logic]]<br />
* [[ScriptGenerateBoxPacking | ScriptGenerateBoxPacking]]<br />
* [[ScriptGenerateCylindricalPacking | ScriptGenerateCylindricalPacking]]<br />
* [[ScriptUniaxialTensionCompressionTest | ScriptUniaxialTensionCompressionTest]]<br />
* [[SharedMaterialProperties | SharedMaterialProperties]]<br />
* [[Yade_Wiki_Structure | Yade_Wiki_Structure]]<br />
* [[Pages_required_reworking | Pages required reworking]]<br />
* [[Snow_documentation| Snow documentation]]<br />
<br />
== Other==<br />
* [[Logo | Logo ]]<br />
* [[Sandbox | Sandbox]]<br />
[[Category:Overview]]<br />
[[Category:New documentation structure and items]]</div>Richefeuhttps://yade-dem.org/w/index.php?title=Yade&diff=436Yade2009-09-15T07:52:57Z<p>Richefeu: /* Common information */</p>
<hr />
<div> <br />
<br />
Yade is an extensible open-source framework for discrete numerical models, focused on Discrete Element Method. The project started as an offspring from SDEC at Grenoble University, now is being developed at multiple research institutes and has active and helpful user community.<br />
<br />
The computation parts are written in c++ using flexible object model, allowing independent implementation of new alogrithms, interfaces with other software packages (e.g. flow simulation), data import/export routines. Python can be used to create and manipulate the simulation or for postprocessing.<br />
<br />
<!--<br />
{| style="margin:0;padding:0ex;width:100%;"<br />
|valign="top" style="width:17em" | <br />
<strong><br />
* [[News|News about yade]]<br />
* [[Publications|List of publications]]<br />
* [[Reference documentation|Reference documentation]]<br />
* [[Screenshots and videos|Screenshots and videos]]<br />
* [[Installation|Download yade]]<br />
* [[Getting started]]<br />
</strong><br />
|valign="top" style="text-align: justify;" | <br />
<br />
__NOTOC__[[Image:Yade135_less_red.png|right]]<br />
Open source discrete modelling, finite element method, all in one!<br />
<br />
YADE Open-Dem is an Open Source GNU/GPL Software framework designed with dynamic libraries in a way that it is easy to add new numerical models for simulation. It aims to provide versatile means to perform discrete modelling.<br />
<br />
|}<br />
<br />
{| style="margin:0;padding:0;width:100%;"<br />
|valign="top" style="width:67%;text-align: justify;" | <br />
<br />
==Abstract==<br />
|valign="top" style="width:3%" | <br />
&nbsp;<br />
<br />
|valign="top" style="width:30%" | <br />
==Browse yade==<br />
<div style="font-size: 95%;color: #666;">Press '''+''' to expand</div><br />
<categorytree mode=all>Yade</categorytree><br />
|}<br />
<br />
==Some pictures==<br />
<br />
<div style="font-size: 95%;color: #666;">Upload here cool screenshots</div><br />
<br />
[[Image:Yade256.png|150px]]<br />
<br />
== Recent Additions ==<br />
COMMENT -- DPL manual: http://semeb.com/dpldemo --<br />
<br />
'''[[Documentation]]'''<br />
<dpl><br />
categoryregexp=.*documentation<br />
ordermethod=firstedit<br />
order=descending<br />
count=5<br />
mode=userformat<br />
listseparators=,* %DATE% [[%TITLE%]]\n,,<br />
addeditdate=true<br />
userdateformat=d m Y:<br />
</dpl><br />
'''[[Publications]]'''<br />
<dpl><br />
categoryregexp=Publication<br />
ordermethod=firstedit<br />
order=descending<br />
count=5<br />
mode=userformat<br />
listseparators=,* %DATE% [[%TITLE%]]\n,,<br />
addeditdate=true<br />
userdateformat=d m Y:<br />
</dpl><br />
'''[[Patches]] ?????'''<br />
<dpl><br />
categoryregexp=patches<br />
notnamespace=Template<br />
ordermethod=firstedit<br />
order=descending<br />
count=5<br />
mode=userformat<br />
listseparators=,* %DATE% [[%TITLE%]]\n,,<br />
addeditdate=true<br />
userdateformat=d m Y:<br />
</dpl><br />
<br />
'''[[Engines]] ?????'''<br />
<dpl><br />
categoryregexp=Engine<br />
notnamespace=Template<br />
ordermethod=firstedit<br />
order=descending<br />
count=5<br />
mode=userformat<br />
listseparators=,* %DATE% [[%TITLE%]]\n,,<br />
addeditdate=true<br />
userdateformat=d m Y:<br />
</dpl><br />
<br />
==Pros and cons==<br />
<br />
{| style="margin:0;padding:0.2em;width:100%;"<br />
|valign="top" style="width:49%;text-align: justify;" | <br />
''Advantages:''<br />
* allows numerous simulation methods in the single framework, so coupling them becomes possible,<br />
* plugins can import data from other software,<br />
* thoughtful code design promotes code reuse and improvement,<br />
* open source development model allows community feedback.<br />
<br />
|valign="top" style="width:2%" | <br />
&nbsp;<br />
|valign="top" style="width:49%;text-align: justify;" | <br />
<br />
''Disadvantages:''<br />
* implementing models requires adhering to framework design,<br />
* Yade framework is a new emerging software, still in beta phase<br />
* Documentation is lacking, although switching to wiki should help a lot now.<br />
* if you know more disadvantages, let [[Contact|us]] know!<br />
<br />
|}<br />
<br />
==Release status==<br />
<br />
{| style="margin:0;padding:0.2em;width:100%;"<br />
<br />
|valign="top" style="width:19%" |<br />
* release<br />
* version&nbsp;number<br />
* operating&nbsp;systems<br />
|valign="top" style="width:1%" | <br />
&nbsp;<br />
|valign="top" style="width:80%" | <br />
&nbsp;: beta<br><br />
&nbsp;: 0.12.1<br><br />
&nbsp;: linux<br><br />
|}<br />
<br />
--><br />
<br />
==First to read==<br />
===Common information ===<br />
* [[First_steps | First steps. Instruction how to start YADE simple simulation]]<br />
* [[Getting_started | Getting started]]<br />
* [[FAQ | Frequently asked questions (FAQ) on YADE]]<br />
* [https://yade.hmg.inpg.fr/index.php/Category:Screenshots | Screenshots]<br />
* [[Screenshots_and_videos | Screenshots and videos]]<br />
<br />
=== Installation ===<br />
* [[Installation | Installation. Common information]]<br />
** [[Installation_details | Installation details]]<br />
** [[Installation_of_yade_on_debian_or_kubuntu | YADE installation on Debian, Kubuntu/Ubuntu]]<br />
** [[Installation_of_yade_on_fedora | YADE installation on Fedora/RedHat]]<br />
** [[Installation_of_yade_on_gentoo | YADE installation on Gentoo]]<br />
** [[Installation_of_yade_on_MacOSX_Leopard | YADE installation on Mac OS X]]<br />
** [[New:Required_packages | Required packages]]<br />
** [[Reported_problems | Reported problems]]<br />
<br />
=== New to Linux? ===<br />
* [[ New_to_linux? | New to Linux?]]<br />
** [[New:3D_graphics | 3D graphics]]<br />
** [[New:Going_further | Going further]]<br />
** [[New:Porting_QGLViewer_to_kubuntu | Porting QGLViewer to Kubuntu]]<br />
=== Physics===<br />
* [[How_it_works | Simple DEM explanation]]<br />
* [[Discrete_Element_Method | Discrete Element Method]]<br />
* [[Lattice_Geometrical_Model | Lattice Geometrical Model]]<br />
<br />
== Yade Community ==<br />
* [[Publications | Publications]]<br />
* [[Contact | Contact]]<br />
* [[News | News]]<br />
* [[Release_NEWS | Release NEWS]]<br />
* [[Authors_and_contributors | Authors and contributors]]<br />
* [[WhoIsDoingWhat | Who Is Doing What]]<br />
* [[Yade_history | Yade history]]<br />
* [[Future_plans | Future plans]]<br />
<br />
==Using YADE==<br />
* [[Usage_details| Explanation how to use graphic YADE interface]]<br />
* [[New:Making_videos | Making videos]]<br />
* [[Mgpost | Using Mgpost]]<br />
==Development==<br />
* [[Coding | Coding]]<br />
* [[Quick_Bazaar_tutorial | Quick Bazaar tutorial]]<br />
* [[Quick_subversion_tutorial | Quick subversion tutorial]]<br />
* [[Reference_documentation | Reference documentation (Doxygen and Epydoc))]]<br />
* [[Development_schedule | Development schedule]]<br />
* [[Development_Summary | Development Summary]]<br />
* [[Version_Numbering | Version Numbering]]<br />
* [[Schedule | Schedule]]<br />
<br />
=== Information on source code ===<br />
* [[Adding_plugin_to_the_source_tree | Adding plugin to the source tree]]<br />
* [[Third_party_plugins | How to add third party plugins]]<br />
* [[ConstitutiveLawHowto | Constitutive Law Howto]]<br />
* [[ConstitutiveLaws | Constitutive Laws]]<br />
* [[Contacts_overview | Contacts overview]]<br />
* [[RegressionsTests | Regressions Tests]]<br />
<br />
=== Examples ===<br />
* [[SimpleSceneTutorial | Simple Scene Tutorial]]<br />
* [[SimpleSceneCpp | Simple Scene Cpp]]<br />
* [[SimpleScenePython | Simple Scene Python]]<br />
<br />
==== Python ====<br />
* [[Python3Intro | Python3Intro]]<br />
* [[PythonPrimer | Python Primer]]<br />
* [[PythonPlotting | Creating simple plots with python]]<br />
* [[ScriptParametricStudy | Script Parametric Study. Explains how to use yade-$version-multi scripts]]<br />
* [[ScriptPlotContactDirectionDistribution | Script Plot Contact Direction Distribution]]<br />
<br />
=== Articles about development and debugging ===<br />
* [[ImplicitBuilds | Implicit Builds]]<br />
* [[DebianPackages | How to build Debian Packages]]<br />
<br />
====Debugging ====<br />
* [[Introduction_to_debugging | Introduction to debugging]]<br />
* [[Debugging_using_Kdevelop | Debugging using Kdevelop]]<br />
* [[Debugging_using_Valgrind | Debugging using Valgrind]]<br />
* [[Debugging_with_Backtrace | Debugging with Backtrace]]<br />
* [[Debugging_and_speed_profiling | Debugging and speed profiling]]<br />
* [[Speed_profiling_using_KCachegrind | Speed profiling using KCachegrind]]<br />
* [[Speed_profiling_using_TimingInfo_and_TimingDeltas_classes | Speed profiling using TimingInfo and TimingDeltas classes]]<br />
<br />
=== Performance and optimization ===<br />
* [[Performance_Tuning | Performance Tuning]]<br />
* [[Triaxial_Test_Parallel | Triaxial Test Parallel]]<br />
* [[Benchmark_revision1253 | Benchmark revision1253]]<br />
* [[Benchmarks | Benchmarks]]<br />
* [[Insertion_Sort_Collider_Stride | Insertion Sort Collider Stride]]<br />
* [[Colliders_performace | Colliders performace]]<br />
<br />
=== Drafts ===<br />
<br />
* [[ExamplesCleanup | Examples Cleanup]]<br />
* [[Sanitizing_Contact_Logic | Sanitizing Contact Logic]]<br />
* [[ScriptGenerateBoxPacking | ScriptGenerateBoxPacking]]<br />
* [[ScriptGenerateCylindricalPacking | ScriptGenerateCylindricalPacking]]<br />
* [[ScriptUniaxialTensionCompressionTest | ScriptUniaxialTensionCompressionTest]]<br />
* [[SharedMaterialProperties | SharedMaterialProperties]]<br />
* [[Yade_Wiki_Structure | Yade_Wiki_Structure]]<br />
* [[Pages_required_reworking | Pages required reworking]]<br />
* [[Snow_documentation| Snow documentation]]<br />
<br />
== Other==<br />
* [[Logo | Logo ]]<br />
* [[Sandbox | Sandbox]]<br />
[[Category:Overview]]<br />
[[Category:New documentation structure and items]]</div>Richefeuhttps://yade-dem.org/w/index.php?title=Installation_of_yade_on_MacOSX_Leopard&diff=430Installation of yade on MacOSX Leopard2009-08-31T09:19:07Z<p>Richefeu: </p>
<hr />
<div>WARNING NOT YET READY!<br />
<br />
== Tools needed for Yade installation ==<br />
<br />
=== Bazaar ===<br />
We need bazaar (http://bazaar-vcs.org/Download) to get the sources of Yade. For installation from sources, simply type in bazaar's folder the following line: <br />
<br />
$ sudo python setup.py install<br />
<br />
Enter then your password. Note that python does not need to be installed.<br />
<br />
=== MacPorts ===<br />
<br />
You can get the pkg at http://www.macports.org/install.php. After installation type:<br />
<br />
$ sudo port -v selfupdate<br />
<br />
=== Apple X11 ===<br />
<br />
1. Insert the "Mac OS X Install DVD" and run the package named "Optional Installs".<br />
2. At the software selection window expand the Applications category and click the check box beside X11 (and nothing else).<br />
3. Click Install to install X11.<br />
<br />
=== DeveloperTools ===<br />
<br />
- install last version of xcode (DeveloperTools, mpkg): http://developer.apple.com/technology/xcode.html (need ADC Member Apple ID and password)<br />
<br />
<br />
=== Scons ===<br />
<br />
- install scons (sudo python setup.py install): http://www.scons.org/download.php<br />
<br />
<br />
== Installing dependencies ==<br />
<br />
=== install boost from sources ===<br />
<br />
In the source folder of boost, type<br />
<br />
$ export BOOST=`pwd`<br />
$ cd tools/jam/src<br />
$ ./build.sh darwin<br />
$ cd bin.macosxx86/<br />
$ export PATH=`pwd`:$PATH<br />
$ cd $BOOST<br />
$ bjam --toolset=darwin --with-thread --with-filesystem --with-iostreams --with-regex --with-program_options --with-python --with-system --with-date_time --with-serialization stage<br />
$ sudo bjam --toolset=darwin --with-thread --with-filesystem --with-iostreams --with-regex --with-program_options --with-python --with-system --with-date_time --with-serialization install<br />
<br />
Then add some symbolic links (the example is for boost 1.39)<br />
<br />
ln -s /usr/local/lib/libboost-filesystem-mt-1_39.dylib /usr/local/lib/libboost-filesystem-mt.dylib<br />
ln -s /usr/local/lib/libboost-python-mt-1_39.dylib /usr/local/lib/libboost-python-mt.dylib<br />
...<br />
ln -s /usr/local/include/boost-1_39 /usr/local/include/boost<br />
<br />
<br />
=== CGAL (version >= 3.4) ===<br />
<br />
Get the sources here http://www.cgal.org/download.html<br />
<br />
Specify the boost include directory. For example:<br />
export BOOST_INCLUDEDIR=/usr/local/include/boost<br />
Configure with cmake (that can be installed with sudo port install cmake):<br />
cmake .<br />
Then, build and install CGAL:<br />
make<br />
sudo make install<br />
<br />
=== example of scons.profile-default ==<br />
<br />
PREFIX = '/Users/richefeu/Documents/YADE'<br />
exclude = 'none'<br />
features = 'gts,log4cxx,opengl,openmp,python'<br />
version = 'vr'<br />
QTDIR = ['/usr/share/qt3', '/usr/lib/qt', '/usr/lib/qt3', '/usr/qt/3', '/usr/lib/qt-3.3']<br />
CXXFLAGS = ['-I/usr/local/include/boost-1_39', '-L/usr/local/bin']<br />
SHCCFLAGS = ['-fPIC']<br />
<br />
- install gnuplot: sudo port install gnuplot<br />
<br />
- install glib2 (macports)<br />
- need g++ >= 4.2 (and g++ >= 4.3 for openMP support)<br />
<br />
<br />
<br />
== Compilation ==<br />
<br />
<br />
TODO<br />
[[Category:Installation]]</div>Richefeuhttps://yade-dem.org/w/index.php?title=Yade&diff=24Yade2009-08-30T11:55:21Z<p>Richefeu: /* Installation */</p>
<hr />
<div> <br />
<br />
Yade is extensible open-source framework for discrete numerical models, focused on Discrete Element Method. The project started as an offspring from SDEC at University in Grenoble (UJF), now is being developed at multiple research institutes and has active and helpful user community.<br />
<br />
The computation parts are written in c++ using flexible object model, allowing independent implementation of new alogrithms, interfaces with other software packages (e.g. flow simulation), data import/export routines. Python can be used to create and manipulate the simulation or for postprocessing.<br />
<br />
<!--<br />
{| style="margin:0;padding:0ex;width:100%;"<br />
|valign="top" style="width:17em" | <br />
<strong><br />
* [[News|News about yade]]<br />
* [[Publications|List of publications]]<br />
* [[Reference documentation|Reference documentation]]<br />
* [[Screenshots and videos|Screenshots and videos]]<br />
* [[Installation|Download yade]]<br />
* [[Getting started]]<br />
</strong><br />
|valign="top" style="text-align: justify;" | <br />
<br />
__NOTOC__[[Image:Yade135_less_red.png|right]]<br />
Open source discrete modelling, finite element method, all in one!<br />
<br />
YADE Open-Dem is an Open Source GNU/GPL Software framework designed with dynamic libraries in a way that it is easy to add new numerical models for simulation. It aims to provide versatile means to perform discrete modelling.<br />
<br />
|}<br />
<br />
{| style="margin:0;padding:0;width:100%;"<br />
|valign="top" style="width:67%;text-align: justify;" | <br />
<br />
==Abstract==<br />
|valign="top" style="width:3%" | <br />
&nbsp;<br />
<br />
|valign="top" style="width:30%" | <br />
==Browse yade==<br />
<div style="font-size: 95%;color: #666;">Press '''+''' to expand</div><br />
<categorytree mode=all>Yade</categorytree><br />
|}<br />
<br />
==Some pictures==<br />
<br />
<div style="font-size: 95%;color: #666;">Upload here cool screenshots</div><br />
<br />
[[Image:Yade256.png|150px]]<br />
<br />
== Recent Additions ==<br />
COMMENT -- DPL manual: http://semeb.com/dpldemo --<br />
<br />
'''[[Documentation]]'''<br />
<dpl><br />
categoryregexp=.*documentation<br />
ordermethod=firstedit<br />
order=descending<br />
count=5<br />
mode=userformat<br />
listseparators=,* %DATE% [[%TITLE%]]\n,,<br />
addeditdate=true<br />
userdateformat=d m Y:<br />
</dpl><br />
'''[[Publications]]'''<br />
<dpl><br />
categoryregexp=Publication<br />
ordermethod=firstedit<br />
order=descending<br />
count=5<br />
mode=userformat<br />
listseparators=,* %DATE% [[%TITLE%]]\n,,<br />
addeditdate=true<br />
userdateformat=d m Y:<br />
</dpl><br />
'''[[Patches]] ?????'''<br />
<dpl><br />
categoryregexp=patches<br />
notnamespace=Template<br />
ordermethod=firstedit<br />
order=descending<br />
count=5<br />
mode=userformat<br />
listseparators=,* %DATE% [[%TITLE%]]\n,,<br />
addeditdate=true<br />
userdateformat=d m Y:<br />
</dpl><br />
<br />
'''[[Engines]] ?????'''<br />
<dpl><br />
categoryregexp=Engine<br />
notnamespace=Template<br />
ordermethod=firstedit<br />
order=descending<br />
count=5<br />
mode=userformat<br />
listseparators=,* %DATE% [[%TITLE%]]\n,,<br />
addeditdate=true<br />
userdateformat=d m Y:<br />
</dpl><br />
<br />
==Pros and cons==<br />
<br />
{| style="margin:0;padding:0.2em;width:100%;"<br />
|valign="top" style="width:49%;text-align: justify;" | <br />
''Advantages:''<br />
* allows numerous simulation methods in the single framework, so coupling them becomes possible,<br />
* plugins can import data from other software,<br />
* thoughtful code design promotes code reuse and improvement,<br />
* open source development model allows community feedback.<br />
<br />
|valign="top" style="width:2%" | <br />
&nbsp;<br />
|valign="top" style="width:49%;text-align: justify;" | <br />
<br />
''Disadvantages:''<br />
* implementing models requires adhering to framework design,<br />
* Yade framework is a new emerging software, still in beta phase<br />
* Documentation is lacking, although switching to wiki should help a lot now.<br />
* if you know more disadvantages, let [[Contact|us]] know!<br />
<br />
|}<br />
<br />
==Release status==<br />
<br />
{| style="margin:0;padding:0.2em;width:100%;"<br />
<br />
|valign="top" style="width:19%" |<br />
* release<br />
* version&nbsp;number<br />
* operating&nbsp;systems<br />
|valign="top" style="width:1%" | <br />
&nbsp;<br />
|valign="top" style="width:80%" | <br />
&nbsp;: beta<br><br />
&nbsp;: 0.12.1<br><br />
&nbsp;: linux<br><br />
|}<br />
<br />
--><br />
<br />
==First to read==<br />
===Common information ===<br />
* [[First_steps | First steps. Instruction how to start YADE simple simulation]]<br />
* [[Getting_started | Getting started]]<br />
* [[FAQ | Frequently asked questions (FAQ) on YADE]]<br />
* [http://yade.wikia.com/wiki/Category:Screenshots Screenshots]<br />
* [[Screenshots_and_videos | Screenshots and videos]]<br />
<br />
=== Installation ===<br />
* [[Installation | Installation. Common information]]<br />
** [[Installation_details | Installation details]]<br />
** [[Installation_of_yade_on_debian_or_kubuntu | YADE installation on Debian, Kubuntu/Ubuntu]]<br />
** [[Installation_of_yade_on_fedora | YADE installation on Fedora/RedHat]]<br />
** [[Installation_of_yade_on_gentoo | YADE installation on Gentoo]]<br />
** [[Installation_of_yade_on_MacOSX_Leopard | YADE installation on Mac OS X]]<br />
** [[New:Required_packages | Required packages]]<br />
** [[Reported_problems | Reported problems]]<br />
<br />
=== New to Linux? ===<br />
* [[ New_to_linux? | New to Linux?]]<br />
** [[New:3D_graphics | 3D graphics]]<br />
** [[New:Going_further | Going further]]<br />
** [[New:Porting_QGLViewer_to_kubuntu | Porting QGLViewer to Kubuntu]]<br />
=== Physics===<br />
* [[How_it_works | Simple DEM explanation]]<br />
* [[Discrete_Element_Method | Discrete Element Method]]<br />
* [[Lattice_Geometrical_Model | Lattice Geometrical Model]]<br />
<br />
== Yade Community ==<br />
* [[Publications | Publications]]<br />
* [[Contact | Contact]]<br />
* [[News | News]]<br />
* [[Release_NEWS | Release NEWS]]<br />
* [[Authors_and_contributors | Authors and contributors]]<br />
* [[WhoIsDoingWhat | Who Is Doing What]]<br />
* [[Yade_history | Yade history]]<br />
* [[Future_plans | Future plans]]<br />
<br />
==Using YADE==<br />
* [[Usage_details| Explanation how to use graphic YADE interface]]<br />
* [[New:Making_videos | Making videos]]<br />
* [[Mgpost | Using Mgpost]]<br />
==Development==<br />
* [[Coding | Coding]]<br />
* [[Quick_Bazaar_tutorial | Quick Bazaar tutorial]]<br />
* [[Quick_subversion_tutorial | Quick subversion tutorial]]<br />
* [[Reference_documentation | Reference documentation (Doxygen and Epydoc))]]<br />
* [[Development_schedule | Development schedule]]<br />
* [[Development_Summary | Development Summary]]<br />
* [[Version_Numbering | Version Numbering]]<br />
* [[Schedule | Schedule]]<br />
<br />
=== Information on source code ===<br />
* [[Adding_plugin_to_the_source_tree | Adding plugin to the source tree]]<br />
* [[Third_party_plugins | How to add third party plugins]]<br />
* [[ConstitutiveLawHowto | Constitutive Law Howto]]<br />
* [[ConstitutiveLaws | Constitutive Laws]]<br />
* [[Contacts_overview | Contacts overview]]<br />
* [[RegressionsTests | Regressions Tests]]<br />
<br />
=== Examples ===<br />
* [[SimpleSceneTutorial | Simple Scene Tutorial]]<br />
* [[SimpleSceneCpp | Simple Scene Cpp]]<br />
* [[SimpleScenePython | Simple Scene Python]]<br />
<br />
==== Python ====<br />
* [[Python3Intro | Python3Intro]]<br />
* [[PythonPrimer | Python Primer]]<br />
* [[PythonPlotting | Creating simple plots with python]]<br />
* [[ScriptParametricStudy | Script Parametric Study. Explains how to use yade-$version-multi scripts]]<br />
* [[ScriptPlotContactDirectionDistribution | Script Plot Contact Direction Distribution]]<br />
<br />
=== Articles about development and debugging ===<br />
* [[ImplicitBuilds | Implicit Builds]]<br />
* [[DebianPackages | How to build Debian Packages]]<br />
<br />
====Debugging ====<br />
* [[Introduction_to_debugging | Introduction to debugging]]<br />
* [[Debugging_using_Kdevelop | Debugging using Kdevelop]]<br />
* [[Debugging_using_Valgrind | Debugging using Valgrind]]<br />
* [[Debugging_with_Backtrace | Debugging with Backtrace]]<br />
* [[Debugging_and_speed_profiling | Debugging and speed profiling]]<br />
* [[Speed_profiling_using_KCachegrind | Speed profiling using KCachegrind]]<br />
* [[Speed_profiling_using_TimingInfo_and_TimingDeltas_classes | Speed profiling using TimingInfo and TimingDeltas classes]]<br />
<br />
=== Performance and optimization ===<br />
* [[Performance_Tuning | Performance Tuning]]<br />
* [[Triaxial_Test_Parallel | Triaxial Test Parallel]]<br />
* [[Benchmark_revision1253 | Benchmark revision1253]]<br />
* [[Benchmarks | Benchmarks]]<br />
* [[Insertion_Sort_Collider_Stride | Insertion Sort Collider Stride]]<br />
* [[Colliders_performace | Colliders performace]]<br />
<br />
=== Drafts ===<br />
<br />
* [[ExamplesCleanup | Examples Cleanup]]<br />
* [[Sanitizing_Contact_Logic | Sanitizing Contact Logic]]<br />
* [[ScriptGenerateBoxPacking | ScriptGenerateBoxPacking]]<br />
* [[ScriptGenerateCylindricalPacking | ScriptGenerateCylindricalPacking]]<br />
* [[ScriptUniaxialTensionCompressionTest | ScriptUniaxialTensionCompressionTest]]<br />
* [[SharedMaterialProperties | SharedMaterialProperties]]<br />
* [[Yade_Wiki_Structure | Yade_Wiki_Structure]]<br />
* [[Pages_required_reworking | Pages required reworking]]<br />
* [[Snow_documentation| Snow documentation]]<br />
<br />
== Other==<br />
* [[Logo | Logo ]]<br />
* [[Sandbox | Sandbox]]<br />
[[Category:Overview]]<br />
[[Category:New documentation structure and items]]</div>Richefeuhttps://yade-dem.org/w/index.php?title=MediaWiki:Sidebar&diff=13MediaWiki:Sidebar2009-07-08T08:14:30Z<p>Richefeu: </p>
<hr />
<div>* SEARCH<br />
<br />
* navigation<br />
** mainpage|YADE Home<br />
** portal-url|portal<br />
** currentevents-url|currentevents<br />
** recentchanges-url|recentchanges<br />
** randompage-url|randompage<br />
** helppage|help<br />
<br />
<br />
* Yade for Beginners<br />
** beginners-guide|Beginners guide<br />
** Downloading/compiling Yade<br />
** The logic of Sconscripts<br />
** Kdevelop usage<br />
<br />
* Advance use of Yade<br />
** Developper guide<br />
** Python console and scripts<br />
** Constitutive laws<br />
** Debuging tools<br />
** Parallelization<br />
** Profiling<br />
<br />
<br />
* TOOLBOX<br />
<br />
* LANGUAGES</div>Richefeuhttps://yade-dem.org/w/index.php?title=Yade:About&diff=12Yade:About2009-07-08T08:10:09Z<p>Richefeu: </p>
<hr />
<div>'''YADE''' is an Open Source GNU/GPL Software framework designed with dynamic libraries in a way that it is easy to add new numerical models for simulation. It aims to provide versatile means to perform discrete modelling.<br />
<br />
Various different methods and algorithms for numerical simulations currently exist. Yade tries to extract their underlying abstractions.<br />
<br />
Currently there are two physically complete models: <br />
* Discrete Element Method (Open [[wikipedia:Discrete Element Method|DEM]]) based on spheres, and<br />
* Lattice Geometrical Model based on rods.<br />
<br />
And three models are under development:<br />
* Discrete Model based on Tetrahedra,<br />
* Finite Element Method ([[wikipedia:FEM|FEM]], [[wikipedia:Finite element analysis|[2]]]) that uses Tetrahedra elements, and<br />
* Simple Mass Spring based on springs. <br />
<br />
Those abstractions are implemented in C++ conforming to Object Oriented design principles. They provide interface to plug-in different modelling methods. Yade framework is intended to also work with other numerical methods than those mentioned above.<br />
<br />
The development of this open source software is mostly funded in 3SR lab - Grenoble University, France. Although its physical modelling (the actual formulas) are fairly complete, the program documentation and interface needs improvement and is being worked on as well.</div>Richefeuhttps://yade-dem.org/w/index.php?title=Yade:About&diff=11Yade:About2009-07-08T08:08:51Z<p>Richefeu: Created page with 'YADE is an Open Source GNU/GPL Software framework designed with dynamic libraries in a way that it is easy to add new numerical models for simulation. It aims to provide versatil…'</p>
<hr />
<div>YADE is an Open Source GNU/GPL Software framework designed with dynamic libraries in a way that it is easy to add new numerical models for simulation. It aims to provide versatile means to perform discrete modelling.<br />
<br />
Various different methods and algorithms for numerical simulations currently exist. Yade tries to extract their underlying abstractions.<br />
<br />
Currently there are two physically complete models: <br />
* Discrete Element Method (Open [[wikipedia:Discrete Element Method|DEM]]) based on spheres, and<br />
* Lattice Geometrical Model based on rods.<br />
<br />
And three models are under development:<br />
* Discrete Model based on Tetrahedra,<br />
* Finite Element Method ([[wikipedia:FEM|FEM]], [[wikipedia:Finite element analysis|[2]]]) that uses Tetrahedra elements, and<br />
* Simple Mass Spring based on springs. <br />
<br />
Those abstractions are implemented in C++ conforming to Object Oriented design principles. They provide interface to plug-in different modelling methods. Yade framework is intended to also work with other numerical methods than those mentioned above.<br />
<br />
The development of this open source software is mostly funded in 3SR lab - Grenoble University, France. Although its physical modelling (the actual formulas) are fairly complete, the program documentation and interface needs improvement and is being worked on as well.</div>Richefeuhttps://yade-dem.org/w/index.php?title=Beginners-guide&diff=10Beginners-guide2009-07-08T08:03:10Z<p>Richefeu: /* 3.Making a calculation */</p>
<hr />
<div>The .pdf version of all that follows (which is not perfectly edited for the moment) : [[Image:Gettingstarted3.pdf]]<br />
<br />
==Introduction==<br />
<br />
If you read these lines you have surely decided recently to try and use Yade for your numerical simulations. I was in this case two months ago, while I didn't know more or less anything on Linux, C++, or open source codes... So you can easily imagine that sometimes I had the feeling to try to solve puzzle with manuals redacted in chinese... I begin slowly to come back to the surface and I think that it would be a good thing (for each new user but for Yade itself) if the beginning of the use of this code could be not so disorientating for everyone. So here are a few paragraphs that are not intended to be very complicated but that, I hope, will help new users to see faster than me how coarsely Yade is built and how they will have to deal with it.<br />
<br />
<br />
==Installing and beginning to use Yade==<br />
<br />
Yade is developed originaly on Linux, so (except if you have sufficient skills to compile the sources on another system) the first thing you have to do to use Yade is to quit Windows and jump into Linux, which could be a bit frightening if you are really a non geek. But sincerely under Linux, even if you could do all that you want with black screens with white letters (and probably many people would say you that it is the best thing to do), you would also have the possibility to use it so that you will not see so much differences with Windows.<br />
<br />
When you are a little familiarized with Linux, you can download, all that Yade needs to be installed, on the web site : http://yade.wikia.com/wiki/Yade : in the rubrique Installation then download : http://yade.wikia.com/wiki/Installation#Download. You will so download a tar.gz file which is a compressed folder (like the .zip under Windows for example).<br />
Once this file downloaded you have to decompress it, by right cliking on it an then making "Extract" into the location you want (as an example for me it is something like home/jerome/yade-0.11.1). You have then become a lot of files and folders which constitute all the "sources" of Yade. For those for who that would not be clear (if this happens), you have to understand that Yade has to be seen like a programming project (in C++ so) with a lot of source files that interact with each other and describe a lot of things like the geometry of your numerical model, the contact laws between the entities (in fact all the things that are used for the calculations). You have then to compile all these source files to create an executable and libraries based on what is written in these files.<br />
<br />
===1.Compiling===<br />
<br />
In fact to compile the source files all that you have to do is to '''open a terminal''' in the folder where you extracted the sources (home/jerome/yade-0.11.1 for me so), and then typing scons. This instruction, which will so create the "real" software Yade (the executable), uses the instructions (written in Python programming language) from the two files "''SConstruct''" and "''scons.config''" that are in this folder.<br />
In fact, before typing scons you have to edit "''scons.config''" (which is by chance the simplest of the both...) where, for example, the folder where the executable will be installed (and few other things) is defined. You have to define this folder and you can do it on the first line beginning with "''PREFIX =''" (personly I choosed to name the folder of the executable : YADE, so I have me : "''PREFIX = '/home/jerome/YADE' ''"). I can't really explain you all the others lines, I can only say that they allow you to set some options of installation, for example the line " ''exclude ='' " which allows you not to install some modules of Yade. Yade being indeed constituted of different modules ("packages") (one for discrete element simulations, one for finite elements ones, and one for lattice ones for example), you could be interested in not to installing one of them : for example if you don't need the lattice module and if the compilation crushes only because of source files concerning this module, you can solve your problems by typing "''exclude = 'lattice' ''", moreover it would save time. If you want all to be installed, type "''exclude = 'none'''"! Once the scons.config file set you can now type in the terminal :<br />
<br />
scons<br />
<br />
NB : in fact it is not absolutely necessary to edit directly scons.config : for setting the same things you can also type in the terminal something like :<br />
<br />
scons exclude=lattice,mass-spring optimize=1 debug=0 version=-trunk PREFIX=/opt<br />
<br />
(and then these options will be remembered in scons.config)<br />
Then the only thing you have to do is to pray that all works well and that you will not have to give a look to the SConstruct file (if this is very unfortunately the case then you can use the yade mail list to ask a – precise - question by sending the error message printed)...<br />
To finish about the compilation I have to say you that there are some other important files that allow a good compilation. In each folder of pkg/, you can find ''SConscript'' files (one in pkg/dem, one in pkg/common...). These files describe the interactions between the source files : if you open for example '''pkg/dem/SConscript''' you will find a lot of paragraphs looking like this :<br />
<br />
env.SharedLibrary('TriaxialTest',<br />
['PreProcessor/TriaxialTest.cpp'],<br />
LIBS=env['LIBS']+['SDECLinkGeometry',<br />
'ElasticContactLaw',<br />
'AveragePositionRecorder',<br />
...<br />
'PositionOrientationRecorder']),<br />
<br />
In fact for each class described in pkg/dem (and that you want to be compiled in the aim to use it in the executable for the simulations), you must have one paragraph. As you can see the paragraph begins with the name of the class (here it is " TriaxialTest ", we will speak about it in few lines), its location, and then you have all the list of the classes necessary to the one considered (TriaxialTest here) to work well. To see fast which classes are "necessary" you would normally only have to give a look to which classes are included in the source file considered (which is so " pkg/dem/PreProcessor/TriaxialTest.cpp " here)<br />
If it is your very first compilation you should not have to give interest to these SConscript files. But later when you will modify some source files, you will have to add the corresponding lines in the corresponding paragraph. For example if you write a new class named for example LdC26, that describes a new law of contact, and that you want use it in the existing file who describe your simulation (let's say that its name is " MySimulation "), you will have to<br />
- add in the paragraph env.SharedLibrary('MySimulation',... a line 'LdC26'<br />
- and create a paragraph<br />
<br />
env.SharedLibrary('LdC26',<br />
['location of LdC26'],<br />
LIBS=env['LIBS']+['all the classes corresponding to the objects you used for creating LdC26...<br />
<br />
===2.Launching Yade for the first time===<br />
<br />
Once the compilation has could do its job (maybe around a few days after having downloaded the sources...) you can now go into the folder you indicated in scons.config. Folder in which you should find folders named bin, data, include, lib. In the bin one you will find the executable : you can launch it by opening a terminal in this folder and so typing<br />
./yade-0.11.1<br />
(if your executable has the same name as mine). Here is the window you should obtain :<br />
<br />
[[Image:image1.jpg]]<br />
<br />
Great, isn't it ? For making a few things you could click on Preprocessor, then FileGenerator, and you obtain this :<br />
[[Image:image2.jpg]]<br />
This window allows you to open a preexisting example of simulation. There are various examples, but because I will take often this example, let's say a few words about the TriaxialTest.<br />
This preprocessor simulates a ... triaxial test by the discrete element method. The numerical model is composed of some spheres (simulating the physical sample) that are contained into a box constituted itselve by six walls. By launching the calculation, the six walls move so that the numerical sample is confined, after that you could impose a deviatoric stress.<br />
You can choose the example you want to launch in the line " Generator Name ". <br />
<br />
====a) Line " Generator Name "====<br />
<br />
In the source files there are indeed some "preprocessor" files that describe some numerical models, like so the simulation of a triaxial test (" TriaxialTest "...), or the simulation of the impact of a ball in a wall of bricks (" SDECImpactTest "), and so on. Depending on the type of the numerical simulation (DEM, FEM, lattice...) you can find these files in folders looking like yade-0.11.1/pkg/dem/PreProcessor (if it is a DEM simulation).<br />
For each numerical model you have two files : one .hpp and one .cpp. In yade-0.11.1/pkg/dem/PreProcessor you can so find for example the files TriaxialTest.hpp and Triaxial.cpp. If you know something to C++ you would be used to that, and if it is not the case, before strong advicing you to give a serious look to C++ language (for french speaking people I personally advice http://www.siteduzero.com/tuto-3-5395-0-apprenez-a-programmer-en-c.html which I found very well done and, so, quite simple to understand), I could explain you that in the .hpp file you will find the declaration of all the variables and functions (you can make the difference by this way : the names of functions contain parentheses, the names of variables don't) that will be used in .cpp file.<br />
If you are lucky you could also find in this .hpp file maybe some comments that will explain you to what correspond these variables and functions. If you want, you can give a look to some of these preprocessor files, but we will speak about it in some paragraphs.<br />
<br />
====b) The " Parameters " window====<br />
<br />
Below is a " Parameters " window where you can modify some features of the numerical models, which were given default numerical values in the preprocessor file. For example, for the TriaxialTest, you could change the values of the dimension of the box containing the numerical sample, physical parameters of the spheres and the walls : sphereYougModulus, boxYoungModulus, sphereFrictionDeg, names and locations for outputs files and so on... I don't explain you now the real meanings of all of these physical parameters, be just aware that some correspond to what you think (for example the friction degrees that are used to described the maximum tangential forces on the contacts), but some not : for example the Young modulus are all but real Young Modulus (all the entities are indeed rigid), but they are used to compute the normal rigidities on the contacts.<br />
<br />
====c) The " Generate " button====<br />
<br />
When you are ready to start a calculation you can click on Generate. If I understood well this will read the corresponding preprocessor file so that, for example for the TriaxialTest, all the balls (and the boxes) will be effectively created, located to the right places and will be affected their physical parameters (that's a very incomplete but, I hope, quite practical and clear example). Engines working on bodies are created too (see next paragraph about engines). Thanks to the "execution" of the preprocessor file a .xml or .bin file is generated and saved (in the location indicated in the Output FileName line). Binary files are shorter but non editable format files, I will speak to you about the .xml file that you could read with a text editor.<br />
<br />
====d) The .xml file (IMPORTANT § BECAUSE OF EXPLANATIONS ABOUT ENGINES)====<br />
<br />
In fact all that you have done here was only to create this .xml file which will be directly used now when the calculation will run. So let us give a look to it.<br />
The first lines will probably be always the same and look to this :<br />
<br />
<Yade><br />
<rootBody _className_=... <br />
<physicalParameters ...<br />
<geometricalModel /><br />
<interactingGeometry ...<br />
<boundingVolume ...<br />
<br />
These lines are always the same, so I won't tell you a lot about this (and also because I don't see what I could explain you...). But just after you can see an important paragraph beginning with<br />
<br />
<engines size="a number"><br />
<engines _className_="..." ...<br />
<br />
I would say that it is the point of Yade : engines are "things" that act on the numerical model every timestep. They are of course all defined in source files you could find in folders like for example '''yade-0.11.1/pkg/dem/Engine/...''' for engines specifics to DEM simulations or in '''yade-0.11.1/pkg/common/Engine''' for engines that could be used for every type of simulation. Here are two examples you could find in your .xml file issued from the ''TriaxialTest'' preprocessor, so that you could maybe better imagine what these engines could be :<br />
<br />
- the " ''TriaxialCompressionEngine'' "<br />
As you might imagine, this engine allows to confine the numerical sample. You could find the sources for it in '''pkg/dem/Engine/DeusExMachina'''.<br />
You can see in the xml file, that after ''<engines _className_="TriaxialCompressionEngine"'', there are still a lot of things written : that's all the variables (with their values) specifics to the ''TriaxialCompressionEngine''. These variables were declared in ''TriaxialCompressionEngine.hpp'' (and you can see how exactly they are used in ''TriaxialCompressionEngine.cpp''), but there values were defined in the ''TriaxialTest'' preprocessor file. Fortunately the .hpp file is here well commented and you should see fast to what they correspond without searching them in the .cpp and trying to understand their role (which is the general case you will have to do).<br />
<br />
- the " ''GravityEngine'' "<br />
You could maybe not see it in this .xml file but you would surely fast find it in other .xml files corresponding to others preprocessor files. The sources for this engine are in '''pkg/common/Engine/DeusExMachina'''.<br />
This engine allows to apply ... the gravity to the bodies of the numerical model !! Give a look to the sources, and you will see that there is here only a variable : a vector of three real numbers (cf the type Vector3r which is also defined somewhere in the sources) named gravity. In xml files where this engine appears you should see so a line looking to :<br />
''<engines _className_="GravityEngine" gravity="{0 -9.81 0}" />''<br />
<br />
To conclude these some words about the engines, I will ask you to continue to look into the sources of these engines (or others) and I'll point your attention about the fact that they all have a "''action''" or a "''applycondition''" function (if this doesn't appear directly, these functions are herited from a mother class). In fact that's how the calculation progresses : at each timestep the " ''action'' " function of all of the engines which appear in the list in the .xml file is executed.<br />
<br />
NB1: to be sure of that you can see the files '''core/Metabody.hpp''' and '''.cpp''' where the function ''moveToNextTimeStep()'' (whose you could imagine that it is executed at each timestep...) is defined. If you are familiar (and if you're not that's not too bad for the moment) with C++ you would see what I mean.<br />
<br />
NB2: if later you will modify this .xml file, by adding for example engines, be careful that if you want to use 15 engines, you have to have on the first line of this paragraph : ''<engines size="15">'' !<br />
<br />
That's so how, at each timestep, the spheres move, the contact forces are calculated, the values of what you want to be stored are stored and so on...<br />
<br />
<br />
To finish with the .xml file, you will see that after the § devoted to the engines there is a one where you could find the list of all of the numerical entities, named "bodies", constituting the numerical sample. This paragraph begins with :<br />
<br />
<bodies _className_="BodyRedirectionVector" ><br />
<body size="a number"><br />
<body _className_="Body" id="0" ...<br />
<br />
In the second line you can so see ... the number of bodies present in the model. Then comes the list of all these bodies with informations about each one. They have all an identity number (from 0 to number of bodies – 1), that you can see in ... ''id=''.<br />
After this number of identity, you can find ''isDynamic="1"'' or ''"0"''. Depending on this, this body will (if ''isDynamic="1"''...) or not be able to move. To be sure of that, you can open the file '''pkg/common/Engine/EngineUnit/LeapFrogPositionIntegrator.cpp'''. In this file is described how the velocities and positions of bodies are updated, knowing their acceleration. And as you can see, all these lines won't be executed if the body is not dynamic (cf line 18 : ''if(!body->isDynamic) return;''). So it is a simple mean to have fixed bodies : set for them ''isDynamic="0"'', and you will be sure that there will never move !<br />
NB: this file has a brother : '''LeapFrogOrientationIntegrator''' (in the same folder) which does the same work but for the rotations and orientations. <br />
<br />
Then you have ''se3'', which is a 7 real vector : the three first numbers represent the position of the center of the body, and the four last are a quaternion which describes the orientation of the body. The other parameters should be easy to understand. Please just note that there are some of them which are used for the screen display.<br />
<br />
===3.Making a calculation===<br />
<br />
Now that you have already learned some things about Yade, you could be envious to see how it calculates... After having clicked on Generate, two new windows should have open : one named Simulation Controller and one Primary View.<br />
In the Primary View one is represented the numerical model. You could zoom, move (right click) and rotate (left click) the view with the mouse.<br />
The Simulation Controller window looks like this :<br />
[[Image:Image3.jpg]]<br />
<br />
You can so see different counters :<br />
* One for the "real time" : it is the time since you launched the calculations (it would so indicate 1 h if one day you launch a calculation at 12h before going eat and if you come back at 13 h).<br />
* One counter for the simulation time : it is the "numerical time" : the product of the time step (which could evolve) by the number of iterations.<br />
* One counter for the number of iterations being done (with, right, the rate of iterations per second)<br />
And finally the current value of the time step !!<br />
<br />
Under you have "load" and "save" buttons. The "save" one allows to create a .xml file corresponding to the current state of the simulation. Compared to the one issued from the generation of the preprocessor file, the differences would surely be the positions and speeds of bodies for example...<br />
The "load" one is to restore a .xml file (issued from saving or generating). Note that sometimes it doesn't work for me so I have to close this window (click just left of "Simulation Controller"), and close also the "File Generator" and then make File->New Simulation, then this Load button works better (don't ask me why !)<br />
<br />
Then come buttons to control the running of the simulation (their meanings are normally quite clear...), and finally you can choose to use time step calculated by a time stepper, or use a constant time step that you fix.<br />
<br />
==The preprocessor file==<br />
Now I'm afraid it is time to jump into the sources files, and especially into the preprocessor ones, to see from where all this stuff comes. Remind you just that, thanks to the .xml file and the "Load simulation" button you could make all your calculations without preprocessor files but, for doing that, you would have to be able to write yourself your xml file starting from nothing... I'm not sure it would be easier !<br />
If you are always no familiar with C++ I'm afraid that this sweet period should finish now : to speak about my particular case it's perfectly clear that I don't know C++ as good as it would be necessary to re write Yade (and from very very very very far), but I'm satisfied to know the very few things that allow me not to feel in the worst unknown and dangerous jungle when I open a source file...<br />
<br />
I propose you to continue to focus on the same example. So please now open pkg/dem/PreProcessor/TriaxialTest.cpp (and .hpp). You could open it with any text editor, but it would surely be better to open it with something especially devoting to programming, like KDevelop for example.<br />
<br />
This preprocessor file, like the others, has the following functions : generate, createBox, createSphere, createActors, positionRootBody, postProcessAttributes, registerAttributes. I can't explain you all of these but here is what I understood (or was explained).<br />
<br />
===1.The generate function===<br />
<br />
I said you in the previous chapter that, when we click on " Generate " in FileGenerator window, the corresponding preprocessor file was executed. In fact we could imagine that, more precisely, this is this function which is executed (after surely also the constructor of the class). So let us hope that this function contains all that we want for doing our simulations...<br />
<br />
This function begins with the call of the definition of a pointer towards a "Metabody", and whose name is rootBody. You could find the sources which define what a Metabody is exactly in core/, but I advice you for the moment to be satisfied with the idea that a Metabody, and, so, our object rootBody, represents the whole simulation, that is to say : all the discrete entities with their positions, parameters..., with all the engines that will act (and surely a lot of other things).<br />
<br />
Then you have the call to the functions createActors (we will speak about it later) and positionRootBody.<br />
<br />
Then come few lines to define some variables of the object rootBody :<br />
rootBody->persistentInteractions = shared_ptr<InteractionContainer>(new InteractionHashMap);<br />
rootBody->transientInteractions = shared_ptr<InteractionContainer>(new InteractionHashMap);<br />
...<br />
They seem to be always the same, and that's good because I can't really explain you them.<br />
<br />
Finally is generally the creation of the numerical sample, thanks to the use of the functions createSphere and createBox for example.<br />
<br />
===2.The createActors function===<br />
<br />
I would say that this is a very important part of the file. For one time let's begin by the end of the paragraph and, exactly by these lines :<br />
rootBody->engines.clear();<br />
rootBody->engines.push_back(...<br />
We saw in the .xml file that there were a list of engines that run during the calculation. This list of engines is defined here. As you see this list is stored in the rootBody object, and after having cleared it (to be sure of what we do), all the engines are, one after the other, added in the list, thanks to the C++ function push_back. In fact what are added are pointers towards "engine" objects. All these pointers were defined (with the values of their variables) in the lines above.<br />
So if you make for example calculations described by a preprocessor file, but if you want focus on some special things (the force acting on a body) that are not stored in the "default" form of the preprocessor file, that's the place where you have to add the right things : that is to say the definition of a pointer towards the engine that will record what you want (you can find "recorder engines" in pkg/dem/Engine/StandAloneEngine/ for example), the affectation of good values for its variables (for example the name of the file where the values were stored is a variable of such engines), and finally a line looking like that : <br />
rootBody->engines.push_back(my_pointer_towards_a_engine_recorder_objet);<br />
<br />
NB : do not forget also, if necessary, to make the right # include in the preprocessor file, and to modify the SConscript files, so that the compilation works.<br />
<br />
===3.The registerAttributes function===<br />
<br />
Let us finish by an other important function : the registerAttributes. When you generated your TriaxialTest for example, you obtained this window :<br />
[[Image:Image4.jpg]]<br />
<br />
As it is suggested by the "save time" a save was done. But what was exactly saved, and why ?<br />
That's the role of the registerAttributes functions : they allow to save in memory for example values of variables that were defined in the preprocessor file (and which were, so, defined only once : when the simulation was "generated"). In the case of variables which would be used every time step (for example variables of engines), if the values of the variables would not be registered, the engine would have forgot these values ! (and in the less worse case the values of the constructor of the engine would so be taken).<br />
So, for all things you wish Yade to keep in memory you have to write somewhere (in the implementation of the registerAttributes of your class in fact) :<br />
REGISTER_ATTRIBUTE(my_thing_to_keep_in_memory);<br />
<br />
To help you to understand, here is an example from TriaxialTest. You should have normally in the TriaxialTest preprocessor file, the definition and the use of pointers towards VelocityRecorder engines. You should find indeed lines looking like that :<br />
velocityRecorder = shared_ptr<VelocityRecorder>(new VelocityRecorder);<br />
With then the affectation of correct values to the attributes of this pointer, for example, the name of the output file :<br />
velocityRecorder-> outputFile = velocityRecordFile;<br />
You see here that a string (velocityRecordFile) is used to affect this value. The string is defined in fact in the constructor of the TriaxialTest (he is taken equal to "../data/velocities" for example), and you could see that this string is stored thanks to the line REGISTER_ATTRIBUTE(velocityRecordFile); which appears in the implementation of the registerAttributes function of TriaxialTest.<br />
Thanks to this, Yade will keep in memory that the output file of the velocityRecorder engine is not only a string named velocityRecordFile, but in fact "../data/velocities".<br />
<br />
NB : if you wonder why Yade is able to recall that the output file of the engine is the string velocityRecordFile, the answer is simple : give a look to the source of the engine (in pkg/dem/Engine/StandAloneEngine/VelocityRecorder.cpp, and you will see, in the function registerAttributes, the line " REGISTER_ATTRIBUTE(outputFile); " !!!<br />
<br />
==CONCLUSION==<br />
<br />
That's the end of this paper. As you saw I can't explain you all : first because explaining all the source files of Yade would take very much more than these few pages, and second and overall because I have not finished yet to ask me questions about Yade ! But I hope that it helped you to understand how to apprehend Yade and that it lets you understand and accept that now all that you have to do for using Yade is to open quite a lot of source files, find in them all the variables or functions about which you ask questions, and seek for their declaration and their use to understand what is their role (and after when you will write your own files and submit them to the Yade community, please add comments !!!)</div>Richefeuhttps://yade-dem.org/w/index.php?title=Beginners-guide&diff=9Beginners-guide2009-07-08T08:01:48Z<p>Richefeu: /* d) The .xml file (IMPORTANT § BECAUSE OF EXPLANATIONS ABOUT ENGINES) */</p>
<hr />
<div>The .pdf version of all that follows (which is not perfectly edited for the moment) : [[Image:Gettingstarted3.pdf]]<br />
<br />
==Introduction==<br />
<br />
If you read these lines you have surely decided recently to try and use Yade for your numerical simulations. I was in this case two months ago, while I didn't know more or less anything on Linux, C++, or open source codes... So you can easily imagine that sometimes I had the feeling to try to solve puzzle with manuals redacted in chinese... I begin slowly to come back to the surface and I think that it would be a good thing (for each new user but for Yade itself) if the beginning of the use of this code could be not so disorientating for everyone. So here are a few paragraphs that are not intended to be very complicated but that, I hope, will help new users to see faster than me how coarsely Yade is built and how they will have to deal with it.<br />
<br />
<br />
==Installing and beginning to use Yade==<br />
<br />
Yade is developed originaly on Linux, so (except if you have sufficient skills to compile the sources on another system) the first thing you have to do to use Yade is to quit Windows and jump into Linux, which could be a bit frightening if you are really a non geek. But sincerely under Linux, even if you could do all that you want with black screens with white letters (and probably many people would say you that it is the best thing to do), you would also have the possibility to use it so that you will not see so much differences with Windows.<br />
<br />
When you are a little familiarized with Linux, you can download, all that Yade needs to be installed, on the web site : http://yade.wikia.com/wiki/Yade : in the rubrique Installation then download : http://yade.wikia.com/wiki/Installation#Download. You will so download a tar.gz file which is a compressed folder (like the .zip under Windows for example).<br />
Once this file downloaded you have to decompress it, by right cliking on it an then making "Extract" into the location you want (as an example for me it is something like home/jerome/yade-0.11.1). You have then become a lot of files and folders which constitute all the "sources" of Yade. For those for who that would not be clear (if this happens), you have to understand that Yade has to be seen like a programming project (in C++ so) with a lot of source files that interact with each other and describe a lot of things like the geometry of your numerical model, the contact laws between the entities (in fact all the things that are used for the calculations). You have then to compile all these source files to create an executable and libraries based on what is written in these files.<br />
<br />
===1.Compiling===<br />
<br />
In fact to compile the source files all that you have to do is to '''open a terminal''' in the folder where you extracted the sources (home/jerome/yade-0.11.1 for me so), and then typing scons. This instruction, which will so create the "real" software Yade (the executable), uses the instructions (written in Python programming language) from the two files "''SConstruct''" and "''scons.config''" that are in this folder.<br />
In fact, before typing scons you have to edit "''scons.config''" (which is by chance the simplest of the both...) where, for example, the folder where the executable will be installed (and few other things) is defined. You have to define this folder and you can do it on the first line beginning with "''PREFIX =''" (personly I choosed to name the folder of the executable : YADE, so I have me : "''PREFIX = '/home/jerome/YADE' ''"). I can't really explain you all the others lines, I can only say that they allow you to set some options of installation, for example the line " ''exclude ='' " which allows you not to install some modules of Yade. Yade being indeed constituted of different modules ("packages") (one for discrete element simulations, one for finite elements ones, and one for lattice ones for example), you could be interested in not to installing one of them : for example if you don't need the lattice module and if the compilation crushes only because of source files concerning this module, you can solve your problems by typing "''exclude = 'lattice' ''", moreover it would save time. If you want all to be installed, type "''exclude = 'none'''"! Once the scons.config file set you can now type in the terminal :<br />
<br />
scons<br />
<br />
NB : in fact it is not absolutely necessary to edit directly scons.config : for setting the same things you can also type in the terminal something like :<br />
<br />
scons exclude=lattice,mass-spring optimize=1 debug=0 version=-trunk PREFIX=/opt<br />
<br />
(and then these options will be remembered in scons.config)<br />
Then the only thing you have to do is to pray that all works well and that you will not have to give a look to the SConstruct file (if this is very unfortunately the case then you can use the yade mail list to ask a – precise - question by sending the error message printed)...<br />
To finish about the compilation I have to say you that there are some other important files that allow a good compilation. In each folder of pkg/, you can find ''SConscript'' files (one in pkg/dem, one in pkg/common...). These files describe the interactions between the source files : if you open for example '''pkg/dem/SConscript''' you will find a lot of paragraphs looking like this :<br />
<br />
env.SharedLibrary('TriaxialTest',<br />
['PreProcessor/TriaxialTest.cpp'],<br />
LIBS=env['LIBS']+['SDECLinkGeometry',<br />
'ElasticContactLaw',<br />
'AveragePositionRecorder',<br />
...<br />
'PositionOrientationRecorder']),<br />
<br />
In fact for each class described in pkg/dem (and that you want to be compiled in the aim to use it in the executable for the simulations), you must have one paragraph. As you can see the paragraph begins with the name of the class (here it is " TriaxialTest ", we will speak about it in few lines), its location, and then you have all the list of the classes necessary to the one considered (TriaxialTest here) to work well. To see fast which classes are "necessary" you would normally only have to give a look to which classes are included in the source file considered (which is so " pkg/dem/PreProcessor/TriaxialTest.cpp " here)<br />
If it is your very first compilation you should not have to give interest to these SConscript files. But later when you will modify some source files, you will have to add the corresponding lines in the corresponding paragraph. For example if you write a new class named for example LdC26, that describes a new law of contact, and that you want use it in the existing file who describe your simulation (let's say that its name is " MySimulation "), you will have to<br />
- add in the paragraph env.SharedLibrary('MySimulation',... a line 'LdC26'<br />
- and create a paragraph<br />
<br />
env.SharedLibrary('LdC26',<br />
['location of LdC26'],<br />
LIBS=env['LIBS']+['all the classes corresponding to the objects you used for creating LdC26...<br />
<br />
===2.Launching Yade for the first time===<br />
<br />
Once the compilation has could do its job (maybe around a few days after having downloaded the sources...) you can now go into the folder you indicated in scons.config. Folder in which you should find folders named bin, data, include, lib. In the bin one you will find the executable : you can launch it by opening a terminal in this folder and so typing<br />
./yade-0.11.1<br />
(if your executable has the same name as mine). Here is the window you should obtain :<br />
<br />
[[Image:image1.jpg]]<br />
<br />
Great, isn't it ? For making a few things you could click on Preprocessor, then FileGenerator, and you obtain this :<br />
[[Image:image2.jpg]]<br />
This window allows you to open a preexisting example of simulation. There are various examples, but because I will take often this example, let's say a few words about the TriaxialTest.<br />
This preprocessor simulates a ... triaxial test by the discrete element method. The numerical model is composed of some spheres (simulating the physical sample) that are contained into a box constituted itselve by six walls. By launching the calculation, the six walls move so that the numerical sample is confined, after that you could impose a deviatoric stress.<br />
You can choose the example you want to launch in the line " Generator Name ". <br />
<br />
====a) Line " Generator Name "====<br />
<br />
In the source files there are indeed some "preprocessor" files that describe some numerical models, like so the simulation of a triaxial test (" TriaxialTest "...), or the simulation of the impact of a ball in a wall of bricks (" SDECImpactTest "), and so on. Depending on the type of the numerical simulation (DEM, FEM, lattice...) you can find these files in folders looking like yade-0.11.1/pkg/dem/PreProcessor (if it is a DEM simulation).<br />
For each numerical model you have two files : one .hpp and one .cpp. In yade-0.11.1/pkg/dem/PreProcessor you can so find for example the files TriaxialTest.hpp and Triaxial.cpp. If you know something to C++ you would be used to that, and if it is not the case, before strong advicing you to give a serious look to C++ language (for french speaking people I personally advice http://www.siteduzero.com/tuto-3-5395-0-apprenez-a-programmer-en-c.html which I found very well done and, so, quite simple to understand), I could explain you that in the .hpp file you will find the declaration of all the variables and functions (you can make the difference by this way : the names of functions contain parentheses, the names of variables don't) that will be used in .cpp file.<br />
If you are lucky you could also find in this .hpp file maybe some comments that will explain you to what correspond these variables and functions. If you want, you can give a look to some of these preprocessor files, but we will speak about it in some paragraphs.<br />
<br />
====b) The " Parameters " window====<br />
<br />
Below is a " Parameters " window where you can modify some features of the numerical models, which were given default numerical values in the preprocessor file. For example, for the TriaxialTest, you could change the values of the dimension of the box containing the numerical sample, physical parameters of the spheres and the walls : sphereYougModulus, boxYoungModulus, sphereFrictionDeg, names and locations for outputs files and so on... I don't explain you now the real meanings of all of these physical parameters, be just aware that some correspond to what you think (for example the friction degrees that are used to described the maximum tangential forces on the contacts), but some not : for example the Young modulus are all but real Young Modulus (all the entities are indeed rigid), but they are used to compute the normal rigidities on the contacts.<br />
<br />
====c) The " Generate " button====<br />
<br />
When you are ready to start a calculation you can click on Generate. If I understood well this will read the corresponding preprocessor file so that, for example for the TriaxialTest, all the balls (and the boxes) will be effectively created, located to the right places and will be affected their physical parameters (that's a very incomplete but, I hope, quite practical and clear example). Engines working on bodies are created too (see next paragraph about engines). Thanks to the "execution" of the preprocessor file a .xml or .bin file is generated and saved (in the location indicated in the Output FileName line). Binary files are shorter but non editable format files, I will speak to you about the .xml file that you could read with a text editor.<br />
<br />
====d) The .xml file (IMPORTANT § BECAUSE OF EXPLANATIONS ABOUT ENGINES)====<br />
<br />
In fact all that you have done here was only to create this .xml file which will be directly used now when the calculation will run. So let us give a look to it.<br />
The first lines will probably be always the same and look to this :<br />
<br />
<Yade><br />
<rootBody _className_=... <br />
<physicalParameters ...<br />
<geometricalModel /><br />
<interactingGeometry ...<br />
<boundingVolume ...<br />
<br />
These lines are always the same, so I won't tell you a lot about this (and also because I don't see what I could explain you...). But just after you can see an important paragraph beginning with<br />
<br />
<engines size="a number"><br />
<engines _className_="..." ...<br />
<br />
I would say that it is the point of Yade : engines are "things" that act on the numerical model every timestep. They are of course all defined in source files you could find in folders like for example '''yade-0.11.1/pkg/dem/Engine/...''' for engines specifics to DEM simulations or in '''yade-0.11.1/pkg/common/Engine''' for engines that could be used for every type of simulation. Here are two examples you could find in your .xml file issued from the ''TriaxialTest'' preprocessor, so that you could maybe better imagine what these engines could be :<br />
<br />
- the " ''TriaxialCompressionEngine'' "<br />
As you might imagine, this engine allows to confine the numerical sample. You could find the sources for it in '''pkg/dem/Engine/DeusExMachina'''.<br />
You can see in the xml file, that after ''<engines _className_="TriaxialCompressionEngine"'', there are still a lot of things written : that's all the variables (with their values) specifics to the ''TriaxialCompressionEngine''. These variables were declared in ''TriaxialCompressionEngine.hpp'' (and you can see how exactly they are used in ''TriaxialCompressionEngine.cpp''), but there values were defined in the ''TriaxialTest'' preprocessor file. Fortunately the .hpp file is here well commented and you should see fast to what they correspond without searching them in the .cpp and trying to understand their role (which is the general case you will have to do).<br />
<br />
- the " ''GravityEngine'' "<br />
You could maybe not see it in this .xml file but you would surely fast find it in other .xml files corresponding to others preprocessor files. The sources for this engine are in '''pkg/common/Engine/DeusExMachina'''.<br />
This engine allows to apply ... the gravity to the bodies of the numerical model !! Give a look to the sources, and you will see that there is here only a variable : a vector of three real numbers (cf the type Vector3r which is also defined somewhere in the sources) named gravity. In xml files where this engine appears you should see so a line looking to :<br />
''<engines _className_="GravityEngine" gravity="{0 -9.81 0}" />''<br />
<br />
To conclude these some words about the engines, I will ask you to continue to look into the sources of these engines (or others) and I'll point your attention about the fact that they all have a "''action''" or a "''applycondition''" function (if this doesn't appear directly, these functions are herited from a mother class). In fact that's how the calculation progresses : at each timestep the " ''action'' " function of all of the engines which appear in the list in the .xml file is executed.<br />
<br />
NB1: to be sure of that you can see the files '''core/Metabody.hpp''' and '''.cpp''' where the function ''moveToNextTimeStep()'' (whose you could imagine that it is executed at each timestep...) is defined. If you are familiar (and if you're not that's not too bad for the moment) with C++ you would see what I mean.<br />
<br />
NB2: if later you will modify this .xml file, by adding for example engines, be careful that if you want to use 15 engines, you have to have on the first line of this paragraph : ''<engines size="15">'' !<br />
<br />
That's so how, at each timestep, the spheres move, the contact forces are calculated, the values of what you want to be stored are stored and so on...<br />
<br />
<br />
To finish with the .xml file, you will see that after the § devoted to the engines there is a one where you could find the list of all of the numerical entities, named "bodies", constituting the numerical sample. This paragraph begins with :<br />
<br />
<bodies _className_="BodyRedirectionVector" ><br />
<body size="a number"><br />
<body _className_="Body" id="0" ...<br />
<br />
In the second line you can so see ... the number of bodies present in the model. Then comes the list of all these bodies with informations about each one. They have all an identity number (from 0 to number of bodies – 1), that you can see in ... ''id=''.<br />
After this number of identity, you can find ''isDynamic="1"'' or ''"0"''. Depending on this, this body will (if ''isDynamic="1"''...) or not be able to move. To be sure of that, you can open the file '''pkg/common/Engine/EngineUnit/LeapFrogPositionIntegrator.cpp'''. In this file is described how the velocities and positions of bodies are updated, knowing their acceleration. And as you can see, all these lines won't be executed if the body is not dynamic (cf line 18 : ''if(!body->isDynamic) return;''). So it is a simple mean to have fixed bodies : set for them ''isDynamic="0"'', and you will be sure that there will never move !<br />
NB: this file has a brother : '''LeapFrogOrientationIntegrator''' (in the same folder) which does the same work but for the rotations and orientations. <br />
<br />
Then you have ''se3'', which is a 7 real vector : the three first numbers represent the position of the center of the body, and the four last are a quaternion which describes the orientation of the body. The other parameters should be easy to understand. Please just note that there are some of them which are used for the screen display.<br />
<br />
===3.Making a calculation===<br />
<br />
Now that you have already learned some things about Yade, you could be envious to see how it calculates... After having clicked on Generate, two new windows should have open : one named Simulation Controller and one Primary View.<br />
In the Primary View one is represented the numerical model. You could zoom, move (right click) and rotate (left click) the view with the mouse.<br />
The Simulation Controller window looks like this :<br />
[[Image:Image3.jpg]]<br />
<br />
You can so see different counters :<br />
One for the "real time" : it is the time since you launched the calculations (it would so indicate 1 h if one day you launch a calculation at 12h before going eat and if you come back at 13 h).<br />
One counter for the simulation time : it is the "numerical time" : the product of the time step (which could evolve) by the number of iterations.<br />
One counter for the number of iterations being done (with, right, the rate of iterations per second)<br />
And finally the current value of the time step !!<br />
<br />
Under you have "load" and "save" buttons. The "save" one allows to create a .xml file corresponding to the current state of the simulation. Compared to the one issued from the generation of the preprocessor file, the differences would surely be the positions and speeds of bodies for example...<br />
The "load" one is to restore a .xml file (issued from saving or generating). Note that sometimes it doesn't work for me so I have to close this window (click just left of "Simulation Controller"), and close also the "File Generator" and then make File->New Simulation, then this Load button works better (don't ask me why !)<br />
<br />
Then come buttons to control the running of the simulation (their meanings are normally quite clear...), and finally you can choose to use time step calculated by a time stepper, or use a constant time step that you fix.<br />
<br />
==The preprocessor file==<br />
Now I'm afraid it is time to jump into the sources files, and especially into the preprocessor ones, to see from where all this stuff comes. Remind you just that, thanks to the .xml file and the "Load simulation" button you could make all your calculations without preprocessor files but, for doing that, you would have to be able to write yourself your xml file starting from nothing... I'm not sure it would be easier !<br />
If you are always no familiar with C++ I'm afraid that this sweet period should finish now : to speak about my particular case it's perfectly clear that I don't know C++ as good as it would be necessary to re write Yade (and from very very very very far), but I'm satisfied to know the very few things that allow me not to feel in the worst unknown and dangerous jungle when I open a source file...<br />
<br />
I propose you to continue to focus on the same example. So please now open pkg/dem/PreProcessor/TriaxialTest.cpp (and .hpp). You could open it with any text editor, but it would surely be better to open it with something especially devoting to programming, like KDevelop for example.<br />
<br />
This preprocessor file, like the others, has the following functions : generate, createBox, createSphere, createActors, positionRootBody, postProcessAttributes, registerAttributes. I can't explain you all of these but here is what I understood (or was explained).<br />
<br />
===1.The generate function===<br />
<br />
I said you in the previous chapter that, when we click on " Generate " in FileGenerator window, the corresponding preprocessor file was executed. In fact we could imagine that, more precisely, this is this function which is executed (after surely also the constructor of the class). So let us hope that this function contains all that we want for doing our simulations...<br />
<br />
This function begins with the call of the definition of a pointer towards a "Metabody", and whose name is rootBody. You could find the sources which define what a Metabody is exactly in core/, but I advice you for the moment to be satisfied with the idea that a Metabody, and, so, our object rootBody, represents the whole simulation, that is to say : all the discrete entities with their positions, parameters..., with all the engines that will act (and surely a lot of other things).<br />
<br />
Then you have the call to the functions createActors (we will speak about it later) and positionRootBody.<br />
<br />
Then come few lines to define some variables of the object rootBody :<br />
rootBody->persistentInteractions = shared_ptr<InteractionContainer>(new InteractionHashMap);<br />
rootBody->transientInteractions = shared_ptr<InteractionContainer>(new InteractionHashMap);<br />
...<br />
They seem to be always the same, and that's good because I can't really explain you them.<br />
<br />
Finally is generally the creation of the numerical sample, thanks to the use of the functions createSphere and createBox for example.<br />
<br />
===2.The createActors function===<br />
<br />
I would say that this is a very important part of the file. For one time let's begin by the end of the paragraph and, exactly by these lines :<br />
rootBody->engines.clear();<br />
rootBody->engines.push_back(...<br />
We saw in the .xml file that there were a list of engines that run during the calculation. This list of engines is defined here. As you see this list is stored in the rootBody object, and after having cleared it (to be sure of what we do), all the engines are, one after the other, added in the list, thanks to the C++ function push_back. In fact what are added are pointers towards "engine" objects. All these pointers were defined (with the values of their variables) in the lines above.<br />
So if you make for example calculations described by a preprocessor file, but if you want focus on some special things (the force acting on a body) that are not stored in the "default" form of the preprocessor file, that's the place where you have to add the right things : that is to say the definition of a pointer towards the engine that will record what you want (you can find "recorder engines" in pkg/dem/Engine/StandAloneEngine/ for example), the affectation of good values for its variables (for example the name of the file where the values were stored is a variable of such engines), and finally a line looking like that : <br />
rootBody->engines.push_back(my_pointer_towards_a_engine_recorder_objet);<br />
<br />
NB : do not forget also, if necessary, to make the right # include in the preprocessor file, and to modify the SConscript files, so that the compilation works.<br />
<br />
===3.The registerAttributes function===<br />
<br />
Let us finish by an other important function : the registerAttributes. When you generated your TriaxialTest for example, you obtained this window :<br />
[[Image:Image4.jpg]]<br />
<br />
As it is suggested by the "save time" a save was done. But what was exactly saved, and why ?<br />
That's the role of the registerAttributes functions : they allow to save in memory for example values of variables that were defined in the preprocessor file (and which were, so, defined only once : when the simulation was "generated"). In the case of variables which would be used every time step (for example variables of engines), if the values of the variables would not be registered, the engine would have forgot these values ! (and in the less worse case the values of the constructor of the engine would so be taken).<br />
So, for all things you wish Yade to keep in memory you have to write somewhere (in the implementation of the registerAttributes of your class in fact) :<br />
REGISTER_ATTRIBUTE(my_thing_to_keep_in_memory);<br />
<br />
To help you to understand, here is an example from TriaxialTest. You should have normally in the TriaxialTest preprocessor file, the definition and the use of pointers towards VelocityRecorder engines. You should find indeed lines looking like that :<br />
velocityRecorder = shared_ptr<VelocityRecorder>(new VelocityRecorder);<br />
With then the affectation of correct values to the attributes of this pointer, for example, the name of the output file :<br />
velocityRecorder-> outputFile = velocityRecordFile;<br />
You see here that a string (velocityRecordFile) is used to affect this value. The string is defined in fact in the constructor of the TriaxialTest (he is taken equal to "../data/velocities" for example), and you could see that this string is stored thanks to the line REGISTER_ATTRIBUTE(velocityRecordFile); which appears in the implementation of the registerAttributes function of TriaxialTest.<br />
Thanks to this, Yade will keep in memory that the output file of the velocityRecorder engine is not only a string named velocityRecordFile, but in fact "../data/velocities".<br />
<br />
NB : if you wonder why Yade is able to recall that the output file of the engine is the string velocityRecordFile, the answer is simple : give a look to the source of the engine (in pkg/dem/Engine/StandAloneEngine/VelocityRecorder.cpp, and you will see, in the function registerAttributes, the line " REGISTER_ATTRIBUTE(outputFile); " !!!<br />
<br />
==CONCLUSION==<br />
<br />
That's the end of this paper. As you saw I can't explain you all : first because explaining all the source files of Yade would take very much more than these few pages, and second and overall because I have not finished yet to ask me questions about Yade ! But I hope that it helped you to understand how to apprehend Yade and that it lets you understand and accept that now all that you have to do for using Yade is to open quite a lot of source files, find in them all the variables or functions about which you ask questions, and seek for their declaration and their use to understand what is their role (and after when you will write your own files and submit them to the Yade community, please add comments !!!)</div>Richefeuhttps://yade-dem.org/w/index.php?title=Beginners-guide&diff=8Beginners-guide2009-07-08T07:58:10Z<p>Richefeu: /* 1.Compiling */</p>
<hr />
<div>The .pdf version of all that follows (which is not perfectly edited for the moment) : [[Image:Gettingstarted3.pdf]]<br />
<br />
==Introduction==<br />
<br />
If you read these lines you have surely decided recently to try and use Yade for your numerical simulations. I was in this case two months ago, while I didn't know more or less anything on Linux, C++, or open source codes... So you can easily imagine that sometimes I had the feeling to try to solve puzzle with manuals redacted in chinese... I begin slowly to come back to the surface and I think that it would be a good thing (for each new user but for Yade itself) if the beginning of the use of this code could be not so disorientating for everyone. So here are a few paragraphs that are not intended to be very complicated but that, I hope, will help new users to see faster than me how coarsely Yade is built and how they will have to deal with it.<br />
<br />
<br />
==Installing and beginning to use Yade==<br />
<br />
Yade is developed originaly on Linux, so (except if you have sufficient skills to compile the sources on another system) the first thing you have to do to use Yade is to quit Windows and jump into Linux, which could be a bit frightening if you are really a non geek. But sincerely under Linux, even if you could do all that you want with black screens with white letters (and probably many people would say you that it is the best thing to do), you would also have the possibility to use it so that you will not see so much differences with Windows.<br />
<br />
When you are a little familiarized with Linux, you can download, all that Yade needs to be installed, on the web site : http://yade.wikia.com/wiki/Yade : in the rubrique Installation then download : http://yade.wikia.com/wiki/Installation#Download. You will so download a tar.gz file which is a compressed folder (like the .zip under Windows for example).<br />
Once this file downloaded you have to decompress it, by right cliking on it an then making "Extract" into the location you want (as an example for me it is something like home/jerome/yade-0.11.1). You have then become a lot of files and folders which constitute all the "sources" of Yade. For those for who that would not be clear (if this happens), you have to understand that Yade has to be seen like a programming project (in C++ so) with a lot of source files that interact with each other and describe a lot of things like the geometry of your numerical model, the contact laws between the entities (in fact all the things that are used for the calculations). You have then to compile all these source files to create an executable and libraries based on what is written in these files.<br />
<br />
===1.Compiling===<br />
<br />
In fact to compile the source files all that you have to do is to '''open a terminal''' in the folder where you extracted the sources (home/jerome/yade-0.11.1 for me so), and then typing scons. This instruction, which will so create the "real" software Yade (the executable), uses the instructions (written in Python programming language) from the two files "''SConstruct''" and "''scons.config''" that are in this folder.<br />
In fact, before typing scons you have to edit "''scons.config''" (which is by chance the simplest of the both...) where, for example, the folder where the executable will be installed (and few other things) is defined. You have to define this folder and you can do it on the first line beginning with "''PREFIX =''" (personly I choosed to name the folder of the executable : YADE, so I have me : "''PREFIX = '/home/jerome/YADE' ''"). I can't really explain you all the others lines, I can only say that they allow you to set some options of installation, for example the line " ''exclude ='' " which allows you not to install some modules of Yade. Yade being indeed constituted of different modules ("packages") (one for discrete element simulations, one for finite elements ones, and one for lattice ones for example), you could be interested in not to installing one of them : for example if you don't need the lattice module and if the compilation crushes only because of source files concerning this module, you can solve your problems by typing "''exclude = 'lattice' ''", moreover it would save time. If you want all to be installed, type "''exclude = 'none'''"! Once the scons.config file set you can now type in the terminal :<br />
<br />
scons<br />
<br />
NB : in fact it is not absolutely necessary to edit directly scons.config : for setting the same things you can also type in the terminal something like :<br />
<br />
scons exclude=lattice,mass-spring optimize=1 debug=0 version=-trunk PREFIX=/opt<br />
<br />
(and then these options will be remembered in scons.config)<br />
Then the only thing you have to do is to pray that all works well and that you will not have to give a look to the SConstruct file (if this is very unfortunately the case then you can use the yade mail list to ask a – precise - question by sending the error message printed)...<br />
To finish about the compilation I have to say you that there are some other important files that allow a good compilation. In each folder of pkg/, you can find ''SConscript'' files (one in pkg/dem, one in pkg/common...). These files describe the interactions between the source files : if you open for example '''pkg/dem/SConscript''' you will find a lot of paragraphs looking like this :<br />
<br />
env.SharedLibrary('TriaxialTest',<br />
['PreProcessor/TriaxialTest.cpp'],<br />
LIBS=env['LIBS']+['SDECLinkGeometry',<br />
'ElasticContactLaw',<br />
'AveragePositionRecorder',<br />
...<br />
'PositionOrientationRecorder']),<br />
<br />
In fact for each class described in pkg/dem (and that you want to be compiled in the aim to use it in the executable for the simulations), you must have one paragraph. As you can see the paragraph begins with the name of the class (here it is " TriaxialTest ", we will speak about it in few lines), its location, and then you have all the list of the classes necessary to the one considered (TriaxialTest here) to work well. To see fast which classes are "necessary" you would normally only have to give a look to which classes are included in the source file considered (which is so " pkg/dem/PreProcessor/TriaxialTest.cpp " here)<br />
If it is your very first compilation you should not have to give interest to these SConscript files. But later when you will modify some source files, you will have to add the corresponding lines in the corresponding paragraph. For example if you write a new class named for example LdC26, that describes a new law of contact, and that you want use it in the existing file who describe your simulation (let's say that its name is " MySimulation "), you will have to<br />
- add in the paragraph env.SharedLibrary('MySimulation',... a line 'LdC26'<br />
- and create a paragraph<br />
<br />
env.SharedLibrary('LdC26',<br />
['location of LdC26'],<br />
LIBS=env['LIBS']+['all the classes corresponding to the objects you used for creating LdC26...<br />
<br />
===2.Launching Yade for the first time===<br />
<br />
Once the compilation has could do its job (maybe around a few days after having downloaded the sources...) you can now go into the folder you indicated in scons.config. Folder in which you should find folders named bin, data, include, lib. In the bin one you will find the executable : you can launch it by opening a terminal in this folder and so typing<br />
./yade-0.11.1<br />
(if your executable has the same name as mine). Here is the window you should obtain :<br />
<br />
[[Image:image1.jpg]]<br />
<br />
Great, isn't it ? For making a few things you could click on Preprocessor, then FileGenerator, and you obtain this :<br />
[[Image:image2.jpg]]<br />
This window allows you to open a preexisting example of simulation. There are various examples, but because I will take often this example, let's say a few words about the TriaxialTest.<br />
This preprocessor simulates a ... triaxial test by the discrete element method. The numerical model is composed of some spheres (simulating the physical sample) that are contained into a box constituted itselve by six walls. By launching the calculation, the six walls move so that the numerical sample is confined, after that you could impose a deviatoric stress.<br />
You can choose the example you want to launch in the line " Generator Name ". <br />
<br />
====a) Line " Generator Name "====<br />
<br />
In the source files there are indeed some "preprocessor" files that describe some numerical models, like so the simulation of a triaxial test (" TriaxialTest "...), or the simulation of the impact of a ball in a wall of bricks (" SDECImpactTest "), and so on. Depending on the type of the numerical simulation (DEM, FEM, lattice...) you can find these files in folders looking like yade-0.11.1/pkg/dem/PreProcessor (if it is a DEM simulation).<br />
For each numerical model you have two files : one .hpp and one .cpp. In yade-0.11.1/pkg/dem/PreProcessor you can so find for example the files TriaxialTest.hpp and Triaxial.cpp. If you know something to C++ you would be used to that, and if it is not the case, before strong advicing you to give a serious look to C++ language (for french speaking people I personally advice http://www.siteduzero.com/tuto-3-5395-0-apprenez-a-programmer-en-c.html which I found very well done and, so, quite simple to understand), I could explain you that in the .hpp file you will find the declaration of all the variables and functions (you can make the difference by this way : the names of functions contain parentheses, the names of variables don't) that will be used in .cpp file.<br />
If you are lucky you could also find in this .hpp file maybe some comments that will explain you to what correspond these variables and functions. If you want, you can give a look to some of these preprocessor files, but we will speak about it in some paragraphs.<br />
<br />
====b) The " Parameters " window====<br />
<br />
Below is a " Parameters " window where you can modify some features of the numerical models, which were given default numerical values in the preprocessor file. For example, for the TriaxialTest, you could change the values of the dimension of the box containing the numerical sample, physical parameters of the spheres and the walls : sphereYougModulus, boxYoungModulus, sphereFrictionDeg, names and locations for outputs files and so on... I don't explain you now the real meanings of all of these physical parameters, be just aware that some correspond to what you think (for example the friction degrees that are used to described the maximum tangential forces on the contacts), but some not : for example the Young modulus are all but real Young Modulus (all the entities are indeed rigid), but they are used to compute the normal rigidities on the contacts.<br />
<br />
====c) The " Generate " button====<br />
<br />
When you are ready to start a calculation you can click on Generate. If I understood well this will read the corresponding preprocessor file so that, for example for the TriaxialTest, all the balls (and the boxes) will be effectively created, located to the right places and will be affected their physical parameters (that's a very incomplete but, I hope, quite practical and clear example). Engines working on bodies are created too (see next paragraph about engines). Thanks to the "execution" of the preprocessor file a .xml or .bin file is generated and saved (in the location indicated in the Output FileName line). Binary files are shorter but non editable format files, I will speak to you about the .xml file that you could read with a text editor.<br />
<br />
====d) The .xml file (IMPORTANT § BECAUSE OF EXPLANATIONS ABOUT ENGINES)====<br />
<br />
In fact all that you have done here was only to create this .xml file which will be directly used now when the calculation will run. So let us give a look to it.<br />
The first lines will probably be always the same and look to this :<br />
''<Yade>''<br />
''<rootBody _className_= ...''<br />
''<physicalParameters ...''<br />
''<geometricalModel />''<br />
''<interactingGeometry ...''<br />
''<boundingVolume ...''<br />
<br />
These lines are always the same, so I won't tell you a lot about this (and also because I don't see what I could explain you...). But just after you can see an important paragraph beginning with<br />
<br />
''<engines size="a number">''<br />
<br />
''<engines _className_="...''<br />
<br />
I would say that it is the point of Yade : engines are "things" that act on the numerical model every timestep. They are of course all defined in source files you could find in folders like for example '''yade-0.11.1/pkg/dem/Engine/...''' for engines specifics to DEM simulations or in '''yade-0.11.1/pkg/common/Engine''' for engines that could be used for every type of simulation. Here are two examples you could find in your .xml file issued from the ''TriaxialTest'' preprocessor, so that you could maybe better imagine what these engines could be :<br />
<br />
- the " ''TriaxialCompressionEngine'' "<br />
As you might imagine, this engine allows to confine the numerical sample. You could find the sources for it in '''pkg/dem/Engine/DeusExMachina'''.<br />
You can see in the xml file, that after ''<engines _className_="TriaxialCompressionEngine"'', there are still a lot of things written : that's all the variables (with their values) specifics to the ''TriaxialCompressionEngine''. These variables were declared in ''TriaxialCompressionEngine.hpp'' (and you can see how exactly they are used in ''TriaxialCompressionEngine.cpp''), but there values were defined in the ''TriaxialTest'' preprocessor file. Fortunately the .hpp file is here well commented and you should see fast to what they correspond without searching them in the .cpp and trying to understand their role (which is the general case you will have to do).<br />
<br />
- the " ''GravityEngine'' "<br />
You could maybe not see it in this .xml file but you would surely fast find it in other .xml files corresponding to others preprocessor files. The sources for this engine are in '''pkg/common/Engine/DeusExMachina'''.<br />
This engine allows to apply ... the gravity to the bodies of the numerical model !! Give a look to the sources, and you will see that there is here only a variable : a vector of three real numbers (cf the type Vector3r which is also defined somewhere in the sources) named gravity. In xml files where this engine appears you should see so a line looking to :<br />
''<engines _className_="GravityEngine" gravity="{0 -9.81 0}" />''<br />
<br />
To conclude these some words about the engines, I will ask you to continue to look into the sources of these engines (or others) and I'll point your attention about the fact that they all have a "''action''" or a "''applycondition''" function (if this doesn't appear directly, these functions are herited from a mother class). In fact that's how the calculation progresses : at each timestep the " ''action'' " function of all of the engines which appear in the list in the .xml file is executed.<br />
<br />
NB1 : to be sure of that you can see the files '''core/Metabody.hpp''' and '''.cpp''' where the function ''moveToNextTimeStep()'' (whose you could imagine that it is executed at each timestep...) is defined. If you are familiar (and if you're not that's not too bad for the moment) with C++ you would see what I mean.<br />
<br />
NB2 : if later you will modify this .xml file, by adding for example engines, be careful that if you want to use 15 engines, you have to have on the first line of this paragraph : ''<engines size="15">'' !<br />
<br />
That's so how, at each timestep, the spheres move, the contact forces are calculated, the values of what you want to be stored are stored and so on...<br />
<br />
<br />
To finish with the .xml file, you will see that after the § devoted to the engines there is a one where you could find the list of all of the numerical entities, named "bodies", constituting the numerical sample. This paragraph begins with :<br />
''<bodies _className_="BodyRedirectionVector" >''<br />
''<body size="a number">''<br />
''<body _className_="Body" id="0" ...''<br />
In the second line you can so see ... the number of bodies present in the model. Then comes the list of all these bodies with informations about each one. They have all an identity number (from 0 to number of bodies – 1), that you can see in ... ''id=''.<br />
After this number of identity, you can find ''isDynamic="1"'' or ''"0"''. Depending on this, this body will (if ''isDynamic="1"''...) or not be able to move. To be sure of that, you can open the file '''pkg/common/Engine/EngineUnit/LeapFrogPositionIntegrator.cpp'''. In this file is described how the velocities and positions of bodies are updated, knowing their acceleration. And as you can see, all these lines won't be executed if the body is not dynamic (cf line 18 : ''if(!body->isDynamic) return;''). So it is a simple mean to have fixed bodies : set for them ''isDynamic="0"'', and you will be sure that there will never move !<br />
NB : this file has a brother : '''LeapFrogOrientationIntegrator''' (in the same folder) which does the same work but for the rotations and orientations. <br />
<br />
Then you have ''se3'', which is a 7 real vector : the three first numbers represent the position of the center of the body, and the four last are a quaternion which describes the orientation of the body. The other parameters should be easy to understand. Please just note that there are some of them which are used for the screen display.<br />
<br />
===3.Making a calculation===<br />
<br />
Now that you have already learned some things about Yade, you could be envious to see how it calculates... After having clicked on Generate, two new windows should have open : one named Simulation Controller and one Primary View.<br />
In the Primary View one is represented the numerical model. You could zoom, move (right click) and rotate (left click) the view with the mouse.<br />
The Simulation Controller window looks like this :<br />
[[Image:Image3.jpg]]<br />
<br />
You can so see different counters :<br />
One for the "real time" : it is the time since you launched the calculations (it would so indicate 1 h if one day you launch a calculation at 12h before going eat and if you come back at 13 h).<br />
One counter for the simulation time : it is the "numerical time" : the product of the time step (which could evolve) by the number of iterations.<br />
One counter for the number of iterations being done (with, right, the rate of iterations per second)<br />
And finally the current value of the time step !!<br />
<br />
Under you have "load" and "save" buttons. The "save" one allows to create a .xml file corresponding to the current state of the simulation. Compared to the one issued from the generation of the preprocessor file, the differences would surely be the positions and speeds of bodies for example...<br />
The "load" one is to restore a .xml file (issued from saving or generating). Note that sometimes it doesn't work for me so I have to close this window (click just left of "Simulation Controller"), and close also the "File Generator" and then make File->New Simulation, then this Load button works better (don't ask me why !)<br />
<br />
Then come buttons to control the running of the simulation (their meanings are normally quite clear...), and finally you can choose to use time step calculated by a time stepper, or use a constant time step that you fix.<br />
<br />
==The preprocessor file==<br />
Now I'm afraid it is time to jump into the sources files, and especially into the preprocessor ones, to see from where all this stuff comes. Remind you just that, thanks to the .xml file and the "Load simulation" button you could make all your calculations without preprocessor files but, for doing that, you would have to be able to write yourself your xml file starting from nothing... I'm not sure it would be easier !<br />
If you are always no familiar with C++ I'm afraid that this sweet period should finish now : to speak about my particular case it's perfectly clear that I don't know C++ as good as it would be necessary to re write Yade (and from very very very very far), but I'm satisfied to know the very few things that allow me not to feel in the worst unknown and dangerous jungle when I open a source file...<br />
<br />
I propose you to continue to focus on the same example. So please now open pkg/dem/PreProcessor/TriaxialTest.cpp (and .hpp). You could open it with any text editor, but it would surely be better to open it with something especially devoting to programming, like KDevelop for example.<br />
<br />
This preprocessor file, like the others, has the following functions : generate, createBox, createSphere, createActors, positionRootBody, postProcessAttributes, registerAttributes. I can't explain you all of these but here is what I understood (or was explained).<br />
<br />
===1.The generate function===<br />
<br />
I said you in the previous chapter that, when we click on " Generate " in FileGenerator window, the corresponding preprocessor file was executed. In fact we could imagine that, more precisely, this is this function which is executed (after surely also the constructor of the class). So let us hope that this function contains all that we want for doing our simulations...<br />
<br />
This function begins with the call of the definition of a pointer towards a "Metabody", and whose name is rootBody. You could find the sources which define what a Metabody is exactly in core/, but I advice you for the moment to be satisfied with the idea that a Metabody, and, so, our object rootBody, represents the whole simulation, that is to say : all the discrete entities with their positions, parameters..., with all the engines that will act (and surely a lot of other things).<br />
<br />
Then you have the call to the functions createActors (we will speak about it later) and positionRootBody.<br />
<br />
Then come few lines to define some variables of the object rootBody :<br />
rootBody->persistentInteractions = shared_ptr<InteractionContainer>(new InteractionHashMap);<br />
rootBody->transientInteractions = shared_ptr<InteractionContainer>(new InteractionHashMap);<br />
...<br />
They seem to be always the same, and that's good because I can't really explain you them.<br />
<br />
Finally is generally the creation of the numerical sample, thanks to the use of the functions createSphere and createBox for example.<br />
<br />
===2.The createActors function===<br />
<br />
I would say that this is a very important part of the file. For one time let's begin by the end of the paragraph and, exactly by these lines :<br />
rootBody->engines.clear();<br />
rootBody->engines.push_back(...<br />
We saw in the .xml file that there were a list of engines that run during the calculation. This list of engines is defined here. As you see this list is stored in the rootBody object, and after having cleared it (to be sure of what we do), all the engines are, one after the other, added in the list, thanks to the C++ function push_back. In fact what are added are pointers towards "engine" objects. All these pointers were defined (with the values of their variables) in the lines above.<br />
So if you make for example calculations described by a preprocessor file, but if you want focus on some special things (the force acting on a body) that are not stored in the "default" form of the preprocessor file, that's the place where you have to add the right things : that is to say the definition of a pointer towards the engine that will record what you want (you can find "recorder engines" in pkg/dem/Engine/StandAloneEngine/ for example), the affectation of good values for its variables (for example the name of the file where the values were stored is a variable of such engines), and finally a line looking like that : <br />
rootBody->engines.push_back(my_pointer_towards_a_engine_recorder_objet);<br />
<br />
NB : do not forget also, if necessary, to make the right # include in the preprocessor file, and to modify the SConscript files, so that the compilation works.<br />
<br />
===3.The registerAttributes function===<br />
<br />
Let us finish by an other important function : the registerAttributes. When you generated your TriaxialTest for example, you obtained this window :<br />
[[Image:Image4.jpg]]<br />
<br />
As it is suggested by the "save time" a save was done. But what was exactly saved, and why ?<br />
That's the role of the registerAttributes functions : they allow to save in memory for example values of variables that were defined in the preprocessor file (and which were, so, defined only once : when the simulation was "generated"). In the case of variables which would be used every time step (for example variables of engines), if the values of the variables would not be registered, the engine would have forgot these values ! (and in the less worse case the values of the constructor of the engine would so be taken).<br />
So, for all things you wish Yade to keep in memory you have to write somewhere (in the implementation of the registerAttributes of your class in fact) :<br />
REGISTER_ATTRIBUTE(my_thing_to_keep_in_memory);<br />
<br />
To help you to understand, here is an example from TriaxialTest. You should have normally in the TriaxialTest preprocessor file, the definition and the use of pointers towards VelocityRecorder engines. You should find indeed lines looking like that :<br />
velocityRecorder = shared_ptr<VelocityRecorder>(new VelocityRecorder);<br />
With then the affectation of correct values to the attributes of this pointer, for example, the name of the output file :<br />
velocityRecorder-> outputFile = velocityRecordFile;<br />
You see here that a string (velocityRecordFile) is used to affect this value. The string is defined in fact in the constructor of the TriaxialTest (he is taken equal to "../data/velocities" for example), and you could see that this string is stored thanks to the line REGISTER_ATTRIBUTE(velocityRecordFile); which appears in the implementation of the registerAttributes function of TriaxialTest.<br />
Thanks to this, Yade will keep in memory that the output file of the velocityRecorder engine is not only a string named velocityRecordFile, but in fact "../data/velocities".<br />
<br />
NB : if you wonder why Yade is able to recall that the output file of the engine is the string velocityRecordFile, the answer is simple : give a look to the source of the engine (in pkg/dem/Engine/StandAloneEngine/VelocityRecorder.cpp, and you will see, in the function registerAttributes, the line " REGISTER_ATTRIBUTE(outputFile); " !!!<br />
<br />
==CONCLUSION==<br />
<br />
That's the end of this paper. As you saw I can't explain you all : first because explaining all the source files of Yade would take very much more than these few pages, and second and overall because I have not finished yet to ask me questions about Yade ! But I hope that it helped you to understand how to apprehend Yade and that it lets you understand and accept that now all that you have to do for using Yade is to open quite a lot of source files, find in them all the variables or functions about which you ask questions, and seek for their declaration and their use to understand what is their role (and after when you will write your own files and submit them to the Yade community, please add comments !!!)</div>Richefeuhttps://yade-dem.org/w/index.php?title=Beginners-guide&diff=7Beginners-guide2009-07-08T07:56:26Z<p>Richefeu: </p>
<hr />
<div>The .pdf version of all that follows (which is not perfectly edited for the moment) : [[Image:Gettingstarted3.pdf]]<br />
<br />
==Introduction==<br />
<br />
If you read these lines you have surely decided recently to try and use Yade for your numerical simulations. I was in this case two months ago, while I didn't know more or less anything on Linux, C++, or open source codes... So you can easily imagine that sometimes I had the feeling to try to solve puzzle with manuals redacted in chinese... I begin slowly to come back to the surface and I think that it would be a good thing (for each new user but for Yade itself) if the beginning of the use of this code could be not so disorientating for everyone. So here are a few paragraphs that are not intended to be very complicated but that, I hope, will help new users to see faster than me how coarsely Yade is built and how they will have to deal with it.<br />
<br />
<br />
==Installing and beginning to use Yade==<br />
<br />
Yade is developed originaly on Linux, so (except if you have sufficient skills to compile the sources on another system) the first thing you have to do to use Yade is to quit Windows and jump into Linux, which could be a bit frightening if you are really a non geek. But sincerely under Linux, even if you could do all that you want with black screens with white letters (and probably many people would say you that it is the best thing to do), you would also have the possibility to use it so that you will not see so much differences with Windows.<br />
<br />
When you are a little familiarized with Linux, you can download, all that Yade needs to be installed, on the web site : http://yade.wikia.com/wiki/Yade : in the rubrique Installation then download : http://yade.wikia.com/wiki/Installation#Download. You will so download a tar.gz file which is a compressed folder (like the .zip under Windows for example).<br />
Once this file downloaded you have to decompress it, by right cliking on it an then making "Extract" into the location you want (as an example for me it is something like home/jerome/yade-0.11.1). You have then become a lot of files and folders which constitute all the "sources" of Yade. For those for who that would not be clear (if this happens), you have to understand that Yade has to be seen like a programming project (in C++ so) with a lot of source files that interact with each other and describe a lot of things like the geometry of your numerical model, the contact laws between the entities (in fact all the things that are used for the calculations). You have then to compile all these source files to create an executable and libraries based on what is written in these files.<br />
<br />
===1.Compiling===<br />
<br />
In fact to compile the source files all that you have to do is to '''open a terminal''' in the folder where you extracted the sources (home/jerome/yade-0.11.1 for me so), and then typing scons. This instruction, which will so create the "real" software Yade (the executable), uses the instructions (written in Python programming language) from the two files "''SConstruct''" and "''scons.config''" that are in this folder.<br />
In fact, before typing scons you have to edit "''scons.config''" (which is by chance the simplest of the both...) where, for example, the folder where the executable will be installed (and few other things) is defined. You have to define this folder and you can do it on the first line beginning with "''PREFIX =''" (personly I choosed to name the folder of the executable : YADE, so I have me : "''PREFIX = '/home/jerome/YADE' ''"). I can't really explain you all the others lines, I can only say that they allow you to set some options of installation, for example the line " ''exclude ='' " which allows you not to install some modules of Yade. Yade being indeed constituted of different modules ("packages") (one for discrete element simulations, one for finite elements ones, and one for lattice ones for example), you could be interested in not to installing one of them : for example if you don't need the lattice module and if the compilation crushes only because of source files concerning this module, you can solve your problems by typing "''exclude = 'lattice' ''", moreover it would save time. If you want all to be installed, type "''exclude = 'none'''"! Once the scons.config file set you can now type in the terminal :<br />
<br />
scons<br />
<br />
NB : in fact it is not absolutely necessary to edit directly scons.config : for setting the same things you can also type in the terminal something like :<br />
<br />
scons exclude=lattice,mass-spring optimize=1 debug=0 version=-trunk PREFIX=/opt<br />
<br />
(and then these options will be remembered in scons.config)<br />
<br />
Then the only thing you have to do is to pray that all works well and that you will not have to give a look to the SConstruct file (if this is very unfortunately the case then you can use the yade mail list to ask a – precise - question by sending the error message printed)...<br />
To finish about the compilation I have to say you that there are some other important files that allow a good compilation. In each folder of pkg/, you can find ''SConscript'' files (one in pkg/dem, one in pkg/common...). These files describe the interactions between the source files : if you open for example '''pkg/dem/SConscript''' you will find a lot of paragraphs looking like this :<br />
<br />
''env.SharedLibrary('TriaxialTest',<br />
['PreProcessor/TriaxialTest.cpp'],<br />
LIBS=env['LIBS']+['SDECLinkGeometry',<br />
'ElasticContactLaw',<br />
'AveragePositionRecorder',<br />
...<br />
'PositionOrientationRecorder']),''<br />
<br />
In fact for each class described in pkg/dem (and that you want to be compiled in the aim to use it in the executable for the simulations), you must have one paragraph. As you can see the paragraph begins with the name of the class (here it is " TriaxialTest ", we will speak about it in few lines), its location, and then you have all the list of the classes necessary to the one considered (TriaxialTest here) to work well. To see fast which classes are "necessary" you would normally only have to give a look to which classes are included in the source file considered (which is so " pkg/dem/PreProcessor/TriaxialTest.cpp " here)<br />
If it is your very first compilation you should not have to give interest to these SConscript files. But later when you will modify some source files, you will have to add the corresponding lines in the corresponding paragraph. For example if you write a new class named for example LdC26, that describes a new law of contact, and that you want use it in the existing file who describe your simulation (let's say that its name is " MySimulation "), you will have to<br />
- add in the paragraph env.SharedLibrary('MySimulation',... a line 'LdC26'<br />
- and create a paragraph<br />
env.SharedLibrary('LdC26',<br />
['location of LdC26'],<br />
LIBS=env['LIBS']+['all the classes corresponding to the objects you used for creating LdC26...<br />
<br />
===2.Launching Yade for the first time===<br />
<br />
Once the compilation has could do its job (maybe around a few days after having downloaded the sources...) you can now go into the folder you indicated in scons.config. Folder in which you should find folders named bin, data, include, lib. In the bin one you will find the executable : you can launch it by opening a terminal in this folder and so typing<br />
./yade-0.11.1<br />
(if your executable has the same name as mine). Here is the window you should obtain :<br />
<br />
[[Image:image1.jpg]]<br />
<br />
Great, isn't it ? For making a few things you could click on Preprocessor, then FileGenerator, and you obtain this :<br />
[[Image:image2.jpg]]<br />
This window allows you to open a preexisting example of simulation. There are various examples, but because I will take often this example, let's say a few words about the TriaxialTest.<br />
This preprocessor simulates a ... triaxial test by the discrete element method. The numerical model is composed of some spheres (simulating the physical sample) that are contained into a box constituted itselve by six walls. By launching the calculation, the six walls move so that the numerical sample is confined, after that you could impose a deviatoric stress.<br />
You can choose the example you want to launch in the line " Generator Name ". <br />
<br />
====a) Line " Generator Name "====<br />
<br />
In the source files there are indeed some "preprocessor" files that describe some numerical models, like so the simulation of a triaxial test (" TriaxialTest "...), or the simulation of the impact of a ball in a wall of bricks (" SDECImpactTest "), and so on. Depending on the type of the numerical simulation (DEM, FEM, lattice...) you can find these files in folders looking like yade-0.11.1/pkg/dem/PreProcessor (if it is a DEM simulation).<br />
For each numerical model you have two files : one .hpp and one .cpp. In yade-0.11.1/pkg/dem/PreProcessor you can so find for example the files TriaxialTest.hpp and Triaxial.cpp. If you know something to C++ you would be used to that, and if it is not the case, before strong advicing you to give a serious look to C++ language (for french speaking people I personally advice http://www.siteduzero.com/tuto-3-5395-0-apprenez-a-programmer-en-c.html which I found very well done and, so, quite simple to understand), I could explain you that in the .hpp file you will find the declaration of all the variables and functions (you can make the difference by this way : the names of functions contain parentheses, the names of variables don't) that will be used in .cpp file.<br />
If you are lucky you could also find in this .hpp file maybe some comments that will explain you to what correspond these variables and functions. If you want, you can give a look to some of these preprocessor files, but we will speak about it in some paragraphs.<br />
<br />
====b) The " Parameters " window====<br />
<br />
Below is a " Parameters " window where you can modify some features of the numerical models, which were given default numerical values in the preprocessor file. For example, for the TriaxialTest, you could change the values of the dimension of the box containing the numerical sample, physical parameters of the spheres and the walls : sphereYougModulus, boxYoungModulus, sphereFrictionDeg, names and locations for outputs files and so on... I don't explain you now the real meanings of all of these physical parameters, be just aware that some correspond to what you think (for example the friction degrees that are used to described the maximum tangential forces on the contacts), but some not : for example the Young modulus are all but real Young Modulus (all the entities are indeed rigid), but they are used to compute the normal rigidities on the contacts.<br />
<br />
====c) The " Generate " button====<br />
<br />
When you are ready to start a calculation you can click on Generate. If I understood well this will read the corresponding preprocessor file so that, for example for the TriaxialTest, all the balls (and the boxes) will be effectively created, located to the right places and will be affected their physical parameters (that's a very incomplete but, I hope, quite practical and clear example). Engines working on bodies are created too (see next paragraph about engines). Thanks to the "execution" of the preprocessor file a .xml or .bin file is generated and saved (in the location indicated in the Output FileName line). Binary files are shorter but non editable format files, I will speak to you about the .xml file that you could read with a text editor.<br />
<br />
====d) The .xml file (IMPORTANT § BECAUSE OF EXPLANATIONS ABOUT ENGINES)====<br />
<br />
In fact all that you have done here was only to create this .xml file which will be directly used now when the calculation will run. So let us give a look to it.<br />
The first lines will probably be always the same and look to this :<br />
''<Yade>''<br />
''<rootBody _className_= ...''<br />
''<physicalParameters ...''<br />
''<geometricalModel />''<br />
''<interactingGeometry ...''<br />
''<boundingVolume ...''<br />
<br />
These lines are always the same, so I won't tell you a lot about this (and also because I don't see what I could explain you...). But just after you can see an important paragraph beginning with<br />
<br />
''<engines size="a number">''<br />
<br />
''<engines _className_="...''<br />
<br />
I would say that it is the point of Yade : engines are "things" that act on the numerical model every timestep. They are of course all defined in source files you could find in folders like for example '''yade-0.11.1/pkg/dem/Engine/...''' for engines specifics to DEM simulations or in '''yade-0.11.1/pkg/common/Engine''' for engines that could be used for every type of simulation. Here are two examples you could find in your .xml file issued from the ''TriaxialTest'' preprocessor, so that you could maybe better imagine what these engines could be :<br />
<br />
- the " ''TriaxialCompressionEngine'' "<br />
As you might imagine, this engine allows to confine the numerical sample. You could find the sources for it in '''pkg/dem/Engine/DeusExMachina'''.<br />
You can see in the xml file, that after ''<engines _className_="TriaxialCompressionEngine"'', there are still a lot of things written : that's all the variables (with their values) specifics to the ''TriaxialCompressionEngine''. These variables were declared in ''TriaxialCompressionEngine.hpp'' (and you can see how exactly they are used in ''TriaxialCompressionEngine.cpp''), but there values were defined in the ''TriaxialTest'' preprocessor file. Fortunately the .hpp file is here well commented and you should see fast to what they correspond without searching them in the .cpp and trying to understand their role (which is the general case you will have to do).<br />
<br />
- the " ''GravityEngine'' "<br />
You could maybe not see it in this .xml file but you would surely fast find it in other .xml files corresponding to others preprocessor files. The sources for this engine are in '''pkg/common/Engine/DeusExMachina'''.<br />
This engine allows to apply ... the gravity to the bodies of the numerical model !! Give a look to the sources, and you will see that there is here only a variable : a vector of three real numbers (cf the type Vector3r which is also defined somewhere in the sources) named gravity. In xml files where this engine appears you should see so a line looking to :<br />
''<engines _className_="GravityEngine" gravity="{0 -9.81 0}" />''<br />
<br />
To conclude these some words about the engines, I will ask you to continue to look into the sources of these engines (or others) and I'll point your attention about the fact that they all have a "''action''" or a "''applycondition''" function (if this doesn't appear directly, these functions are herited from a mother class). In fact that's how the calculation progresses : at each timestep the " ''action'' " function of all of the engines which appear in the list in the .xml file is executed.<br />
<br />
NB1 : to be sure of that you can see the files '''core/Metabody.hpp''' and '''.cpp''' where the function ''moveToNextTimeStep()'' (whose you could imagine that it is executed at each timestep...) is defined. If you are familiar (and if you're not that's not too bad for the moment) with C++ you would see what I mean.<br />
<br />
NB2 : if later you will modify this .xml file, by adding for example engines, be careful that if you want to use 15 engines, you have to have on the first line of this paragraph : ''<engines size="15">'' !<br />
<br />
That's so how, at each timestep, the spheres move, the contact forces are calculated, the values of what you want to be stored are stored and so on...<br />
<br />
<br />
To finish with the .xml file, you will see that after the § devoted to the engines there is a one where you could find the list of all of the numerical entities, named "bodies", constituting the numerical sample. This paragraph begins with :<br />
''<bodies _className_="BodyRedirectionVector" >''<br />
''<body size="a number">''<br />
''<body _className_="Body" id="0" ...''<br />
In the second line you can so see ... the number of bodies present in the model. Then comes the list of all these bodies with informations about each one. They have all an identity number (from 0 to number of bodies – 1), that you can see in ... ''id=''.<br />
After this number of identity, you can find ''isDynamic="1"'' or ''"0"''. Depending on this, this body will (if ''isDynamic="1"''...) or not be able to move. To be sure of that, you can open the file '''pkg/common/Engine/EngineUnit/LeapFrogPositionIntegrator.cpp'''. In this file is described how the velocities and positions of bodies are updated, knowing their acceleration. And as you can see, all these lines won't be executed if the body is not dynamic (cf line 18 : ''if(!body->isDynamic) return;''). So it is a simple mean to have fixed bodies : set for them ''isDynamic="0"'', and you will be sure that there will never move !<br />
NB : this file has a brother : '''LeapFrogOrientationIntegrator''' (in the same folder) which does the same work but for the rotations and orientations. <br />
<br />
Then you have ''se3'', which is a 7 real vector : the three first numbers represent the position of the center of the body, and the four last are a quaternion which describes the orientation of the body. The other parameters should be easy to understand. Please just note that there are some of them which are used for the screen display.<br />
<br />
===3.Making a calculation===<br />
<br />
Now that you have already learned some things about Yade, you could be envious to see how it calculates... After having clicked on Generate, two new windows should have open : one named Simulation Controller and one Primary View.<br />
In the Primary View one is represented the numerical model. You could zoom, move (right click) and rotate (left click) the view with the mouse.<br />
The Simulation Controller window looks like this :<br />
[[Image:Image3.jpg]]<br />
<br />
You can so see different counters :<br />
One for the "real time" : it is the time since you launched the calculations (it would so indicate 1 h if one day you launch a calculation at 12h before going eat and if you come back at 13 h).<br />
One counter for the simulation time : it is the "numerical time" : the product of the time step (which could evolve) by the number of iterations.<br />
One counter for the number of iterations being done (with, right, the rate of iterations per second)<br />
And finally the current value of the time step !!<br />
<br />
Under you have "load" and "save" buttons. The "save" one allows to create a .xml file corresponding to the current state of the simulation. Compared to the one issued from the generation of the preprocessor file, the differences would surely be the positions and speeds of bodies for example...<br />
The "load" one is to restore a .xml file (issued from saving or generating). Note that sometimes it doesn't work for me so I have to close this window (click just left of "Simulation Controller"), and close also the "File Generator" and then make File->New Simulation, then this Load button works better (don't ask me why !)<br />
<br />
Then come buttons to control the running of the simulation (their meanings are normally quite clear...), and finally you can choose to use time step calculated by a time stepper, or use a constant time step that you fix.<br />
<br />
==The preprocessor file==<br />
Now I'm afraid it is time to jump into the sources files, and especially into the preprocessor ones, to see from where all this stuff comes. Remind you just that, thanks to the .xml file and the "Load simulation" button you could make all your calculations without preprocessor files but, for doing that, you would have to be able to write yourself your xml file starting from nothing... I'm not sure it would be easier !<br />
If you are always no familiar with C++ I'm afraid that this sweet period should finish now : to speak about my particular case it's perfectly clear that I don't know C++ as good as it would be necessary to re write Yade (and from very very very very far), but I'm satisfied to know the very few things that allow me not to feel in the worst unknown and dangerous jungle when I open a source file...<br />
<br />
I propose you to continue to focus on the same example. So please now open pkg/dem/PreProcessor/TriaxialTest.cpp (and .hpp). You could open it with any text editor, but it would surely be better to open it with something especially devoting to programming, like KDevelop for example.<br />
<br />
This preprocessor file, like the others, has the following functions : generate, createBox, createSphere, createActors, positionRootBody, postProcessAttributes, registerAttributes. I can't explain you all of these but here is what I understood (or was explained).<br />
<br />
===1.The generate function===<br />
<br />
I said you in the previous chapter that, when we click on " Generate " in FileGenerator window, the corresponding preprocessor file was executed. In fact we could imagine that, more precisely, this is this function which is executed (after surely also the constructor of the class). So let us hope that this function contains all that we want for doing our simulations...<br />
<br />
This function begins with the call of the definition of a pointer towards a "Metabody", and whose name is rootBody. You could find the sources which define what a Metabody is exactly in core/, but I advice you for the moment to be satisfied with the idea that a Metabody, and, so, our object rootBody, represents the whole simulation, that is to say : all the discrete entities with their positions, parameters..., with all the engines that will act (and surely a lot of other things).<br />
<br />
Then you have the call to the functions createActors (we will speak about it later) and positionRootBody.<br />
<br />
Then come few lines to define some variables of the object rootBody :<br />
rootBody->persistentInteractions = shared_ptr<InteractionContainer>(new InteractionHashMap);<br />
rootBody->transientInteractions = shared_ptr<InteractionContainer>(new InteractionHashMap);<br />
...<br />
They seem to be always the same, and that's good because I can't really explain you them.<br />
<br />
Finally is generally the creation of the numerical sample, thanks to the use of the functions createSphere and createBox for example.<br />
<br />
===2.The createActors function===<br />
<br />
I would say that this is a very important part of the file. For one time let's begin by the end of the paragraph and, exactly by these lines :<br />
rootBody->engines.clear();<br />
rootBody->engines.push_back(...<br />
We saw in the .xml file that there were a list of engines that run during the calculation. This list of engines is defined here. As you see this list is stored in the rootBody object, and after having cleared it (to be sure of what we do), all the engines are, one after the other, added in the list, thanks to the C++ function push_back. In fact what are added are pointers towards "engine" objects. All these pointers were defined (with the values of their variables) in the lines above.<br />
So if you make for example calculations described by a preprocessor file, but if you want focus on some special things (the force acting on a body) that are not stored in the "default" form of the preprocessor file, that's the place where you have to add the right things : that is to say the definition of a pointer towards the engine that will record what you want (you can find "recorder engines" in pkg/dem/Engine/StandAloneEngine/ for example), the affectation of good values for its variables (for example the name of the file where the values were stored is a variable of such engines), and finally a line looking like that : <br />
rootBody->engines.push_back(my_pointer_towards_a_engine_recorder_objet);<br />
<br />
NB : do not forget also, if necessary, to make the right # include in the preprocessor file, and to modify the SConscript files, so that the compilation works.<br />
<br />
===3.The registerAttributes function===<br />
<br />
Let us finish by an other important function : the registerAttributes. When you generated your TriaxialTest for example, you obtained this window :<br />
[[Image:Image4.jpg]]<br />
<br />
As it is suggested by the "save time" a save was done. But what was exactly saved, and why ?<br />
That's the role of the registerAttributes functions : they allow to save in memory for example values of variables that were defined in the preprocessor file (and which were, so, defined only once : when the simulation was "generated"). In the case of variables which would be used every time step (for example variables of engines), if the values of the variables would not be registered, the engine would have forgot these values ! (and in the less worse case the values of the constructor of the engine would so be taken).<br />
So, for all things you wish Yade to keep in memory you have to write somewhere (in the implementation of the registerAttributes of your class in fact) :<br />
REGISTER_ATTRIBUTE(my_thing_to_keep_in_memory);<br />
<br />
To help you to understand, here is an example from TriaxialTest. You should have normally in the TriaxialTest preprocessor file, the definition and the use of pointers towards VelocityRecorder engines. You should find indeed lines looking like that :<br />
velocityRecorder = shared_ptr<VelocityRecorder>(new VelocityRecorder);<br />
With then the affectation of correct values to the attributes of this pointer, for example, the name of the output file :<br />
velocityRecorder-> outputFile = velocityRecordFile;<br />
You see here that a string (velocityRecordFile) is used to affect this value. The string is defined in fact in the constructor of the TriaxialTest (he is taken equal to "../data/velocities" for example), and you could see that this string is stored thanks to the line REGISTER_ATTRIBUTE(velocityRecordFile); which appears in the implementation of the registerAttributes function of TriaxialTest.<br />
Thanks to this, Yade will keep in memory that the output file of the velocityRecorder engine is not only a string named velocityRecordFile, but in fact "../data/velocities".<br />
<br />
NB : if you wonder why Yade is able to recall that the output file of the engine is the string velocityRecordFile, the answer is simple : give a look to the source of the engine (in pkg/dem/Engine/StandAloneEngine/VelocityRecorder.cpp, and you will see, in the function registerAttributes, the line " REGISTER_ATTRIBUTE(outputFile); " !!!<br />
<br />
==CONCLUSION==<br />
<br />
That's the end of this paper. As you saw I can't explain you all : first because explaining all the source files of Yade would take very much more than these few pages, and second and overall because I have not finished yet to ask me questions about Yade ! But I hope that it helped you to understand how to apprehend Yade and that it lets you understand and accept that now all that you have to do for using Yade is to open quite a lot of source files, find in them all the variables or functions about which you ask questions, and seek for their declaration and their use to understand what is their role (and after when you will write your own files and submit them to the Yade community, please add comments !!!)</div>Richefeuhttps://yade-dem.org/w/index.php?title=Beginners-guide&diff=6Beginners-guide2009-07-07T14:06:48Z<p>Richefeu: Created page with 'The .pdf version of all that follows (which is not perfectly edited for the moment) : Image:Gettingstarted3.pdf ==Introduction== If you read these lines you have surely dec…'</p>
<hr />
<div>The .pdf version of all that follows (which is not perfectly edited for the moment) : [[Image:Gettingstarted3.pdf]]<br />
<br />
==Introduction==<br />
<br />
If you read these lines you have surely decided recently to try and use Yade for your numerical simulations. I was in this case two months ago, while I didn't know more or less anything on Linux, C++, or open source codes... So you can easily imagine that sometimes I had the feeling to try to solve puzzle with manuals redacted in chinese... I begin slowly to come back to the surface and I think that it would be a good thing (for each new user but for Yade itself) if the beginning of the use of this code could be not so disorientating for everyone. So here are a few paragraphs that are not intended to be very complicated but that, I hope, will help new users to see faster than me how coarsely Yade is built and how they will have to deal with it.<br />
<br />
<br />
==Installing and beginning to use Yade==<br />
<br />
Yade is developed originaly on Linux, so (except if you have sufficient skills to compile the sources on another system) the first thing you have to do to use Yade is to quit Windows and jump into Linux, which could be a bit frightening if you are really a non geek. But sincerely under Linux, even if you could do all that you want with black screens with white letters (and probably many people would say you that it is the best thing to do), you would also have the possibility to use it so that you will not see so much differences with Windows.<br />
<br />
When you are a little familiarized with Linux, you can download, all that Yade needs to be installed, on the web site : http://yade.wikia.com/wiki/Yade : in the rubrique Installation then download : http://yade.wikia.com/wiki/Installation#Download. You will so download a tar.gz file which is a compressed folder (like the .zip under Windows for example).<br />
Once this file downloaded you have to decompress it, by right cliking on it an then making "Extract" into the location you want (as an example for me it is something like home/jerome/yade-0.11.1). You have then become a lot of files and folders which constitute all the "sources" of Yade. For those for who that would not be clear (if this happens), you have to understand that Yade has to be seen like a programming project (in C++ so) with a lot of source files that interact with each other and describe a lot of things like the geometry of your numerical model, the contact laws between the entities (in fact all the things that are used for the calculations). You have then to compile all these source files to create an executable and libraries based on what is written in these files.<br />
<br />
===1.Compiling===<br />
<br />
In fact to compile the source files all that you have to do is to '''open a terminal''' in the folder where you extracted the sources (home/jerome/yade-0.11.1 for me so), and then typing scons. This instruction, which will so create the "real" software Yade (the executable), uses the instructions (written in Python programming language) from the two files "''SConstruct''" and "''scons.config''" that are in this folder.<br />
In fact, before typing scons you have to edit "''scons.config''" (which is by chance the simplest of the both...) where, for example, the folder where the executable will be installed (and few other things) is defined. You have to define this folder and you can do it on the first line beginning with "''PREFIX =''" (personly I choosed to name the folder of the executable : YADE, so I have me : "''PREFIX = '/home/jerome/YADE' ''"). I can't really explain you all the others lines, I can only say that they allow you to set some options of installation, for example the line " ''exclude ='' " which allows you not to install some modules of Yade. Yade being indeed constituted of different modules ("packages") (one for discrete element simulations, one for finite elements ones, and one for lattice ones for example), you could be interested in not to installing one of them : for example if you don't need the lattice module and if the compilation crushes only because of source files concerning this module, you can solve your problems by typing "''exclude = 'lattice' ''", moreover it would save time. If you want all to be installed, type "''exclude = 'none'''" !<br />
Once the scons.config file set you can now type in the terminal :<br />
'''''scons'''''<br />
NB : in fact it is not absolutely necessary to edit directly scons.config : for setting the same things you can also type in the terminal something like :<br />
'''''scons exclude=lattice,mass-spring optimize=1 debug=0 version=-trunk PREFIX=/opt'''''<br />
(and then these options will be remembered in scons.config)<br />
<br />
Then the only thing you have to do is to pray that all works well and that you will not have to give a look to the SConstruct file (if this is very unfortunately the case then you can use the yade mail list to ask a – precise - question by sending the error message printed)...<br />
To finish about the compilation I have to say you that there are some other important files that allow a good compilation. In each folder of pkg/, you can find ''SConscript'' files (one in pkg/dem, one in pkg/common...). These files describe the interactions between the source files : if you open for example '''pkg/dem/SConscript''' you will find a lot of paragraphs looking like this :<br />
<br />
''env.SharedLibrary('TriaxialTest',<br />
['PreProcessor/TriaxialTest.cpp'],<br />
LIBS=env['LIBS']+['SDECLinkGeometry',<br />
'ElasticContactLaw',<br />
'AveragePositionRecorder',<br />
...<br />
'PositionOrientationRecorder']),''<br />
<br />
In fact for each class described in pkg/dem (and that you want to be compiled in the aim to use it in the executable for the simulations), you must have one paragraph. As you can see the paragraph begins with the name of the class (here it is " TriaxialTest ", we will speak about it in few lines), its location, and then you have all the list of the classes necessary to the one considered (TriaxialTest here) to work well. To see fast which classes are "necessary" you would normally only have to give a look to which classes are included in the source file considered (which is so " pkg/dem/PreProcessor/TriaxialTest.cpp " here)<br />
If it is your very first compilation you should not have to give interest to these SConscript files. But later when you will modify some source files, you will have to add the corresponding lines in the corresponding paragraph. For example if you write a new class named for example LdC26, that describes a new law of contact, and that you want use it in the existing file who describe your simulation (let's say that its name is " MySimulation "), you will have to<br />
- add in the paragraph env.SharedLibrary('MySimulation',... a line 'LdC26'<br />
- and create a paragraph<br />
env.SharedLibrary('LdC26',<br />
['location of LdC26'],<br />
LIBS=env['LIBS']+['all the classes corresponding to the objects you used for creating LdC26...<br />
<br />
===2.Launching Yade for the first time===<br />
<br />
Once the compilation has could do its job (maybe around a few days after having downloaded the sources...) you can now go into the folder you indicated in scons.config. Folder in which you should find folders named bin, data, include, lib. In the bin one you will find the executable : you can launch it by opening a terminal in this folder and so typing<br />
./yade-0.11.1<br />
(if your executable has the same name as mine). Here is the window you should obtain :<br />
<br />
[[Image:image1.jpg]]<br />
<br />
Great, isn't it ? For making a few things you could click on Preprocessor, then FileGenerator, and you obtain this :<br />
[[Image:image2.jpg]]<br />
This window allows you to open a preexisting example of simulation. There are various examples, but because I will take often this example, let's say a few words about the TriaxialTest.<br />
This preprocessor simulates a ... triaxial test by the discrete element method. The numerical model is composed of some spheres (simulating the physical sample) that are contained into a box constituted itselve by six walls. By launching the calculation, the six walls move so that the numerical sample is confined, after that you could impose a deviatoric stress.<br />
You can choose the example you want to launch in the line " Generator Name ". <br />
<br />
====a) Line " Generator Name "====<br />
<br />
In the source files there are indeed some "preprocessor" files that describe some numerical models, like so the simulation of a triaxial test (" TriaxialTest "...), or the simulation of the impact of a ball in a wall of bricks (" SDECImpactTest "), and so on. Depending on the type of the numerical simulation (DEM, FEM, lattice...) you can find these files in folders looking like yade-0.11.1/pkg/dem/PreProcessor (if it is a DEM simulation).<br />
For each numerical model you have two files : one .hpp and one .cpp. In yade-0.11.1/pkg/dem/PreProcessor you can so find for example the files TriaxialTest.hpp and Triaxial.cpp. If you know something to C++ you would be used to that, and if it is not the case, before strong advicing you to give a serious look to C++ language (for french speaking people I personally advice http://www.siteduzero.com/tuto-3-5395-0-apprenez-a-programmer-en-c.html which I found very well done and, so, quite simple to understand), I could explain you that in the .hpp file you will find the declaration of all the variables and functions (you can make the difference by this way : the names of functions contain parentheses, the names of variables don't) that will be used in .cpp file.<br />
If you are lucky you could also find in this .hpp file maybe some comments that will explain you to what correspond these variables and functions. If you want, you can give a look to some of these preprocessor files, but we will speak about it in some paragraphs.<br />
<br />
====b) The " Parameters " window====<br />
<br />
Below is a " Parameters " window where you can modify some features of the numerical models, which were given default numerical values in the preprocessor file. For example, for the TriaxialTest, you could change the values of the dimension of the box containing the numerical sample, physical parameters of the spheres and the walls : sphereYougModulus, boxYoungModulus, sphereFrictionDeg, names and locations for outputs files and so on... I don't explain you now the real meanings of all of these physical parameters, be just aware that some correspond to what you think (for example the friction degrees that are used to described the maximum tangential forces on the contacts), but some not : for example the Young modulus are all but real Young Modulus (all the entities are indeed rigid), but they are used to compute the normal rigidities on the contacts.<br />
<br />
====c) The " Generate " button====<br />
<br />
When you are ready to start a calculation you can click on Generate. If I understood well this will read the corresponding preprocessor file so that, for example for the TriaxialTest, all the balls (and the boxes) will be effectively created, located to the right places and will be affected their physical parameters (that's a very incomplete but, I hope, quite practical and clear example). Engines working on bodies are created too (see next paragraph about engines). Thanks to the "execution" of the preprocessor file a .xml or .bin file is generated and saved (in the location indicated in the Output FileName line). Binary files are shorter but non editable format files, I will speak to you about the .xml file that you could read with a text editor.<br />
<br />
====d) The .xml file (IMPORTANT § BECAUSE OF EXPLANATIONS ABOUT ENGINES)====<br />
<br />
In fact all that you have done here was only to create this .xml file which will be directly used now when the calculation will run. So let us give a look to it.<br />
The first lines will probably be always the same and look to this :<br />
''<Yade>''<br />
''<rootBody _className_= ...''<br />
''<physicalParameters ...''<br />
''<geometricalModel />''<br />
''<interactingGeometry ...''<br />
''<boundingVolume ...''<br />
<br />
These lines are always the same, so I won't tell you a lot about this (and also because I don't see what I could explain you...). But just after you can see an important paragraph beginning with<br />
<br />
''<engines size="a number">''<br />
<br />
''<engines _className_="...''<br />
<br />
I would say that it is the point of Yade : engines are "things" that act on the numerical model every timestep. They are of course all defined in source files you could find in folders like for example '''yade-0.11.1/pkg/dem/Engine/...''' for engines specifics to DEM simulations or in '''yade-0.11.1/pkg/common/Engine''' for engines that could be used for every type of simulation. Here are two examples you could find in your .xml file issued from the ''TriaxialTest'' preprocessor, so that you could maybe better imagine what these engines could be :<br />
<br />
- the " ''TriaxialCompressionEngine'' "<br />
As you might imagine, this engine allows to confine the numerical sample. You could find the sources for it in '''pkg/dem/Engine/DeusExMachina'''.<br />
You can see in the xml file, that after ''<engines _className_="TriaxialCompressionEngine"'', there are still a lot of things written : that's all the variables (with their values) specifics to the ''TriaxialCompressionEngine''. These variables were declared in ''TriaxialCompressionEngine.hpp'' (and you can see how exactly they are used in ''TriaxialCompressionEngine.cpp''), but there values were defined in the ''TriaxialTest'' preprocessor file. Fortunately the .hpp file is here well commented and you should see fast to what they correspond without searching them in the .cpp and trying to understand their role (which is the general case you will have to do).<br />
<br />
- the " ''GravityEngine'' "<br />
You could maybe not see it in this .xml file but you would surely fast find it in other .xml files corresponding to others preprocessor files. The sources for this engine are in '''pkg/common/Engine/DeusExMachina'''.<br />
This engine allows to apply ... the gravity to the bodies of the numerical model !! Give a look to the sources, and you will see that there is here only a variable : a vector of three real numbers (cf the type Vector3r which is also defined somewhere in the sources) named gravity. In xml files where this engine appears you should see so a line looking to :<br />
''<engines _className_="GravityEngine" gravity="{0 -9.81 0}" />''<br />
<br />
To conclude these some words about the engines, I will ask you to continue to look into the sources of these engines (or others) and I'll point your attention about the fact that they all have a "''action''" or a "''applycondition''" function (if this doesn't appear directly, these functions are herited from a mother class). In fact that's how the calculation progresses : at each timestep the " ''action'' " function of all of the engines which appear in the list in the .xml file is executed.<br />
<br />
NB1 : to be sure of that you can see the files '''core/Metabody.hpp''' and '''.cpp''' where the function ''moveToNextTimeStep()'' (whose you could imagine that it is executed at each timestep...) is defined. If you are familiar (and if you're not that's not too bad for the moment) with C++ you would see what I mean.<br />
<br />
NB2 : if later you will modify this .xml file, by adding for example engines, be careful that if you want to use 15 engines, you have to have on the first line of this paragraph : ''<engines size="15">'' !<br />
<br />
That's so how, at each timestep, the spheres move, the contact forces are calculated, the values of what you want to be stored are stored and so on...<br />
<br />
<br />
To finish with the .xml file, you will see that after the § devoted to the engines there is a one where you could find the list of all of the numerical entities, named "bodies", constituting the numerical sample. This paragraph begins with :<br />
''<bodies _className_="BodyRedirectionVector" >''<br />
''<body size="a number">''<br />
''<body _className_="Body" id="0" ...''<br />
In the second line you can so see ... the number of bodies present in the model. Then comes the list of all these bodies with informations about each one. They have all an identity number (from 0 to number of bodies – 1), that you can see in ... ''id=''.<br />
After this number of identity, you can find ''isDynamic="1"'' or ''"0"''. Depending on this, this body will (if ''isDynamic="1"''...) or not be able to move. To be sure of that, you can open the file '''pkg/common/Engine/EngineUnit/LeapFrogPositionIntegrator.cpp'''. In this file is described how the velocities and positions of bodies are updated, knowing their acceleration. And as you can see, all these lines won't be executed if the body is not dynamic (cf line 18 : ''if(!body->isDynamic) return;''). So it is a simple mean to have fixed bodies : set for them ''isDynamic="0"'', and you will be sure that there will never move !<br />
NB : this file has a brother : '''LeapFrogOrientationIntegrator''' (in the same folder) which does the same work but for the rotations and orientations. <br />
<br />
Then you have ''se3'', which is a 7 real vector : the three first numbers represent the position of the center of the body, and the four last are a quaternion which describes the orientation of the body. The other parameters should be easy to understand. Please just note that there are some of them which are used for the screen display.<br />
<br />
===3.Making a calculation===<br />
<br />
Now that you have already learned some things about Yade, you could be envious to see how it calculates... After having clicked on Generate, two new windows should have open : one named Simulation Controller and one Primary View.<br />
In the Primary View one is represented the numerical model. You could zoom, move (right click) and rotate (left click) the view with the mouse.<br />
The Simulation Controller window looks like this :<br />
[[Image:Image3.jpg]]<br />
<br />
You can so see different counters :<br />
One for the "real time" : it is the time since you launched the calculations (it would so indicate 1 h if one day you launch a calculation at 12h before going eat and if you come back at 13 h).<br />
One counter for the simulation time : it is the "numerical time" : the product of the time step (which could evolve) by the number of iterations.<br />
One counter for the number of iterations being done (with, right, the rate of iterations per second)<br />
And finally the current value of the time step !!<br />
<br />
Under you have "load" and "save" buttons. The "save" one allows to create a .xml file corresponding to the current state of the simulation. Compared to the one issued from the generation of the preprocessor file, the differences would surely be the positions and speeds of bodies for example...<br />
The "load" one is to restore a .xml file (issued from saving or generating). Note that sometimes it doesn't work for me so I have to close this window (click just left of "Simulation Controller"), and close also the "File Generator" and then make File->New Simulation, then this Load button works better (don't ask me why !)<br />
<br />
Then come buttons to control the running of the simulation (their meanings are normally quite clear...), and finally you can choose to use time step calculated by a time stepper, or use a constant time step that you fix.<br />
<br />
==The preprocessor file==<br />
Now I'm afraid it is time to jump into the sources files, and especially into the preprocessor ones, to see from where all this stuff comes. Remind you just that, thanks to the .xml file and the "Load simulation" button you could make all your calculations without preprocessor files but, for doing that, you would have to be able to write yourself your xml file starting from nothing... I'm not sure it would be easier !<br />
If you are always no familiar with C++ I'm afraid that this sweet period should finish now : to speak about my particular case it's perfectly clear that I don't know C++ as good as it would be necessary to re write Yade (and from very very very very far), but I'm satisfied to know the very few things that allow me not to feel in the worst unknown and dangerous jungle when I open a source file...<br />
<br />
I propose you to continue to focus on the same example. So please now open pkg/dem/PreProcessor/TriaxialTest.cpp (and .hpp). You could open it with any text editor, but it would surely be better to open it with something especially devoting to programming, like KDevelop for example.<br />
<br />
This preprocessor file, like the others, has the following functions : generate, createBox, createSphere, createActors, positionRootBody, postProcessAttributes, registerAttributes. I can't explain you all of these but here is what I understood (or was explained).<br />
<br />
===1.The generate function===<br />
<br />
I said you in the previous chapter that, when we click on " Generate " in FileGenerator window, the corresponding preprocessor file was executed. In fact we could imagine that, more precisely, this is this function which is executed (after surely also the constructor of the class). So let us hope that this function contains all that we want for doing our simulations...<br />
<br />
This function begins with the call of the definition of a pointer towards a "Metabody", and whose name is rootBody. You could find the sources which define what a Metabody is exactly in core/, but I advice you for the moment to be satisfied with the idea that a Metabody, and, so, our object rootBody, represents the whole simulation, that is to say : all the discrete entities with their positions, parameters..., with all the engines that will act (and surely a lot of other things).<br />
<br />
Then you have the call to the functions createActors (we will speak about it later) and positionRootBody.<br />
<br />
Then come few lines to define some variables of the object rootBody :<br />
rootBody->persistentInteractions = shared_ptr<InteractionContainer>(new InteractionHashMap);<br />
rootBody->transientInteractions = shared_ptr<InteractionContainer>(new InteractionHashMap);<br />
...<br />
They seem to be always the same, and that's good because I can't really explain you them.<br />
<br />
Finally is generally the creation of the numerical sample, thanks to the use of the functions createSphere and createBox for example.<br />
<br />
===2.The createActors function===<br />
<br />
I would say that this is a very important part of the file. For one time let's begin by the end of the paragraph and, exactly by these lines :<br />
rootBody->engines.clear();<br />
rootBody->engines.push_back(...<br />
We saw in the .xml file that there were a list of engines that run during the calculation. This list of engines is defined here. As you see this list is stored in the rootBody object, and after having cleared it (to be sure of what we do), all the engines are, one after the other, added in the list, thanks to the C++ function push_back. In fact what are added are pointers towards "engine" objects. All these pointers were defined (with the values of their variables) in the lines above.<br />
So if you make for example calculations described by a preprocessor file, but if you want focus on some special things (the force acting on a body) that are not stored in the "default" form of the preprocessor file, that's the place where you have to add the right things : that is to say the definition of a pointer towards the engine that will record what you want (you can find "recorder engines" in pkg/dem/Engine/StandAloneEngine/ for example), the affectation of good values for its variables (for example the name of the file where the values were stored is a variable of such engines), and finally a line looking like that : <br />
rootBody->engines.push_back(my_pointer_towards_a_engine_recorder_objet);<br />
<br />
NB : do not forget also, if necessary, to make the right # include in the preprocessor file, and to modify the SConscript files, so that the compilation works.<br />
<br />
===3.The registerAttributes function===<br />
<br />
Let us finish by an other important function : the registerAttributes. When you generated your TriaxialTest for example, you obtained this window :<br />
[[Image:Image4.jpg]]<br />
<br />
As it is suggested by the "save time" a save was done. But what was exactly saved, and why ?<br />
That's the role of the registerAttributes functions : they allow to save in memory for example values of variables that were defined in the preprocessor file (and which were, so, defined only once : when the simulation was "generated"). In the case of variables which would be used every time step (for example variables of engines), if the values of the variables would not be registered, the engine would have forgot these values ! (and in the less worse case the values of the constructor of the engine would so be taken).<br />
So, for all things you wish Yade to keep in memory you have to write somewhere (in the implementation of the registerAttributes of your class in fact) :<br />
REGISTER_ATTRIBUTE(my_thing_to_keep_in_memory);<br />
<br />
To help you to understand, here is an example from TriaxialTest. You should have normally in the TriaxialTest preprocessor file, the definition and the use of pointers towards VelocityRecorder engines. You should find indeed lines looking like that :<br />
velocityRecorder = shared_ptr<VelocityRecorder>(new VelocityRecorder);<br />
With then the affectation of correct values to the attributes of this pointer, for example, the name of the output file :<br />
velocityRecorder-> outputFile = velocityRecordFile;<br />
You see here that a string (velocityRecordFile) is used to affect this value. The string is defined in fact in the constructor of the TriaxialTest (he is taken equal to "../data/velocities" for example), and you could see that this string is stored thanks to the line REGISTER_ATTRIBUTE(velocityRecordFile); which appears in the implementation of the registerAttributes function of TriaxialTest.<br />
Thanks to this, Yade will keep in memory that the output file of the velocityRecorder engine is not only a string named velocityRecordFile, but in fact "../data/velocities".<br />
<br />
NB : if you wonder why Yade is able to recall that the output file of the engine is the string velocityRecordFile, the answer is simple : give a look to the source of the engine (in pkg/dem/Engine/StandAloneEngine/VelocityRecorder.cpp, and you will see, in the function registerAttributes, the line " REGISTER_ATTRIBUTE(outputFile); " !!!<br />
<br />
==CONCLUSION==<br />
<br />
That's the end of this paper. As you saw I can't explain you all : first because explaining all the source files of Yade would take very much more than these few pages, and second and overall because I have not finished yet to ask me questions about Yade ! But I hope that it helped you to understand how to apprehend Yade and that it lets you understand and accept that now all that you have to do for using Yade is to open quite a lot of source files, find in them all the variables or functions about which you ask questions, and seek for their declaration and their use to understand what is their role (and after when you will write your own files and submit them to the Yade community, please add comments !!!)</div>Richefeuhttps://yade-dem.org/w/index.php?title=MediaWiki:Sidebar&diff=5MediaWiki:Sidebar2009-07-07T14:03:21Z<p>Richefeu: </p>
<hr />
<div>* SEARCH<br />
<br />
<br />
* Yade for Beginners<br />
** beginners-guide|Begginers guide<br />
** Downloading/compiling Yade<br />
** The logic of Sconscripts<br />
** Kdevelop usage<br />
<br />
* Advance use of Yade<br />
** Developper guide<br />
** Python console and scripts<br />
** Constitutive laws<br />
** Debuging tools<br />
** Parallelization<br />
** Profiling<br />
<br />
* navigation<br />
** mainpage|mainpage-description<br />
** portal-url|portal<br />
** currentevents-url|currentevents<br />
** recentchanges-url|recentchanges<br />
** randompage-url|randompage<br />
** helppage|help<br />
<br />
* TOOLBOX<br />
<br />
* LANGUAGES</div>Richefeuhttps://yade-dem.org/w/index.php?title=MediaWiki:Sidebar&diff=4MediaWiki:Sidebar2009-07-07T14:02:04Z<p>Richefeu: </p>
<hr />
<div>* SEARCH<br />
<br />
<br />
* Yade for Beginners<br />
** Begginers guide<br />
** Downloading/compiling Yade<br />
** The logic of Sconscripts<br />
** Kdevelop/CTags and perhaps more tricks to navigate in the code<br />
<br />
* Advance use of Yade<br />
** Developper guide<br />
** Python console and scripts<br />
** Constitutive laws<br />
** Debuging tools<br />
** Parallelization<br />
** Profiling<br />
<br />
* navigation<br />
** mainpage|mainpage-description<br />
** portal-url|portal<br />
** currentevents-url|currentevents<br />
** recentchanges-url|recentchanges<br />
** randompage-url|randompage<br />
** helppage|help<br />
<br />
* TOOLBOX<br />
<br />
* LANGUAGES</div>Richefeuhttps://yade-dem.org/w/index.php?title=MediaWiki:Sidebar&diff=3MediaWiki:Sidebar2009-07-07T13:57:58Z<p>Richefeu: Created page with '* SEARCH * navigation ** mainpage|mainpage-description ** portal-url|portal ** currentevents-url|currentevents ** recentchanges-url|recentchanges ** randompage-url|randompage ** …'</p>
<hr />
<div>* SEARCH<br />
* navigation<br />
** mainpage|mainpage-description<br />
** portal-url|portal<br />
** currentevents-url|currentevents<br />
** recentchanges-url|recentchanges<br />
** randompage-url|randompage<br />
** helppage|help<br />
* TOOLBOX<br />
* LANGUAGES</div>Richefeuhttps://yade-dem.org/w/index.php?title=Main_Page&diff=2Main Page2009-07-07T13:53:33Z<p>Richefeu: Created page with 'YADE MAIN PAGE ToDo! :)'</p>
<hr />
<div>YADE MAIN PAGE<br />
<br />
<br />
ToDo! :)</div>Richefeuhttps://yade-dem.org/w/index.php?title=Category:New_documentation_structure_and_items&diff=394Category:New documentation structure and items2009-06-26T07:44:12Z<p>Richefeu: </p>
<hr />
<div>'''Proposal for the lvl2 guide : (find a better name)'''<br />
<br />
'''VR'''<br />
Maybe should we split the following items in two groups: "Yade for beginners" and "Advance Yade usage"?<br />
'''/VR'''<br />
<br />
- Downloading/compiling Yade<br />
<br />
- Documentation (J. Duriez's begginers guide, wiki, doxygen + doxygen commenting convention) and how everybody can improve it.<br />
<br />
'''VR''' - Yade main concepts '''/VR'''<br />
<br />
- Creation of new classes and usage of SVN (I see people modifying existing classes to do what they want, best way to stop updating/commiting).<br />
<br />
- Gui Interface<br />
<br />
- Python console and scripts<br />
<br />
- The logic of Sconscripts<br />
<br />
- Kdevelop/CTags and perhaps more tricks to navigate in the code<br />
<br />
- debuging tools<br />
<br />
- usage of log4cxx<br />
<br />
- bug tracking (?)<br />
<br />
- Parallelization<br />
<br />
- Profiling<br />
<br />
<br />
<br />
'''Things that are not documented enough in current wiki, or not documented at all :'''<br />
<br />
<br />
- Numerical scheme : the finite difference integration loop (you can't understand the code if you don't understand the theoretical background)<br />
<br />
- Contact-logic : how interactions are created/deleted. We have a page for this but it needs cleanup.<br />
<br />
<br />
'''Proposal for Yade Main page :'''<br />
<br />
Starting from the current page :<br />
<br />
<br />
-Add one or two beautifull images<br />
<br />
-One BIG link to the main documentation page (itself pointing to JD. beginners guide, lvl2 guide, a structured list of wiki pages, a link to doxygen doc so you can browse/link Yade code in the wiki itself)<br />
<br />
-Pros/cons : should it be on the first page?<br />
<br />
<br />
<br />
'''General suggestions'''<br />
<br />
<br />
-This website is good looking and the documentation is clear, it can give ideas : [http://www.cgal.org/ CGAL].<br />
<br />
'''VR''' I'm not sure it is as clear as you say. But it is clear that it is complet and usefull! '''\VR'''</div>Richefeuhttps://yade-dem.org/w/index.php?title=File:Xeon233_collider-perf.png&diff=392File:Xeon233 collider-perf.png2009-05-29T14:43:56Z<p>Richefeu: </p>
<hr />
<div>== Licensing: ==<br />
{{Aucune licence sélectionnée}}</div>Richefeuhttps://yade-dem.org/w/index.php?title=Authors_and_contributors&diff=129Authors and contributors2009-05-06T07:03:52Z<p>Richefeu: /* Yade core developers */</p>
<hr />
<div>__NOTOC__<br />
<div style="font-size: 90%;color: #444;">Please upload your photo and update information about you, like adding a hyperlink to your homepage.</div><br />
= Yade core developers =<br />
Listed in the order of joining the project.<br />
{| border="1" style="margin:0;padding:0;width:100%;border: 1px solid #ddd;border-collapse:collapse;background-color:#fff;"<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ --><br />
[[Image:Janek Kozicki.png|120px|left]]<br />
*[http://janek.kozicki.pl/ '''Janek Kozicki'''] [http://developer.berlios.de/users/cosurgi/ 2], PhD<br />
**''From:'' [http://www.pg.gda.pl/eng.html Gdansk University of Technology], Civil Engineering Department, [http://www.3s.hmg.inpg.fr/ L3S]<br />
**''Focus:'' core yade development and design<br />
**''Also:'' Lattice Geometrical Model, documentation, website, releases, mailing lists<br />
<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ --><br />
[[Image:essaib5.jpg|120px|left]]<br />
*'''Bruno Chareyre''' [http://developer.berlios.de/users/chareyre/ 2], Assistant professor<br />
**''From:'' [http://www.3s.hmg.inpg.fr/ Lab 3S - INP Grenoble]<br />
**''Focus:'' DEM modelling in geomechanics, micromechanics of granular materials<br />
**''Also: ''Quasi-static behaviour, shear tests, simulation of full scale geotechnical problems<br />
<br />
|-<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ --><br />
[[Image:Vaclav_Smilauer_cvut-photo.jpg|120px|left]]<br />
*'''Vaclav Smilauer''' [http://developer.berlios.de/users/eudoxos/ 2], PhD student<br />
**''From:'' [http://ujf-grenoble.fr/ L3S UJF Grenoble], [http://www.fsv.cvut.cz/ CVUT Prague] Departement of [http://ksm.fsv.cvut.cz/ Structural Mechanics]<br />
**''PhD Focus:'' Discrete modelling of concrete impact<br />
**''Also:'' modellling with tetrahedra, framework cleanup, build system<br />
<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ --><br />
[[Image:Richefeu.jpg|120px|left]]<br />
*'''Vincent Richefeu''' [http://developer.berlios.de/users/richefeu/ 2], Assistant professor<br />
**''From:'' [http://www.ujf-grenoble.fr/ L3S UJF Grenoble]<br />
**''Focus:'' Micromechanics of wet granular materials<br />
**''Also: '' Multi-physics<br />
|}<br />
<br />
= Yade package developers =<br />
{| border="1" style="margin:0;padding:0;width:100%;border: 1px solid #ddd;border-collapse:collapse;background-color:#fff;"<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ --><br />
[[Image:Unknown.png|120px|left]]<br />
*'''Jerome Duriez''' [https://developer.berlios.de/users/jduriez/ 2], PhD student<br />
**''From:'' [http://www.3s.hmg.inpg.fr/ Lab 3S - INP Grenoble]<br />
**''Focus:'' ?<br />
**''Also:'' ?<br />
<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ --><br />
[[Image:Unknown.png|120px|left]]<br />
*'''Sergei Dorofeenko''' [https://developer.berlios.de/users/sega/ 2], PhD<br />
**''From:'' [http://www.icp.ac.ru/eng/index.html IPCP RAS, Chernogolovka]<br />
**''Focus:'' ?<br />
**''Also: ''?<br />
<br />
|-<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ --><br />
[[Image:Unknown.png|120px|left]]<br />
*'''Jean-François Jerier''' [https://developer.berlios.de/users/jfjerier/ 2], PhD student<br />
**''From:'' [http://www.3s.hmg.inpg.fr/ Lab 3S - INP Grenoble]<br />
**''Focus:'' ?<br />
**''Also:'' ?<br />
<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ <br />
[[Image:Unknown.png|120px|left]]<br />
*'''??''' [http://developer.berlios.de/users/??/ 2], PhD student<br />
**''From:'' ?<br />
**''Focus:'' ?<br />
**''Also:'' ? --><br />
|}<br />
<br />
= Founders =<br />
<br />
{| border="1" style="margin:0;padding:0;width:100%;border: 1px solid #ddd;border-collapse:collapse;background-color:#fff;"<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ --><br />
[[Image:Frederic Victor Donze.jpg|120px|left]]<br />
*[http://geo.hmg.inpg.fr/frederic/ '''Frédéric Victor Donzé'''], Professor<br />
**''From:'' [http://www.ujf-grenoble.fr/37654972/1/fiche___pagelibre/ University Joseph Fourier, Grenoble]<br />
**''Contribution:'' author of SDEC (Yade is SDEC's reincarnation), gave us formulation of DEM, lots of great ideas and constructive criticism,<br />
<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ --><br />
[[Image:Olivier Galizzi.png|120px|left]]<br />
*[http://www-evasion.imag.fr/Membres/Olivier.Galizzi/ '''Olivier Galizzi'''], [http://developer.berlios.de/users/galizzi/ 2] retired PhD student<br />
**''From:'' [http://www-evasion.imag.fr/ EVASION] / [http://www-gravir.imag.fr/ GRAVIR] - [http://www.imag.fr/ IMAG], Institute of Informatics and Applied Mathematics in Grenoble<br />
**''Contribution:'' Started yade project, QT, openGL, plugin handling, documentation, then abadoned yade.<br />
|-<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ --><br />
[[Image:Janek Kozicki.png|120px|left]]<br />
*[http://janek.kozicki.pl/ '''Janek Kozicki'''] [http://developer.berlios.de/users/cosurgi/ 2], PhD<br />
**''From:'' [http://www.pg.gda.pl/eng.html GUT Civil Engineering], [http://www.3s.hmg.inpg.fr/ L3S]<br />
**''Contribution:'' Started yade project with Olivier, C++ design, multimethods, maintaining the project<br />
<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ --><br />
&nbsp;<br />
|}<br />
<br />
= Benefactors =<br />
<br />
{| border="1" style="margin:0;padding:0;width:100%;border: 1px solid #ddd;border-collapse:collapse;background-color:#fff;"<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ --><br />
[[Image:Felix Darve.jpg|120px|left]]<br />
*'''Félix Darve''', Professor<br />
**''From:'' [http://www.3s.hmg.inpg.fr/ Lab 3S - INP Grenoble]<br />
**''Contribution:'' provided funding for our project from various european research programs<br />
<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ --><br />
[[Image:Francois Faure.gif|120px|left]]<br />
*[http://www-evasion.imag.fr/~Francois.Faure/ '''François Faure'''], Assistant professor<br />
**''From:'' [http://www.ujf-grenoble.fr/37654972/1/fiche___pagelibre/ University Joseph Fourier], [http://www.inrialpes.fr/jsp/fiche_pagelibre.jsp?CODE=36392593&LANGUE=1 INRIA], Grenoble<br />
**''Contribution:'' Promoter of Olivier Galizzi's PhD, comments about C++ design<br />
|}<br />
<br />
<br />
= Contributors =<br />
Listed in the order of contributing the code.<br />
<br />
{| border="1" style="margin:0;padding:0;width:100%;border: 1px solid #ddd;border-collapse:collapse;background-color:#fff;"<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ --><br />
[[Image:Unknown.png|120px|left]]<br />
*'''Jean-Patrick Plassiard'''<br />
**''Contribution:'' Started DEM with local moment rotation law in 3D<br />
<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ --><br />
[[Image:Unknown.png|120px|left]]<br />
*'''Emmanuel Frangin'''<br />
**''Contribution:'' FEM tetrahedron element<br />
<br />
|-<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ --><br />
[[Image:Unknown.png|120px|left]]<br />
*'''Andreas Plesch'''<br />
**''About:'' Interested in quantitative analysis in structural geology<br />
**''From:'' Research Associate at the Structural Geology and Earth Resources Group in the Earth and Planetary Sciences Department, Harvard University, Cambridge, MA, USA<br />
**''Contribution:'' SDECMovingWall filegenerator, valuable comments that were added to current documentation<br />
|valign="top" style="width:50%" | <!-- ------------------------------------------------------ --><br />
[[Image:Unknown.png|120px|left]]<br />
*'''Luc Scholtes'''<br />
**''Contribution:'' Water capillary contact law<br />
|}<br />
<br />
<br />
= Our supporters =<br />
<br />
* Artur Czechowski [http://developer.berlios.de/users/arturcz/ 2] ─ debian package maintainer.<br />
* Basia Kozicka ─ checks and proofreads documentation.<br />
<br />
<br />
[[Category:overview]]</div>Richefeuhttps://yade-dem.org/w/index.php?title=File:Richefeu.jpg&diff=387File:Richefeu.jpg2009-05-06T06:59:54Z<p>Richefeu: </p>
<hr />
<div>== Licensing: ==<br />
{{Self}}</div>Richefeuhttps://yade-dem.org/w/index.php?title=File:40000Polye_vit.jpg&diff=378File:40000Polye vit.jpg2009-03-02T20:07:47Z<p>Richefeu: </p>
<hr />
<div>== Licensing: ==<br />
{{Aucune licence sélectionnée}}</div>Richefeuhttps://yade-dem.org/w/index.php?title=File:Tomo_ceramic2.png&diff=377File:Tomo ceramic2.png2009-03-02T19:57:46Z<p>Richefeu: </p>
<hr />
<div>== Licensing: ==<br />
{{Aucune licence sélectionnée}}</div>Richefeuhttps://yade-dem.org/w/index.php?title=File:Polye_forces_close.png&diff=376File:Polye forces close.png2009-03-02T19:55:14Z<p>Richefeu: </p>
<hr />
<div>== Licensing: ==<br />
{{Aucune licence sélectionnée}}</div>Richefeuhttps://yade-dem.org/w/index.php?title=File:Shot1.png&diff=373File:Shot1.png2009-02-26T09:02:24Z<p>Richefeu: </p>
<hr />
<div>== Licensing: ==<br />
{{Aucune licence sélectionnée}}</div>Richefeuhttps://yade-dem.org/w/index.php?title=Mgpost&diff=372Mgpost2009-02-26T08:58:32Z<p>Richefeu: Mgpost moved to Using mgpost</p>
<hr />
<div>#REDIRECT [[Using mgpost]]</div>Richefeuhttps://yade-dem.org/w/index.php?title=User:Richefeu&diff=369User:Richefeu2009-02-26T08:56:19Z<p>Richefeu: Removing all content from page</p>
<hr />
<div></div>Richefeuhttps://yade-dem.org/w/index.php?title=User_talk:Richefeu&diff=370User talk:Richefeu2009-02-25T15:04:47Z<p>Richefeu: Removing all content from page</p>
<hr />
<div></div>Richefeu