diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-04-17 14:34:17 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-04-17 14:34:17 +0000 |
commit | 75f350debabff79ffe0d804ce3ca23140fb8e2ea (patch) | |
tree | df672bfdb9118121c6530ebe779c2ed888b073ea /src | |
parent | a3facde932b8aec7d3cc60ff5162dbb4e08c8148 (diff) |
maple script to compute 1st and 2nd derivs of (mu,nu,phi) wrt (x,y,z)
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@528 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src')
-rw-r--r-- | src/patch/coord_derivs.maple | 43 | ||||
-rw-r--r-- | src/patch/coord_derivs.out | 158 | ||||
-rw-r--r-- | src/patch/makefile | 8 |
3 files changed, 207 insertions, 2 deletions
diff --git a/src/patch/coord_derivs.maple b/src/patch/coord_derivs.maple new file mode 100644 index 0000000..154eb20 --- /dev/null +++ b/src/patch/coord_derivs.maple @@ -0,0 +1,43 @@ +# coord_derivs.maple -- compute derivatives of (mu,nu,phi) wrt (x,y,z) +# $Id$ + +mu := arctan(y/z); +nu := arctan(x/z); +phi := arctan(y/x); + +######################################## + +simplify(diff(mu,x)); +simplify(diff(mu,y)); +simplify(diff(mu,z)); + +simplify(diff(nu,x)); +simplify(diff(nu,y)); +simplify(diff(nu,z)); + +simplify(diff(phi,x)); +simplify(diff(phi,y)); +simplify(diff(phi,z)); + +######################################## + +simplify(diff(mu,x,x)); +simplify(diff(mu,x,y)); +simplify(diff(mu,x,z)); +simplify(diff(mu,y,y)); +simplify(diff(mu,y,z)); +simplify(diff(mu,z,z)); + +simplify(diff(nu,x,x)); +simplify(diff(nu,x,y)); +simplify(diff(nu,x,z)); +simplify(diff(nu,y,y)); +simplify(diff(nu,y,z)); +simplify(diff(nu,z,z)); + +simplify(diff(phi,x,x)); +simplify(diff(phi,x,y)); +simplify(diff(phi,x,z)); +simplify(diff(phi,y,y)); +simplify(diff(phi,y,z)); +simplify(diff(phi,z,z)); diff --git a/src/patch/coord_derivs.out b/src/patch/coord_derivs.out new file mode 100644 index 0000000..9491df8 --- /dev/null +++ b/src/patch/coord_derivs.out @@ -0,0 +1,158 @@ + |\^/| Maple 7 (IBM INTEL LINUX) +._|\| |/|_. Copyright (c) 2001 by Waterloo Maple Inc. + \ MAPLE / All rights reserved. Maple is a registered trademark of + <____ ____> Waterloo Maple Inc. + | Type ? for help. +# coord_derivs.maple -- compute derivatives of (mu,nu,phi) wrt (x,y,z) +# $Id$ +> +> mu := arctan(y/z); + mu := arctan(y/z) + +> nu := arctan(x/z); + nu := arctan(x/z) + +> phi := arctan(y/x); + phi := arctan(y/x) + +> +######################################## +> +> simplify(diff(mu,x)); + 0 + +> simplify(diff(mu,y)); + z + ------- + 2 2 + z + y + +> simplify(diff(mu,z)); + y + - ------- + 2 2 + z + y + +> +> simplify(diff(nu,x)); + z + ------- + 2 2 + z + x + +> simplify(diff(nu,y)); + 0 + +> simplify(diff(nu,z)); + x + - ------- + 2 2 + z + x + +> +> simplify(diff(phi,x)); + y + - ------- + 2 2 + x + y + +> simplify(diff(phi,y)); + x + ------- + 2 2 + x + y + +> simplify(diff(phi,z)); + 0 + +> +######################################## +> +> simplify(diff(mu,x,x)); + 0 + +> simplify(diff(mu,x,y)); + 0 + +> simplify(diff(mu,x,z)); + 0 + +> simplify(diff(mu,y,y)); + z y + -2 ---------- + 2 2 2 + (z + y ) + +> simplify(diff(mu,y,z)); + 2 2 + -z + y + ---------- + 2 2 2 + (z + y ) + +> simplify(diff(mu,z,z)); + z y + 2 ---------- + 2 2 2 + (z + y ) + +> +> simplify(diff(nu,x,x)); + z x + -2 ---------- + 2 2 2 + (z + x ) + +> simplify(diff(nu,x,y)); + 0 + +> simplify(diff(nu,x,z)); + 2 2 + z - x + - ---------- + 2 2 2 + (z + x ) + +> simplify(diff(nu,y,y)); + 0 + +> simplify(diff(nu,y,z)); + 0 + +> simplify(diff(nu,z,z)); + z x + 2 ---------- + 2 2 2 + (z + x ) + +> +> simplify(diff(phi,x,x)); + y x + 2 ---------- + 2 2 2 + (x + y ) + +> simplify(diff(phi,x,y)); + 2 2 + -x + y + ---------- + 2 2 2 + (x + y ) + +> simplify(diff(phi,x,z)); + 0 + +> simplify(diff(phi,y,y)); + y x + -2 ---------- + 2 2 2 + (x + y ) + +> simplify(diff(phi,y,z)); + 0 + +> simplify(diff(phi,z,z)); + 0 + +> quit +bytes used=444120, alloc=458668, time=0.04 diff --git a/src/patch/makefile b/src/patch/makefile index 0b0964f..24734db 100644 --- a/src/patch/makefile +++ b/src/patch/makefile @@ -1,5 +1,5 @@ # Makefile for standalone test drivers in this directory -# $Id: makefile,v 1.2 2002-04-13 12:50:30 jthorn Exp $ +# $Id: makefile,v 1.3 2002-04-17 14:34:16 jthorn Exp $ # # CC, CXX = C and C++ compilers. Defaults are gcc and g++ if # variables aren't set from command line or environment. @@ -27,7 +27,11 @@ JTUTIL_OBJ := $(filter-out ../jtutil/test%, $(wildcard ../jtutil/*.o)) ################################################################################ -test : test_coords test_coords2 +test : test_coords test_coords2 test_coords : test_coords.o coords.o $(JTUTIL_OBJ) -lm test_coords2 : test_coords2.o coords.o $(JTUTIL_OBJ) -lm + +.PHONY : coord.derivs +coord.derivs : + maple <coord_derivs.maple >coord_derivs.out |