# evalMetric

## Description

The function evaluates the common analysis functions of the metric tensor. It returns the stress-energy tensor in coordinate and Eulerian frame, the energy conditions, and the metric scalars.

## Method

evalMetric runs several solver and analysis functions and packages the output into a struct for the user.

## Syntax

`[`<mark style="color:green;">`output`</mark>`] = evalMetric(`<mark style="color:blue;">`metric`</mark>`,`` `<mark style="color:orange;">`tryGPU`</mark>`,`` `<mark style="color:orange;">`keepPositive`</mark>`,`` `<mark style="color:orange;">`numAngularVec`</mark>`,`` `<mark style="color:orange;">`numTimeVec`</mark>`)`

### Input Arguments

{% hint style="info" %} <mark style="color:blue;">blue</mark> are required inputs.

<mark style="color:orange;">orange</mark> are optional inputs with native default values.
{% endhint %}

<table><thead><tr><th width="197">Inputs</th><th width="94">Format</th><th width="97">Type</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:blue;"><code>metric</code></mark> </td><td>struct</td><td>object</td><td>Input metric tensor. </td></tr><tr><td><mark style="color:orange;"><code>tryGPU</code></mark> </td><td>1x1 array</td><td>integer</td><td>Use the GPU for evaluations, input either 1 for true or 0 for false. <strong>The default value is 0.</strong></td></tr><tr><td><mark style="color:orange;"><code>keepPositive</code></mark></td><td>1x1 array</td><td>integer</td><td>Selects if the energy condition output only returns positive violation values. Input either 1 for true or 0 for false, returning positive and negative values. <strong>The default value is 1.</strong></td></tr><tr><td><mark style="color:orange;"><code>numAngularVec</code></mark></td><td>1x1 array</td><td>integer</td><td>The number of spatial vectors used for energy conditions. <strong>The default value is 100.</strong></td></tr><tr><td><mark style="color:orange;"><code>numTimeVec</code></mark></td><td>1x1 array</td><td>integer</td><td>The number of time vectors used for energy conditions. <strong>The default value is 10.</strong></td></tr></tbody></table>

### Output Arguments

<table><thead><tr><th width="116">Outputs</th><th width="86.33333333333331">Format</th><th width="98">Type</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:green;"><code>output</code></mark></td><td>struct</td><td>object</td><td>Returns a struct with the following fields:<br><code>.metric</code>: metric tensor<br><code>.energyTensor</code>: stress-energy tensor in the coordinate frame<br><code>.energyTensorEulerian</code>: stress-energy tensor in the Eulerian frame<br><code>.null</code>: null energy condition<br><code>.weak</code>: weak energy condition<br><code>.strong</code>: strong energy condition<br><code>.dominant</code>: dominant energy condition<br><code>.expansion</code>: expansion scalar<br><code>.shear</code>: shear scalar<br><code>.vorticity</code>: vorticity scalar</td></tr></tbody></table>
