diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-04-22 16:07:01 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-04-22 16:07:01 +0000 |
commit | 7a947ed3500193215524c29434fafad42690c7fd (patch) | |
tree | bce58e31fb1d8e2d212650044557d8c22fe89d4f /src/gr/setup_gr_gfas.maple | |
parent | 9ccad87ad118c36bec20447708348e7dd5c78fa1 (diff) |
renaming this file
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@580 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/gr/setup_gr_gfas.maple')
-rw-r--r-- | src/gr/setup_gr_gfas.maple | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/src/gr/setup_gr_gfas.maple b/src/gr/setup_gr_gfas.maple new file mode 100644 index 0000000..ede82ca --- /dev/null +++ b/src/gr/setup_gr_gfas.maple @@ -0,0 +1,96 @@ +# Maple code to set up all gridfn arrays +# $Id$ + +# +# setup_gr_gfas - setup all the GR gfas +# `Diff/gridfn2` - Diff() simplification based on gridfn properties known here +# + +################################################################################ + +setup_gr_gfas := +proc() +global + @include "../maple/coords.minc", + @include "../maple/gfa.minc", + @include "../gr/gr_gfas.minc"; + +# metric and extrinsic curvature +make_gfa('g_dd', {inert}, [1..N, 1..N], symmetric); +make_gfa('K_dd', {inert}, [1..N, 1..N], symmetric); + +# index-raised and contracted metric and extrinsic curvature +make_gfa('g_uu', {inert,fnd}, [1..N, 1..N], symmetric); +make_gfa('K_uu', {inert,fnd}, [1..N, 1..N], symmetric); +make_gfa('K', {inert, fnd}, [], none); + +# xyz partial derivatives of metric +# ... as far as Maple is concerned, these are indeed separate gridfns; +# the derivatives are actually taken by the interpolator +make_gfa('partial_d_g_dd', {inert}, [1..N, 1..N, 1..N], symmetric3_23); + +# xyz partial derivatives of metric determinant +make_gfa('partial_d_ln_sqrt_g', {inert,fnd}, [1..N], none); + +# xyz partial derivatives of inverse metric +# (computed in terms of xyz derivatives of g_dd) +make_gfa('partial_d_g_uu', {inert,fnd}, [1..N, 1..N, 1..N], symmetric3_23); + +# radius of horizon +make_gfa('h', {inert, fnd}, [], none); + +# outward-pointing *non*-unit normal (covector) to horizon +# and it's xyz-coordinate partial derivatives +make_gfa('s_d', {inert,fnd}, [1..N], none); +make_gfa('partial_d_s_d', {inert,fnd}, [1..N, 1..N], none); + +# LHS of apparent horizon equation +make_gfa('H', {inert, fnd}, [], none); + +# subexpressions for computing LHS of apparent horizon equation +# ... these are defined by (15) in my 1996 apparent horizon finding paper +make_gfa('HA', {inert, fnd}, [], none); +make_gfa('HB', {inert, fnd}, [], none); +make_gfa('HC', {inert, fnd}, [], none); +make_gfa('HD', {inert, fnd}, [], none); + +NULL; +end proc; + + +################################################################################ + +# +# This function implements further simplification rules for Diff() +# based on gridfn properties which are known here but not in ../maple/. +# +# It currently knows about the following simplifications: +# - Diff(g_dd[i,j], x_xyz[k]) --> partial_d_g_dd[k,i,j] +# +# Anything else is returned unchanged. (To avoid infinite recursion, +# such a return is *unevaluated*.) +# +# Arguments: +# operand = (in) The thing to be differentiated. +# var_seq = (in) (varargs) An expression sequence of the variables to +# differentiate with respect to. +# +`Diff/gridfn` := +proc(operand) # varargs +option remember; # performance optimization +global + @include "../maple/coords.minc", + @include "../maple/gfa.minc", + @include "../gr/gr_gfas.minc"; +local var_list, posn; + +var_list := [args[2..nargs]]; + +if ( type(operand, indexed) and (op(0,operand) = 'g_dd') + and (nops(var_list) = 1) and member(var_list[1],x_xyz_list,'posn') ) + then return partial_d_g_dd[posn, op(operand)]; +end if; + +# unevaluated return to avoid infinite recursion +return 'Diff'(operand, op(var_list)); +end proc; |