forked from sfepy/sfepy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
138 lines (104 loc) · 4.97 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
This is not for the faint of heart! But it gets better.
Installation prerequisites:
---------------------------
recent numpy, scipy (with umfpack wrapper, or umfpack scikit), cython
Dependencies:
-------------
- mandatory: matplotlib, pyparsing, pytables
- optional:
- umfpack + umfpack scikit (optional, but strongly recommended)
- some tests and functions use sympy
- schroedinger.py requires pysparse, pexpect, gmsh (2D), tetgen (3D)
- log.py (live plotting) requires multiprocessing, matplotlib with GTKAgg
- isfepy requires ipython, mayavi, matplotlib with WXAgg
- postproc.py requires mayavi
- to be able to (re)generate the documentation: sphinx, numpydoc, LaTeX
SfePy is known to work on various flavours of Linux, on Intel Macs and Windows.
On Linux, consult the package manager of your favourite distribution.
For example in Gentoo:
$ emerge -va pytables pyparsing numpy scipy matplotlib ipython
in Debian:
$ apt-get install python-tables python-pyparsing python-matplotlib python-scipy
On Windows, all the required packages are part of the Enthought Python
Distribution (EPD) [1] which is free for academic purposes. A completely
free Python(x,y) [2] can be used too, but pyparsing has to be installed
manually, see [3] for step-by-step instructions.
[1] http://www.enthought.com/products/epd.php
[2] http://code.google.com/p/pythonxy
[3] http://docs.sfepy.org/doc/introduction.html#running-on-windows-using-python-x-y
SfePy can be used without any installation (see In-place compilation...) by
running the scripts from the top-level directory of the distribution
(TOPDIR) (see Examples), or can be installed locally or system-wide (see
Installation).
In-place compilation of C extension modules:
--------------------------------------------
1. Look at site_cfg_template.py and follow the instructions
therein. Usually no changes are necessary.
2. Run:
python setup.py build_ext --inplace
Installation:
-------------
system-wide: 'python setup.py install'
local: 'python setup.py install --root=<installation prefix>'
Examples:
---------
Run the executable script 'simple.py' in the top-level directory of the
distribution (TOPDIR). The unix-style calls are used below,
on windows use 'python <script>' in place of './<script>'.
Basic usage:
'./simple.py examples/diffusion/poisson.py' ... creates cylinder.vtk
'./postproc.py -b cylinder.vtk' ... visualize the results
'./simple.py examples/navier_stokes/stokes.py' ... creates channels_symm944t.vtk
'./postproc.py -b channels_symm944t.vtk' ... visualize the results
'./runTests.py' ... see Testing below
'./isfepy' ... follow the help printed on its startup
Surface extraction:
'./findSurf.py meshes/quantum/cube.node -' ... creates surf_cube.mesh
Applications (look at the Dependencies!):
- phononic materials:
'./phonon.py -p examples/phononic/band_gaps.py'
... see examples/phononic/output/
- schroedinger.py (order is important below):
'./schroedinger.py --2d --create-mesh'
'./schroedinger.py --2d --hydrogen'
'./postproc.py mesh.vtk'
Stand-alone examples:
'python examples/standalone/homogenized_elasticity/rs_correctors.py'
'python examples/standalone/elastic_materials/compare_elastic_materials.py'
'python examples/standalone/live_plot/live_plot.py' ... requires GTKAgg
matplotlib backend!
'python examples/standalone/interactive/linear_elasticity.py -s'
... '-s' option requires Mayavi
Testing:
--------
Run './runTests.py' or './runTests.py --filter-less' in TOPDIR.
Tests that save results save them into TOPDIR/output-tests directory. View the
results (*.vtk) with a VTK-capable viewer (e.g. ParaView, Mayavi).
No failures should be reported.
If you get some failures it probably means some optional packages are not
installed. Also be sure to have a recent version of Numpy and SciPy installed
(latest releases or SVN versions are the best bet). Verify also your pytables
(hdf5) installation (possible test_io.py failures).
To debug a failure, run './runTests.py --debug'.
See also './runTests.py --help' for further options.
Documentation:
--------------
SfePy is documented using Sphinx [3]. The documentation sources are in
the doc directory. Those sources can be used to generate the
documentation in many formats supported by Sphinx, notably in html and
pdf (using LaTeX). The pdf version is already contained in the release,
see doc/sfepy_manual.pdf. The file can be (re)generated either by
'python setup.py pdfdocs' in TOPDIR, or using the sphinx commands in the
doc directory.
For the html version of the sphinx documentation go to [4] (the latest
release) or [5] (bleeding edge). Similarly to above, it can be
(re)generated by 'python setup.py htmldocs' in TOPDIR.
If doxygen is installed, the documentation of data structures and functions can
be automatically generated by running 'python setup.py doxygendocs'. Then see
'doc/html/index.html'.
See also [1], [2].
[1] http://sfepy.org
[2] http://sfepy.kme.zcu.cz
[3] http://sphinx.pocoo.org/
[4] http://docs.sfepy.org/doc
[5] http://docs.sfepy.org/doc-devel