metricGet_Schwarzschild
Description
Create the Schwarzschild spacetime in Cartesian coordinates.
For more details on the Schwarzschild metric please read the following reference (section 2.2.2) or any standard general relativity textbook:
Method
The metric is constructed using the Schwarzschild radius as a unitless pass-in value in Cartesian coordinates.
Syntax
[
metric
] = metricGet_Schwarzschild(
gridSize
,
worldCenter
,
rs
,
gridScale
)
Input Arguments
blue are required inputs.
orange are optional inputs with native default values.
blue are required inputs
Inputs | Format | Type | Description |
---|---|---|---|
| 1x4 array | integer | The size of the world specified as:
|
| 1x4 array | double | The center of the world, which defines the center of as a 4-vector, specified as: |
| 1x1 array | double | Schwarzschild radius, in unitless form. |
| 1x4 array | double | Unit scaling factor of the grid dimensions defined relative to The default value is [1, 1, 1, 1]. |
Output Arguments
Outputs | Format | Type | Description |
---|---|---|---|
| struct | object | Schwarzschild solution returned as the metric tensor object. |
Last updated