diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2001-09-17 16:25:21 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2001-09-17 16:25:21 +0000 |
commit | 1acdb1f385a645e30f13978d0ef6aa75831656a3 (patch) | |
tree | 3f7f6ee5d42a134ed75999c5dea6ac3555b3aa57 /src/maple | |
parent | 537b41919f7b3da98302cae47eac3b8d8dc0ac0e (diff) |
drop old x_rrs[] coordinate vector in favor of new y[] vector
also redo Kronecker delta so it's not restricted to only a single
coordinate system, i.e. now it's a Maple procedure rather than a
gridfn (= Maple table).
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@353 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/maple')
-rw-r--r-- | src/maple/coords.maple | 37 | ||||
-rw-r--r-- | src/maple/coords.minc | 6 | ||||
-rw-r--r-- | src/maple/setup.maple | 2 |
3 files changed, 26 insertions, 19 deletions
diff --git a/src/maple/coords.maple b/src/maple/coords.maple index 24404bf..78afb3e 100644 --- a/src/maple/coords.maple +++ b/src/maple/coords.maple @@ -2,14 +2,29 @@ # $Id$ # +# setup_delta - set up the Kronecker delta # setup_coords - set up coordinates # ############################################################################### # +# This function sets up the Kronecker delta. +# +delta := +proc(i::algebraic, j::algebraic) +if (type(i,integer) and type(j,integer)) + then return `if`(i = j, 1, 0); +fi; + +# unevaluated return if we don't have integer arguments +return 'delta'(i,j); +end proc; + +############################################################################### + +# # This function sets up the coordinates. -# It also sets up the Kronecker delta # setup_coords := proc() @@ -20,12 +35,6 @@ N := 3; # number of spatial coordinates, # i.e. spatial coordinate indices # are 1..N N_ang := 2; # number of angular spatial coordinates -A_min := 2; # min angular-spatial-coordinate - # spatial coordinate index, - # i.e. angular spatial coordinate - # indices are A_min..N - -delta := array(1..N, 1..N, identity); # Kronecker delta # (x,y,z) coordinates x_xyz := array(1..N); @@ -34,16 +43,14 @@ x_xyz[2] := yy; x_xyz[3] := zz; x_xyz_list := map(op, [entries(x_xyz)]); -# (r,rho,sigma) coordinates -# we hard-wire that r is the first coordinate and remaining ones are angular -x_rrs := array(1..N); -x_rrs[1] := r; -x_rrs[2] := rho; -x_rrs[3] := sigma; -x_rrs_list := map(op, [entries(x_rrs)]); +# (rho,sigma) coordinates +y_rs := array(1..N_ang); +y_rs[1] := rho; +y_rs[2] := sigma; +x_rrs_list := map(op, [entries(y_rs)]); # list of all coordinates (for sorting things into "nice" order) -x_all_list := [op(x_xyz_list), op(x_rrs_list)]; +x_all_list := [op(x_xyz_list), op(y_rs_list)]; NULL; end proc; diff --git a/src/maple/coords.minc b/src/maple/coords.minc index 6ab0c9d..f6225a0 100644 --- a/src/maple/coords.minc +++ b/src/maple/coords.minc @@ -4,11 +4,11 @@ # coordinates N, # number of spatial coordinates N_ang, # number of angular spatial coordinates -A_min, # min angular-spatial-coordinate coordinate index delta, # Kronecker delta x_xyz, x_xyz_list, # array and list of (xx,yy,zz) coordinates -x_rrs, x_rrs_list, # array and list of (r,rho,sigma) coordinates -r, rho, sigma, # individual patch coordinates +y_rs, y_rs_list, # array and list of (rho,sigma) coordinates +rho, sigma, # individual patch coordinates +mu, nu, phi, # angular coordinates xx, yy, zz, # Cartesian coordinates x_all_list # list of all coordinates # no comma diff --git a/src/maple/setup.maple b/src/maple/setup.maple index ef5b7a3..f686c77 100644 --- a/src/maple/setup.maple +++ b/src/maple/setup.maple @@ -10,7 +10,7 @@ # # Note paths are evaluated relative to where read command gets executed, # not relative to this directory, so we use ../maple/ to try and avoid -# ambiguities... +# ambiguities in case this file gets read from another directory. # read "../maple/util.mm"; |