Skip to content

Commit a932c51

Browse files
Merge pull request #2082 from CliMA/ck/CommonSpaces
Define CommonSpaces module
2 parents 68cc581 + e960a0b commit a932c51

File tree

10 files changed

+623
-18
lines changed

10 files changed

+623
-18
lines changed

NEWS.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,23 @@ ClimaCore.jl Release Notes
44
main
55
-------
66

7+
- We've added new convenience constructors for spaces PR [2082](https://github.com/CliMA/ClimaCore.jl/pull/2082). Here are links to the new constructors:
8+
- [ExtrudedCubedSphereSpace]()
9+
- [CubedSphereSpace]()
10+
- [ColumnSpace]()
11+
- [Box3DSpace]()
12+
- [SliceXZSpace]()
13+
- [RectangleXYSpace]()
14+
715
v0.14.20
8-
-------
916

1017
- We've added new convenience constructors for grids PR [1848](https://github.com/CliMA/ClimaCore.jl/pull/1848). Here are links to the new constructors:
11-
- [ExtrudedCubedSphereGrid]()
12-
- [CubedSphereGrid]()
13-
- [ColumnGrid]()
14-
- [Box3DGrid]()
15-
- [SliceXZGrid]()
16-
- [RectangleXYGrid]()
18+
- [ExtrudedCubedSphereGrid](https://github.com/CliMA/ClimaCore.jl/blob/cbb193042fac3b4bef33251fbc0f232427bfe506/src/CommonGrids/CommonGrids.jl#L85-L144)
19+
- [CubedSphereGrid](https://github.com/CliMA/ClimaCore.jl/blob/cbb193042fac3b4bef33251fbc0f232427bfe506/src/CommonGrids/CommonGrids.jl#L200-L235)
20+
- [ColumnGrid](https://github.com/CliMA/ClimaCore.jl/blob/cbb193042fac3b4bef33251fbc0f232427bfe506/src/CommonGrids/CommonGrids.jl#L259-L281)
21+
- [Box3DGrid](https://github.com/CliMA/ClimaCore.jl/blob/cbb193042fac3b4bef33251fbc0f232427bfe506/src/CommonGrids/CommonGrids.jl#L303-L378)
22+
- [SliceXZGrid](https://github.com/CliMA/ClimaCore.jl/blob/cbb193042fac3b4bef33251fbc0f232427bfe506/src/CommonGrids/CommonGrids.jl#L441-L498)
23+
- [RectangleXYGrid](https://github.com/CliMA/ClimaCore.jl/blob/cbb193042fac3b4bef33251fbc0f232427bfe506/src/CommonGrids/CommonGrids.jl#L547-L602)
1724

1825
- A `strict = true` keyword was added to `rcompare`, which checks that the types match. If `strict = false`, then `rcompare` will return `true` for `FieldVector`s and `NamedTuple`s with the same properties but permuted order. For example:
1926
- `rcompare((;a=1,b=2), (;b=2,a=1); strict = true)` will return `false` and

docs/refs.bib

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ @article{Bao2014
1515
volume = {271},
1616
pages = {224-243},
1717
year = {2014},
18-
doi = {https://doi.org/10.1016/j.jcp.2013.11.033},
18+
doi = {10.1016/j.jcp.2013.11.033},
1919
author = {Lei Bao and Ramachandran D. Nair and Henry M. Tufo}
2020
}
2121

@@ -48,7 +48,7 @@ @article{BorisBook1973
4848
number = {1},
4949
pages = {38-69},
5050
year = {1973},
51-
doi = {https://doi.org/10.1016/0021-9991(73)90147-2},
51+
doi = {10.1016/0021-9991(73)90147-2},
5252
author = {Jay P Boris and David L Book}
5353
}
5454

@@ -121,7 +121,7 @@ @article{GubaOpt2014
121121
volume = {267},
122122
pages = {176-195},
123123
year = {2014},
124-
doi = {https://doi.org/10.1016/j.jcp.2014.02.029}
124+
doi = {10.1016/j.jcp.2014.02.029}
125125
}
126126

127127
@article{Nair2005,
@@ -166,7 +166,7 @@ @article{Schar2002
166166
address = {Boston MA, USA},
167167
volume = {130},
168168
number = {10},
169-
doi = {https://doi.org/10.1175/1520-0493(2002)130<2459:ANTFVC>2.0.CO;2},
169+
doi = {10.1175/1520-0493(2002)130<2459:ANTFVC>2.0.CO;2},
170170
pages= {2459 - 2480},
171171
}
172172

@@ -242,7 +242,7 @@ @article{Williamson1992
242242
number = {1},
243243
pages = {211-224},
244244
year = {1992},
245-
doi = {https://doi.org/10.1016/S0021-9991(05)80016-6},
245+
doi = {10.1016/S0021-9991(05)80016-6},
246246
author = {David L. Williamson and John B. Drake and James J. Hack and Rüdiger Jakob and Paul N. Swarztrauber}
247247
}
248248

docs/src/api.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ Topologies.ghost_neighboring_elements
180180
## Grids
181181

182182
```@docs
183+
Grids.CellFace
184+
Grids.CellCenter
183185
Grids.ColumnGrid
184186
Grids.FiniteDifferenceGrid
185187
Grids.ExtrudedFiniteDifferenceGrid
@@ -227,6 +229,10 @@ the center of each element (also referred to as _cell_) (`CenterFiniteDifference
227229
or the interfaces (faces in 3D, edges in 2D or points in 1D) between elements
228230
(`FaceFiniteDifferenceSpace`).
229231

232+
```@docs
233+
Spaces.FiniteDifferenceSpace
234+
```
235+
230236
Users should construct either the center or face space from the mesh, then construct
231237
the other space from the original one: this internally reuses the same data structures, and avoids allocating additional memory.
232238

@@ -247,6 +253,24 @@ Spaces.SpectralElementSpaceSlab
247253
Spaces.node_horizontal_length_scale
248254
```
249255

256+
### Extruded Finite Difference Spaces
257+
258+
```@docs
259+
Spaces.ExtrudedFiniteDifferenceSpace
260+
```
261+
262+
## CommonSpaces
263+
264+
```@docs
265+
CommonSpaces
266+
CommonSpaces.ExtrudedCubedSphereSpace
267+
CommonSpaces.CubedSphereSpace
268+
CommonSpaces.ColumnSpace
269+
CommonSpaces.Box3DSpace
270+
CommonSpaces.SliceXZSpace
271+
CommonSpaces.RectangleXYSpace
272+
```
273+
250274
### Quadratures
251275

252276

src/ClimaCore.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ include("Limiters/Limiters.jl")
2424
include("InputOutput/InputOutput.jl")
2525
include("Remapping/Remapping.jl")
2626
include("CommonGrids/CommonGrids.jl")
27+
include("CommonSpaces/CommonSpaces.jl")
2728

2829
include("deprecated.jl")
2930

src/CommonGrids/CommonGrids.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,16 @@ end
269269
)
270270
271271
A convenience constructor, which builds a
272-
[`Grids.FiniteDifferenceGrid`](@ref).
272+
[`Grids.FiniteDifferenceGrid`](@ref) given:
273+
274+
- `FT` the floating-point type (defaults to `Float64`) [`Float32`, `Float64`]
275+
- `z_elem` the number of z-points
276+
- `z_min` the domain minimum along the z-direction.
277+
- `z_max` the domain maximum along the z-direction.
278+
- `device` the `ClimaComms.device`
279+
- `context` the `ClimaComms.context`
280+
- `stretch` the mesh `Meshes.StretchingRule` (defaults to [`Meshes.Uniform`](@ref))
281+
- `z_mesh` the vertical mesh, defaults to an `Meshes.IntervalMesh` along `z` with given `stretch`
273282
274283
# Example usage
275284

0 commit comments

Comments
 (0)