From 471d9eeedb400b65aef28bfd5564b17bca36c2d5 Mon Sep 17 00:00:00 2001 From: jthorn Date: Wed, 12 May 2004 15:39:04 +0000 Subject: * 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 --- src/gr/expansion.cc | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'src/gr/expansion.cc') 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; } } } -- cgit v1.2.3