Skip to content

Commit 400ae0b

Browse files
authored
Merge pull request #86 from FourierFlows/RemoveGeophysicalFlows
Remove Geophysical Flows Modules
2 parents 2bad3de + b43dbb8 commit 400ae0b

33 files changed

+189
-3836
lines changed

.travis.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,16 @@ matrix:
1414
- julia: 1.0
1515
- julia: nightly
1616

17-
before_script:
18-
- julia -e 'using Pkg; Pkg.add("JLD2"); Pkg.add("SpecialFunctions"); Pkg.add("CuArrays");'
19-
- julia -e 'using Pkg; Pkg.add("Interpolations"); Pkg.add("Requires");'
20-
- julia -e 'using Pkg; Pkg.add("FFTW");'
21-
22-
# script:
23-
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
24-
# - julia -e 'using Pkg; Pkg.test("FourierFlows", coverage=true)'
17+
# before_script:
18+
# - julia -e 'using Pkg; Pkg.add("JLD2"); Pkg.add("SpecialFunctions"); Pkg.add("CuArrays");'
19+
# - julia -e 'using Pkg; Pkg.add("Interpolations"); Pkg.add("Requires");'
20+
# - julia -e 'using Pkg; Pkg.add("FFTW");'
2521

2622
after_success:
2723
- julia -e 'using Pkg; Pkg.add("Documenter")'
2824
- julia -e 'using Pkg; Pkg.add("Documenter"); Pkg.dir("FourierFlows"); include(joinpath("docs", "make.jl"))'
2925
- julia -e 'using Pkg; Pkg.add("Coverage"); Pkg.dir("FourierFlows"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
26+
- julia -e 'using Pkg; Pkg.add("Coverage"); Pkg.dir("FourierFlows"); using Coverage; Codecov.submit(Codecov.process_folder())''
3027

3128
notifications:
3229
email: true

Manifest.toml

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,27 @@ version = "0.8.10"
2727

2828
[[BinaryProvider]]
2929
deps = ["Libdl", "Pkg", "SHA", "Test"]
30-
git-tree-sha1 = "b530fbeb6f41ab5a83fbe3db1fcbe879334bcd2d"
30+
git-tree-sha1 = "38be61810f280c3c478f5c38aaf387f8f9199275"
3131
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
32-
version = "0.4.2"
32+
version = "0.5.1"
3333

3434
[[CUDAapi]]
35-
deps = ["InteractiveUtils", "Libdl", "Logging", "Pkg", "Test"]
36-
git-tree-sha1 = "576625a0922ab766ff5d7f685c6907d28dccf52f"
35+
deps = ["Libdl", "Logging", "Test"]
36+
git-tree-sha1 = "6684fd39c199e79456a121da40bbbcf370e646d3"
3737
uuid = "3895d2a7-ec45-59b8-82bb-cfc6a382f9b3"
38-
version = "0.5.0"
38+
version = "0.5.2"
3939

4040
[[CUDAdrv]]
41-
deps = ["CUDAapi", "InteractiveUtils", "Libdl", "Pkg", "Printf", "Test"]
42-
git-tree-sha1 = "0bbb47620dfda5b90dfc1820f6b44dfd71ad875c"
41+
deps = ["CUDAapi", "Libdl", "Printf", "Test"]
42+
git-tree-sha1 = "94a3b9afb137e8d08136b334e51a25375557ca24"
4343
uuid = "c5f51814-7f29-56b8-a69c-e4d8f6be1fde"
44-
version = "0.8.5"
44+
version = "0.8.6"
4545

4646
[[CUDAnative]]
4747
deps = ["CUDAapi", "CUDAdrv", "InteractiveUtils", "LLVM", "Libdl", "Logging", "Pkg", "Printf", "Statistics", "Test"]
48-
git-tree-sha1 = "d0f3aebc1fde1eb4822006da6b52854acffa6186"
48+
git-tree-sha1 = "debfe5af100e335b5df7109184e2e450f616dd1f"
4949
uuid = "be33ccc6-a3ff-5ff2-a52e-74243cff1e17"
50-
version = "0.8.10"
50+
version = "0.9.1"
5151

5252
[[CodecZlib]]
5353
deps = ["BinaryProvider", "Libdl", "Pkg", "Test", "TranscodingStreams"]
@@ -63,9 +63,9 @@ version = "0.2.0"
6363

6464
[[Compat]]
6565
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
66-
git-tree-sha1 = "ae262fa91da6a74e8937add6b613f58cd56cdad4"
66+
git-tree-sha1 = "ff2595695fc4f14427358ce2593f867085c45dcb"
6767
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
68-
version = "1.1.0"
68+
version = "1.2.0"
6969

7070
[[ComputationalResources]]
7171
deps = ["Pkg", "Test"]
@@ -75,9 +75,9 @@ version = "0.3.0"
7575

7676
[[Conda]]
7777
deps = ["Compat", "JSON", "VersionParsing"]
78-
git-tree-sha1 = "a47f9a2c7b80095e6a935536795635522fe27f5d"
78+
git-tree-sha1 = "85b5bf3ffcf4f39abe019dab1dd00a0aead8d882"
7979
uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d"
80-
version = "1.0.1"
80+
version = "1.0.2"
8181

8282
[[Coverage]]
8383
deps = ["Compat", "HTTP", "JSON", "MbedTLS"]
@@ -92,10 +92,10 @@ uuid = "3a865a2d-5b23-5a0f-bc46-62713ec82fae"
9292
version = "0.8.0"
9393

9494
[[DataStructures]]
95-
deps = ["InteractiveUtils", "REPL", "Random", "Serialization", "Test"]
96-
git-tree-sha1 = "5162c360c52e9265e0bfafb71415c31f746f7e04"
95+
deps = ["InteractiveUtils", "OrderedCollections", "REPL", "Random", "Serialization", "Test"]
96+
git-tree-sha1 = "8fc6e166e24fda04b2b648d4260cdad241788c54"
9797
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
98-
version = "0.12.0"
98+
version = "0.14.0"
9999

100100
[[Dates]]
101101
deps = ["Printf"]
@@ -141,9 +141,9 @@ version = "0.2.4"
141141

142142
[[FileIO]]
143143
deps = ["Pkg", "Random", "Test"]
144-
git-tree-sha1 = "b80161b7e679a1241f9441ebfa60b62d4239cf99"
144+
git-tree-sha1 = "481e4db939f005db39f7296599d0543c0744fe30"
145145
uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
146-
version = "1.0.1"
146+
version = "1.0.2"
147147

148148
[[FillArrays]]
149149
deps = ["Compat", "LinearAlgebra", "Random", "SparseArrays"]
@@ -159,15 +159,15 @@ version = "0.9.0"
159159

160160
[[GPUArrays]]
161161
deps = ["FFTW", "FillArrays", "LinearAlgebra", "Pkg", "Printf", "Random", "Serialization", "StaticArrays", "Test"]
162-
git-tree-sha1 = "718a68157a867a5883c7715f441190e70245e86e"
162+
git-tree-sha1 = "0b1a3469e776ae30d198e0e9d1ba8b1dedc352e6"
163163
uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
164-
version = "0.4.0"
164+
version = "0.4.2"
165165

166166
[[HTTP]]
167167
deps = ["Base64", "Dates", "Distributed", "IniFile", "MbedTLS", "Sockets", "Test"]
168-
git-tree-sha1 = "8a0f75e8b09df01d9f1ba9ad3fbf8b4983595d20"
168+
git-tree-sha1 = "b881f69331e85642be315c63d05ed65d6fc8a05b"
169169
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
170-
version = "0.6.14"
170+
version = "0.7.1"
171171

172172
[[IniFile]]
173173
deps = ["Test"]
@@ -181,9 +181,9 @@ uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
181181

182182
[[Interpolations]]
183183
deps = ["AxisAlgorithms", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "SharedArrays", "SparseArrays", "StaticArrays", "Test", "WoodburyMatrices"]
184-
git-tree-sha1 = "ea6fdc5d2144bd5ee3e465f4c9329a1562744803"
184+
git-tree-sha1 = "d3328be2a9624d62957607a8bdfcc164d24f1b6d"
185185
uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
186-
version = "0.9.0"
186+
version = "0.10.3"
187187

188188
[[JLD2]]
189189
deps = ["CodecZlib", "DataStructures", "FileIO", "LinearAlgebra", "Mmap", "Printf", "Random", "Test"]
@@ -198,10 +198,10 @@ uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
198198
version = "0.19.0"
199199

200200
[[LLVM]]
201-
deps = ["InteractiveUtils", "Printf", "Test", "Unicode"]
202-
git-tree-sha1 = "ca92c66f3bbea27d7dc755e19719bb571ac773a9"
201+
deps = ["InteractiveUtils", "Libdl", "Printf", "Test", "Unicode"]
202+
git-tree-sha1 = "68e13858ba0601d3616e76fecb2d0c472bb9a742"
203203
uuid = "929cbde3-209d-540e-8aea-75f648917ca0"
204-
version = "0.9.14"
204+
version = "0.9.15"
205205

206206
[[LibGit2]]
207207
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
@@ -227,10 +227,10 @@ deps = ["Base64"]
227227
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
228228

229229
[[MbedTLS]]
230-
deps = ["BinaryProvider", "Compat", "Libdl", "Pkg", "Sockets"]
231-
git-tree-sha1 = "17d5a81dbb1e682d4ff707c01f0afe5948068fa6"
230+
deps = ["BinaryProvider", "Libdl", "Pkg", "Random", "Sockets", "Test"]
231+
git-tree-sha1 = "3775d205b09b624aa06d39012a8920ba99cb3b8b"
232232
uuid = "739be429-bea8-5141-9913-cc70e7f3736d"
233-
version = "0.6.0"
233+
version = "0.6.3"
234234

235235
[[Mmap]]
236236
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
@@ -253,6 +253,12 @@ git-tree-sha1 = "f8cd140824f74f2948ff8660bc2292e16d29c1b7"
253253
uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
254254
version = "0.8.1"
255255

256+
[[OrderedCollections]]
257+
deps = ["Pkg", "Random", "Serialization", "Test"]
258+
git-tree-sha1 = "85619a3f3e17bb4761fe1b1fd47f0e979f964d5b"
259+
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
260+
version = "1.0.2"
261+
256262
[[Pkg]]
257263
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
258264
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
@@ -305,10 +311,10 @@ deps = ["LinearAlgebra", "Random"]
305311
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
306312

307313
[[SpecialFunctions]]
308-
deps = ["BinDeps", "BinaryProvider", "Compat", "Libdl"]
309-
git-tree-sha1 = "d12f8917be3782f4b800ba16003b8d0d4858c2e5"
314+
deps = ["BinDeps", "BinaryProvider", "Libdl", "Test"]
315+
git-tree-sha1 = "c35c9c76008babf4d658060fc64aeb369a41e7bd"
310316
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
311-
version = "0.7.0"
317+
version = "0.7.1"
312318

313319
[[StaticArrays]]
314320
deps = ["InteractiveUtils", "LinearAlgebra", "Random", "Statistics", "Test"]
@@ -347,7 +353,7 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
347353
deps = ["Compat"]
348354
git-tree-sha1 = "c9d5aa108588b978bd859554660c8a5c4f2f7669"
349355
uuid = "81def892-9a0e-5fdd-b105-ffc91e053289"
350-
version = "1.1.2"
356+
version = "1.1.3"
351357

352358
[[WoodburyMatrices]]
353359
deps = ["LinearAlgebra", "Random", "SparseArrays", "Test"]

README.md

Lines changed: 4 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
## Overview
2020

21-
This software provides solvers for partial differential equations on
21+
This software provides tools for partial differential equations on
2222
doubly-periodic domains using Fourier-based pseudospectral methods.
2323
A central intent of the software's design is also to provide a framework
2424
for writing new, fast solvers for new physical problems.
@@ -35,88 +35,10 @@ julia> using Pkg
3535
julia> Pkg.add("FourierFlows")
3636
```
3737

38-
## Source code organization
39-
40-
The code is divided along conceptual lines into problem-agnostic and
41-
problem-specific components. Files that contain problem-agnostic parts
42-
of the code are stored in `/src`. Files in `/src` define the domain,
43-
'AbstractTypes' that supertype problem-specific types, and
44-
time-stepper types and routines. Problem-specific modules are stores in
45-
`/src/physics`.
46-
47-
Here's an overview of the code structure:
48-
49-
- `/src/`
50-
- `FourierFlows.jl`
51-
- Defines supertyping AbstractParams, AbstractGrid, etc.
52-
- Defines a `Problem` type to organize the grid, vars, params,
53-
equation, and timestepper into a single structure.
54-
- Includes all sources files and physics files.
55-
- `timesteppers.jl`: defines modules and `stepforward!` routines for
56-
various time-steppers. Current implemented time-steppers are:
57-
- Forward Euler
58-
- 3rd-order Adams-Bashforth (AB3)
59-
- 4th-order Runge-Kutta (RK4)
60-
- 4th-order Runge-Kutta Exponential Time Differencing (ETDRK4)
61-
- 4th-order Dual Runge-Kutta (DualRK4)
62-
- 4th-order Dual Runge-Kutta Exponential Time Differencing (DualETDRK4)
63-
64-
For each time-stepper exists also a "filtered" version that filters
65-
out high-wavenumber spectral components of the solution. The `Dual`
66-
time-steppers evolve a state variable that comprises both of real valued
67-
and complex valued fields.
68-
69-
- `physics/`
70-
- `kuramotosivashinsky.jl`: Defines a `KuramotoSivashinsky` module that
71-
solves the 1D Kuramoto-Sivashinsky equation.
72-
- `twodturb.jl`: Defines a `TwoDTurb` module that provides a
73-
solver for the two-dimensional vorticity equation.
74-
- `barotropicqg.jl`: Defines a `BarotropicQG` module that provides
75-
several solvers for the barotropic QG model that permit beta,
76-
topography, beta + topography, and forcing.
77-
- `verticallyfourierboussinesq.jl`: Defines a `VerticallyFourierBoussinesq` module that
78-
solves the two-mode truncation of the Fourier series thin-layer approximation to the hydrostatic Boussinesq equations.
79-
- `verticallycosinerboussinesq.jl`: Defines a `VerticallyCosineBoussinesq` module that
80-
solves the two-mode truncation of the Sin/Cos series thin-layer approximation to the hydrostatic Boussinesq equations.
81-
- `traceradvdiff.jl`: Defines a `TracerAdvDiff` module that
82-
provides a solver for a two-dimensional and periodic tracer
83-
field in a given 2D flow (u, w), which can be an arbitrary
84-
function of x, z, and t.
85-
86-
87-
## Basic Notation
88-
89-
The code solves partial differential equations of the general
90-
form: `∂u/∂t = L*u + N(u)`, where `u` denotes the solution, which is
91-
typically an array of complex coefficients for each Fourier mode. In general,
92-
`L` is an array of coeffients that describe the linear part of the equation
93-
governing `u`, while `N(u)` is an arbitrary function that may contain terms
94-
both linear and nonlinear in `u`, as well forcing terms.
95-
The time-steppers currently implemented only accepted
96-
diagonal `L` arrays, which means that `L` and `u` have the same size.
97-
Currently, the ETDRK4 time-stepper is the only time-stepper implemented that
98-
makes special use of `L`. Both `L` and the function that calculates `N(u)` are
99-
stored as fields of the type `AbstractEquation`.
100-
101-
102-
## Writing fast solvers
103-
104-
The performance-intensive part of the code involves just two functions: the
105-
timestepping scheme `stepforward!`, and the function `calcN!` that
106-
calculates the nonlinear part of the given equation's right-hand side.
107-
Optimization of these two functions for a given problem will produce the
108-
fastest possible code.
109-
110-
111-
## Future work
112-
113-
The code is in the chaotic stage of development. A main goal for the future
114-
is to permit the use of shared memory parallelism in the compute-intensive
115-
routines (shared-memory parallelism provided already by FFTW/MKLFFT, but
116-
is not yet native to Julia for things like element-wise matrix multiplication,
117-
addition, and assignment). This feature may possibly be enabled by
118-
Intel Lab's [ParallelAccelerator][] package.
38+
## Example
11939

40+
For a simple example involving the advection and diffusion of a passive tracer,
41+
see `examples/tracers_cellularflow.jl`.
12042

12143
# Developers
12244

REQUIRE

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)