Skip to content

Latest commit

 

History

History
67 lines (43 loc) · 2.54 KB

README.md

File metadata and controls

67 lines (43 loc) · 2.54 KB

diffgeoM

This package aims to extend the famous general relativity toolkit diffgeo.m by Matthew Headrick.

The original diffgeo.m is very well designed, with a minimalist code base (only ~600 lines of core code) while being fairly robust. Therefore, this project tries not to modify its core code, but rather builds around it, with personalized symbols inspired by similar packages, such as MathGR and ccgrg.

The wrapper script diffgeoM.wl calls the main package diffgeo.m, and perform various modifications. Symbols are renamed for personal convenience, while the original symbols remain accessible under the `diffgeo` context.

Usage

The usage of diffgeoM is very much similar to the original diffgeo.m, which is well documented in diffgeoManual.nb. The only difference is that there are some new symbols:

  • The association between new -> original symbols is given in the variable renames
  • Some other extended symbols are defined in this section.

The initial input of diffgeoM is coord, metric, and optionally, metricSign (note the captital S in Sign; this is a rename of the original metricsign in diffgeo.m).

  • It is recommended to run diffgeoM (or even the original diffgeo.m) in a special Mathematica "Context", especially when there are multiple coordinate systems involved.

  • When there are multiple contexts, it is recommended to re-run diffgeoM before tensor calculations, to ensure that System` functions are correctly defined.

For example,

metricSign = -1;

"# Define bulk coordinates outside the bulk` context";
bulk`coord = {t, r, \[Phi]};
"# ... in this way, the symbols: t, r and \[Phi]";
"# ... are Global`ly available";

"# Entering the bulk` context";
Begin["bulk`"];

"# Define bulk metric";
metric = ...;

"# Call diffgeoM";
<< diffgeoM`

"# Exiting the bulk` context";
End[];


"### Now we want to switch to another geometry";
"# Entering the boundary` context";
Begin["boundary`"];

coord = {r, \[Phi]};
metric = ...;
<< diffgeoM`

"# Exiting the boundary` context";
End[];

"# Ricci tensors";
bulk`tRicci // MatrixForm
boundary`tRicci // MatrixForm

License