File: ctensor7.dem

package info (click to toggle)
maxima-sage 5.45.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 113,788 kB
  • sloc: lisp: 440,833; fortran: 14,665; perl: 14,369; tcl: 10,997; sh: 4,475; makefile: 2,520; ansic: 447; python: 262; xml: 59; awk: 37; sed: 17
file content (31 lines) | stat: -rw-r--r-- 1,101 bytes parent folder | download | duplicates (17)
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 */