# verifyTensor

## Description

Checks the data structure of the metric and stress-energy tensor objects to ensure the required data is provided. See [Object Types](https://applied-physics.gitbook.io/warp-factory/overview/object-types) for specifics on the required struct fields.

## Method

Checks all required fields by object type.

{% hint style="info" %}
This function is used throughout Warp Factory to ensure that data is present. The user can decide to use this to check their own metrics, but errors will be provided automatically in critical functions, such as in the frame transformations or in the solver.
{% endhint %}

## Syntax

`[`<mark style="color:green;">`verified`</mark>`] = verifyTensor(`<mark style="color:blue;">`inputTensor`</mark>`,`` `<mark style="color:orange;">`suppressMsgs`</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="232">Inputs</th><th width="94">Format</th><th width="92">Type</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:blue;"><code>inputTensor</code></mark> </td><td>struct</td><td>object</td><td>Input tensor object. </td></tr><tr><td><mark style="color:orange;"><code>suppressMsgs</code></mark> </td><td>1x1 array</td><td>integer</td><td>Selects if error messages will be displayed. <strong>The default value is 0, which means true.</strong></td></tr></tbody></table>

### Output Arguments

<table><thead><tr><th width="192">Outputs</th><th width="94.33333333333331">Format</th><th width="96">Type</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:green;"><code>verified</code></mark></td><td>1x1 array</td><td>logical</td><td>Returns a 1 if the tensor is verified and 0 if not.</td></tr></tbody></table>
