Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stokesian Dynamics #220

Merged
merged 65 commits into from Apr 17, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
a5c0555
Does not run, but compiles. integrate_sd can be called. Has not imple…
dschwoerer Mar 20, 2014
c03275e
should work, but is still slow
dschwoerer Apr 15, 2014
1918636
optimized the kernel generating the matrizes
dschwoerer Apr 15, 2014
743c9ce
changed to new solver (using magma)
dschwoerer Apr 16, 2014
be14030
new: * iterative solver * avoids double counting of R_2B^inf * and more
dschwoerer Apr 30, 2014
0f75658
works now without magma
dschwoerer May 5, 2014
9643091
new:
dschwoerer Apr 30, 2014
b9f2003
added nearfield force part for brownian motion
dschwoerer May 8, 2014
2567967
Merge commit 'b9f2003cb3c6ab56f68d52638ba458c951637478'
dschwoerer May 8, 2014
fe35c42
Merge branch 'master' of git://github.com/espressomd/espresso
dschwoerer May 9, 2014
48c90dd
worked on brownian motion
dschwoerer May 19, 2014
b62c514
added GMRes Iterative solver
dschwoerer Jun 4, 2014
becb3b0
Merge branch 'master' of git://github.com/espressomd/espresso
dschwoerer Jun 4, 2014
8b9f7b5
* preconditioner free matrix inversion is now done without matrix mat…
dschwoerer Jun 24, 2014
0b1dfea
Merge branch 'master' of git://github.com/espressomd/espresso
dschwoerer Jun 24, 2014
01797a0
Merge branch 'master' of https://github.com/dschwoerer/espresso
dschwoerer Jul 2, 2014
2b1af52
small changes
dschwoerer Jul 23, 2014
7a07e49
Merge branch 'master' of git://github.com/espressomd/espresso
dschwoerer Jul 23, 2014
0f91251
Merge branch 'master' of git://github.com/espressomd/espresso
dschwoerer Jul 25, 2014
b3d0b94
seems to work
dschwoerer Jul 25, 2014
babf68d
Merge branch 'master' of /home/dschwoerer/soft/espresso/espresso-main
dschwoerer Jul 25, 2014
d3d03b9
Merge branch 'master' of git://github.com/espressomd/espresso
dschwoerer Sep 19, 2014
35f4cfe
Merge branch 'master' of git://github.com/espressomd/espresso
dschwoerer Sep 19, 2014
0e364da
first try of an wavespace / realspace splitted aproach which should b…
dschwoerer Oct 6, 2014
0d030b9
Merge branch 'master' of git://github.com/espressomd/espresso
dschwoerer Oct 13, 2014
74384fe
* ewald summation is implemented
dschwoerer Oct 16, 2014
075aa92
added documentation of Stokesian Dynamics
dschwoerer Oct 16, 2014
7a65c19
fixed bugs in the ewald summation
dschwoerer Oct 29, 2014
529e2bc
Merge branch 'master' of git://github.com/espressomd/espresso
dschwoerer Oct 29, 2014
e7777d3
small changes
dschwoerer Nov 4, 2014
940d3c1
small fixes in the documentation
dschwoerer Nov 4, 2014
7dee3d2
Merge branch 'master' of https://github.com/dschwoerer/espresso
dschwoerer Nov 4, 2014
3ee9fae
set default viscisity
dschwoerer Nov 14, 2014
28815c7
Merge branch 'master' of /home/dschwoerer/soft/espresso/espresso-main
dschwoerer Nov 14, 2014
f30959e
added brownian dynamics
dschwoerer Nov 19, 2014
7df331b
Merge branch 'master' of /home/dschwoerer/soft/espresso/espresso-main
dschwoerer Nov 19, 2014
f23a966
removed warning
dschwoerer Nov 25, 2014
ac9f96e
added checkpointing for the correlator, including documentation and t…
dschwoerer Dec 10, 2014
e2123db
Merge branch 'master' of https://github.com/espressomd/espresso
dschwoerer Dec 10, 2014
2e8a09b
fixed warnings in correlator
dschwoerer Dec 10, 2014
4b8ec88
tiny fix in ug
dschwoerer Dec 19, 2014
a26b86c
speedup of sd ewald sum
dschwoerer Dec 19, 2014
5675a5d
Merge branch 'master' of /home/dschwoerer/soft/espresso/espresso-main
dschwoerer Dec 19, 2014
a9d07aa
Merge branch 'master' of https://github.com/espressomd/espresso
dschwoerer Jan 13, 2015
f97c3a4
added SD features to features.def
dschwoerer Jan 15, 2015
8423b4d
added higher modes in structure facture fast
dschwoerer Jan 15, 2015
2e70b2f
Fixes in SD and correlator checkpointing
dschwoerer Jan 15, 2015
3e7016f
fix in brownian near field force
dschwoerer Jan 15, 2015
0300ca8
Merge branch 'master' of hs:repos/espresso
dschwoerer Jan 18, 2015
84fd2ff
cleanup fixes
dschwoerer Feb 6, 2015
7728eae
Merge branch 'master' of https://github.com/espressomd/espresso
dschwoerer Feb 9, 2015
7ec5e9e
tiny fix
dschwoerer Feb 11, 2015
f5bf8f2
compile fix
dschwoerer Apr 10, 2015
3e24215
improved documentation
dschwoerer Apr 10, 2015
32c1b54
Added testcases for Stokesian Dynamics
dschwoerer Apr 14, 2015
af71437
Fixed testcase: Added check that PBC are compiled in
dschwoerer Apr 14, 2015
9ffd8e4
Merge branch 'master' of https://github.com/espressomd/espresso
dschwoerer Apr 14, 2015
a1ee606
Merge branch 'master' of /home/dschwoerer/soft/espresso/espresso-main
dschwoerer Apr 14, 2015
42e3b35
fix for GHMC
dschwoerer Apr 14, 2015
d8eaf92
fixed particle counting if virtual sites are enabled
dschwoerer Apr 14, 2015
77b36ee
fixed requirements for testcases
dschwoerer Apr 14, 2015
1c7495f
remove ADDITIONAL_CHECKS from integrate_sd.cpp
dschwoerer Apr 14, 2015
22eb46c
remove ADDITIONAL_CHECKS from integrate_sd.cpp
dschwoerer Apr 15, 2015
cb7e37e
removed duplicate of sanity checks
dschwoerer Apr 16, 2015
e3db64b
added documentation for arpack as requirement
dschwoerer Apr 16, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 27 additions & 0 deletions config/Espresso.m4
Expand Up @@ -74,3 +74,30 @@ AC_DEFUN([ES_ADDPATH_CHECK_HEADER],[
])



dnl search for a library in additional paths
AC_DEFUN([ES_ADDPATH_CHECK_LIB_2],[
AC_MSG_CHECKING([for lib$1])
es_save_LDFLAGS=$LDFLAGS
es_save_LIBS=$LIBS
es_adp_found=no
dnl let's see whether it's in the default paths
LIBS="-l$1 $es_save_LIBS"
AC_LINK_IFELSE([AC_LANG_CALL([],[$2])],[es_adp_found=yes],[])

if test .$es_adp_found = .no; then
for path in $5 /usr/lib64 /usr/local/lib64 /opt/lib64 /sw/lib /opt/local/lib /usr/lib /usr/local/lib /opt/lib; do
LDFLAGS="$es_save_LDFLAGS -L$path"
AC_LINK_IFELSE([AC_LANG_PROGRAMM([],[$2])],[es_adp_found=yes],[])
if test .$es_adp_found = .yes; then break; fi
done
fi
if test .$es_adp_found = .yes; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
LDFLAGS=$es_save_LDFLAGS
LIBS=$es_save_LIBS
fi
AS_IF([test .$es_adp_found = .yes], [$3],[$4])
])
116 changes: 116 additions & 0 deletions configure.ac
Expand Up @@ -268,6 +268,7 @@ AS_IF([test x$with_cuda != xno],[
# save current libs in case CUDA is not enabled at the end
save_LIBS=$LIBS
save_LDFLAGS=$LDFLAGS
save_CPPFLAGS=$CPPFLAGS

# NVCC
AC_PROG_CUDA
Expand Down Expand Up @@ -301,6 +302,37 @@ AS_IF([test x$with_cuda != xno],[
])
], [$cuda_path/lib $cuda_path/lib64])

ES_ADDPATH_CHECK_LIB(cublas, cublasDgemm_v2, [], [
cuda_ok=no

AS_IF([test x$with_cuda = xyes],[
AC_MSG_FAILURE([could not find cuda BLAS library (cublas), specify location using LDFLAGS])
],[
AC_MSG_WARN([could not find cuda BLAS library (cublas). Some features will not be available!])
])
], [$cuda_path/lib $cuda_path/lib64])

ES_ADDPATH_CHECK_HEADER([cublas_v2.h],, [
cuda_ok=no

AS_IF([test x$with_cuda = xyes],[
AC_MSG_FAILURE([could not find cuda BLAS header files (cublas_v2.h), specify location using CPPFLAGS])
],[
AC_MSG_WARN([could not find cuda BLAS header files (cublas_v2.h). Some features will not be available!])
])
], [$cuda_path/include])


ES_ADDPATH_CHECK_LIB(curand, curandCreateGenerator, [], [
cuda_ok=no

AS_IF([test x$with_cuda = xyes],[
AC_MSG_FAILURE([could not find cuda RAND library (curand), specify location using LDFLAGS])
],[
AC_MSG_WARN([could not find cuda RAND library (curand). Some features will not be available!])
])
], [$cuda_path/lib $cuda_path/lib64])

# NVCC compile check
AC_MSG_CHECKING([whether CUDA compiles])

Expand Down Expand Up @@ -379,11 +411,95 @@ AS_IF([test x$with_cuda != xno],[
# reset standard compiler options
LIBS=$save_LIBS
LDFLAGS=$save_LDFLAGS
CPPFLAGS=$save_CPPFLAGS
])
])

AM_CONDITIONAL(CUDA, [test x$cuda_ok == xyes])

## Checking for MAGMA
##################################
AS_IF([test x$with_magma = xguess || test x$with_magma = xyes || test x$with_magma = x],[
magma_path=/usr/local/magma
],[test x$with_magma != xno],[
magma_path=$with_magma
with_magma=yes
])

AC_MSG_CHECKING([whether to use MAGMA])
AC_ARG_WITH([magma],
AS_HELP_STRING([--with-magma],
[specify whether or not to use MAGMA [guess]]),
, with_magma=guess)
AC_MSG_RESULT($with_magma)

AS_IF([test x$with_magma = xno], [magma_found=no],
[ AC_SEARCH_LIBS(magma_init, [magma], [magma_found=yes], [magma_found=no])
AS_IF([test x$magma_found = xyes],
[ AC_CHECK_HEADER([magma.h],, [magma_found=no],[[#define HAVE_CUBLAS]])
AS_IF([test x$magma_found = xyes],
[ AC_SEARCH_LIBS([lsame_], [acml acml_mp],, [magma_found=no]
AC_MSG_WARN([MAGMA needs LAPACK. Currently only for the acml libary is searched - others have still to be added to configure.ac]) )])
])
])


AS_IF([test x$magma_found = xno],[
AS_IF([test x$with_magma = xyes],[
AC_MSG_FAILURE([MAGMA requested, but MAGMA was not found!])
],[ AS_IF([test x$with_magma = xguess], [
AC_MSG_WARN([MAGMA not found. Some features will not be available!])
])
])
])
AS_IF([test x$magma_found = xyes],[
AC_DEFINE(MAGMA,[],[Whether MAGMA is available])])
# end of check for MAGMA


## Checking for ARPACK
##################################
AS_IF([test x$with_arpack = xguess || test x$with_arpack = xyes || test x$with_arpack = x],[
arpack_path=/usr/local/arpack
],[test x$with_arpack != xno],[
arpack_path=$with_arpack
with_arpack=yes
])

AC_MSG_CHECKING([whether to use ARPACK])
AC_ARG_WITH([arpack],
AS_HELP_STRING([--with-arpack],
[specify whether or not to use ARPACK [guess]]),
, with_arpack=guess)
AC_MSG_RESULT($with_arpack)


ES_ADDPATH_CHECK_LIB(arpack, dnaupd_, [arpack_found=yes], [
arpack_found=no

AS_IF([test x$with_arpack = xyes],[
AC_MSG_FAILURE([could not find ARPACK library, specify location using LDFLAGS])
],[
AC_MSG_WARN([could not find ARPACK library. Some features will not be available!])
])
], [$arpack_path/.libs])



AS_IF([test x$arpack_found = xno],[
AS_IF([test x$with_arpack = xyes],[
AC_MSG_FAILURE([ARPACK requested, but ARPACK was not found!])
],[ AS_IF([test x$with_arpack = xguess], [
AC_MSG_WARN([ARPACK not found. Some features will not be available!])
])
])
])
AS_IF([test x$arpack_found = xyes],[
AC_DEFINE(ARPACK,[],[Whether ARPACK is available])])
# end of check for ARPACK



cat <<EOF
****************************************************************
* Checking for Python *
Expand Down
2 changes: 1 addition & 1 deletion doc/dg/dg.tex
Expand Up @@ -280,7 +280,7 @@ \subsection{General issues}
\item To see which parts of the User's guide need to be fixed or which
documentation is missing, there is a \verb!\todo!-command where one
can put notes about what remains to be done. In the release version,
the boxes are diabled so that they do not disturb the users. They
the boxes are disabled so that they do not disturb the users. They
can be turned on by commenting out the appropriate line in
\texttt{ug.tex}:
\begin{verbatim}
Expand Down
12 changes: 6 additions & 6 deletions doc/ug/analysis-core.tex
Expand Up @@ -445,7 +445,7 @@ \subsection{Creating a correlation}
Tensor product of $A$ and $B$, \ie $C_{i \cdot l_B + j} = A_i B_j$, with $l_B$ the length of $B$.
\item \lit{complex_conjugate_product}
\todo{Complex conjugate product must be defined.}
\item \lit{fcs_acf} \var{w_x}\var{w_y} \var{w_z} \\
\item \lit{fcs_acf} \var{w_x} \var{w_y} \var{w_z} \\
Fluorescence Correlation Spectroscopy (FCS) autocorrelation function, \ie
\begin{equation}
G_i(\tau) = \frac{1}{N} \Bigl< \exp \Bigl( - \frac{\Delta x_i^2(\tau) }{w_x^2} - \frac{\Delta y_i^2(\tau)}{w_y^2} - \frac{\Delta z_i^2(\tau)}{w_z^2} \Bigr) \Bigr>\,,
Expand All @@ -457,7 +457,7 @@ \subsection{Creating a correlation}
\begin{equation}
W(x,y,z) = I_0 \exp \Bigl( - \frac{2x^2}{w_x^2} - \frac{2y^2}{w_y^2} - \frac{2z^2}{w_z^2} \Bigr)\,.
\end{equation}
Equation~\ref{eq:Gtau} is a generalization of the formula presented by
Equation~\eqref{eq:Gtau} is a generalization of the formula presented by
H\"ofling \etal~\cite{hofling11a}. For more information, see references therein.
Per each 3 dimensions of the observable, one dimension of the correlation output
is produced. If \lit{fcs_acf} is used with other observables than
Expand All @@ -481,7 +481,7 @@ \subsection{Creating a correlation}
in tau. This is a parameter of the multiple tau correlator. If you
want to use it, make sure that you know how it works. By default, it
is set equal to \var{tau\_max} which results in the trivial linear
correlator. By setting \var{tau\_lin} < \var{tau\_max} the multiple
correlator. By setting \var{tau\_lin} $<$ \var{tau\_max} the multiple
tau correlator is switched on. In many cases, \var{tau\_lin}=16 is a
good choice but this may strongly depend on the observables you are
correlating. For more information, we recommend to read
Expand Down Expand Up @@ -549,7 +549,7 @@ \subsection{Collecting time series data for the correlation}
updated only when the lower level buffers are filled and
there is a need to push some values one level up. When the
updating is stopped, a number of observable values have not
reached the higher level, especially when \var{tau_max}
reached the higher level, especially when \var{tau\_max}
is comparable to the total simulation time
and if there are many compression levels. In such case,
variant \variant{3} is very useful. If \var{tau\_max}
Expand Down Expand Up @@ -620,9 +620,9 @@ \subsection{The correlation algorithm: multiple tau correlator}
\end{figure}

Let us consider a set of $N$ observable values as schematically shown
in Figures~\ref{fig:dataSet}, where a value of index $i$ was measured
in figure~\ref{fig:dataSet}, where a value of index $i$ was measured
in time $i\delta t$. We are interested in computing the correlation
function according to Equation~\ref{eq:CtauDef} for a range lag times
function according to equation~\eqref{eq:corr.def} for a range lag times
$\tau = (i-j)\delta t$ between the measurements $i$ and $j$.
To simplify the notation, we further drop $\delta t$
when referring to observables and lag times.
Expand Down
12 changes: 11 additions & 1 deletion doc/ug/features.tex
Expand Up @@ -27,7 +27,7 @@ \chapter{Features}
this will negatively effect \es's performance.

Features can be activated in the configuration header
\texttt{myconfig.h} (see section \vref{sec:myconfig}). Too activate
\texttt{myconfig.hpp} (see section \vref{sec:myconfig}). Too activate
\texttt{FEATURE}, add the following line to the header file:
\begin{verbatim}
#define FEATURE
Expand Down Expand Up @@ -145,6 +145,14 @@ \section{General features}
\item \newfeature{LB_ELECTROHYDRODYNAMICS} Enables the implicit
calculation of electro-hydrodynamics for charged particles and salt
ions in an electric field.
\item \newfeature{SD} enable Stokesian Dynamics.
\item \newfeature{SD_NOT_PERIODIC} disable periodic boundary conditions in
Stokesian Dynamics.
\item \newfeature{SD_USE_FLOAT} use float instead of double in Stokesian
Dynamics.
\item \newfeature{SD_FF_ONLY} disable nearfield of Stokesian Dynamics.
\item \newfeature{SD_DEBUG} enable debug Stokesian Dynamics.

\end{itemize}

\section{Interactions}
Expand Down Expand Up @@ -255,6 +263,8 @@ \section{Debug messages}
\item \newfeature{FORCE\_CORE} Causes \es{} to try to provoke a core dump
when exiting unexpectedly.
\item \newfeature{MPI\_CORE} Causes \es{} to try this even with MPI errors.
\item \newfeature{SD_DEBUG} Causes \es{} to check more things in the Stokesian
Dynamics code. If \var{warnings} is larger 1, SD prints more informations.
\end{itemize}

%%% Local Variables:
Expand Down
3 changes: 3 additions & 0 deletions doc/ug/installation.tex
Expand Up @@ -154,6 +154,9 @@ \subsection{Options and Variables}
i.e. everything with a Fermi chip or newer. Note that we require at
least compute model 1.1, that is G90. However, to use G90 (e.\,g.~Tesla
C1060), you need to manually specificy compute model 1.1.
\item[\texttt{--with-arpack=path} / \texttt{--without-arpack}] This switch
enables ARPACK support. \texttt{path} should be the path to the ARPACK
directory. ARPACK is currently only needed for Stokesian Dynamics support.
\item[\texttt{LDFLAGS=\textit{linker-flags}}] This variable can be
used to change the flags that the linker will get when linking the
\es binaries. This variable can be used to modify the path where
Expand Down
1 change: 1 addition & 0 deletions doc/ug/introduction.tex
Expand Up @@ -167,6 +167,7 @@ \section{Available simulation methods}
DPD & None & Good \\
Shan-Chen Multicomponent Fluid & Group & Group \\
Tunable Slip Boundary & Single & Single \\
Stokesian Dynamics & Single & Single \\
\multicolumn{3}{|c|}{\textbf{Analysis}} \\
uwerr & None & Good \\
\multicolumn{3}{|c|}{\textbf{Input/Output}} \\
Expand Down
6 changes: 3 additions & 3 deletions doc/ug/lb.tex
Expand Up @@ -130,9 +130,9 @@ \section{Setting up a LB fluid}
the lattice constant.

\begin{essyntax}
lbfluid save_ascii_checkpoint \var{filename}
lbfluid save_binary_checkpoint \var{filename}
lbfluid load_ascii_checkpoint \var{filename}
lbfluid save_ascii_checkpoint \var{filename}\\
lbfluid save_binary_checkpoint \var{filename}\\
lbfluid load_ascii_checkpoint \var{filename}\\
lbfluid load_binary_checkpoint \var{filename}
\end{essyntax}
The first two save commands save all of the LB fluid nodes' populations to \var{filename} in ascii or binary format respectively.
Expand Down
13 changes: 13 additions & 0 deletions doc/ug/otherrefs.bib
Expand Up @@ -111,6 +111,19 @@ @ARTICLE{ballenegger09a
url = {http://link.aip.org/link/?JCP/131/094107/1}
}

@article{beenakker86a,
author = {Beenakker, C. W. J.},
title = {Ewald sum of the Rotne--Prager tensor},
journal = {The Journal of Chemical Physics},
year = {1986},
volume = {85},
number = {3},
pages = {1581-1582},
file = {beenakker86a.pdf:beenakker86a.pdf:PDF},
url = {http://scitation.aip.org/content/aip/journal/jcp/85/3/10.1063/1.451199},
doi = {10.1063/1.451199}
}

@ARTICLE{berendsen84a,
author = {H. J. C. Berendsen and J. P. M. Postma and W. F. van Gunsteren and
A. DiNola and J. R. Haak},
Expand Down
1 change: 1 addition & 0 deletions doc/ug/part.tex
Expand Up @@ -356,6 +356,7 @@ \subsection{Getting particle properties}
\subsection{Deleting particles}
\label{tcl:part:delete}

\todo{What is the syntax of variant 3?}
\begin{essyntax}
\variant{1} part \var{pid} delete
\variant{2} part deleteall
Expand Down