Commit a536e78b authored by Rémy Mozul's avatar Rémy Mozul

Merge branch 'user_2016' into 'master'

2016 release

See merge request !1
parents 4efa4ba0 e1af0fe8

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
if( CMAKE_MAJOR_VERSION EQUAL 2 )
if( CMAKE_MINOR_VERSION EQUAL 8 )
if( CMAKE_PATCH_VERSION LESS 3 )
message(WARNING "CMake version is inferior to 2.8.3, some features may not be well supported")
endif( CMAKE_PATCH_VERSION LESS 3 )
endif( CMAKE_MINOR_VERSION EQUAL 8 )
endif( CMAKE_MAJOR_VERSION EQUAL 2 )
# path to homemade/taken macros/finds
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/src/tools/cmake/modules ${CMAKE_MODULE_PATH})
# Force out-of-source build
include(OutOfSourcesBuild)
project(LMGC90_dev Fortran C CXX)
SET(LMGC90_MAJOR_VERSION 2)
SET(LMGC90_MINOR_VERSION 0)
SET(LMGC90_PATCH_VERSION 0)
MESSAGE(STATUS "You try to build LMGC90_dev")
include(CTest)
add_subdirectory(src)
# LMGC90 project: user version #
# Downloading
To get the project please check [here](https://git-xen.lmgc.univ-montp2.fr/lmgc90/lmgc90_user/wikis/download_and_install)
To get the project please check [here](https://git-xen.lmgc.univ-montp2.fr/lmgc90/lmgc90_user/wikis/home)
# Contact us
If you'd like to speak about a bad behavior of a simulation, to propose a non
regression test, to propose a new feature or any thing relative to the
development of LMGC90, please contact us via this mailing list:
lmgc90-dev@groupes.renater.fr
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
......@@ -24,6 +33,14 @@ For Windows user, jump to [Windows Version section](#winversion)
# <a name="linversion"> Linux and MacOS version </a>
# 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.
......@@ -59,11 +76,20 @@ 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 Debian 7
To compile:
......@@ -78,6 +104,12 @@ 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
```
......@@ -105,6 +137,12 @@ 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
```
......@@ -128,6 +166,12 @@ 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
```
......@@ -152,7 +196,7 @@ sudo port select gcc mp-gcc49
sudo port select python python27
```
For the doc:
To build the documentation:
```
doxygen graphviz py27-sphinx py27-numpydoc texlive-latex-extra dvipng ImageMagick
......@@ -176,10 +220,47 @@ In the *lmgc90_user* directory run:
```shell
mkdir build
cd build
cmake ../src
cmake ..
make
```
CMake is used to generate the makefile. Out of source build is advised.
So you need to know the source tree path, decide on a build path then:
```
cd build_path
cmake source_path
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 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
......@@ -234,7 +315,7 @@ in general.
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](https://repo.continuum.io/archive/.winzip/Anaconda2-2.5.0-Windows-x86_64.zip).
which can be downloaded from [here](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
......
# 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: 7087fddd1fcf46ba6ed4e8ccea462539
config: 18d4cbd131087e90d4cf97685dfe9ec3
tags: 645f666f9bcd5a90fca523b33c5a78b7
import math
from pylmgc90.pre_lmgc import *
from pylmgc90.pre import *
nb_particles = 10000
radius_min = 1.0
......@@ -12,8 +12,8 @@ ly = 100.
[nb_laid_particles, coors] = depositInBox2D(radii,lx,ly)
mat = material(name='TDURx', type='RIGID', density=100.)
mod = model(name='rigid', type='MECAx', element='Rxx2D', dimension=2)
mat = material(name='TDURx', materialType='RIGID', density=100.)
mod = model(name='rigid', physics='MECAx', element='Rxx2D', dimension=2)
# generate the triangles
bodies = avatars()
......@@ -24,7 +24,7 @@ for i in range(nb_laid_particles):
max_radius = max(radii)
mut = material(name='TDURx', type='RIGID', density=1000.)
mut = material(name='TDURx', materialType='RIGID', density=1000.)
# left wall : rough wall
left = roughWall( center=[-radius_max, 0.5*ly], theta=-0.5*math.pi, l=ly + 2.*radius_max,
......@@ -55,7 +55,7 @@ svs = see_tables()
tacts = tact_behavs()
# interaction definition:
lplpl=tact_behav(name='iqsc0', type='IQS_CLB', fric=0.3)
lplpl=tact_behav(name='iqsc0', law='IQS_CLB', fric=0.3)
tacts+=lplpl
svplpl = see_table(CorpsCandidat='RBDY2', candidat='POLYG', colorCandidat='BLUEx', behav=lplpl,
CorpsAntagoniste='RBDY2', antagoniste='POLYG', colorAntagoniste='BLUEx', alert=.1)
......
import numpy
import math
from pylmgc90.pre_lmgc import *
from pylmgc90.pre import *
dim = 2
bodies = avatars()
mat = material(name='PLEXx',type='RIGID',density=2000.)
mod = model(name='rigid', type='MECAx', element='Rxx2D', dimension=dim)
mat = material(name='PLEXx',materialType='RIGID',density=2000.)
mod = model(name='rigid', physics='MECAx', element='Rxx2D', dimension=dim)
# bricks, half-brick, linteau and opening definition
brick = brick2D('brick', 1.e-1, 5.e-2)
......@@ -71,7 +71,7 @@ mats = materials()
svs = see_tables()
tacts = tact_behavs()
mut = material(name='TDURx',type='RIGID',density=2500.)
mut = material(name='TDURx',materialType='RIGID',density=2500.)
mats.addMaterial(mat,mut)
floor = rigidJonc(axe1=3.e-1, axe2=2.5e-2, center=[2.5e-1, -2.5e-2],
......@@ -86,9 +86,9 @@ except:
pass
# interactions management :
lplpl=tact_behav(name='iqsc0',type='IQS_CLB',fric=0.3)
lplpl=tact_behav(name='iqsc0',law='IQS_CLB',fric=0.3)
tacts+=lplpl
lpljc=tact_behav(name='iqsc1',type='IQS_CLB',fric=0.5)
lpljc=tact_behav(name='iqsc1',law='IQS_CLB',fric=0.5)
tacts+=lpljc
svbbbb = see_table(CorpsCandidat='RBDY2',candidat='POLYG', colorCandidat='BLEUx',behav=lplpl,
CorpsAntagoniste='RBDY2', antagoniste='POLYG',colorAntagoniste='BLEUx',alert=5.e-3)
......
import numpy
import math
from pylmgc90.pre_lmgc import *
from pylmgc90.pre import *
dim = 2
# disk creation
radius = 0.1
disk = avatar(type='RBDY2', dimension=dim)
disk.addNode( node(type='NO2xx',coor=numpy.array([0.,0.1]),number=1) )
disk = avatar(dimension=dim)
disk.addNode( node(coor=numpy.array([0.,0.1]),number=1) )
disk.addBulk( rigid2d() )
disk.defineGroups()
disk.addContactors(type='DISKx',color='BLUEx',byrd=radius)
disk.addContactors(shape='DISKx',color='BLUEx',byrd=radius)
# foundation creation
floor = avatar(type='RBDY2', dimension=dim)
floor.addNode( node(type='NO2xx',coor=numpy.array([0.,-0.05]),number=1) )
floor = avatar(dimension=dim)
floor.addNode( node(coor=numpy.array([0.,-0.05]),number=1) )
floor.addBulk( rigid2d() )
floor.defineGroups()
floor.addContactors(type='JONCx',color='BLUEx',axe1=1.,axe2=0.05)
floor.addContactors(shape='JONCx',color='BLUEx',axe1=1.,axe2=0.05)
# materials, model and groups definition
mat = material(name='TDURx',type='RIGID',density=1000.)
mut = material(name='MOUxx',type='RIGID',density=100.)
mod = model(name='rigid', type='MECAx', element='Rxx2D', dimension=dim)
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()
......@@ -56,7 +56,7 @@ for i in range(nb_columns):
# adding floor and rotation sample
bodies.addAvatar(floor)
bodies.rotate(type='axis', alpha=-math.pi/6., axis=[0., 0., 1.], center=[1.,-0.05])
bodies.rotate(description='axis', alpha=-math.pi/6., axis=[0., 0., 1.], center=[1.,-0.05])
try:
visuAvatars(bodies)
......@@ -70,7 +70,7 @@ svs = see_tables()
tacts = tact_behavs()
# interaction definition:
ldkjc=tact_behav(name='iqsc0', type='IQS_CLB', fric=0.3)
ldkjc=tact_behav(name='iqsc0', law='IQS_CLB', fric=0.3)
tacts+=ldkjc
svdkjc = see_table(CorpsCandidat='RBDY2', candidat='DISKx', colorCandidat='BLUEx', behav=ldkjc,
CorpsAntagoniste='RBDY2', antagoniste='JONCx', colorAntagoniste='BLUEx', alert=.1)
......
......@@ -45,36 +45,36 @@
<div class="body" role="main">
<h1>All modules for which code is available</h1>
<ul><li><a href="pylmgc90/pre_lmgc/avatar/avatar.html">pylmgc90.pre_lmgc.avatar.avatar</a></li>
<li><a href="pylmgc90/pre_lmgc/avatar/bulk/bulk.html">pylmgc90.pre_lmgc.avatar.bulk.bulk</a></li>
<li><a href="pylmgc90/pre_lmgc/avatar/bulks.html">pylmgc90.pre_lmgc.avatar.bulks</a></li>
<li><a href="pylmgc90/pre_lmgc/avatar/contactor/contactor.html">pylmgc90.pre_lmgc.avatar.contactor.contactor</a></li>
<li><a href="pylmgc90/pre_lmgc/avatar/contactors.html">pylmgc90.pre_lmgc.avatar.contactors</a></li>
<li><a href="pylmgc90/pre_lmgc/avatar/node/node.html">pylmgc90.pre_lmgc.avatar.node.node</a></li>
<li><a href="pylmgc90/pre_lmgc/avatar/nodes.html">pylmgc90.pre_lmgc.avatar.nodes</a></li>
<li><a href="pylmgc90/pre_lmgc/avatars.html">pylmgc90.pre_lmgc.avatars</a></li>
<li><a href="pylmgc90/pre_lmgc/build_avatar/brick.html">pylmgc90.pre_lmgc.build_avatar.brick</a></li>
<li><a href="pylmgc90/pre_lmgc/build_avatar/brick_wall.html">pylmgc90.pre_lmgc.build_avatar.brick_wall</a></li>
<li><a href="pylmgc90/pre_lmgc/build_avatar/extrusion.html">pylmgc90.pre_lmgc.build_avatar.extrusion</a></li>
<li><a href="pylmgc90/pre_lmgc/build_avatar/lattices2D.html">pylmgc90.pre_lmgc.build_avatar.lattices2D</a></li>
<li><a href="pylmgc90/pre_lmgc/build_avatar/lattices3D.html">pylmgc90.pre_lmgc.build_avatar.lattices3D</a></li>
<li><a href="pylmgc90/pre_lmgc/build_avatar/lecture.html">pylmgc90.pre_lmgc.build_avatar.lecture</a></li>
<li><a href="pylmgc90/pre_lmgc/build_avatar/mesh.html">pylmgc90.pre_lmgc.build_avatar.mesh</a></li>
<li><a href="pylmgc90/pre_lmgc/build_avatar/mesh2D.html">pylmgc90.pre_lmgc.build_avatar.mesh2D</a></li>
<li><a href="pylmgc90/pre_lmgc/build_avatar/mesh3D.html">pylmgc90.pre_lmgc.build_avatar.mesh3D</a></li>
<li><a href="pylmgc90/pre_lmgc/build_avatar/particles.html">pylmgc90.pre_lmgc.build_avatar.particles</a></li>
<li><a href="pylmgc90/pre_lmgc/build_avatar/tools/containers2D.html">pylmgc90.pre_lmgc.build_avatar.tools.containers2D</a></li>
<li><a href="pylmgc90/pre_lmgc/build_avatar/tools/containers3D.html">pylmgc90.pre_lmgc.build_avatar.tools.containers3D</a></li>
<li><a href="pylmgc90/pre_lmgc/build_avatar/tools/granulometry.html">pylmgc90.pre_lmgc.build_avatar.tools.granulometry</a></li>
<li><a href="pylmgc90/pre_lmgc/build_avatar/walls.html">pylmgc90.pre_lmgc.build_avatar.walls</a></li>
<li><a href="pylmgc90/pre_lmgc/bulk_behavs.html">pylmgc90.pre_lmgc.bulk_behavs</a></li>
<li><a href="pylmgc90/pre_lmgc/files/evolutionFile.html">pylmgc90.pre_lmgc.files.evolutionFile</a></li>
<li><a href="pylmgc90/pre_lmgc/models.html">pylmgc90.pre_lmgc.models</a></li>
<li><a href="pylmgc90/pre_lmgc/shared/bulk_behav.html">pylmgc90.pre_lmgc.shared.bulk_behav</a></li>
<li><a href="pylmgc90/pre_lmgc/shared/model.html">pylmgc90.pre_lmgc.shared.model</a></li>
<li><a href="pylmgc90/pre_lmgc/shared/tact_behav.html">pylmgc90.pre_lmgc.shared.tact_behav</a></li>
<li><a href="pylmgc90/pre_lmgc/tact_behavs.html">pylmgc90.pre_lmgc.tact_behavs</a></li>
<li><a href="pylmgc90/pre_lmgc/viz/visuVtk.html">pylmgc90.pre_lmgc.viz.visuVtk</a></li>
<ul><li><a href="pylmgc90/pre/IO/evolution2File.html">pylmgc90.pre.IO.evolution2File</a></li>
<li><a href="pylmgc90/pre/avatar/avatar.html">pylmgc90.pre.avatar.avatar</a></li>
<li><a href="pylmgc90/pre/avatar/bulk/bulk.html">pylmgc90.pre.avatar.bulk.bulk</a></li>
<li><a href="pylmgc90/pre/avatar/bulks.html">pylmgc90.pre.avatar.bulks</a></li>
<li><a href="pylmgc90/pre/avatar/contactor/contactor.html">pylmgc90.pre.avatar.contactor.contactor</a></li>
<li><a href="pylmgc90/pre/avatar/contactors.html">pylmgc90.pre.avatar.contactors</a></li>
<li><a href="pylmgc90/pre/avatar/node/node.html">pylmgc90.pre.avatar.node.node</a></li>
<li><a href="pylmgc90/pre/avatar/nodes.html">pylmgc90.pre.avatar.nodes</a></li>
<li><a href="pylmgc90/pre/avatars.html">pylmgc90.pre.avatars</a></li>
<li><a href="pylmgc90/pre/build_avatar/brick.html">pylmgc90.pre.build_avatar.brick</a></li>
<li><a href="pylmgc90/pre/build_avatar/brick_wall.html">pylmgc90.pre.build_avatar.brick_wall</a></li>
<li><a href="pylmgc90/pre/build_avatar/extrusion.html">pylmgc90.pre.build_avatar.extrusion</a></li>
<li><a href="pylmgc90/pre/build_avatar/lattices2D.html">pylmgc90.pre.build_avatar.lattices2D</a></li>
<li><a href="pylmgc90/pre/build_avatar/lattices3D.html">pylmgc90.pre.build_avatar.lattices3D</a></li>
<li><a href="pylmgc90/pre/build_avatar/lecture.html">pylmgc90.pre.build_avatar.lecture</a></li>
<li><a href="pylmgc90/pre/build_avatar/mesh.html">pylmgc90.pre.build_avatar.mesh</a></li>
<li><a href="pylmgc90/pre/build_avatar/mesh2D.html">pylmgc90.pre.build_avatar.mesh2D</a></li>
<li><a href="pylmgc90/pre/build_avatar/mesh3D.html">pylmgc90.pre.build_avatar.mesh3D</a></li>
<li><a href="pylmgc90/pre/build_avatar/particles.html">pylmgc90.pre.build_avatar.particles</a></li>
<li><a href="pylmgc90/pre/build_avatar/tools/containers2D.html">pylmgc90.pre.build_avatar.tools.containers2D</a></li>
<li><a href="pylmgc90/pre/build_avatar/tools/containers3D.html">pylmgc90.pre.build_avatar.tools.containers3D</a></li>
<li><a href="pylmgc90/pre/build_avatar/tools/granulometry.html">pylmgc90.pre.build_avatar.tools.granulometry</a></li>
<li><a href="pylmgc90/pre/build_avatar/walls.html">pylmgc90.pre.build_avatar.walls</a></li>
<li><a href="pylmgc90/pre/bulk_behavs.html">pylmgc90.pre.bulk_behavs</a></li>
<li><a href="pylmgc90/pre/models.html">pylmgc90.pre.models</a></li>
<li><a href="pylmgc90/pre/shared/bulk_behav.html">pylmgc90.pre.shared.bulk_behav</a></li>
<li><a href="pylmgc90/pre/shared/model.html">pylmgc90.pre.shared.model</a></li>
<li><a href="pylmgc90/pre/shared/tact_behav.html">pylmgc90.pre.shared.tact_behav</a></li>
<li><a href="pylmgc90/pre/tact_behavs.html">pylmgc90.pre.tact_behavs</a></li>
<li><a href="pylmgc90/pre/viz/visuVtk.html">pylmgc90.pre.viz.visuVtk</a></li>
</ul>
</div>
......@@ -85,8 +85,8 @@
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
......@@ -110,7 +110,7 @@
</div>
<div class="footer" role="contentinfo">
&copy; Copyright 2015, CNRS.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.4.
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pylmgc90.pre.IO.evolution2File &mdash; pylmgc90.pre 2015.2 documentation</title>
<link rel="stylesheet" href="../../../../_static/classic.css" type="text/css" />
<link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../../',
VERSION: '2015.2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="pylmgc90.pre 2015.2 documentation" href="../../../../index.html" />
<link rel="up" title="Module code" href="../../../index.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../../index.html">pylmgc90.pre 2015.2 documentation</a> &raquo;</li>
<li class="nav-item nav-item-1"><a href="../../../index.html" accesskey="U">Module code</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<h1>Source code for pylmgc90.pre.IO.evolution2File</h1><div class="highlight"><pre>
<span></span><span class="c1"># module gerant l&#39;ecriture du fichier d&#39;evolution pour l&#39;application des conditions limites</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">pylmgc90.pre.utilities.error</span> <span class="kn">import</span> <span class="o">*</span>
<div class="viewcode-block" id="writeEvolution"><a class="viewcode-back" href="../../../../classes.html#pylmgc90.pre.writeEvolution">[docs]</a><span class="k">def</span> <span class="nf">writeEvolution</span><span class="p">(</span><span class="n">f</span><span class="p">,</span> <span class="n">instants</span><span class="p">,</span> <span class="n">path</span><span class="o">=</span><span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">&#39;evolution.dat&#39;</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> this function writes an evolution file used to apply specific boundary conditions.</span>
<span class="sd"> parameters:</span>
<span class="sd"> -----------</span>
<span class="sd"> - f: a function of time</span>
<span class="sd"> - instants: for each instant t in the list, the function</span>
<span class="sd"> f is evaluated and the couple (t, f(t)) is write in the file</span>
<span class="sd"> optional parameters:</span>
<span class="sd"> --------------------</span>
<span class="sd"> - path=&#39;&#39;: path to the direactory where to write the evolution file</span>
<span class="sd"> - name=&#39;evolution.dat&#39;: name of the evolution file</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># on verifie que la fonction donnee est bien appelable</span>
<span class="k">if</span> <span class="ow">not</span> <span class="nb">callable</span><span class="p">(</span><span class="n">f</span><span class="p">):</span>
<span class="n">showError</span><span class="p">(</span><span class="s2">&quot;given function is not callable!&quot;</span><span class="p">)</span>
<span class="c1"># on ouvre le fichier d&#39;evolution en ecriture</span>
<span class="n">fid</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">path</span><span class="p">,</span><span class="n">name</span><span class="p">),</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span>
<span class="k">print</span> <span class="s1">&#39;</span><span class="se">\n</span><span class="s1">Debut Ecriture du fichier </span><span class="se">\t</span><span class="s1">:</span><span class="se">\t</span><span class="s1">&#39;</span> <span class="o">+</span> <span class="n">name</span>
<span class="c1"># on ecrit le couple t, f(t) pour chaque instant t</span>
<span class="k">for</span> <span class="n">t</span> <span class="ow">in</span> <span class="n">instants</span><span class="p">:</span>
<span class="n">fid</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;</span><span class="si">%14.7E</span><span class="s1"> </span><span class="si">%14.7E</span><span class="se">\n</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="n">f</span><span class="p">(</span><span class="n">t</span><span class="p">)))</span>
<span class="c1"># on ferme le fichier</span>
<span class="n">fid</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
<span class="k">print</span> <span class="s1">&#39;Fin Ecriture du fichier </span><span class="se">\t</span><span class="s1">:</span><span class="se">\t</span><span class="s1">&#39;</span> <span class="o">+</span> <span class="n">name</span></div>
</pre></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="../../../../search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../../index.html">pylmgc90.pre 2015.2 documentation</a> &raquo;</li>
<li class="nav-item nav-item-1"><a href="../../../index.html" >Module code</a> &raquo;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&copy; Copyright 2015, CNRS.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.4.
</div>