Skip to content

Commit 89c3bc2

Browse files
authored
added test_advection for analytical solutions (#4)
1 parent 5efb7cd commit 89c3bc2

15 files changed

+951
-352
lines changed

examples/Kolmogrov2d_rk4_fvm_forced_turbulence.ipynb

Lines changed: 21 additions & 12 deletions
Large diffs are not rendered by default.

examples/Kolmogrov2d_rk4_spectral_forced_turbulence.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
},
9191
{
9292
"cell_type": "code",
93-
"execution_count": 6,
93+
"execution_count": null,
9494
"metadata": {},
9595
"outputs": [
9696
{
@@ -115,7 +115,7 @@
115115
" drag=0.1,\n",
116116
" smooth=True,\n",
117117
" forcing_fn=forcing_fn,\n",
118-
" solver=RK4CrankNicolsonStepper(),\n",
118+
" step_fn=RK4CrankNicolsonStepper(),\n",
119119
").to(device)\n",
120120
"\n",
121121
"result = get_trajectory_imex(\n",

fno/data_gen/data_gen_Kolmogorov2d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def main(args):
122122
drag=0.1,
123123
smooth=True,
124124
forcing_fn=forcing_fn,
125-
solver=RK4CrankNicolsonStepper(),
125+
step_fn=RK4CrankNicolsonStepper(),
126126
).to(device)
127127

128128
num_batches = total_samples // batch_size

fno/data_gen/data_gen_McWilliams2d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def main(args):
119119
drag=0,
120120
smooth=True,
121121
forcing_fn=None,
122-
solver=RK4CrankNicolsonStepper(),
122+
step_fn=RK4CrankNicolsonStepper(),
123123
).to(device)
124124

125125
num_batches = total_samples // batch_size

fno/data_gen/data_gen_fno.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,7 @@ def main(args):
176176
grid=grid,
177177
smooth=True,
178178
forcing_fn=forcing_fn,
179-
solver=step_fn,
180-
order=2,
179+
step_fn=step_fn,
181180
).to(device)
182181

183182
if os.path.exists(data_filepath) and not force_rerun:

fno/data_gen/grf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(
3434
n=128,
3535
alpha=2,
3636
tau=3,
37-
device="cuda",
37+
device:torch.device=device,
3838
dtype=torch.float,
3939
normalize=False,
4040
smoothing=False,

0 commit comments

Comments
 (0)