aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2004-03-01 11:06:58 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2004-03-01 11:06:58 +0000
commitacca3644a7c06329974540d43e237781b27abd87 (patch)
tree1cbc7f9d5758bc855791a2e48d46c28eb7537871 /src
parente0960f7ac453f9d34e937682ebe72306b6b33b75 (diff)
document standard variable names for various data structures
used throughout the code git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@1282 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src')
-rw-r--r--src/CODESTYLE37
1 files changed, 33 insertions, 4 deletions
diff --git a/src/CODESTYLE b/src/CODESTYLE
index d0233eb..9164011 100644
--- a/src/CODESTYLE
+++ b/src/CODESTYLE
@@ -1,6 +1,6 @@
AHFinderDirect Code Style
=========================
-$Header: /usr/local/svn/cvs-repositories/numrelcvs/AEIThorns/AHFinderDirect/src/CODESTYLE,v 1.6 2003-08-18 10:01:01 jthorn Exp $
+$Header: /usr/local/svn/cvs-repositories/numrelcvs/AEIThorns/AHFinderDirect/src/CODESTYLE,v 1.7 2004-03-01 11:06:58 jthorn Exp $
This file documents some general programming conventions used in this
thorn.
@@ -31,6 +31,38 @@ Only a few options are configured at compile-time; these use #defines
in src/include/config.h.
+Variable Names
+==============
+
+Most of the code uses the generic floating-point data type
+ typedef CCTK_REAL fp;
+
+The code uses a number of standard variable names, which reference
+data structures in the ./patch/ subdirectory:
+ patch_system& ps; // patch_system.{cc,hh}
+ patch& p; // patch.{cc,hh}, fd_grid.{cc,hh}, grid.{cc,hh}
+ int pn; // 0-origin patch number,
+ // cf. patch_system.{cc,hh}
+ ghost_zone& gz; // ghost_zone.{cc,hh}
+ interpatch_ghost_zone& ipgz; // ghost_zone.{cc,hh}
+ symmetry_ghost_zone& sgz; // ghost_zone.{cc,hh}
+ int gfn; // small-integer gridfn number, cf. grid.hh
+ // and the definitions in ../gr/gfns.hh
+ int iwr; // integer gridfn-array indices
+ // in the wr (radial) direction
+ int irho, isigma; // integer gridfn-array indices
+ // in the (rho,sigma) directions
+ int iperp, ipar; // integer gridfn-array indices in the
+ // (perpendicular,parallel) directions along a
+ // given min/max rho/sigma side of a patch,
+ // cf. patch_edge.{cc,hh}
+ bool want_min, want_rho; // Boolean flags to specify a single min/max
+ // rho/sigma side of a patch
+In the ./driver/ subdirectory, the code also uses
+ int hn; // horizon number
+ // (runs from 1 to N_horizons inclusive)
+
+
Code Layout/Indentation
========================
@@ -43,9 +75,6 @@ so I use
#define then /* empty */
with usage as shown below.
-A lot of the code uses the generic floating-point data type
- typedef CCTK_REAL fp;
-
Almost (but not quite) all the code fits into 80 columns.
The indentation style is a bit unusual, and is best described by the