diff --git a/bin/tutorial_example.py b/bin/tutorial_example.py
index 962d2fe..cfaabcf 100644
--- a/bin/tutorial_example.py
+++ b/bin/tutorial_example.py
@@ -1,82 +1,82 @@
#!/usr/bin/env python3
import numpy as np
import muSpectre as msp
import matplotlib.pyplot as plt
## currently, muSpectre is restricted to odd-numbered resolutions for
## reasons explained in T.W.J. de Geus, J. Vondřejc, J. Zeman,
## R.H.J. Peerlings, M.G.D. Geers, Finite strain FFT-based non-linear
## solvers made simple, Computer Methods in Applied Mechanics and
## Engineering, Volume 318, 2017
## https://doi.org/10.1016/j.cma.2016.12.032
resolution = [51, 51]
center = np.array([r//2 for r in resolution])
incl = resolution[0]//5
## Domain dimensions
lengths = [7., 5.]
## formulation (small_strain or finite_strain)
formulation = msp.Formulation.small_strain
## build a computational domain
rve = msp.Cell(resolution, lengths, formulation)
## define the material properties of the matrix and inclusion
hard = msp.material.MaterialLinearElastic1_2d.make(
rve, "hard", 10e9, .33)
soft = msp.material.MaterialLinearElastic1_2d.make(
rve, "soft", 70e9, .33)
## assign each pixel to exactly one material
-for i, pixel in enumerate(rve):
+for pixel in rve:
if np.linalg.norm(center - np.array(pixel),2)`_).
.. _c4science: https://c4science.ch
Building *µ*\Spectre
********************
-You can compile *µ*\Spectre using `CMake `_. The current (and possibly incomplete list of) dependencies are
+You can compile *µ*\Spectre using `CMake `_ (3.1.0 or higher). The current (and possibly incomplete list of) dependencies are
+- `CMake `_ (3.1.0 or higher)
- `Boost unit test framework `_
- `FFTW `_
-- `Sphinx `_ and `Breathe `_
- `git `_
+- `Python3 `_ including the header files.
+- `numpy `_ and `scipy `_.
+
+Recommended:
+
+- `Sphinx `_ and `Breathe `_ (necessary if you want to build the documentation (turned off by default)
+- `Eigen `_ (3.3.0 or higher). If you do not install this, it will be downloaded automatically at configuration time, so this is not strictly necessary. The download can be slow, though, so we recommend installing it on your system.
+- The CMake curses graphical user interface (``ccmake``).
*µ*\Spectre requires a relatively modern compiler as it makes heavy use of C++14 features. It has successfully been compiled and tested using the following compilers under Linux
- gcc-7.2
- gcc-6.4
- gcc-5.4
- clang-6.0
- clang-5.0
- clang-4.0
and using clang-4.0 under MacOS.
It does *not* compile on Intel's most recent compiler, as it is still lacking some C++14 support. Work-arounds are planned, but will have to wait for someone to pick up the `task `_.
To compile, create a build folder and configure the CMake project. If you do this in the folder you cloned in the previous step, it can look for instance like this:
.. code-block:: sh
$ mkdir build-release
$ cd build-release
$ ccmake ..
Then, set the build type to ``Release`` to produce optimised code. *µ*\Spectre makes heavy use of expression templates, so optimisation is paramount. (As an example, the performance difference between code compiled in ``Debug`` and ``Release`` is about a factor 40 in simple linear elasticity.)
Finally, compile the library and the tests by running
.. code-block:: sh
$ make -j
.. warning::
When using the ``-j`` option to compile, be aware that compiling *µ*\Spectre uses quite a bit of RAM. If your machine start swapping at compile time, reduce the number of parallel compilations
Running *µ*\Spectre
*******************
The easiest and intended way of using *µ*\Spectre is through its Python bindings. The following simple example computes the response of a two-dimensional stretched periodic RVE cell. The cell consist of a soft matrix with a circular hard inclusion.
-.. literalinclude:: ../../../bin/tutorial_example.py
+.. literalinclude:: ../../../bin/tutorial_examplex.py
:language: python
More examples both both python and c++ executables can be found in the ``/bin`` folder.
Getting help
************
-*µ*\Spectre is in a very early stage of development and the documentation is currently spotty. Also, there is no FAQ page yet. If you run into trouble, please contact us on the `*µ*\Spectre chat room `_ and someone will answer as soon as possible. You can also check the API :ref:`reference`.
+*µ*\Spectre is in a very early stage of development and the documentation is currently spotty. Also, there is no FAQ page yet. If you run into trouble, please contact us on the `µSpectre chat room `_ and someone will answer as soon as possible. You can also check the API :ref:`reference`.
Reporting Bugs
**************
-If you think you found a bug, you are probably right. Please report it! The preferred way is for you to create a task on `*µ*\Spectre's workboard `_ and assign it to user ``junge``. Include steps to reproduce the bug if possible. Someone will answer as soon as possible.
+If you think you found a bug, you are probably right. Please report it! The preferred way is for you to create a task on `µSpectre's workboard `_ and assign it to user ``junge``. Include steps to reproduce the bug if possible. Someone will answer as soon as possible.
Contribute
**********
We welcome contributions both for new features and bug fixes. New features must be documented and have unit tests. Please submit contributions for review as `Arcanist revisions `_. More detailed guidelines for submissions will follow soonᵀᴹ.