aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjthorn <jthorn@b1d164ef-f17a-46e7-89d4-021c7118ef4e>2004-11-21 12:55:34 +0000
committerjthorn <jthorn@b1d164ef-f17a-46e7-89d4-021c7118ef4e>2004-11-21 12:55:34 +0000
commit28c6a381fde4da9bef6afe81f131a6b1962f3e9b (patch)
tree82523db34dfb03fe79e305ca219e252eafa9f12d
parent4c8807e22858460f8cb5a19bfe92b74dd1de5aa2 (diff)
document the need for Fortran code which uses macros which (directly
or indirectoy) take derivatives, to #include "ADM_Spacing_declare.h" and "ADM_Spacing.h", and update the Fortran example to show this git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinBase/ADMMacros/trunk@86 b1d164ef-f17a-46e7-89d4-021c7118ef4e
-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).