# HG changeset patch
# User paugier <pierre.augier@ens-lyon.org>
# Date 1516727941 -3600
#      Tue Jan 23 18:19:01 2018 +0100
# Node ID f603651d5c9b7db40394fc72a65cc8c431ca6da3
# Parent  138ae34e293bea21d90de05c356c334e197d1339
fluiddyn paper + spectraldns

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -23,3 +23,5 @@
 auto/*
 
 **/_minted-*
+
+fluidsim/Scripts/spectralDNS/*
\ No newline at end of file
diff --git a/bib.bib b/bib.bib
--- a/bib.bib
+++ b/bib.bib
@@ -2,7 +2,7 @@
 
 @article{fluiddyn,
   author = "Pierre Augier and Cyrille Bonamy and Ashwin Vishnu Mohanan",
-  year = "201?",
+  year = "2018",
   title = "FluidDyn: a Python open-source framework for research and teaching
                   in fluid dynamics",
   journal = "J. Open Research Software",
@@ -12,7 +12,7 @@
 
 @article{fluidfft,
   author = "Ashwin Vishnu Mohanan and Cyrille Bonamy and Pierre Augier",
-  year = "201?",
+  year = "2018",
   title = "Fluidfft: common API (C++ and Python) for Fast Fourier Transform
                   libraries",
   journal = "J. Open Research Software",
@@ -22,7 +22,7 @@
 
 @article{fluidsim,
   author = "Ashwin Vishnu Mohanan and Cyrille Bonamy and Pierre Augier",
-  year = "201?",
+  year = "2018",
   title = "FluidSim: modular, object-oriented Python package for CFD
                   simulations",
   journal = "J. Open Research Software",
diff --git a/fluiddyn/fluiddyn_paper.tex b/fluiddyn/fluiddyn_paper.tex
--- a/fluiddyn/fluiddyn_paper.tex
+++ b/fluiddyn/fluiddyn_paper.tex
@@ -120,6 +120,14 @@
 Computers of all kinds (from smartphones to HPC clusters) connected by a world
 wide web are used for human communication but also for many other applications.
 %
+It has become very easy to reproduce and exchange ideas and data.
+%
+The set of things that you can give without loosing them, as knowledge and
+love, has been somehow extended.
+%
+The information technology revolution opens fantastic opportunities for human
+collaboration and of course for science.
+
 The web related activities represent approximately 5\% of GDP in the USA!  A
 huge amount of money (and work) is spent for the related technologies.  We all
 know the most powerful and famous companies involved in this dynamics
@@ -432,8 +440,8 @@
 is optimized at the Python level and then an automatically produced C++ code is
 properly compiled.
 %
-This two-step compilation allows very interesting optimizations as demonstrated
-for example in
+This two-step compilation allows very clever optimizations as demonstrated for
+example in
 \href{http://serge-sans-paille.github.io/pythran-stories/being-more-than-a-translator.html}{%
 this blog post by the main developer of Pythran}.
 %
@@ -975,27 +983,31 @@
 company than us. Do they realize that when they work on these programs, they
 work (often for free) for the company that sells the proprietary tool?
 
-
 Some real open-source codes have also emerged, for example
 \href{https://nek5000.mcs.anl.gov/}{NEK5000} (Fortran), OpenFOAM (C++),
 \href{http://basilisk.fr}{Basilisk} (C) and
 \href{http://channelflow.org/}{Channelflow} (C++),
 \href{https://www.code-saturne.org}{Code\_Saturn} (C/Fortran).
 
-Volkswagen group (Volkswagen, Audi, Seat, Porsche, Skoda, ...) has used
-OpenFOAM since 2006\footnote{\url{https://www.nas.nasa.gov/assets/pdf/ams/%
+Big companies have started to use open-source development for fluid mechanics
+application. For example, Volkswagen group (Volkswagen, Audi, Seat, Porsche,
+Skoda, ...) has used OpenFOAM since
+2006\footnote{\url{https://www.nas.nasa.gov/assets/pdf/ams/%
 2014/AMS_20141202_Othmer.pdf}}.
-
-The code \href{https://www.code-saturne.org}{Code\_Saturn} is part of the very
-interesting
+%
+EDF, the main French electric utility company has also a very interesting
 \href{http://linuxfr.org/news/strat\%C3\%A9gie-open-source-\%C3\%A0-edf-rd}{%
-open-source strategy of EDF}.
+open-source strategy}.  It leads to many codes and in particular
+\href{https://www.code-saturne.org}{Code\_Saturn} for the fluid simulations.
 %
-EDF is also involved in the development of Paraview.
+EDF is also involved in the development of
+\href{https://www.paraview.org/}{Paraview}.
 
 Finally, scientists start to use Python to study fluid mechanics, in particular
-with CFD codes (Dedalus, SpectralDNS and
-\href{https://github.com/mikaem/Oasis}{Oasis}) or for data analysis (OpenPTV).
+with CFD codes (\href{http://dedalus-project.org/}{Dedalus},
+\href{https://github.com/spectralDNS}{SpectralDNS} and
+\href{https://github.com/mikaem/Oasis}{Oasis}) or for data analysis
+(\href{http://www.openptv.net/}{OpenPTV}).
 
 
 \subsection*{FluidDyn project}
@@ -1021,8 +1033,8 @@
 \begin{itemize}
 \item Good coding practice with readable and understandable Python code
 (PEP~8).
-\item Source control management and forge simple for the new comers (using
-Mercurial and Bitbucket).
+\item Source control management (Mercurial) and forge (Bitbucket) simple for
+the new comers.
 \item Packaging and install procedure. All packages are available from
 \href{https://pypi.org/}{Pypi} and can be install simply with
 \href{https://pypi.org/project/pip/}{pip}, the standard Python installation
@@ -1071,19 +1083,23 @@
 framework to run sequential and parallel Computational Fluid Dynamics (CFD)
 simulations and on-the-fly post-processing for a variety of problems
 (Navier-Stokes, Shallow Water, F\"oppl von K\'arm\'an equations, to name a
-few). ... \cite{LindborgMohanan2017}
+few).  A study using fluidsim has just been published in Physics of Fluids
+\cite[]{LindborgMohanan2017}.
 
 \item fluidlab: Package to handles laboratory experiments. Primarily used to
 communicate with various hardware devices such as motors and pumps, to handle
 I/O between sensors, and to store data.
-
-\cite{LeclercqPartridgeAugierDalzielKerswell2016, ISSF2016}
+%
+Experiments using fluidlab have been carried out in the DAMTP fluid laboratory
+\cite[Cambridge, UK,][]{LeclercqPartridgeAugierDalzielKerswell2016}, in ENS Lyon
+laboratory (Lyon, France, ???) and at LEGI \cite[Grenoble, France,][]{ISSF2016}.
 
 \item fluidimage: Scalable image processing package which implements various
 algorithms to calibrate cameras, to preprocess, to do Particle Image
 Velocimetry (PIV) and to postprocess data.
-
-\cite{ISSF2016}
+%
+Fluidimage is used to process images taken during experiments perform in the
+Coriolis platform \cite[]{ISSF2016}.
 
 \item fluidfoam: Small package to load OpenFoam data and plot them.
 
@@ -1106,11 +1122,18 @@
 it has been made forward compatible with Python 3 through the use of external
 package future.
 
-The package fluiddyn is organized into five sub-packages: \codeinline{io},
-\codeinline{util}, \codeinline{calcul}, \codeinline{clusters} and
-\codeinline{output}.
+\subsection*{API of the Python library fluiddyn}
 
-\subsection*{API of the Python library fluiddyn}
+The package fluiddyn is organized into five sub-packages: 
+\begin{itemize}
+\item \codeinline{fluiddyn.io}: This subpackage provides utilities for
+input/output to different file formats.
+\item \codeinline{fluiddyn.util}: Miscellaneous utilities.
+\item \codeinline{fluiddyn.calcul}: Modules for numerical computations.
+\item \codeinline{fluiddyn.clusters}: Classes to launch jobs on HPC clusters.
+\item \codeinline{fluiddyn.output}: Utilities to produce scientific outputs
+(figures and videos).
+\end{itemize}
 
 Sub-packages \codeinline{io}, \codeinline{util} and \codeinline{calcul} are the
 largest in terms of lines of code and provides the Application Programming
@@ -1131,7 +1154,7 @@
 \item Support printing to console as XML and saving as XML, hdf5 and netcdf4
 files.
 \item Evaluate data types automatically while loading from saved files.
-\item Easy expansion of default parameters dynamically, through function calls.
+\item Easy exploration in an interactive console.
 \item Allows modification of default parameters through simple Python script
 files. Errors are raised if the user try to used an invalid parameter.
 \item Graphical User Interface (GUI) frontend with PyQt.
@@ -1170,14 +1193,16 @@
 
 \subsubsection*{Module \codeinline{fluiddyn.calcul.easyfft}}
 
-
-\subsubsection*{Sub-package \codeinline{fluiddyn.clusters}}
-
-
-\subsubsection*{Sub-package \codeinline{fluiddyn.output}}
-
+Thin wrapper for an unified API using classes around the packages pyfftw and
+scipy.fftpack.  It is very easy to perform forward and backward Fast Fourier
+Transforms (FFT) in 1d, 2d and 3d.  The FFT can be multithreaded if the
+environment variable \codeinline{OMP\_NUM\_THREADS} is defined.
 
 \subsection*{The fluiddyn command-line utilities}
+
+The package fluiddyn also provides few simple command-line utilities to perform
+simple tasks useful for a scientist developing with Python and using the
+FluidDyn packages.
 \begin{itemize}
 
 \item fluidinfo
@@ -1330,44 +1355,49 @@
 
 \subsection*{Conclusions}
 
-The project tries to open the possibility of another usage of open-source in
-science and fluid dynamics.
-
 Fluiddyn is an attempt to set off a collaborative dynamics based on open-source
 development in the research on fluid dynamics.
-
-It is right now just an experiment.  Will people use these tools and
-collaborate with these tools?
+%
+We try with this project to open the possibility of another usage of
+open-source in science and fluid dynamics.
 
-Can it be successful? 
+The project is right now in a very preliminary state.  Packages with
+interesting features are implemented and a framework for packaging, documenting
+and testing is now well set.
+%
+However, there is not yet any community around the project and we have know to
+work on this task since an active community of users and of developers is a
+condition for success.  
 
-The way is not straight and easy. Problems:
-
+Will people use these tools and collaborate with these tools?
+%
+There are clearly many challenges and potential barriers:
 \begin{itemize}
-\item habits.
-\item knowledge and skills in the community
-\item misunderstanding of colleagues and in particular colleagues with
+\item The habits in the community.
+\item Knowledge and skills in the community
+\item Misunderstanding of colleagues and in particular colleagues with
 responsibilities and power.
-\item Open-source is not free. A good software has a cost that we should be
-willing to pay to get it. Lack of a business model for open-source software in
-science.
-\item recognition of the work spent in open-source, in particular for
+\item Lack of a business model for open-source software in science.  A good
+open-source software has a cost that we should be willing to pay to get it.
+\item Lack of recognition of the work spent in open-source, in particular for
 precarious scientists.
 \end{itemize}
 
-On our side, we have:
-
-\begin{itemize}
-\item collective efficiency
-\item quality of the tools used (Python and its scientific ecosystem,
-Mercurial, Readthedocs, Jupyter, ...)
-\item deep learning and Internet of Things dynamics
-\end{itemize}
-
+On our side, we have also positive points.
+%
+The quality of the tools we use (Python and its scientific ecosystem,
+Mercurial, Readthedocs, Jupyter, ...) is impressive.
+%
 Scientific code is done to be read and to transmit ideas. Technically, Python
 is among the best languages for this point of view.
+%
+We can benefit from the dynamics of Python and of new trendy subjects like deep
+learning and the Internet of Things.
+%
+Finally, if we manage to gather a community of users and of developers, the
+collective efficiency related to open-source methods and tools can be a strong
+booster.
 
-Open-source a necessity for this objective.
 
 \section*{Acknowledgements}
 
diff --git a/fluidsim/Scripts/install_spectraldns.sh b/fluidsim/Scripts/install_spectraldns.sh
--- a/fluidsim/Scripts/install_spectraldns.sh
+++ b/fluidsim/Scripts/install_spectraldns.sh
@@ -4,10 +4,11 @@
 
 ## Use the following if you use virtualenvwrapper like me ;)
 # mkvirtualenv -p python2 --system-site-packages spectraldns_python
-virtualenv -p python2 --system-site-packages spectraldns_python
+# virtualenv -p python2 -system-site-packages spectraldns_python
+virtualenv -p python2 spectraldns_python
 source spectraldns_python/bin/activate
 
-pip install pytest nodepy mpi4py cython numpy pythran numba
+python -m pip install pytest nodepy mpi4py cython numpy scipy pythran numba colorlog h5py
 
 git clone https://github.com/spectralDNS/mpiFFT4py.git
 cd mpiFFT4py
@@ -42,4 +43,4 @@
 pwd > $VIRTUAL_ENV/.project
 
 cd tests
-pytest -v
+python -m pytest -v