File: ctensor7.dem

package info (click to toggle)
maxima 5.49.0-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 128,980 kB
  • sloc: lisp: 437,854; fortran: 14,665; tcl: 10,143; sh: 4,598; makefile: 2,204; ansic: 447; java: 374; python: 262; perl: 201; xml: 60; awk: 28; sed: 15; javascript: 2
file content (31 lines) | stat: -rw-r--r-- 1,101 bytes parent folder | download | duplicates (19)
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
/* 
 * 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.
 *
 * CTENSOR features for (mainly) gravitational theory
 */

if get('ctensor,'version)=false then load(ctensor);
("We set up a simple nonempty metric")$
derivabbrev:true;
dim:4;
lg:matrix([a,0,0,0],[0,x^2,0,0],[0,0,x^2*sin(y)^2,0],[0,0,0,-d]);
depends([a,d],x);
ct_coords:[x,y,z,t];
("Compute the inverse metric")$
cmetric();
("Compute the Einstein tensor")$
einstein(false);
("Find a set of unique differential equations in ein")$
findde(ein,2);
("Find out which tensor components were used in these equations")$
deindex;

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