Mercurial > repos > public > sbplib_julia
comparison src/Grids/zero_dim_grid.jl @ 1268:dbddd0f61bde refactor/grids
Add refine, coarsen, boundary_identifiers, and boundary_grid methods to ZeroDimGrid
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 24 Feb 2023 21:54:39 +0100 |
parents | 5e28ae42caf2 |
children | 8860bfcaedaa |
comparison
equal
deleted
inserted
replaced
1267:30729cba1095 | 1268:dbddd0f61bde |
---|---|
15 Base.iterate(g::ZeroDimGrid, ::Any) = nothing | 15 Base.iterate(g::ZeroDimGrid, ::Any) = nothing |
16 | 16 |
17 Base.IteratorSize(::Type{<:ZeroDimGrid}) = Base.HasShape{0}() | 17 Base.IteratorSize(::Type{<:ZeroDimGrid}) = Base.HasShape{0}() |
18 Base.length(g::ZeroDimGrid) = 1 | 18 Base.length(g::ZeroDimGrid) = 1 |
19 Base.size(g::ZeroDimGrid) = () | 19 Base.size(g::ZeroDimGrid) = () |
20 | |
21 | |
22 refine(g::ZeroDimGrid, ::Int) = g | |
23 coarsen(g::ZeroDimGrid, ::Int) = g | |
24 | |
25 boundary_identifiers(g::ZeroDimGrid) = () | |
26 boundary_grid(g::ZeroDimGrid, ::Any) = throw(ArgumentError("ZeroDimGrid has no boundaries")) |