diff --git a/CMakeLists.txt b/CMakeLists.txt index 506077f661e03f90a369aeab810eaef4ebd334a2..80b5c4977045632621706897cded823eeb37d13d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,12 +16,30 @@ include(OutOfSourcesBuild) project(LMGC90_dev Fortran C CXX) -SET(LMGC90_MAJOR_VERSION 2) +SET(LMGC90_MAJOR_VERSION 3) SET(LMGC90_MINOR_VERSION 0) SET(LMGC90_PATCH_VERSION 0) MESSAGE(STATUS "You try to build LMGC90_dev") +# Try to find out if on ubuntu +# (does nothing if lsb_release executable does not exist) +find_program(LSB_RELEASE lsb_release) +execute_process(COMMAND ${LSB_RELEASE} -is + OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +#message(STATUS "lsb_release : ${LSB_RELEASE_ID_SHORT}") + +# Get current year to help set version +include(GetCurrentYear) +TODAY(TODAY YEAR) + +# Set release candidate number (used in sphinx doc) +set(RC 1) +if( RC ) + set(RCWITHDOT ".rc${RC}") +endif( RC ) include(CTest) diff --git a/README.md b/README.md index cc862568624660098ce8ae00fd091a639db03c34..3eefe478046587ad3355086aaffcf16663125a59 100644 --- a/README.md +++ b/README.md @@ -17,345 +17,9 @@ To stay aware, you can subscribe to this mailing list by asking to: - Dubois Frédéric : frederic.dubois@umontpellier.fr - Rémy Mozul : remy.mozul@umontpellier.fr -# Organization +# How does it work -*lmgc90_user* directory is organized in several -subdirectories: +To obtain up to date informations on how to download/install/use, please check the +[wiki](https://git-xen.lmgc.univ-montp2.fr/lmgc90/lmgc90_user/wikis/home#how-does-it-work) - * *src* : the sources of LMGC90 software - * *examples* : the user examples working with the sources - * *manuals* : a list of manuals/documentation for the software in pdf format - * *docs* : the html documentation generated from the sources - -The software is originally designed for [Linux or MacOS](#linversion) - -For Windows user, jump to [Windows Version section](#winversion) - -# Linux and MacOS version - -# Versionning - -People contributing to the project can view up-to-date information -[here](https://git-xen.lmgc.univ-montp2.fr/lmgc90/lmgc90_user/tree/master) - -The versionning tool used is git. To have more information the workflow used -and how to use git check [there](https://git-xen.lmgc.univ-montp2.fr/lmgc90/lmgc90_user/wikis/LMGC90_user) - -With MacOS and Linux the installation and use of LMGC90 software is through -the use of the terminal. You must know how to open a terminal in a specific -directory and move through your directory tree. - -## Update - -To update to very last version from a terminal in current directory: - -``` -$> git pull origin master -``` - -To get as specific version, for example *2016* : - -``` -$> git pull origin 2016 -``` - -## Compilation - -### Pre-requisites - -To compile you need: - - * A Fortran compiler (GNU, Intel or PGI) - * Lapack library - * CMake - * Swig - * Python and Numpy - -For visualisation: - - * Python VTK module - * Paraview - -To build the sphinx documentation: - - * Latex distribution (with pdflatex utility) - * Sphinx and numpydoc - * Doxygen - * Graphviz - * dvipng - -To read some tutorials: - - * Jupyter - * iPython - - -### Ubuntu 12.04/14.04/16.04 Debian 7 - -To compile: - -``` -apt-get install cmake gcc g++ gfortran liblapack-dev swig python-dev python-numpy -``` - -To visualize: - -``` -apt-get install python-vtk paraview -``` - -To build the documentation: - -``` -apt-get install doxygen graphviz python-numpydoc texlive-latex-extra dvipng imagemagick -``` - -To read tutorials - -``` -apt-get install python-pip -pip install jupyter -``` - -### OpenSuse Leap 42.1 - -To compile: - -``` -zypper install cmake gcc gcc-c++ gcc-fortran lapack-devel swig python-devel python-numpy-devel -``` - -To visualize: - -``` -zypper install python-vtk paraview -``` - -Due to some problem one must add to the *.bashrc* file a line similar to: - -``` -export LD_LIBRARY_PATH=/usr/lib64/mpi/gcc/openmpi/lib64 -``` - -To build the documentation: - -``` -zypper install doxygen graphviz python-numpydoc texlive-dvipng ImageMagick -``` - -To read tutorials - -``` -zypper install python-pip -pip install jupyter -``` - -### CentOS 7 - -To compile: - -``` -yum install git cmake gcc gcc-c++ gcc-gfortran lapack-devel swig python-devel numpy -``` - -To visualize, some extra packages, not provided by the standard package repository, are -needed. Thus an extra repository must be added before installing the dependencies: - -``` -yum install epel-release -yum install vtk-python paraview -``` - -To build the documentation: - -``` -yum install doxygen graphviz tex-preview textlive-latex texlive-dvipng python-sphinx python-numpydoc ImageMagick -``` - -To read tutorials - -``` -yum install python-pip -pip install jupyter -``` - - -### Mac OS - -On MacOs using macports (beware of the second line, the *+ python27* goes with *vtk*): - -``` -port install gcc49 python27 py27-numpy swig-python cmake +gui -port install vtk +python27 -``` - -Then you need to set the compiler and python as the default on your system: - -``` -sudo port select gcc mp-gcc49 -sudo port select python python27 -``` - -To build the documentation: - -``` -doxygen graphviz py27-sphinx py27-numpydoc texlive-latex-extra dvipng ImageMagick -``` - -To read tutorials: - -``` -sudo port install py27-jupyter -``` - - -## Building - -You have several commands to run. If you are not familiar with the terminal and compilation in general -please read the output of each command carefully. And if an error occurs do not blindly run the next -commands, but try to correct it first. - -In the *lmgc90_user* directory run: - -```shell -mkdir build -cd build -cmake .. -make -``` - -Instead of cmake, one can use *ccmake* to change variable values on -the command line, or *cmake-gui* to use graphical interface. - -If you are only interested in rigid computations, some external libraries -can be disabled ; before the ```make``` command, run: - -``` -cmake . -DMATLIB_VERSION=none -DMUMPS_VERSION=none -``` - -If you want to re-build the documentation run : - -``` -make docs -``` - -It will build the sphinx documentation in: - - * docs/chipy/ - * docs/dev/ - * docs/Pre/ - -Where you should open the ```index.html``` file. - -The doxygen documentation of the the core of the software would be in ```src/Docs/html/index.html```. - - - -## Installing - -Our policy is to not mess with default system paths. So instead we advise to -use a environment variable to add to python the path to our build directory. -In general adding the following lines to your *.bashrc* (Linux) or *.profile* (MacOS) -file does the trick. Of course you have to replace *mybuildpath* by the path to -your own building directory. Basically it is what returns the command *pwd* when -ran in the same directory you ran the commands *cmake* and *make*. - -```shell -if [ -z ${PYTHONPATH} ]; then - export PYTHONPATH=mybuildpath -else - export PYTHONPATH=${PYTHONPATH}:mybuildpath -fi -``` - -## Getting started - -There are several examples in the directory *examples* -sorted by the type of simulation. - -A good entry point is the *Tutorials* directory where you -can find some **ipython notebooks** trying to introduce -step by step the use of the software. - -### Linux - -To read the notebooks, open a terminal there and run: - -```shell -jupyter notebook -``` - -### MacOS - -To read the notebooks, open a terminal there and run: - -```shell -jupyter-notebook-2.7 -``` - -Python being the interface language to the LMGC90 software, -[this introduction](https://www.python.org/about/gettingstarted/) -is recommended for those unfamiliar with the language or programming -in general. - - -# Windows version - -## Prerequisite - -The only pre-requisite to use LMGC90 on Windows is the Python distribution used. -A binary build is provided to work with the Anaconda python distribution -which can be downloaded from here: -* [32 bits](https://repo.continuum.io/archive/.winzip/Anaconda2-2.5.0-Windows-x86.zip) -* [64 bits](https://repo.continuum.io/archive/.winzip/Anaconda2-2.5.0-Windows-x86.zip) - -Once the file downloaded, unzip it and run the installer. - -To generate visualization files the **vtk** python module must be added. To do that -launch the `Anaconda Prompt` software and type: - -```shell -conda install vtk -``` - -To visualize the files the [Paraview](http://www.paraview.org/download) software -is also needed. - -## Getting the pre-compiled version - -Download the pre-compiled version of LMGC90 for Windows: -* [32 bits](https://mycore.core-cloud.net/public.php?service=files&t=9bb2e3561373c64a4855596873aa98bd) -* [64 bits](https://mycore.core-cloud.net/public.php?service=files&t=9525fc1c270aaddf7e8eae96214f4b49) - -Then create a directory *build* in your *lmgc90_user* directory and unzip -the download file there, it should create a `pylmgc90-xxxx-py27` (where `xxxx` -is to replaced by `i686` if you download the 32 bits version or `x86_64` if you -downloaded the 64 bits version). - -## Installation - -Start `Spyder` then click on the upper line `tools` and `PYTHONPATH manager`. -Then click `Add a path` on lower left corner and select the path to the directory -previously unzipped (that is in this README: *lmgc90_user/build/pylmgc90-xxxx-py27*). -Finally, so that the previous step is taken into account in your current -environment, you have to open a new console by clicking `Console` and then -`Open a new IPython console`. - -## Getting started - -There are several examples in the directory *examples* -sorted by the type of simulation. - -A good entry point is the *Tutorials* directory where you -can find some **ipython notebooks** trying to introduce -step by step the use of the software. - -To read the notebook run the `Jupyter Notebook` application -installed with Anaconda. - -Python being the interface language to the LMGC90 software, -[this introduction](https://www.python.org/about/gettingstarted/) -is recommended for those unfamiliar with the language or programming -in general. diff --git a/docs/Pre/.buildinfo b/docs/Pre/.buildinfo index d2e57160bb194e8f5e3b4d65324e9de69bae453d..7f78bbde4793983bf12d5bc81ec23da7c507dfe9 100644 --- a/docs/Pre/.buildinfo +++ b/docs/Pre/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 18d4cbd131087e90d4cf97685dfe9ec3 +config: fe71abc29a7abe7fa7ffbd3eda79a4e9 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/Pre/_downloads/philosophie.py b/docs/Pre/_downloads/philosophie.py index 3c0103f2ece2ce7eb9bd8b7bfbff828c3c0e6ae9..b64d1cf035051523c2ada3140f0cb8a07f059c06 100644 --- a/docs/Pre/_downloads/philosophie.py +++ b/docs/Pre/_downloads/philosophie.py @@ -5,32 +5,37 @@ from pylmgc90.pre import * dim = 2 -# disk creation -radius = 0.1 -disk = avatar(dimension=dim) -disk.addNode( node(coor=numpy.array([0.,0.1]),number=1) ) -disk.addBulk( rigid2d() ) -disk.defineGroups() -disk.addContactors(shape='DISKx',color='BLUEx',byrd=radius) - -# foundation creation -floor = avatar(dimension=dim) -floor.addNode( node(coor=numpy.array([0.,-0.05]),number=1) ) -floor.addBulk( rigid2d() ) -floor.defineGroups() -floor.addContactors(shape='JONCx',color='BLUEx',axe1=1.,axe2=0.05) - - # materials, model and groups definition mat = material(name='TDURx',materialType='RIGID',density=1000.) mut = material(name='MOUxx',materialType='RIGID',density=100.) mod = model(name='rigid', physics='MECAx', element='Rxx2D', dimension=dim) -disk.defineModel(model=mod) -disk.defineMaterial(material=mut) -disk.computeRigidProperties() -floor.defineModel(model=mod) -floor.defineMaterial(material=mat) -floor.computeRigidProperties() + +radius = 0.1 +disk = rigidDisk(r=radius, center=[0.,0.1], model=mod, material= mat, color='BLUEx') + +floor= rigidJonc(axe1=1., axe2=0.05, center=[0.,-0.05], model=mod, material=mat, color='BLUEx') + +## disk creation +#radius = 0.1 +#disk = avatar(dimension=dim) +#disk.addNode( node(coor=numpy.array([0.,0.1]),number=1) ) +#disk.addBulk( rigid2d() ) +#disk.defineGroups() +#disk.addContactors(shape='DISKx',color='BLUEx',byrd=radius) +# +## foundation creation +#floor = avatar(dimension=dim) +#floor.addNode( node(coor=numpy.array([0.,-0.05]),number=1) ) +#floor.addBulk( rigid2d() ) +#floor.defineGroups() +#floor.addContactors(shape='JONCx',color='BLUEx',axe1=1.,axe2=0.05) +# +#disk.defineModel(model=mod) +#disk.defineMaterial(material=mut) +#disk.computeRigidProperties() +#floor.defineModel(model=mod) +#floor.defineMaterial(material=mat) +#floor.computeRigidProperties() # boundary condition floor.imposeDrivenDof(component=[1,2,3],dofty='vlocy') diff --git a/docs/Pre/_modules/index.html b/docs/Pre/_modules/index.html index 011ac3895e1acf058f53b72329a2e46b336435cd..050abd3556a4ed9f707e893372b8b0f58f2dae56 100644 --- a/docs/Pre/_modules/index.html +++ b/docs/Pre/_modules/index.html @@ -6,7 +6,7 @@
-