Skip to content

Commit

Permalink
Merge branch 'master' of github.com:FourierFlows/GeophysicalFlows.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
navidcy committed Apr 23, 2020
2 parents ae6397a + 88a331e commit fa67a6d
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 20 deletions.
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ julia:1.0:
- nvidia

# the "primary" target, where we require a new GPU to make sure all tests are run
julia:1.3:
julia:1.4:
image: juliagpu/cuda:10.1-cudnn7-cutensor1-devel-ubuntu18.04
extends:
- .julia:1.3
- .julia:1.4
- .test
tags:
- nvidia
Expand All @@ -31,5 +31,5 @@ julia:1.3:
# other tasks
coverage:
extends:
- .julia:1.3
- .julia:1.4
- .coverage
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ os:
- linux

julia:
- 1.3
- 1.0
- 1.4
- nightly

matrix:
Expand All @@ -19,7 +20,7 @@ matrix:
jobs:
include:
- stage: "Documentation"
julia: 1.3
julia: 1.4
os: linux
script:
- julia --project=docs/ -e 'using Pkg; Pkg.instantiate();
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
CuArrays = "^1"
CuArrays = "^1, ^2"
FFTW = "^1"
FourierFlows = "^0.4"
JLD2 = "^0.1"
Reexport = "^0.2"
SpecialFunctions = "^0.8, ^1, 0.10"
SpecialFunctions = "^0.8, 0.10, ^1"
julia = "^1"

[extras]
Expand Down
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
environment:
matrix:
- julia_version: 1.3
- julia_version: 1.0
- julia_version: 1.4
- julia_version: nightly

platform:
Expand Down
8 changes: 3 additions & 5 deletions src/barotropicqg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -384,13 +384,11 @@ end
Returns the extraction of domain-averaged energy by drag μ.
"""
@inline function drag(sol, v, p, g)
@. v.uh = g.Krsq^(-1) * abs2(sol)
@inline function drag(prob)
sol, v, p, g = prob.sol, prob.vars, prob.params, prob.grid
@. v.uh = g.invKrsq * abs2(sol)
v.uh[1, 1] = 0
p.μ/(g.Lx*g.Ly)*FourierFlows.parsevalsum(v.uh, g)
end

@inline drag(prob) = drag(prob.sol, prob.vars, prob.params, prob.grid)


end # module
8 changes: 3 additions & 5 deletions src/barotropicqgql.jl
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,11 @@ end
Returns the extraction of domain-averaged energy by drag mu.
"""
@inline function drag(sol, v, p, g)
@. v.uh = g.Krsq^(-1) * abs2(sol)
@inline function drag(prob)
sol, v, p, g = prob.sol, prob.vars, prob.params, prob.grid
@. v.uh = g.invKrsq * abs2(sol)
v.uh[1, 1] = 0
p.mu/(g.Lx*g.Ly)*parsevalsum(v.uh, g)
end

@inline drag(prob) = drag(prob.sol, prob.vars, prob.params, prob.grid)


end # module
2 changes: 0 additions & 2 deletions test/test_barotropicqg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ function test_bqg_deterministicforcingbudgets(dev::Device=CPU(); n=256, dt=0.01,

BarotropicQG.updatevars!(prob)

cfl = cl.dt*maximum([maximum(v.v)/g.dx, maximum(v.u)/g.dy])

E, D, W, R = diags

t = round*cl.t, digits=2)
Expand Down

2 comments on commit fa67a6d

@navidcy
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/13518

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.4 -m "<description of version>" fa67a6de6233ea3b617073764c67cbfa238480a8
git push origin v0.3.4

Please sign in to comment.