Skip to content

Commit

Permalink
Merge pull request #84 from FourierFlows/MinorFixes
Browse files Browse the repository at this point in the history
Aesthetics in BarotropicQG and TwoDNavierStokes modules
  • Loading branch information
navidcy authored May 28, 2020
2 parents 248b769 + 4445425 commit cf304c6
Show file tree
Hide file tree
Showing 10 changed files with 323 additions and 303 deletions.
5 changes: 2 additions & 3 deletions examples/barotropicqg_acc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ nothing # hide
Lx = 2π # domain size
ν = 4e-15 # viscosity
= 4 # viscosity order
f0 = -1.0 # Coriolis parameter
β = 1.4015 # the y-gradient of planetary PV
μ = 1e-2 # linear drag
F = 0.0012 # normalized wind stress forcing on domain-averaged zonal flow U(t) flow
Expand All @@ -58,8 +57,8 @@ nothing # hide

# ## Problem setup
# We initialize a `Problem` by providing a set of keyword arguments,
prob = BarotropicQG.Problem(nx=nx, Lx=Lx, f0=f0, β=β, eta=topoPV,
calcFU=calcFU, ν=ν, nν=nν, μ=μ, dt=dt, stepper=stepper, dev=dev)
prob = BarotropicQG.Problem(dev; nx=nx, Lx=Lx, β=β, eta=topoPV,
calcFU=calcFU, ν=ν, nν=nν, μ=μ, dt=dt, stepper=stepper)
nothing # hide

# and define some shortcuts.
Expand Down
2 changes: 1 addition & 1 deletion examples/barotropicqg_betadecay.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ nothing # hide
# a viscosity coefficient ν leads to the module's default value: ν=0. In this
# example numerical instability due to accumulation of enstrophy in high wavenumbers
# is taken care with the `FilteredTimestepper` we picked.
prob = BarotropicQG.Problem(nx=nx, Lx=Lx, β=β, μ=μ, dt=dt, stepper=stepper, dev=dev)
prob = BarotropicQG.Problem(dev; nx=nx, Lx=Lx, β=β, μ=μ, dt=dt, stepper=stepper)
nothing # hide

# and define some shortcuts
Expand Down
4 changes: 2 additions & 2 deletions examples/barotropicqg_betaforced.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ nothing # hide
# a viscosity coefficient ν leads to the module's default value: ν=0. In this
# example numerical instability due to accumulation of enstrophy in high wavenumbers
# is taken care with the `FilteredTimestepper` we picked.
prob = BarotropicQG.Problem(nx=nx, Lx=Lx, β=β, μ=μ, dt=dt, stepper=stepper,
calcFq=calcFq!, stochastic=true, dev=dev)
prob = BarotropicQG.Problem(dev; nx=nx, Lx=Lx, β=β, μ=μ, dt=dt, stepper=stepper,
calcFq=calcFq!, stochastic=true)
nothing # hide

# Let's define some shortcuts.
Expand Down
2 changes: 1 addition & 1 deletion examples/twodnavierstokes_decaying.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ nothing # hide
# ## Problem setup
# We initialize a `Problem` by providing a set of keyword arguments. The
# `stepper` keyword defines the time-stepper to be used.
prob = TwoDNavierStokes.Problem(; nx=n, Lx=L, ny=n, Ly=L, dt=dt, stepper="FilteredRK4", dev=dev)
prob = TwoDNavierStokes.Problem(dev; nx=n, Lx=L, ny=n, Ly=L, dt=dt, stepper="FilteredRK4")
nothing # hide

# Next we define some shortcuts for convenience.
Expand Down
4 changes: 2 additions & 2 deletions examples/twodnavierstokes_stochasticforcing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ nothing # hide
# ## Problem setup
# We initialize a `Problem` by providing a set of keyword arguments. The
# `stepper` keyword defines the time-stepper to be used.
prob = TwoDNavierStokes.Problem(nx=n, Lx=L, ν=ν, nν=nν, μ=μ, nμ=nμ, dt=dt, stepper="ETDRK4",
calcF=calcF!, stochastic=true, dev=dev)
prob = TwoDNavierStokes.Problem(dev; nx=n, Lx=L, ν=ν, nν=nν, μ=μ, nμ=nμ, dt=dt, stepper="ETDRK4",
calcF=calcF!, stochastic=true)
nothing # hide

# Define some shortcuts for convenience.
Expand Down
Loading

0 comments on commit cf304c6

Please sign in to comment.