GridArrays
GridArrays.AbstractGrid
— Type.abstract type AbstractGrid{T,N} <: AbstractArray{T,N}
Grids are arrays of points.
GridArrays.MappedGrid
— Type.A MappedGrid consists of a grid and a map. Each grid point of the mapped grid is the map of the corresponding point of the underlying grid.
GridArrays.ProductGrid
— Type.A ProductGrid
represents the cartesian product of other grids.
struct ProductGrid{TG,T,N} <: AbstractGrid{T,N}
Parameters:
- TG is a tuple of (grid) types
- T is the element type of the grid
- N is the dimension of the grid layout
GridArrays.ScatteredGrid
— Type.A grid corresponding to an unstructured collection of points.
GridArrays.iscomposite
— Method.iscomposite(grid::AbstractGrid)
Does the grid consist of multiple grids such as e.g. ProductGrid? Used for pretty printing.
GridArrays.randomgrid
— Method.Compute a scattered grid of M points randomly distributed in Ω
, using the uniform probability measure on Ω
.
GridArrays.resize
— Method.resize(grid::AbstractGrid, dims...)
Create a grid of same structure (such as product structure) but with different points in the different dimensions.
GridArrays.IndexSubGrid
— Type.struct IndexSubGrid{G,I,T,N} <: AbstractSubGrid{T,N}
An IndexSubGrid is a subgrid corresponding to a certain range of indices of the underlying grid. It is assumed to be an 1D grid.
GridArrays.MaskedGrid
— Type.struct MaskedGrid{G,M,I,T} <: AbstractSubGrid{T,1}
A MaskedGrid is a subgrid of another grid that is defined by a mask. The mask is true or false for each point in the supergrid. The set of points for which it is true make up the MaskedGrid.
GridArrays.hasextension
— Method.hasextension(grid::AbstractGrid)
Is it possible to use the resize
function. See also resize
GridArrays.randompoint
— Function.Generate a single random point inside the given domain, with eltype
T
. Random points are generated inside the given box, until one is inside the domain.
GridArrays.randompoint
— Method.Generate a single random point inside the given box, with eltype
T
.
abstract type AbstractEquispacedGrid{T} <: AbstractIntervalGrid{T}
An equispaced grid has equispaced points, and therefore it has a step.
GridArrays.AbstractIntervalGrid
— Type.abstract type AbstractIntervalGrid{T} <: AbstractGrid1d{T}
An AbstractIntervalGrid is a grid that is defined on an interval, i.e. it is connected.
GridArrays.EquispacedGrid
— Type.struct EquispacedGrid{T} <: AbstractEquispacedGrid{T}
An equispaced grid with n points on an interval [a,b], including the endpoints. It has step (b-a)/(n-1).
Example
julia> EquispacedGrid(4,0,1)
4-element EquispacedGrid{Float64}:
0.0
0.3333333333333333
0.6666666666666666
1.0
GridArrays.FourierGrid
— Type.struct FourierGrid{T} <: AbstractEquispacedGrid{T}
A Fourier grid is a periodic equispaced grid on the interval [0,1).
example
julia> FourierGrid(4)
4-element FourierGrid{Float64}:
0.0
0.25
0.5
0.75
struct MidpointEquispacedGrid{T} <: AbstractEquispacedGrid{T}
A MidpointEquispaced grid is an equispaced grid with grid points in the centers of the equispaced subintervals. In other words, this is a DCT-II grid. It has step (b-a)/n
.
Example
julia> MidpointEquispacedGrid(4,0,1)
4-element MidpointEquispacedGrid{Float64}:
0.125
0.375
0.6249999999999999
0.875
struct PeriodicEquispacedGrid{T} <: AbstractEquispacedGrid{T}
A periodic equispaced grid is an equispaced grid that omits the right endpoint. It has step (b-a)/n.
Example
julia> PeriodicEquispacedGrid(4,0,1)
4-element PeriodicEquispacedGrid{Float64}:
0.0
0.25
0.5
0.75