# Workflow

The goal of Warp Factory is to construct spacetimes and evaluate them for physicality and then visualize their structure. The design of Warp Factory is for building spacetimes in the following general sequence:

<details>

<summary>Set up the Spacetime</summary>

The first thing a user will do is define the spacetime in which they will perform analysis, this step is the creation of the metric tensor. The metric tensor in Warp Factory is a  `.struct`[ object](#user-content-fn-1)[^1] which requires several fields that are used to make the stress-energy tensor and other analysis products. The most important of these is the value of metric components defined in the 4D grid. Users can also construct using standard metric components or using 3+1 formalism. Additionally, Warp Factory includes a standard library of warp metrics defined in the literature.

See the [Metrics](/warp-factory/examples/metrics.md) examples for details on how users can construct spacetimes in Warp Factory.

</details>

<details>

<summary>Compute the Stress-energy Tensor</summary>

After the metric is defined, the stress-energy tensor can be computed. This is a simple call of a function that takes in the metric object and returns the stress-energy tensor. The stress-energy tensor is a `.struct` object, just like the metric, which has several fields associated, including each of the tensor component values defined in the 4D grid.

See the [Energy Tensor](/warp-factory/examples/energy-tensor.md) examples for details on how users evaluate the field equation in Warp Factory.

</details>

<details>

<summary>Compute Analysis Products</summary>

With either the metric or stress-energy tensor different analysis products can be generated by Warp Factory. These include finding metric scalars and energy conditions.&#x20;

See [Analysis](/warp-factory/examples/analysis.md) for examples of how to evaluate the energy conditions, scalars, and momentum flow.&#x20;

</details>

<details>

<summary>Plot Results</summary>

Having created metrics, found the stress-energy tensor, and made any desired analysis products, all of these can be visualized using MATLAB inbuilt functions and several special extensions developed for Warp Factory. These include creating flow lines for understanding momentum flow and helpful plot functions to handle the tensor and 4D array object data used.  &#x20;

Plotting examples can be found throughout the different example modules, showing different ways of plotting metric and stress-energy tensors.

</details>

[^1]: See [Object Types](/warp-factory/overview/object-types.md) for more details.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://applied-physics.gitbook.io/warp-factory/overview/workflow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
