Mercurial > repos > public > sbplib_julia
comparison docs/src/grids_and_grid_functions.md @ 1669:a750992d870a feature/grids/min_spacing
Merge default
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Sat, 29 Jun 2024 17:06:14 +0200 |
| parents | ee3fc2d83c73 |
| children |
comparison
equal
deleted
inserted
replaced
| 1646:5f348cc5598e | 1669:a750992d870a |
|---|---|
| 5 The module also has functionality for creating and working with grid functions. | 5 The module also has functionality for creating and working with grid functions. |
| 6 | 6 |
| 7 ## Interface for grids | 7 ## Interface for grids |
| 8 All grids are expected to work as a grid function for the coordinate function, and thus implements Julia's Indexing- and Iteration-interfaces. Notably they are *not* abstract arrays because that inteface is too restrictive for the types of grids we wish to implement. | 8 All grids are expected to work as a grid function for the coordinate function, and thus implements Julia's Indexing- and Iteration-interfaces. Notably they are *not* abstract arrays because that inteface is too restrictive for the types of grids we wish to implement. |
| 9 | 9 |
| 10 | |
| 11 ## Plotting | |
| 12 Plotting of grids and grid functions is supported through a package extension with Makie.jl. | |
| 13 | |
| 14 For grids we have: | |
| 15 * `plot(::Grid{<:Any,2})` (same as `lines`) | |
| 16 * `lines(::Grid{<:Any,2})` | |
| 17 * `scatter(::Grid{<:Any,2})` | |
| 18 | |
| 19 For 1D grid functions we have: | |
| 20 * `plot(::Grid{<:Any,1}, ::AbstractVector)` (same as `lines`) | |
| 21 * `lines(::Grid{<:Any,1}, ::AbstractVector)` | |
| 22 * `scatter(::Grid{<:Any,1}, ::AbstractVector)` | |
| 23 | |
| 24 For 2D grid functions we have: | |
| 25 * `plot(::Grid{<:Any,2}, ::AbstractArray{<:Any,2})` (constructs a 2d mesh) | |
| 26 * `surface(::Grid{<:Any,2}, ::AbstractArray{<:Any,2})` | |
| 27 | |
| 10 ## To write about | 28 ## To write about |
| 11 <!-- # TODO: --> | 29 <!-- # TODO: --> |
| 12 * Grid functions | 30 * Grid functions |
| 13 * Basic structure | 31 * Basic structure |
| 14 * Indexing | 32 * Indexing |
