From 072794c0e1c690d78fc76020ebfbded92298f797 Mon Sep 17 00:00:00 2001 From: eschnett Date: Thu, 23 Dec 2010 01:30:53 +0000 Subject: Add example for CCTK_VECTGFINDEX3D git-svn-id: http://svn.cactuscode.org/flesh/trunk@4657 17b73243-c579-4c4c-a9d2-2d5706c11dac --- doc/UsersGuide/ApplicationThorns.tex | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'doc/UsersGuide') diff --git a/doc/UsersGuide/ApplicationThorns.tex b/doc/UsersGuide/ApplicationThorns.tex index c526df49..f01b3307 100644 --- a/doc/UsersGuide/ApplicationThorns.tex +++ b/doc/UsersGuide/ApplicationThorns.tex @@ -1877,7 +1877,8 @@ for (k=0; kcctk_lsh[0]*((j)+cctkGH->cctk_lsh[1]*(k))) \end{verbatim} +% +Note: In Fortran, grid functions are accessed as Fortran arrays, +i.e.\ simply as \verb|rho(i,j,k)|. + +To access vector grid functions (vector grid functions are a +``vector'' of grid functions; see section +\ref{subsec:Appendix.interface-variables}), one also needs to specify +the vector index. This is best done via the 3D macro +\texttt{CCTK\_VECTGFINDEX3D}: +\begin{verbatim} +for (k=0; k