Mercurial > repos > public > sbplib_julia
comparison src/Grids/Grids.jl @ 1116:c2d7e940639e feature/grids
Rename AbstractGrid to Grid and clean up Grids module
| author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
|---|---|
| date | Fri, 15 Jul 2022 09:54:15 +0200 |
| parents | 138c0fe24eb6 |
| children | 5490d0a38007 |
comparison
equal
deleted
inserted
replaced
| 1115:6530fceef37c | 1116:c2d7e940639e |
|---|---|
| 1 module Grids | 1 module Grids |
| 2 | 2 |
| 3 using Sbplib.RegionIndices | 3 using Sbplib.RegionIndices |
| 4 | 4 |
| 5 export BoundaryIdentifier, CartesianBoundary | 5 # Grid |
| 6 export Grid | |
| 7 export dim | |
| 8 export dims | |
| 9 export points | |
| 10 export evalOn | |
| 6 | 11 |
| 7 abstract type BoundaryIdentifier end | 12 # BoundaryIdentifier |
| 8 struct CartesianBoundary{Dim, R<:Region} <: BoundaryIdentifier end | 13 export BoundaryIdentifier |
| 9 dim(::CartesianBoundary{Dim, R}) where {Dim, R} = Dim | 14 export CartesianBoundary |
| 10 region(::CartesianBoundary{Dim, R}) where {Dim, R} = R() | 15 export dim |
| 16 export region | |
| 11 | 17 |
| 12 export dim, region | 18 # EquidistantGrid |
| 19 export EquidistantGrid | |
| 20 export spacing | |
| 21 export inverse_spacing | |
| 22 export restrict | |
| 23 export orthogonal_dims | |
| 24 export boundary_identifiers | |
| 25 export boundary_grid | |
| 26 export boundary_size | |
| 27 export refine | |
| 28 export coarsen | |
| 13 | 29 |
| 14 include("AbstractGrid.jl") | 30 include("grid.jl") |
| 15 include("EquidistantGrid.jl") | 31 include("boundary_identifier.jl") |
| 16 | 32 include("equidistant_grid.jl") |
| 17 # TODO: Rename AbstractGrid to Grid and move definition here. | |
| 18 | 33 |
| 19 end # module | 34 end # module |
