Skip to content

Commit

Permalink
Try #1367:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Jul 12, 2023
2 parents eef71dc + c0b8d68 commit f39b509
Show file tree
Hide file tree
Showing 16 changed files with 1,274 additions and 1,007 deletions.
4 changes: 2 additions & 2 deletions docs/src/operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ CurlC2F

```@docs
SetBoundaryOperator
FirstOrderOneSided
ThirdOrderOneSided
OneSided1stOrder
OneSided3rdOrder
```

## Finite difference boundary conditions
Expand Down
8 changes: 4 additions & 4 deletions examples/column/bb_fct_advection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ function tendency!(yₜ, y, parameters, t)
top = Operators.Extrapolate(),
)
upwind3 = Operators.Upwind3rdOrderBiasedProductC2F(
bottom = Operators.ThirdOrderOneSided(),
top = Operators.ThirdOrderOneSided(),
bottom = Operators.OneSided3rdOrder(),
top = Operators.OneSided3rdOrder(),
)
FCTBorisBook = Operators.FCTBorisBook(
bottom = Operators.FirstOrderOneSided(),
top = Operators.FirstOrderOneSided(),
bottom = Operators.OneSided1stOrder(),
top = Operators.OneSided1stOrder(),
)
@. yₜ.q =
-divf2c(
Expand Down
4 changes: 2 additions & 2 deletions examples/column/fct_advection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ function f!(dydt, y, parameters, t)
top = Operators.Extrapolate(),
)
third_order_fluxᶠ = Operators.Upwind3rdOrderBiasedProductC2F(
bottom = Operators.ThirdOrderOneSided(),
top = Operators.ThirdOrderOneSided(),
bottom = Operators.OneSided3rdOrder(),
top = Operators.OneSided3rdOrder(),
)
divf2c = Operators.DivergenceF2C(
bottom = Operators.SetValue(Geometry.WVector(FT(0.0))),
Expand Down
8 changes: 4 additions & 4 deletions examples/column/zalesak_fct_advection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ function tendency!(yₜ, y, parameters, t)
top = Operators.Extrapolate(),
)
upwind3 = Operators.Upwind3rdOrderBiasedProductC2F(
bottom = Operators.ThirdOrderOneSided(),
top = Operators.ThirdOrderOneSided(),
bottom = Operators.OneSided3rdOrder(),
top = Operators.OneSided3rdOrder(),
)
FCTZalesak = Operators.FCTZalesak(
bottom = Operators.FirstOrderOneSided(),
top = Operators.FirstOrderOneSided(),
bottom = Operators.OneSided1stOrder(),
top = Operators.OneSided1stOrder(),
)
@. yₜ.q =
-divf2c(
Expand Down
4 changes: 2 additions & 2 deletions examples/hybrid/box/limiters_advection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ function vertical_tendency!(yₜ, y, cache, t)
bottom = Operators.SetValue(Geometry.Contravariant3Vector(FT(0))),
)
upwind3 = Operators.Upwind3rdOrderBiasedProductC2F(
bottom = Operators.ThirdOrderOneSided(),
top = Operators.ThirdOrderOneSided(),
bottom = Operators.OneSided3rdOrder(),
top = Operators.OneSided3rdOrder(),
)
ax12 = (Geometry.Covariant12Axis(),)
ax3 = (Geometry.Covariant3Axis(),)
Expand Down
4 changes: 2 additions & 2 deletions examples/hybrid/plane/bubble_2d_invariant_rhoe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ function rhs_invariant!(dY, Y, _, t)
)
# 1.c) vertical upwinding
third_order_upwind_c2f = Operators.Upwind3rdOrderBiasedProductC2F(
bottom = Operators.ThirdOrderOneSided(),
top = Operators.ThirdOrderOneSided(),
bottom = Operators.OneSided3rdOrder(),
top = Operators.OneSided3rdOrder(),
)
# we want the total u³ at the boundary to be zero: we can either constrain
# both to be zero, or allow one to be non-zero and set the other to be its
Expand Down
4 changes: 2 additions & 2 deletions examples/hybrid/plane/topo_schar_nh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ function rhs_invariant!(dY, Y, _, t)

f_upwind_product1 = Operators.UpwindBiasedProductC2F()
f_upwind_product3 = Operators.Upwind3rdOrderBiasedProductC2F(
bottom = Operators.FirstOrderOneSided(),
top = Operators.FirstOrderOneSided(),
bottom = Operators.OneSided1stOrder(),
top = Operators.OneSided1stOrder(),
)

dρ .= 0 .*
Expand Down
12 changes: 6 additions & 6 deletions examples/hybrid/sphere/deformation_flow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ const upwind1 = Operators.UpwindBiasedProductC2F(
top = Operators.Extrapolate(),
)
const upwind3 = Operators.Upwind3rdOrderBiasedProductC2F(
bottom = Operators.ThirdOrderOneSided(),
top = Operators.ThirdOrderOneSided(),
bottom = Operators.OneSided3rdOrder(),
top = Operators.OneSided3rdOrder(),
)
const FCTZalesak = Operators.FCTZalesak(
bottom = Operators.FirstOrderOneSided(),
top = Operators.FirstOrderOneSided(),
bottom = Operators.OneSided1stOrder(),
top = Operators.OneSided1stOrder(),
)
const FCTBorisBook = Operators.FCTBorisBook(
bottom = Operators.FirstOrderOneSided(),
top = Operators.FirstOrderOneSided(),
bottom = Operators.OneSided1stOrder(),
top = Operators.OneSided1stOrder(),
)

# Reference pressure and density
Expand Down
8 changes: 4 additions & 4 deletions examples/hybrid/sphere/hadley_circulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ function tendency!(yₜ, y, parameters, t)
top = Operators.Extrapolate(),
)
upwind3 = Operators.Upwind3rdOrderBiasedProductC2F(
bottom = Operators.ThirdOrderOneSided(),
top = Operators.ThirdOrderOneSided(),
bottom = Operators.OneSided3rdOrder(),
top = Operators.OneSided3rdOrder(),
)
FCTZalesak = Operators.FCTZalesak(
bottom = Operators.FirstOrderOneSided(),
top = Operators.FirstOrderOneSided(),
bottom = Operators.OneSided1stOrder(),
top = Operators.OneSided1stOrder(),
)
hdiv = Operators.Divergence()
hwdiv = Operators.WeakDivergence()
Expand Down
4 changes: 2 additions & 2 deletions examples/hybrid/staggered_nonhydrostatic_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ const ᶜFC = Operators.FluxCorrectionC2C(
)
const ᶠupwind_product1 = Operators.UpwindBiasedProductC2F()
const ᶠupwind_product3 = Operators.Upwind3rdOrderBiasedProductC2F(
bottom = Operators.ThirdOrderOneSided(),
top = Operators.ThirdOrderOneSided(),
bottom = Operators.OneSided3rdOrder(),
top = Operators.OneSided3rdOrder(),
)

const ᶜinterp_stencil = Operators.Operator2Stencil(ᶜinterp)
Expand Down
4 changes: 3 additions & 1 deletion src/Operators/Operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ using ..RecursiveApply
include("common.jl")
include("spectralelement.jl")
include("numericalflux.jl")
include("finitedifference.jl")
include("finitedifference/finitedifference.jl")
include("finitedifference/upwinding.jl")
include("finitedifference/deprecated.jl")
include("stencilcoefs.jl")
include("operator2stencil.jl")
include("pointwisestencil.jl")
Expand Down
Loading

0 comments on commit f39b509

Please sign in to comment.