aboutsummaryrefslogtreecommitdiff
path: root/doc/documentation.tex
diff options
context:
space:
mode:
Diffstat (limited to 'doc/documentation.tex')
-rw-r--r--doc/documentation.tex27
1 files changed, 24 insertions, 3 deletions
diff --git a/doc/documentation.tex b/doc/documentation.tex
index 620fba2..4ad3974 100644
--- a/doc/documentation.tex
+++ b/doc/documentation.tex
@@ -196,8 +196,21 @@ yourself, since they may be used in later (hidden) calculations.}
\subsection{Fortran}
If you are using the macros inside a Fortran function then the
-\texttt{i}, \texttt{j} and \texttt{k} indices are used directly. This is
-shown in the Fortran example below.
+\texttt{i}, \texttt{j} and \texttt{k} indices are used directly.
+
+If you're using (either directly or indirectly) any macro which computes
+derivatives, you also need to \texttt{\#include} two additional files:
+\begin{description}
+\item[\texttt{ADM\_Spacing\_declare.h}]\mbox{}\\
+ This must be \texttt{\#include}d \textbf{before} any of the
+ other \texttt{<MACRONAME>\_declare.h} files.
+\item[\texttt{ADM\_Spacing.h}]\mbox{}\\
+ This must be \texttt{\#include}d \textbf{after} all of the
+ other \texttt{<MACRONAME>\_declare.h} and \textbf{before}
+ any of the \texttt{<MACRONAME>\_guts.h} files.
+\end{description}
+
+The Fortran example below should make this clear(er).
\subsection{C}
@@ -216,7 +229,7 @@ relative to $(i,j,k)$. That is, you should define \texttt{di = 1},
Since these don't depend on \texttt{i}, \texttt{j} and \texttt{k},
they can be assigned values once outside the loop-over-grid-points loops.
-The C example below should make this clear.
+The C example below should make this clear(er).
Note that you should assign all these variables their values \textbf{before}
\texttt{\#include}ing the \texttt{<MACRONAME>\_guts.h} macro (it may do
@@ -235,6 +248,14 @@ the $trK$ macro to calculate the trace of the extrinsic curvature.
c Declarations for macros.
#include "CactusEinstein/ADMMacros/src/macro/TRK_declare.h"
+c we're not taking any derivatives here, but if we were,
+c we would also need the following line:
+#include "CactusEinstein/ADMMacros/src/macro/ADM_Spacing_declare.h"
+
+c we're not taking any derivatives here, but if we were,
+c we would also need the following line:
+#include "CactusEinstein/ADMMacros/src/macro/ADM_Spacing.h"
+
<CUT>
c Add the shift term: N = B^i D_i(trK).