Skip to content

Commit

Permalink
Dirichlet face diffusion (erf-model#1753)
Browse files Browse the repository at this point in the history
* Dirichlet stencil for all diffusion fluxes at domain faces.

* Update Ctest benchmarks and reduce the CFL so that the scalar field remains stable.

* Fix index error and remake benchmarks.
  • Loading branch information
AMLattanzi authored Aug 22, 2024
1 parent 573e7b7 commit b8fd471
Show file tree
Hide file tree
Showing 71 changed files with 331 additions and 134 deletions.
221 changes: 181 additions & 40 deletions Source/Diffusion/DiffusionSrcForState_N.cpp

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions Tests/ERFGoldFiles/ScalarAdvDiff_order2/Header
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ y_velocity
z_velocity
scalar
3
0.010591524214559184
0.0058841801191995479
0
0 0 0
1 1 1
Expand All @@ -16,9 +16,12 @@ scalar
0.0625 0.0625 0.0625
0
0
0 1 0.010591524214559184
0 2 0.0058841801191995479
20
0 1
0 0.5
0 1
0 1
0.5 1
0 1
Level_0/Cell
Binary file modified Tests/ERFGoldFiles/ScalarAdvDiff_order2/Level_0/Cell_D_00000
Binary file not shown.
Binary file modified Tests/ERFGoldFiles/ScalarAdvDiff_order2/Level_0/Cell_D_00001
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 11 additions & 7 deletions Tests/ERFGoldFiles/ScalarAdvDiff_order2/Level_0/Cell_H
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
1
5
0
(1 0
((0,0,0) (15,15,15) (0,0,0))
(2 0
((0,0,0) (15,7,15) (0,0,0))
((0,8,0) (15,15,15) (0,0,0))
)
1
2
FabOnDisk: Cell_D_00000 0
FabOnDisk: Cell_D_00001 0

1,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-7.5471043704871564e-03,
2,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-4.3870801884518563e-03,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-4.3870801884518563e-03,

1,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,5.0021580139129156e-02,
2,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,6.6730748805811169e-01,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,6.6730748805811169e-01,

7 changes: 5 additions & 2 deletions Tests/ERFGoldFiles/ScalarAdvDiff_order3/Header
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ y_velocity
z_velocity
scalar
3
0.010591524214559184
0.0058841801191995479
0
0 0 0
1 1 1
Expand All @@ -16,9 +16,12 @@ scalar
0.0625 0.0625 0.0625
0
0
0 1 0.010591524214559184
0 2 0.0058841801191995479
20
0 1
0 0.5
0 1
0 1
0.5 1
0 1
Level_0/Cell
Binary file modified Tests/ERFGoldFiles/ScalarAdvDiff_order3/Level_0/Cell_D_00000
Binary file not shown.
Binary file modified Tests/ERFGoldFiles/ScalarAdvDiff_order3/Level_0/Cell_D_00001
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 11 additions & 7 deletions Tests/ERFGoldFiles/ScalarAdvDiff_order3/Level_0/Cell_H
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
1
5
0
(1 0
((0,0,0) (15,15,15) (0,0,0))
(2 0
((0,0,0) (15,7,15) (0,0,0))
((0,8,0) (15,15,15) (0,0,0))
)
1
2
FabOnDisk: Cell_D_00000 0
FabOnDisk: Cell_D_00001 0

1,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-4.1163115238247711e-04,
2,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-3.4989926596060194e-04,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-3.4989926596060194e-04,

1,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,4.7353103508608316e-02,
2,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,6.4304127384625165e-01,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,6.4304127384625165e-01,

7 changes: 5 additions & 2 deletions Tests/ERFGoldFiles/ScalarAdvDiff_order4/Header
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ y_velocity
z_velocity
scalar
3
0.010591524214559184
0.0058841801191995479
0
0 0 0
1 1 1
Expand All @@ -16,9 +16,12 @@ scalar
0.0625 0.0625 0.0625
0
0
0 1 0.010591524214559184
0 2 0.0058841801191995479
20
0 1
0 0.5
0 1
0 1
0.5 1
0 1
Level_0/Cell
Binary file modified Tests/ERFGoldFiles/ScalarAdvDiff_order4/Level_0/Cell_D_00000
Binary file not shown.
Binary file modified Tests/ERFGoldFiles/ScalarAdvDiff_order4/Level_0/Cell_D_00001
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 11 additions & 7 deletions Tests/ERFGoldFiles/ScalarAdvDiff_order4/Level_0/Cell_H
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
1
5
0
(1 0
((0,0,0) (15,15,15) (0,0,0))
(2 0
((0,0,0) (15,7,15) (0,0,0))
((0,8,0) (15,15,15) (0,0,0))
)
1
2
FabOnDisk: Cell_D_00000 0
FabOnDisk: Cell_D_00001 0

1,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-2.9516963361915262e-03,
2,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-1.1019701989397341e-04,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-1.1019701989397341e-04,

1,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,4.7131879103408103e-02,
2,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,6.5561458806517481e-01,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,6.5561458806517481e-01,

7 changes: 5 additions & 2 deletions Tests/ERFGoldFiles/ScalarAdvDiff_order5/Header
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ y_velocity
z_velocity
scalar
3
0.010591524214559184
0.0058841801191995479
0
0 0 0
1 1 1
Expand All @@ -16,9 +16,12 @@ scalar
0.0625 0.0625 0.0625
0
0
0 1 0.010591524214559184
0 2 0.0058841801191995479
20
0 1
0 0.5
0 1
0 1
0.5 1
0 1
Level_0/Cell
Binary file modified Tests/ERFGoldFiles/ScalarAdvDiff_order5/Level_0/Cell_D_00000
Binary file not shown.
Binary file modified Tests/ERFGoldFiles/ScalarAdvDiff_order5/Level_0/Cell_D_00001
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 11 additions & 7 deletions Tests/ERFGoldFiles/ScalarAdvDiff_order5/Level_0/Cell_H
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
1
5
0
(1 0
((0,0,0) (15,15,15) (0,0,0))
(2 0
((0,0,0) (15,7,15) (0,0,0))
((0,8,0) (15,15,15) (0,0,0))
)
1
2
FabOnDisk: Cell_D_00000 0
FabOnDisk: Cell_D_00001 0

1,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-7.5862652610388472e-06,
2,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-1.2211720940724713e-06,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-1.2211720940724713e-06,

1,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,4.4752540932320617e-02,
2,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,6.4895627167974990e-01,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,6.4895627167974990e-01,

7 changes: 5 additions & 2 deletions Tests/ERFGoldFiles/ScalarAdvDiff_order6/Header
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ y_velocity
z_velocity
scalar
3
0.010591524214559184
0.0058841801191995479
0
0 0 0
1 1 1
Expand All @@ -16,9 +16,12 @@ scalar
0.0625 0.0625 0.0625
0
0
0 1 0.010591524214559184
0 2 0.0058841801191995479
20
0 1
0 0.5
0 1
0 1
0.5 1
0 1
Level_0/Cell
Binary file modified Tests/ERFGoldFiles/ScalarAdvDiff_order6/Level_0/Cell_D_00000
Binary file not shown.
Binary file modified Tests/ERFGoldFiles/ScalarAdvDiff_order6/Level_0/Cell_D_00001
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 11 additions & 7 deletions Tests/ERFGoldFiles/ScalarAdvDiff_order6/Level_0/Cell_H
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
1
5
0
(1 0
((0,0,0) (15,15,15) (0,0,0))
(2 0
((0,0,0) (15,7,15) (0,0,0))
((0,8,0) (15,15,15) (0,0,0))
)
1
2
FabOnDisk: Cell_D_00000 0
FabOnDisk: Cell_D_00001 0

1,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-3.6398783894317811e-03,
2,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-8.5494473689909009e-04,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-8.5494473689909009e-04,

1,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,4.6050329646966107e-02,
2,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,6.5324031661389248e-01,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,6.5324031661389248e-01,

7 changes: 5 additions & 2 deletions Tests/ERFGoldFiles/ScalarAdvDiff_weno3/Header
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ y_velocity
z_velocity
scalar
3
0.010591524214559184
0.0058841801191995479
0
0 0 0
1 1 1
Expand All @@ -16,9 +16,12 @@ scalar
0.0625 0.0625 0.0625
0
0
0 1 0.010591524214559184
0 2 0.0058841801191995479
20
0 1
0 0.5
0 1
0 1
0.5 1
0 1
Level_0/Cell
Binary file modified Tests/ERFGoldFiles/ScalarAdvDiff_weno3/Level_0/Cell_D_00000
Binary file not shown.
Binary file modified Tests/ERFGoldFiles/ScalarAdvDiff_weno3/Level_0/Cell_D_00001
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 11 additions & 7 deletions Tests/ERFGoldFiles/ScalarAdvDiff_weno3/Level_0/Cell_H
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
1
5
0
(1 0
((0,0,0) (15,15,15) (0,0,0))
(2 0
((0,0,0) (15,7,15) (0,0,0))
((0,8,0) (15,15,15) (0,0,0))
)
1
2
FabOnDisk: Cell_D_00000 0
FabOnDisk: Cell_D_00001 0

1,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-1.9975435193807833e+01,
2,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-1.4913442747520654e-05,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-1.4913442747520654e-05,

1,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,1.9260071966351692e+01,
2,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,6.4361171319925736e-01,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,6.4361171319925736e-01,

4 changes: 2 additions & 2 deletions Tests/ERFGoldFiles/ScalarAdvDiff_weno3z/Header
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ y_velocity
z_velocity
scalar
3
0.010591524214559184
0.0058841801191995479
0
0 0 0
1 1 1
Expand All @@ -16,7 +16,7 @@ scalar
0.0625 0.0625 0.0625
0
0
0 2 0.010591524214559184
0 2 0.0058841801191995479
20
0 1
0 0.5
Expand Down
Binary file modified Tests/ERFGoldFiles/ScalarAdvDiff_weno3z/Level_0/Cell_D_00000
Binary file not shown.
Binary file modified Tests/ERFGoldFiles/ScalarAdvDiff_weno3z/Level_0/Cell_D_00001
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 4 additions & 4 deletions Tests/ERFGoldFiles/ScalarAdvDiff_weno3z/Level_0/Cell_H
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ FabOnDisk: Cell_D_00000 0
FabOnDisk: Cell_D_00001 0

2,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-4.4035360990971079e-01,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-4.4035360990971079e-01,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-2.6784260415111319e-05,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-2.6784260415111319e-05,

2,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,4.9630783353472940e-01,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,4.9630783353472940e-01,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,6.4794844613230884e-01,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,6.4794844613230884e-01,

7 changes: 5 additions & 2 deletions Tests/ERFGoldFiles/ScalarAdvDiff_weno5/Header
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ y_velocity
z_velocity
scalar
3
0.010591524214559184
0.0058841801191995479
0
0 0 0
1 1 1
Expand All @@ -16,9 +16,12 @@ scalar
0.0625 0.0625 0.0625
0
0
0 1 0.010591524214559184
0 2 0.0058841801191995479
20
0 1
0 0.5
0 1
0 1
0.5 1
0 1
Level_0/Cell
Binary file modified Tests/ERFGoldFiles/ScalarAdvDiff_weno5/Level_0/Cell_D_00000
Binary file not shown.
Binary file modified Tests/ERFGoldFiles/ScalarAdvDiff_weno5/Level_0/Cell_D_00001
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 11 additions & 7 deletions Tests/ERFGoldFiles/ScalarAdvDiff_weno5/Level_0/Cell_H
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
1
5
0
(1 0
((0,0,0) (15,15,15) (0,0,0))
(2 0
((0,0,0) (15,7,15) (0,0,0))
((0,8,0) (15,15,15) (0,0,0))
)
1
2
FabOnDisk: Cell_D_00000 0
FabOnDisk: Cell_D_00001 0

1,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-1.0706262854478577e+00,
2,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-1.2758661744804046e-07,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,-1.2758661744804046e-07,

1,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,1.0122056267114736e+00,
2,5
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,6.5707090339958518e-01,
1.0000000000000000e+00,1.0000000000000000e+02,0.0000000000000000e+00,0.0000000000000000e+00,6.5707090339958518e-01,

Loading

0 comments on commit b8fd471

Please sign in to comment.