Mercurial > repos > public > sbplib_julia
comparison src/Grids/Grids.jl @ 1143:9275d95e2d90 refactor/grids
Merge with default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 19 Oct 2022 22:36:02 +0200 |
parents | dfbd62c7eb09 |
children | 31041ef8092a |
comparison
equal
deleted
inserted
replaced
1092:c4ea28d904f5 | 1143:9275d95e2d90 |
---|---|
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 dims | |
8 export points | |
9 export evalOn | |
6 | 10 |
7 abstract type BoundaryIdentifier end | 11 # BoundaryIdentifier |
8 struct CartesianBoundary{Dim, R<:Region} <: BoundaryIdentifier end | 12 export BoundaryIdentifier |
9 dim(::CartesianBoundary{Dim, R}) where {Dim, R} = Dim | 13 export CartesianBoundary |
10 region(::CartesianBoundary{Dim, R}) where {Dim, R} = R() | 14 export dim |
15 export region | |
11 | 16 |
12 export dim, region | 17 # EquidistantGrid |
18 export EquidistantGrid | |
19 export spacing | |
20 export inverse_spacing | |
21 export restrict | |
22 export boundary_identifiers | |
23 export boundary_grid | |
24 export refine | |
25 export coarsen | |
13 | 26 |
14 include("AbstractGrid.jl") | 27 include("grid.jl") |
15 include("EquidistantGrid.jl") | 28 include("boundary_identifier.jl") |
16 | 29 include("equidistant_grid.jl") |
17 # TODO: Rename AbstractGrid to Grid and move definition here. | |
18 | 30 |
19 end # module | 31 end # module |