Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non-product upwinding #1367

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions docs/src/operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ InterpolateC2F
InterpolateF2C
WeightedInterpolateC2F
WeightedInterpolateF2C
UpwindBiasedProductC2F
Upwind3rdOrderBiasedProductC2F
LeftBiased1stOrderC2F
RightBiased1stOrderC2F
LeftBiased3rdOrderC2F
RightBiased3rdOrderC2F
Upwind1stOrderC2F
Upwind3rdOrderC2F
FCTBorisBook
FCTZalesak
LeftBiasedC2F
RightBiasedC2F
LeftBiasedF2C
RightBiasedF2C
```

### Derivative operators
Expand All @@ -82,8 +82,6 @@ CurlC2F

```@docs
SetBoundaryOperator
FirstOrderOneSided
ThirdOrderOneSided
```

## Finite difference boundary conditions
Expand All @@ -95,6 +93,8 @@ SetValue
SetGradient
SetDivergence
Extrapolate
OneSided1stOrder
OneSided3rdOrder
```

## Internal APIs
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 @@ -47,12 +47,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 @@ -47,12 +47,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 @@ -178,8 +178,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 .* cρ
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 @@ -93,12 +93,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
Loading