`CurvilinearGrids.GridTypes.CurvilinearGrid1D`

— TypeCurvilinearGrid1D

**Fields**

`x`

: Node function, e.g. x -> f(ξ)`∂x∂ξ`

: Derivative of x wrt ξ; ∂x∂ξ(ξ)`nhalo`

: Number of halo cells for all dims`nnodes`

: Number of nodes/vertices`limits`

: Cell loop limits based on halo cells

`CurvilinearGrids.GridTypes.CurvilinearGrid2D`

— TypeCurvilinearGrid2D

**Fields**

`x`

: Node function; e.g., x(i,j)`y`

: Node function; e.g., y(i,j)`jacobian_matrix_func`

: jacobian matrix, e.g., J(i,j)`nhalo`

: Number of halo cells for all dims`nnodes`

: Number of nodes/vertices`limits`

: Cell loop limits based on halo cells

`CurvilinearGrids.GridTypes.CurvilinearGrid3D`

— TypeCurvilinearGrid3D

**Fields**

`x`

: Node function; e.g., x(i,j,k)`y`

: Node function; e.g., y(i,j,k)`z`

: Node function; e.g., z(i,j,k)`jacobian_matrix_func`

: Function to compute the jacobian matrix, e.g., J(i,j,k)`conserv_metric_func`

: Function to compute the conservative metrics`nhalo`

: Number of halo cells for all dims`nnodes`

: Number of nodes/vertices`limits`

: Cell loop limits based on halo cells

`CurvilinearGrids.GridTypes.cellsize`

— MethodGet the size of the grid for cell-based arrays

`CurvilinearGrids.GridTypes.cellsize_withhalo`

— MethodGet the size of the grid for cell-based arrays when the halo cells are included

`CurvilinearGrids.GridTypes.centroid`

— MethodGet the position of the centroid for the given *cell* index. **NOTE:** these indices are consistent with halo cells included. This means that if your grid has 2 halo cells, the position of the first non-halo centroid is index at coord(mesh, 3). The `CurvilinearGrid`

only keeps track of the number of halo cells for each dimension, whereas the grid functions have no knowledge halos. Therefore, the `coord`

function applies a shift to the index for you.

`CurvilinearGrids.GridTypes.coord`

— MethodGet the position/coordinate at a given index. **NOTE:** these indices are consistent with halo cells included. This means that if your grid has 2 halo cells, the position of the first non-halo vertex is index at coord(mesh, 3). The `CurvilinearGrid`

only keeps track of the number of halo cells for each dimension, whereas the grid functions have no knowledge halos. Therefore, the `coord`

function applies a shift to the index for you.

`CurvilinearGrids.IndexingUtils`

— ModuleFunctions used to work on CartesianIndex and CartesianIndices to make looping and stencil creation easy for arbitary dimensions and axes

`CurvilinearGrids.IndexingUtils.down`

— MethodGo down by `n`

on a given `axis`

of a CartesianIndex

`CurvilinearGrids.IndexingUtils.expand`

— MethodExpand the CartesianIndices ranges by `n`

on `axis`

`CurvilinearGrids.IndexingUtils.expand`

— MethodExpand the CartesianIndices ranges by `n`

on all axes

`CurvilinearGrids.IndexingUtils.expand_lower`

— MethodExpand the CartesianIndices starting index by `-n`

on all axes

`CurvilinearGrids.IndexingUtils.expand_upper`

— MethodExpand the CartesianIndices ending index by `+n`

on all axes

`CurvilinearGrids.IndexingUtils.lower_boundary_indices`

— MethodTake a given CartesianIndices and extract only the lower boundary indices at an offset of `n`

along a given `axis`

.

**Example**

```
julia> domain = CartesianIndices((1:10, 4:8))
CartesianIndices((1:10, 4:8))
julia> lower_boundary_indices(domain, 2, 0) # select the first index on axis 2
CartesianIndices((1:10, 4:4))
```

`CurvilinearGrids.IndexingUtils.plus_minus`

— MethodGet indices of of `±n`

for an arbitary `axis`

. For a 2d index, and and offset on the `j`

axis, this would be [i,j-n:j+n]. This makes it simple to generate arbitrary stencils on arbitrary axes.

**Arguments**

- I::CartesianIndex{N}
- axis::Int: which axis to provide the ±n to
- n::Int: how much to offset on a given axis

**Example**

```
julia> I = CartesianIndex((4,5))
CartesianIndex(4, 5)
julia> plus_minus(I, 2, 2)
CartesianIndices((4:4, 3:7))
```

`CurvilinearGrids.IndexingUtils.up`

— MethodGo up by `n`

on a given `axis`

of a CartesianIndex

`CurvilinearGrids.IndexingUtils.upper_boundary_indices`

— MethodTake a given CartesianIndices and extract only the upper boundary indices at an offset of `n`

along a given `axis`

.

**Example**

```
julia> domain = CartesianIndices((1:10, 4:8))
CartesianIndices((1:10, 4:8))
julia> upper_boundary_indices(domain, 2, 1)
CartesianIndices((1:10, 8:8))
```

`CurvilinearGrids.IndexingUtils.δ`

— MethodApply a delta function to the cartesian index on a specified axis. For example, `δ(3, CartesianIndex(1,2,3))`

will give `CartesianIndex(0,0,1)`

.

`CurvilinearGrids.MetricDiscretizationSchemes.IndexingUtils`

— ModuleFunctions used to work on CartesianIndex and CartesianIndices to make looping and stencil creation easy for arbitary dimensions and axes

`CurvilinearGrids.MetricDiscretizationSchemes.IndexingUtils.down`

— MethodGo down by `n`

on a given `axis`

of a CartesianIndex

`CurvilinearGrids.MetricDiscretizationSchemes.IndexingUtils.expand`

— MethodExpand the CartesianIndices ranges by `n`

on `axis`

`CurvilinearGrids.MetricDiscretizationSchemes.IndexingUtils.expand`

— MethodExpand the CartesianIndices ranges by `n`

on all axes

`CurvilinearGrids.MetricDiscretizationSchemes.IndexingUtils.expand_lower`

— MethodExpand the CartesianIndices starting index by `-n`

on all axes

`CurvilinearGrids.MetricDiscretizationSchemes.IndexingUtils.expand_upper`

— MethodExpand the CartesianIndices ending index by `+n`

on all axes

`CurvilinearGrids.MetricDiscretizationSchemes.IndexingUtils.lower_boundary_indices`

— MethodTake a given CartesianIndices and extract only the lower boundary indices at an offset of `n`

along a given `axis`

.

**Example**

```
julia> domain = CartesianIndices((1:10, 4:8))
CartesianIndices((1:10, 4:8))
julia> lower_boundary_indices(domain, 2, 0) # select the first index on axis 2
CartesianIndices((1:10, 4:4))
```

`CurvilinearGrids.MetricDiscretizationSchemes.IndexingUtils.plus_minus`

— MethodGet indices of of `±n`

for an arbitary `axis`

. For a 2d index, and and offset on the `j`

axis, this would be [i,j-n:j+n]. This makes it simple to generate arbitrary stencils on arbitrary axes.

**Arguments**

- I::CartesianIndex{N}
- axis::Int: which axis to provide the ±n to
- n::Int: how much to offset on a given axis

**Example**

```
julia> I = CartesianIndex((4,5))
CartesianIndex(4, 5)
julia> plus_minus(I, 2, 2)
CartesianIndices((4:4, 3:7))
```

`CurvilinearGrids.MetricDiscretizationSchemes.IndexingUtils.up`

— MethodGo up by `n`

on a given `axis`

of a CartesianIndex

`CurvilinearGrids.MetricDiscretizationSchemes.IndexingUtils.upper_boundary_indices`

— MethodTake a given CartesianIndices and extract only the upper boundary indices at an offset of `n`

along a given `axis`

.

**Example**

```
julia> domain = CartesianIndices((1:10, 4:8))
CartesianIndices((1:10, 4:8))
julia> upper_boundary_indices(domain, 2, 1)
CartesianIndices((1:10, 8:8))
```

`CurvilinearGrids.MetricDiscretizationSchemes.IndexingUtils.δ`

— MethodApply a delta function to the cartesian index on a specified axis. For example, `δ(3, CartesianIndex(1,2,3))`

will give `CartesianIndex(0,0,1)`

.