@@ -32,7 +32,7 @@ Arguments
3232Keyword arguments
3333=================
3434- `weight_computation`: The type of approximate division to used when computing WENO weights.
35- Default: `Oceananigans.Utils.NewtonDivWithConversion {Float32}`
35+ Default: `Oceananigans.Utils.ConvertingDivision {Float32}`
3636- `order`: The order of the WENO advection scheme. Default: 5
3737- `bounds` (experimental): Whether to use bounds-preserving WENO, which produces a reconstruction
3838 that attempts to restrict a quantity to lie between a `bounds` tuple.
@@ -51,8 +51,8 @@ To build the default 5th-order scheme:
5151julia> using Oceananigans
5252
5353julia> WENO()
54- WENO{3, Float64, Oceananigans.Utils.NewtonDivWithConversion {Float32}}(order=5)
55- ├── buffer_scheme: WENO{2, Float64, Oceananigans.Utils.NewtonDivWithConversion {Float32}}(order=3)
54+ WENO{3, Float64, Oceananigans.Utils.ConvertingDivision {Float32}}(order=5)
55+ ├── buffer_scheme: WENO{2, Float64, Oceananigans.Utils.ConvertingDivision {Float32}}(order=3)
5656│ └── buffer_scheme: Centered(order=2)
5757└── advecting_velocity_scheme: Centered(order=4)
5858```
@@ -62,10 +62,10 @@ yet minimally-dissipative advection scheme):
6262
6363```jldoctest weno
6464julia> WENO(order=9)
65- WENO{5, Float64, Oceananigans.Utils.NewtonDivWithConversion {Float32}}(order=9)
66- ├── buffer_scheme: WENO{4, Float64, Oceananigans.Utils.NewtonDivWithConversion {Float32}}(order=7)
67- │ └── buffer_scheme: WENO{3, Float64, Oceananigans.Utils.NewtonDivWithConversion {Float32}}(order=5)
68- │ └── buffer_scheme: WENO{2, Float64, Oceananigans.Utils.NewtonDivWithConversion {Float32}}(order=3)
65+ WENO{5, Float64, Oceananigans.Utils.ConvertingDivision {Float32}}(order=9)
66+ ├── buffer_scheme: WENO{4, Float64, Oceananigans.Utils.ConvertingDivision {Float32}}(order=7)
67+ │ └── buffer_scheme: WENO{3, Float64, Oceananigans.Utils.ConvertingDivision {Float32}}(order=5)
68+ │ └── buffer_scheme: WENO{2, Float64, Oceananigans.Utils.ConvertingDivision {Float32}}(order=3)
6969│ └── buffer_scheme: Centered(order=2)
7070└── advecting_velocity_scheme: Centered(order=8)
7171```
@@ -75,34 +75,34 @@ which uses `Centered(order=2)` as the innermost buffer scheme:
7575
7676```jldoctest weno
7777julia> WENO(order=9, minimum_buffer_upwind_order=5)
78- WENO{5, Float64, Oceananigans.Utils.NewtonDivWithConversion {Float32}}(order=9)
79- ├── buffer_scheme: WENO{4, Float64, Oceananigans.Utils.NewtonDivWithConversion {Float32}}(order=7)
80- │ └── buffer_scheme: WENO{3, Float64, Oceananigans.Utils.NewtonDivWithConversion {Float32}}(order=5)
78+ WENO{5, Float64, Oceananigans.Utils.ConvertingDivision {Float32}}(order=9)
79+ ├── buffer_scheme: WENO{4, Float64, Oceananigans.Utils.ConvertingDivision {Float32}}(order=7)
80+ │ └── buffer_scheme: WENO{3, Float64, Oceananigans.Utils.ConvertingDivision {Float32}}(order=5)
8181│ └── buffer_scheme: Centered(order=2)
8282└── advecting_velocity_scheme: Centered(order=8)
8383```
8484
8585```jldoctest weno
8686julia> WENO(order=9, bounds=(0, 1))
87- WENO{5, Float64, Oceananigans.Utils.NewtonDivWithConversion {Float32}}(order=9, bounds=(0.0, 1.0))
88- ├── buffer_scheme: WENO{4, Float64, Oceananigans.Utils.NewtonDivWithConversion {Float32}}(order=7, bounds=(0.0, 1.0))
89- │ └── buffer_scheme: WENO{3, Float64, Oceananigans.Utils.NewtonDivWithConversion {Float32}}(order=5, bounds=(0.0, 1.0))
90- │ └── buffer_scheme: WENO{2, Float64, Oceananigans.Utils.NewtonDivWithConversion {Float32}}(order=3, bounds=(0.0, 1.0))
87+ WENO{5, Float64, Oceananigans.Utils.ConvertingDivision {Float32}}(order=9, bounds=(0.0, 1.0))
88+ ├── buffer_scheme: WENO{4, Float64, Oceananigans.Utils.ConvertingDivision {Float32}}(order=7, bounds=(0.0, 1.0))
89+ │ └── buffer_scheme: WENO{3, Float64, Oceananigans.Utils.ConvertingDivision {Float32}}(order=5, bounds=(0.0, 1.0))
90+ │ └── buffer_scheme: WENO{2, Float64, Oceananigans.Utils.ConvertingDivision {Float32}}(order=3, bounds=(0.0, 1.0))
9191│ └── buffer_scheme: Centered(order=2)
9292└── advecting_velocity_scheme: Centered(order=8)
9393```
9494
9595To build a WENO scheme that uses approximate division on a GPU to execute faster:
9696```jldoctest weno
97- julia> WENO(;weight_computation=Oceananigans.Utils.BackendOptimizedNewtonDiv )
98- WENO{3, Float64, Oceananigans.Utils.BackendOptimizedNewtonDiv }(order=5)
99- ├── buffer_scheme: WENO{2, Float64, Oceananigans.Utils.BackendOptimizedNewtonDiv }(order=3)
97+ julia> WENO(;weight_computation=Oceananigans.Utils.BackendOptimizedDivision )
98+ WENO{3, Float64, Oceananigans.Utils.BackendOptimizedDivision }(order=5)
99+ ├── buffer_scheme: WENO{2, Float64, Oceananigans.Utils.BackendOptimizedDivision }(order=3)
100100│ └── buffer_scheme: Centered(order=2)
101101└── advecting_velocity_scheme: Centered(order=4)
102102```
103103"""
104104function WENO (FT:: DataType = Oceananigans. defaults. FloatType;
105- weight_computation:: DataType = Oceananigans. Utils. NewtonDivWithConversion {Float32},
105+ weight_computation:: DataType = Oceananigans. Utils. ConvertingDivision {Float32},
106106 order = 5 ,
107107 buffer_scheme = DecreasingOrderAdvectionScheme (),
108108 bounds = nothing ,
0 commit comments