Skip to content

Commit

Permalink
Define CommonSpaces module
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Nov 21, 2024
1 parent 68cc581 commit e960a0b
Show file tree
Hide file tree
Showing 10 changed files with 623 additions and 18 deletions.
21 changes: 14 additions & 7 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,23 @@ ClimaCore.jl Release Notes
main
-------

- 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:
- [ExtrudedCubedSphereSpace]()
- [CubedSphereSpace]()
- [ColumnSpace]()
- [Box3DSpace]()
- [SliceXZSpace]()
- [RectangleXYSpace]()

v0.14.20
-------

- 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:
- [ExtrudedCubedSphereGrid]()
- [CubedSphereGrid]()
- [ColumnGrid]()
- [Box3DGrid]()
- [SliceXZGrid]()
- [RectangleXYGrid]()
- [ExtrudedCubedSphereGrid](https://github.com/CliMA/ClimaCore.jl/blob/cbb193042fac3b4bef33251fbc0f232427bfe506/src/CommonGrids/CommonGrids.jl#L85-L144)
- [CubedSphereGrid](https://github.com/CliMA/ClimaCore.jl/blob/cbb193042fac3b4bef33251fbc0f232427bfe506/src/CommonGrids/CommonGrids.jl#L200-L235)
- [ColumnGrid](https://github.com/CliMA/ClimaCore.jl/blob/cbb193042fac3b4bef33251fbc0f232427bfe506/src/CommonGrids/CommonGrids.jl#L259-L281)
- [Box3DGrid](https://github.com/CliMA/ClimaCore.jl/blob/cbb193042fac3b4bef33251fbc0f232427bfe506/src/CommonGrids/CommonGrids.jl#L303-L378)
- [SliceXZGrid](https://github.com/CliMA/ClimaCore.jl/blob/cbb193042fac3b4bef33251fbc0f232427bfe506/src/CommonGrids/CommonGrids.jl#L441-L498)
- [RectangleXYGrid](https://github.com/CliMA/ClimaCore.jl/blob/cbb193042fac3b4bef33251fbc0f232427bfe506/src/CommonGrids/CommonGrids.jl#L547-L602)

- 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:
- `rcompare((;a=1,b=2), (;b=2,a=1); strict = true)` will return `false` and
Expand Down
10 changes: 5 additions & 5 deletions docs/refs.bib
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ @article{Bao2014
volume = {271},
pages = {224-243},
year = {2014},
doi = {https://doi.org/10.1016/j.jcp.2013.11.033},
doi = {10.1016/j.jcp.2013.11.033},
author = {Lei Bao and Ramachandran D. Nair and Henry M. Tufo}
}

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

Expand Down Expand Up @@ -121,7 +121,7 @@ @article{GubaOpt2014
volume = {267},
pages = {176-195},
year = {2014},
doi = {https://doi.org/10.1016/j.jcp.2014.02.029}
doi = {10.1016/j.jcp.2014.02.029}
}

@article{Nair2005,
Expand Down Expand Up @@ -166,7 +166,7 @@ @article{Schar2002
address = {Boston MA, USA},
volume = {130},
number = {10},
doi = {https://doi.org/10.1175/1520-0493(2002)130<2459:ANTFVC>2.0.CO;2},
doi = {10.1175/1520-0493(2002)130<2459:ANTFVC>2.0.CO;2},
pages= {2459 - 2480},
}

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

Expand Down
24 changes: 24 additions & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ Topologies.ghost_neighboring_elements
## Grids

```@docs
Grids.CellFace
Grids.CellCenter
Grids.ColumnGrid
Grids.FiniteDifferenceGrid
Grids.ExtrudedFiniteDifferenceGrid
Expand Down Expand Up @@ -227,6 +229,10 @@ the center of each element (also referred to as _cell_) (`CenterFiniteDifference
or the interfaces (faces in 3D, edges in 2D or points in 1D) between elements
(`FaceFiniteDifferenceSpace`).

```@docs
Spaces.FiniteDifferenceSpace
```

Users should construct either the center or face space from the mesh, then construct
the other space from the original one: this internally reuses the same data structures, and avoids allocating additional memory.

Expand All @@ -247,6 +253,24 @@ Spaces.SpectralElementSpaceSlab
Spaces.node_horizontal_length_scale
```

### Extruded Finite Difference Spaces

```@docs
Spaces.ExtrudedFiniteDifferenceSpace
```

## CommonSpaces

```@docs
CommonSpaces
CommonSpaces.ExtrudedCubedSphereSpace
CommonSpaces.CubedSphereSpace
CommonSpaces.ColumnSpace
CommonSpaces.Box3DSpace
CommonSpaces.SliceXZSpace
CommonSpaces.RectangleXYSpace
```

### Quadratures


Expand Down
1 change: 1 addition & 0 deletions src/ClimaCore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ include("Limiters/Limiters.jl")
include("InputOutput/InputOutput.jl")
include("Remapping/Remapping.jl")
include("CommonGrids/CommonGrids.jl")
include("CommonSpaces/CommonSpaces.jl")

include("deprecated.jl")

Expand Down
11 changes: 10 additions & 1 deletion src/CommonGrids/CommonGrids.jl
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,16 @@ end
)
A convenience constructor, which builds a
[`Grids.FiniteDifferenceGrid`](@ref).
[`Grids.FiniteDifferenceGrid`](@ref) given:
- `FT` the floating-point type (defaults to `Float64`) [`Float32`, `Float64`]
- `z_elem` the number of z-points
- `z_min` the domain minimum along the z-direction.
- `z_max` the domain maximum along the z-direction.
- `device` the `ClimaComms.device`
- `context` the `ClimaComms.context`
- `stretch` the mesh `Meshes.StretchingRule` (defaults to [`Meshes.Uniform`](@ref))
- `z_mesh` the vertical mesh, defaults to an `Meshes.IntervalMesh` along `z` with given `stretch`
# Example usage
Expand Down
Loading

0 comments on commit e960a0b

Please sign in to comment.