aboutsummaryrefslogtreecommitdiff
path: root/src/gr
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2004-05-12 15:39:04 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2004-05-12 15:39:04 +0000
commit471d9eeedb400b65aef28bfd5564b17bca36c2d5 (patch)
tree5a17d3aa181532400e2436265b7198421facf07f /src/gr
parentccdf852dce09dff8e63df5bfbb70c58d1c5e34f5 (diff)
* add interface to Erik's SphericalSurface thorn
==> With this commit, AHFinderDirect now inherits from AEIThorns/SphericalSurface, so you must have that thorn in your configuration to be able to compile. * add computation of surface quadrupole moments and areal radius * expand BH_diagnostics file format to accomodate quadrupole moments and areal radius, and also to include not-implemented-yet columns for 9 more diagnostics which Erik has implemented in his branch * some other small cleanups git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@1329 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/gr')
-rw-r--r--src/gr/expansion.cc27
-rw-r--r--src/gr/gfns.hh7
2 files changed, 32 insertions, 2 deletions
diff --git a/src/gr/expansion.cc b/src/gr/expansion.cc
index e0b7ba8..4d7ae34 100644
--- a/src/gr/expansion.cc
+++ b/src/gr/expansion.cc
@@ -256,8 +256,17 @@ return expansion_success; // *** NORMAL RETURN ***
//******************************************************************************
//
-// This function sets up the global xyz positions of the grid points
-// in the gridfns global_[xyz]. These will be used by interplate_geometry().
+// This function sets up the xyz-position gridfns:
+// * global_[xyz] (used by interplate_geometry() )
+// * global_{xx,xy,xz,yy,yz,zz} (used by higher-level code to compute
+// quadrupole moments of horizons)
+//
+// Bugs:
+// * We initialize the global_{xx,xy,xz,yy,yz,zz} gridfns every time
+// this function is called, i.e. at each horizon-finding Newton
+// iteration, even though they're only needed at the end of the
+// horizon-finding process. In practice the extra cost is small,
+// though, so it's probably not worth fixing this...
//
namespace {
void setup_xyz_posns(patch_system& ps, bool print_msg_flag)
@@ -290,6 +299,20 @@ if (print_msg_flag)
p.gridfn(gfns::gfn__global_x, irho,isigma) = global_x;
p.gridfn(gfns::gfn__global_y, irho,isigma) = global_y;
p.gridfn(gfns::gfn__global_z, irho,isigma) = global_z;
+
+ const fp global_xx = global_x * global_x;
+ const fp global_xy = global_x * global_y;
+ const fp global_xz = global_x * global_z;
+ const fp global_yy = global_y * global_y;
+ const fp global_yz = global_y * global_z;
+ const fp global_zz = global_z * global_z;
+
+ p.gridfn(gfns::gfn__global_xx, irho,isigma) = global_xx;
+ p.gridfn(gfns::gfn__global_xy, irho,isigma) = global_xy;
+ p.gridfn(gfns::gfn__global_xz, irho,isigma) = global_xz;
+ p.gridfn(gfns::gfn__global_yy, irho,isigma) = global_yy;
+ p.gridfn(gfns::gfn__global_yz, irho,isigma) = global_yz;
+ p.gridfn(gfns::gfn__global_zz, irho,isigma) = global_zz;
}
}
}
diff --git a/src/gr/gfns.hh b/src/gr/gfns.hh
index d7a0afd..ee80c90 100644
--- a/src/gr/gfns.hh
+++ b/src/gr/gfns.hh
@@ -39,6 +39,13 @@ enum {
gfn__global_y, // no access macro
gfn__global_z, // no access macro
+ gfn__global_xx, // no access macro
+ gfn__global_xy, // no access macro
+ gfn__global_xz, // no access macro
+ gfn__global_yy, // no access macro
+ gfn__global_yz, // no access macro
+ gfn__global_zz, // no access macro
+
gfn__g_dd_11,
gfn__g_dd_12,
gfn__g_dd_13,