diff --git a/Doc/UserManual/Installation.tex b/Doc/UserManual/Installation.tex index 256ce748f80987a3d7c5a4ec5c239479e91694a6..764b144eb72a813bc9b28dbeb1d92f2ac442d41d 100644 --- a/Doc/UserManual/Installation.tex +++ b/Doc/UserManual/Installation.tex @@ -1,7 +1,7 @@ \newpage -\section{Installation} \SecLabel{InstallationProcedure} +\section{Installation} \SecLabel{Installation} -This section describes how to build and install \BornAgain\ libraries from source. +This section describes how to build and install \BornAgain\ libraries from the source. At the moment we support building on x86/x86\_64 Linux and Mac OS X operating systems. Support for Windows systems is planned in next releases. %In the later releases we are planing to include support for Windows systems and provide @@ -10,9 +10,9 @@ There are three major steps to building \BornAgain\ : \begin{enumerate}[1.] \item Acquire required third-party libraries. \item Get \BornAgain\ source code. -\item Invoke cmake to build and install software. +\item Use \Code{cmake} to build and install software. \end{enumerate} -The remainder of this section explains each step in details. +The remainder of this section explains each step in detail. \subsection{Third-party software.} To successfully build \BornAgain\ a number of prerequisite packages must be installed. @@ -29,14 +29,14 @@ To successfully build \BornAgain\ a number of prerequisite packages must be inst Other packages are optional \begin{itemize} -\item ROOT framework (adds bunch of additional fitting algorithms to \BornAgain) +\item ROOT framework (adds several additional fitting algorithms to \BornAgain) \item python-matplotlib (allows to run usage examples with graphics) %\item Eigen3 library ($\geq 3.1.0$) \end{itemize} -All required packages can be easily installed on most Linux distributions using system's package -manager. Below we give few examples for several selected operation systems. Please note, -that other distributions (Fedora, Mint, etc) may have different commands for invoking the package manager and slightly different names of packages (like ``boost'' instead of ``libboost'' etc). Besides that, installation should be very similar. +All required packages can be easily installed on most Linux distributions using the system's package +manager. Below we give a few examples for several selected operation systems. Please note, +that other distributions (Fedora, Mint, etc) may have different commands for invoking the package manager and slightly different names of packages (like ``boost'' instead of ``libboost'' etc). Besides that, the installation should be very similar. \vspace*{3mm} % --------------- @@ -50,7 +50,7 @@ sudo zypper ar http://download.opensuse.org/repositories/science/openSUSE_12.3 s \end{lstlisting} \noindent -Installing obligatory packages +Installing required packages \begin{lstlisting}[language=shell, style=commandline] sudo zypper install git-core cmake gsl-devel boost-devel fftw3-devel python-devel python-numpy-devel \end{lstlisting} @@ -68,9 +68,9 @@ sudo zypper install libroot-* root-plugin-* root-system-* root-ttf libeigen3-dev % --------------- \noindent {\large\bf Ubuntu 13.04} \newline -Installing obligatory packages +Installing required packages \begin{lstlisting}[language=shell, style=commandline] -sudo apt-get install git cmake libgsl0-dev libboost-all-dev libfftw3-dev python-devel python-numpy +sudo apt-get install git cmake libgsl0-dev libboost-all-dev libfftw3-dev python-dev python-numpy \end{lstlisting} \noindent @@ -87,13 +87,13 @@ sudo apt-get install libroot-* root-plugin-* root-system-* ttf-root-installer li \noindent \noindent {\large\bf Mac OS X 10.8} \newline -To simplify installation of third party open-source software on a Mac OS X system we recommend the use of \Code{MacPorts} package manager. +To simplify the installation of third party open-source software on a Mac OS X system we recommend the use of \Code{MacPorts} package manager. The easiest way to install MacPorts is by downloading the \Code{dmg} from \url{www.macports.org/install.php} and running the system's installer. -After installation new command ``\Code{port}'' will be available in terminal window of your Mac. \ +After the installation new command ``\Code{port}'' will be available in terminal window of your Mac. \ \noindent -Installing obligatory packages +Installing required packages \begin{lstlisting}[language=shell, style=commandline] sudo port -v selfupdate sudo port install git-core cmake @@ -132,17 +132,18 @@ git clone git://apps.jcns.fz-juelich.de/BornAgain.git \noindent {\bf\large More about Git} \\ Our Git repository holds two main branches called ``master'' and ``develop''. We consider ``master'' -branch to be the main branch where the source code of HEAD always reflect latest stable release. Git clone command shown above +branch to be the main branch where the source code of HEAD always reflects latest stable release. \Code{git clone} command shown above \begin{enumerate}[1.] -\item Gives you source code snapshot corresponding to the latest stable release -\item Automatically sets up your local master branch to track our remote master branch, -so you will be able to fetch changes from remote branch at any time using ``git pull'' command. +\item gives you a source code snapshot corresponding to the latest stable release, +\item automatically sets up your local master branch to track our remote master branch, +so you will be able to fetch changes from the remote branch at any time using ``git pull'' command. \end{enumerate} -Master branch is updating approximately once per month, that reflects our release cycle. -The second main branch, ``develop'' branch, is a snapshot of current development. +Master branch is updating approximately once per month. +% that reflects our release cycle. +The second branch, ``develop'' branch, is a snapshot of the current development. This is where any automatic nightly builds are built from. The develop branch is -expected always to work, so to get the most recent features one can switch source tree to it by +always expected to work, so to get the most recent features one can switch source code to it by \begin{lstlisting}[language=bash, style=commandline] cd BornAgain git checkout develop @@ -169,18 +170,19 @@ Here \Code{<source\_dir>} is the name of directory, where \BornAgain\ source cod copied, \Code{<install\_dir>} is the directory, where user wants the package to be installed, and \Code{<build\_dir>} is the directory where building will occur. -\MakeRemark{About CMake}{ -\\ Having dedicated directory \Code{<build\_dir>} for build process -is recommended by CMake. That allows several builds with different compilers/options from the same source and keeps source directory clean from build remnants. +\MakeRemark{About \Code{CMake}}{ +\\Having dedicated directory \Code{<build\_dir>} for build process +is recommended by \Code{CMake}. That allows several builds with different compilers/options from the same source and keeps source directory clean from build remnants. \\ } -Compilation process invoked by the command ``make'' lasts about 10 min for average laptop -of 2012 edition. On multi-core machines the compilation can be speed up by invoking command -make with the parameter ``make -j[N]'', where N is the number of cores. + +Compilation process invoked by the command ``make'' lasts about 10 min for an average laptop +of 2012 edition. On multi-core machines the compilation time can be decreased by invoking command +``make'' with the parameter ``make -j[N]'', where N is the number of cores. Running functional tests is an optional but recommended step. Command ``make check'' -will compile several additional tests and run them one by one. Every tests contains -simulation of typical GISAS geometry and comparison of simulation results with reference files on numerical level. Having 100\% tests passed ensures that your local installation +will compile several additional tests and run them one by one. Every test contains +the simulation of a typical GISAS geometry and the comparison on numerical level of simulation results with reference files. Having 100\% tests passed ensures that your local installation is correct. \begin{lstlisting}[language=bash, style=commandline] make check @@ -193,14 +195,32 @@ Total Test time (real) = 89.19 sec The last command ``make install'' copies compiled libraries and some usage examples -into installation directory. +into the installation directory. \begin{lstlisting}[language=bash, style=commandline] make install \end{lstlisting} -\vspace*{3mm} -\subsection{What is the next?} +\subsubsection{Troubleshooting} + +In the case of complex system setup, with variety of libraries of different versions +scattered across multiple places (\Code{/opt/local}, \Code{/usr} etc.), +you may want to help \Code{CMake} to find libraries in proper place. +In example below +two system variables are defined to force \Code{CMake} to prefer libraries +found in \Code{/opt/local} to other places. +\begin{lstlisting}[language=bash, style=commandline] +export CMAKE_LIBRARY_PATH=/opt/local/lib:$CMAKE_LIBRARY_PATH +export CMAKE_INCLUDE_PATH=/opt/local/include:$CMAKE_INCLUDE_PATH +\end{lstlisting} + + +If compilation fails for some reason, please submit your bug report including compilation errors +at \url{http://apps.jcns.fz-juelich.de/redmine/projects/bornagain/issues} + + + +\subsection{What is next?} In your installation directory you will find \begin{lstlisting}[language=bash, style=commandline] @@ -209,7 +229,7 @@ In your installation directory you will find ./Examples - directory with examples \end{lstlisting} -Run your first example and enjoy your first BornAgain simulation plot. +Run your first example and enjoy first BornAgain simulation plot. \begin{lstlisting}[language=bash, style=commandline] cd <install_dir>/Examples/python/ex001_CylindersAndPrisms python CylindersAndPrisms.py diff --git a/Doc/UserManual/Introduction.tex b/Doc/UserManual/Introduction.tex index 0835483465fb4b1e8dded67aa6f72995e0abdbea..6b28962f14312f05583569e72aa783c824bbd91a 100644 --- a/Doc/UserManual/Introduction.tex +++ b/Doc/UserManual/Introduction.tex @@ -1,31 +1,50 @@ \newpage -\chapter{Introduction} +\chapter*{Introduction} -\BornAgain\ is a software to simulate and fit neutron and X-ray -scattering at grazing incidence. It is a multi–platform open–source project that aims at supporting scientists in the analysis and fitting -of their GISAS data, both for synchrotron (GISAXS) and neutron (GISANS) facilities. The name of the software, -\BornAgain\, indicates the central role of the distorted-wave Born +%\BornAgain\ is a software to simulate and fit neutron and X-ray +%scattering at grazing incidence. It is a multi–platform open–source project that aims at %supporting scientists in the analysis and fitting +%of their GISAS data, both for synchrotron (GISAXS) and neutron (GISANS) facilities. + +\BornAgain\ is a software to simulate and fit small-angle +scattering at grazing incidence (GISAS). +It support analysis both X-ray (GISAXS) and neutron (GISANS) data. +The name of the software, +\BornAgain , indicates the central role of the distorted-wave Born approximation (DWBA) in the physical description of the scattering process. The software provides a generic framework for modeling multilayer samples with smooth or -rough interfaces and with various types of embedded nanoparticles. In this way, it reproduces and enhances the +rough interfaces and with various types of embedded nano\-particles. In this way, it reproduces and enhances the functionality of the present reference software, \IsGISAXS\ by R. Lazzari \cite{Lazzari:vi0158}, and lays a solid base for future extensions in response to specific user needs. To meet the growing demand for GISAS simulation of more -complex structured materials, BornAgain has extended the IsGISAXS program’s functionality by removing the +complex structured materials, \BornAgain\ has extended the \IsGISAXS\ program’s functionality by removing the restrictions on the number of layers and particles, by providing diffuse reflection from rough layer interfaces and by adding particles with inner structure. +\BornAgain\ is platform independent software, with active support for Linux, MacOS and +Microsoft Windows (planned for October, 2013). +It is free and open source software provided under terms +of GNU General Public License (GPL). The authors will be grateful for all kind of +feedback: criticism, praise, bug reports, feature requests , contributed modules. +When \BornAgain\ is used in preparing scientific papers, +please cite this manual as follows: +\begin{center} +C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke, \newline +BornAgain - simulating and fitting X-ray and neutron small angle scattering at grazing incidence, \newline +http://apps.jcns.fz-juelich.de/BornAgain +\end{center} + %For details about the theory (DWBA,\ldots), please refer to IsGISAXS manual \cite{IsGISAXSManual}. -The user guide starts with a brief description of steps necessary for compiling and running -the simulation, \SecRef{QuickStart}. More detailed overview of software architecture and -installation procedure is given in \SecRef{installation}. +This user guide starts with a brief description of the steps necessary for compiling +the source code and running +the simulation in \SecRef{QuickStart}. More detailed overview of software architecture and +installation procedure are given in \SecRef{SoftwareArchitecture} and \SecRef{Installation}. General methodology of simulation with \BornAgain\ and detailed usage examples are given in \SecRef{Examples}. -Fitting tools provided by the frame work are presented in \SecRef{Fitting}. +Fitting tools provided by the framework are presented in \SecRef{Fitting}. \vspace*{2mm} \colorbox{Lightgray}{\parbox{0.95\linewidth} diff --git a/Doc/UserManual/QuickStart.tex b/Doc/UserManual/QuickStart.tex index a3d0d45d98e65fdf2d9b688fad870e1f2546f5d5..dbef0ed58b1343136336653d0549245bbb13737b 100644 --- a/Doc/UserManual/QuickStart.tex +++ b/Doc/UserManual/QuickStart.tex @@ -1,9 +1,10 @@ \newpage +\chapter{Installation} \section{Quick start} \SecLabel{QuickStart} -This section shortly describes how to build \BornAgain\ from source and run first +This section shortly describes how to build \BornAgain\ from source and run the first simulation. More details about software architecture and installation -procedure are given in \SecRef{SoftwareArchitecture} and \SecRef{InstallationProcedure}. \\ +procedure are given in \SecRef{SoftwareArchitecture} and \SecRef{Installation}. \\ \noindent {\bf Step I: $~$ installing third party software} diff --git a/Doc/UserManual/SoftwareArchitecture.tex b/Doc/UserManual/SoftwareArchitecture.tex index 5ca97464d01d5f7a2169ad519c177871cb08ba04..c58f269d36d15806b47f9fc08ca797e6b8beab5f 100644 --- a/Doc/UserManual/SoftwareArchitecture.tex +++ b/Doc/UserManual/SoftwareArchitecture.tex @@ -6,7 +6,7 @@ \resizebox{0.9\textwidth}{!}{% \includegraphics{Figures/basic_architecture.eps}} \caption{ -Left: +Structure of \BornAgain\ libraries. } \label{fig:two_ratios} \end{figure} diff --git a/Doc/UserManual/UserManual.pdf b/Doc/UserManual/UserManual.pdf index 687115dafc8a2ab2fab10abd1df8aac576a24dcf..8a5dffcab9a99b0aaa2e5f305762c7db93116d65 100644 Binary files a/Doc/UserManual/UserManual.pdf and b/Doc/UserManual/UserManual.pdf differ diff --git a/Doc/UserManual/UserManual.tex b/Doc/UserManual/UserManual.tex index ba7dcff34f5a3fe4f89eefb8f90fcac98391d3e5..aa5243b7412e05e5348206682f4df38332869ec5 100644 --- a/Doc/UserManual/UserManual.tex +++ b/Doc/UserManual/UserManual.tex @@ -120,23 +120,37 @@ % TITLE PAGE %---------------------------------------------------------------------------------------- \title{ -BornAgain - simulating and fitting X-ray and neutron scattering at grazing incidence. \\ +BornAgain - simulating and fitting X-ray and neutron small angle scattering at grazing incidence. \\ \vspace*{10mm} User Guide \\ \large{ version 0.1} +\vspace*{5mm} } -\author{Scientific Computing Group at FRM-II} - -\usepackage{eso-pic} -\newcommand\BackgroundPic{% -\put(0,0){% -\parbox[b][\paperheight]{\paperwidth}{% -\vfill -\centering -\includegraphics[width=\paperwidth,height=\paperheight,% -keepaspectratio]{results2_2.png}% -\vfill -}}} +\author{ +{\large C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke }\\ +Scientific Computing Group at MLZ \\ +\vspace*{50mm} +} + + +\date{ +License: Creative Common CC-BY-SA \\ +\today +} + + + +%\usepackage{eso-pic} +%\newcommand\BackgroundPic{% +%\put(0,0){% +%\parbox[b][\paperheight]{\paperwidth}{% +%\vfill +%\centering +%\includegraphics[width=\paperwidth,height=\paperheight,% +%keepaspectratio]{results2_2.png}% +%\vfill +%}}} + %---------------------------------------------------------------------------------------- diff --git a/Tests/FunctionalTests/CMakeLists.txt b/Tests/FunctionalTests/CMakeLists.txt index eac7e39a2871e78c0712d6f72227ee9384acd6b2..636a957d99b6c5a6d83ae0c292b7f6a48e832064 100644 --- a/Tests/FunctionalTests/CMakeLists.txt +++ b/Tests/FunctionalTests/CMakeLists.txt @@ -3,7 +3,11 @@ ############################################################################ enable_testing() + +include(CTestCustom) + add_custom_target(check ${CMAKE_CTEST_COMMAND}) +#add_custom_target(check ${CMAKE_CTEST_COMMAND} -D Experimental) #add_custom_target(check ${CMAKE_CTEST_COMMAND} -V) # export CTEST_OUTPUT_ON_FAILURE=ON will give some output on failure diff --git a/Tests/FunctionalTests/TestCore/CMakeLists.txt b/Tests/FunctionalTests/TestCore/CMakeLists.txt index 3f29dbfca5d297cb5ae923f882f4828d35de9230..5452617a10d15830cfb82815411fc8d17d5d9807 100644 --- a/Tests/FunctionalTests/TestCore/CMakeLists.txt +++ b/Tests/FunctionalTests/TestCore/CMakeLists.txt @@ -16,7 +16,7 @@ set(list_of_tests "IsGISAXS10" "IsGISAXS11" "IsGISAXS15" - "MesoCrystal1" +# "MesoCrystal1" ) foreach(_test ${list_of_tests}) diff --git a/Tests/FunctionalTests/TestPyCore/CMakeLists.txt b/Tests/FunctionalTests/TestPyCore/CMakeLists.txt index 7a20a444ec7d113a000e59ed4e38236ee0f3077e..b977334b8ec843f58e2b4504f5ef1dd2c56c5d9c 100644 --- a/Tests/FunctionalTests/TestPyCore/CMakeLists.txt +++ b/Tests/FunctionalTests/TestPyCore/CMakeLists.txt @@ -14,7 +14,7 @@ set(list_of_tests "isgisaxs10.py" "isgisaxs11.py" "isgisaxs15.py" - "mesocrystal1.py" +# "mesocrystal1.py" ) foreach(_test ${list_of_tests}) diff --git a/Tests/UnitTests/TestCore/LayerTest.h b/Tests/UnitTests/TestCore/LayerTest.h index 038668fb304311c372d9490659d9ec9a7c1f72ae..af5d5004bf75082bef031835c08638d873b18a90 100644 --- a/Tests/UnitTests/TestCore/LayerTest.h +++ b/Tests/UnitTests/TestCore/LayerTest.h @@ -104,8 +104,7 @@ TEST_F(LayerTest, LayerAndDecoration) EXPECT_EQ("NONAME", layer.getDecoration()->getName()); EXPECT_EQ(NULL, layer.createDiffuseDWBASimulation()); - -} + } #endif // LAYERTEST_H diff --git a/cmake/modules/CTestCustom.cmake b/cmake/modules/CTestCustom.cmake new file mode 100644 index 0000000000000000000000000000000000000000..72f35cfcdf79b88758f9dbc0a8141b99d5c78573 --- /dev/null +++ b/cmake/modules/CTestCustom.cmake @@ -0,0 +1 @@ +# settings for CTest