M1 - First Metric
Welcome to Warp Factory!
In this example, we'll learn the basics of metrics.
First metric
Check out the properties of the metric struct
MyFirstMetric.type
This one is simple. The .type
property of this tensor is "metric". This identifies this tensor object as a metric.
MyFirstMetric.index
This property specifies what form the tensor is in. A metric tensor index can either be "covariant" ( ) or "contravariant" ( ).
MyFirstMetric.tensor
The tensor contains the values for metric at each point in space and time for each tensor component. The tensor object is a 4x4 cell array. Each cell contains an array of values for each point in spacetime. The size of this array is equal to the gridSize
of your spacetime.
Let's take a look at the tensor values for a slice of the space.
Just as expected for Minkowski space! ( for all points in the slice)
Other Properties
.name
- Your metric has a name!
.date
- Your metric stores a date when it is made.
.scaling
- Your metric has scaling information about the coordinate grid step size in time and space. We'll get into this more in later examples.
.coords
- The coordinate system associated with the metric. 'cartesian'.
Last updated