File: ctensor2.dem

package info (click to toggle)
maxima 5.47.0-9
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 193,104 kB
  • sloc: lisp: 434,678; fortran: 14,665; tcl: 10,990; sh: 4,577; makefile: 2,763; ansic: 447; java: 328; python: 262; perl: 201; xml: 60; awk: 28; sed: 15; javascript: 2
file content (43 lines) | stat: -rw-r--r-- 1,558 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be
 * useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.  See the GNU General Public License for more details.
 *
 * Differential geometry in CTENSOR
 */

if get('ctensor,'version)=false then load(ctensor);
("Prove that the Schwarzschild line element is of an empty metric")$
("The dimension of the manifold")$
dim:4;
("The coordinate labels")$
ct_coords:[x,y,z,t];
("Rational simplification of geometrical objects")$
(ratwtlvl:false,ratfac:true);
("Here is the Schwarzschild metric in standard coordinates:")$
lg:matrix([1/(1-2*m/x),0,0,0],[0,x^2,0,0],
          [0,0,x^2*sin(y)^2,0],[0,0,0,2*m/x-1]);
("Compute metric inverse and determine diagonality")$
cmetric();
("Compute and display mixed Christoffel symbols")$
christof(mcs);
("Compute and rationally simplify the mixed-index Ricci tensor")$
uricci(true);
("Computes scalar curvature")$
scurvature();
("Compute the (3,1) Riemann tensor")$
riemann(true);
("Compute the covariant Riemann tensor")$
lriemann(true);
("Compute the contravariant Riemann tensor")$
uriemann(true);
("Compute the Kretchmann invariant Rijkl^2")$
rinvariant();

/* End of demo -- comment line needed by MAXIMA to resume demo menu */