Mercurial > repos > public > sbplib_julia
diff src/Grids/grid.jl @ 1347:08f06bfacd5c refactor/grids
Fix typos and formatting of documentation
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 18 May 2023 22:53:31 +0200 |
parents | 760a4a1ec4b7 |
children | 4d628c83987e 86026367a9ff |
line wrap: on
line diff
--- a/src/Grids/grid.jl Mon May 15 22:54:32 2023 +0200 +++ b/src/Grids/grid.jl Thu May 18 22:53:31 2023 +0200 @@ -14,7 +14,7 @@ ## Note Importantly a grid does not have to be an `AbstractArray`. The reason is to -allow flexible handling of special types of grids like multiblock-grids, or +allow flexible handling of special types of grids like multi-block grids, or grids with special indexing. """ abstract type Grid{T,D} end @@ -23,17 +23,17 @@ Base.eltype(::Type{<:Grid{T}}) where T = T """ - coordinate_size(grid) + coordinate_size(g) -The lenght of the coordinate vector for the given grid. +The lenght of the coordinate vector of `Grid` `g`. """ coordinate_size(::Type{<:Grid{T}}) where T = _ncomponents(T) coordinate_size(g::Grid) = coordinate_size(typeof(g)) # TBD: Name of this function?! """ - component_type(grid) + component_type(g) -The type of the components of the coordinate vector. +The type of the components of the coordinate vector of `Grid` `g`. """ component_type(::Type{<:Grid{T}}) where T = eltype(T) component_type(g::Grid) = component_type(typeof(g)) @@ -41,7 +41,7 @@ """ refine(g::Grid, r) -`g` refined by the factor `r`. +The grid where `g` is refined by the factor `r`. See also: [`coarsen`](@ref). """ @@ -50,7 +50,7 @@ """ coarsen(g::Grid, r) -`g` coarsened by the factor `r`. +The grid where `g` is coarsened by the factor `r`. See also: [`refine`](@ref). """ @@ -64,9 +64,9 @@ function boundary_identifiers end """ - boundary_grid(g::Grid, bid::BoundaryIdentifier) + boundary_grid(g::Grid, id::BoundaryIdentifier) -The grid for the specified boundary. +The grid for the boundary specified by `id`. """ function boundary_grid end # TBD: Can we implement a version here that accepts multiple ids and grouped boundaries? Maybe we need multiblock stuff? @@ -78,7 +78,7 @@ with each coordinate as an argument, or on the form `f(x̄)` taking a coordinate vector. -If the goal is a concrete array `map(f,g)` can be used instead. +For concrete array grid functions `map(f,g)` can be used instead. """ eval_on(g::Grid, f) = eval_on(g, f, Base.IteratorSize(g)) function eval_on(g::Grid, f, ::Base.HasShape)