Skip to content

Commit 750ea5d

Browse files
committed
Implemented yz-implicit diffusion.
The implementation enables impdiff_mode-based z, yz, and xyz implicit temporal integration of diffusion paths.
1 parent efc0370 commit 750ea5d

44 files changed

Lines changed: 1103 additions & 334 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

configs/defaults/flags-default.mk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ CUSTOM_DEFINES = SINGLE_PRECISION \
113113

114114
DEFINES += $(foreach var,$(CUSTOM_DEFINES),$(if $(filter 1,$(strip $($(var)))), -D_$(var)))
115115

116-
ifeq ($(strip $(IMPDIFF_1D)),1)
117-
DEFINES += -D_IMPDIFF -D_IMPDIFF_1D
118-
endif
119116
ifeq ($(strip $(PENCIL_AXIS)),1)
120117
DEFINES += -D_DECOMP_X
121118
else ifeq ($(strip $(PENCIL_AXIS)),2)

docs/INFO_INPUT.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ This line sets the domain decomposition and orientation of the computational sub
217217

218218
`dims` is the **processor grid**, the number of domain partitions along the first and second decomposed directions (which depend on the selected default pencil orientation). `dims(1)*dims(2)` corresponds therefore to the total number of computational subdomains. Setting `dims(:) = [0,0]` will trigger a runtime autotuning step to find the processor grid that minimizes transpose times. Note, however, that other components of the algorithm (e.g., collective I/O) may also be affected by the choice of processor grid.
219219

220-
`ipencil_axis` sets the **orientation of the computational subdomains** (or pencils), being one of `[1,2,3]` for `[X,Y,Z]`-aligned pencils. X-aligned is the default if this option is not set, and should be optimal for all cases except for Z-implicit diffusion, where Z-pencils are recommended if `dims(2) > 1` in the input file; see the description of the `&numerics` namelist below.
220+
`ipencil_axis` sets the **orientation of the computational subdomains** (or pencils), being one of `[1,2,3]` for `[X,Y,Z]`-aligned pencils. X-aligned is the default if this option is not set, and should be optimal for all cases except for Z-implicit diffusion, where Z-pencils are recommended if `dims(2) > 1`, and YZ-implicit diffusion, where Y-pencils are recommended with `dims(2) = 1`; see the description of the `&numerics` namelist below.
221221

222222
# About the `&cudecomp` namelist under `input.nml`
223223

@@ -356,15 +356,17 @@ This namelist defines parameters related to the numerical discretization and com
356356

357357
```fortran
358358
&numerics
359-
is_impdiff = F, is_impdiff_1d = F
359+
impdiff_mode = 0
360360
is_poisson_pcr_tdma = F, is_poisson_fft = T, T
361361
/
362362
```
363363

364-
In these lines, `is_impdiff` and `is_impdiff_1d` enable the (semi-) **implicit temporal integration of diffusion terms**:
364+
In this line, `impdiff_mode` controls the (semi-) **implicit temporal integration of diffusion terms**:
365365

366-
* `is_impdiff`, if `.true.`, the diffusion term of the Navier-Stokes and scalar equations is integrated in time implicitly, which may improve the stability of the numerical algorithm for viscous-dominated flows.
367-
* `is_impdiff_1d` is similar to `is_impdiff`, but with implicit diffusion *only* along Z, which may be advantageous when the grid along Z is much finer than along the other directions; *for optimal parallel performance, the domain should not be decomposed along Z* (`ipencil_axis=3`, or `ipencil_axis = 1/2` with `dims(2) = 1`)
366+
* `0`: explicit diffusion in X, Y, and Z.
367+
* `1`: implicit diffusion only along Z.
368+
* `2`: implicit diffusion along Y and Z; this requires `ipencil_axis = 2` or `3` with `dims(2) = 1`, and `ipencil_axis = 2` is recommended.
369+
* `3`: implicit diffusion along all directions.
368370

369371
`is_poisson_pcr_tdma`, if `.true.`, allows for solving the Poisson/Helmholtz equations along Z with a parallel cyclic reduction--tridiagonal matrix algorithm (PCR-TDMA) method. This approach may result in major gains in scalability for pencil-distributed simulations at scale, on many GPUs.
370372

examples/_manuscript_lid_driven_cavity/input.nml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ cudecomp_h_comm_backend = 0, cudecomp_is_h_enable_nccl = T, cudecomp_is_h_enable
3030
/
3131

3232
&numerics
33-
is_impdiff = F, is_impdiff_1d = F
33+
impdiff_mode = 0
3434
is_poisson_pcr_tdma = F
3535
is_poisson_fft = T, T
3636
/

examples/_manuscript_taylor_green_vortex/input.nml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ cudecomp_h_comm_backend = 0, cudecomp_is_h_enable_nccl = T, cudecomp_is_h_enable
3030
/
3131

3232
&numerics
33-
is_impdiff = F, is_impdiff_1d = F
33+
impdiff_mode = 0
3434
is_poisson_pcr_tdma = F
3535
is_poisson_fft = T, T
3636
/

examples/_manuscript_turbulent_channel/input.nml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ cudecomp_h_comm_backend = 0, cudecomp_is_h_enable_nccl = T, cudecomp_is_h_enable
3030
/
3131

3232
&numerics
33-
is_impdiff = F, is_impdiff_1d = F
33+
impdiff_mode = 0
3434
is_poisson_pcr_tdma = F
3535
is_poisson_fft = T, T
3636
/

examples/_manuscript_turbulent_duct/input.nml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ cudecomp_h_comm_backend = 0, cudecomp_is_h_enable_nccl = T, cudecomp_is_h_enable
3030
/
3131

3232
&numerics
33-
is_impdiff = F, is_impdiff_1d = F
33+
impdiff_mode = 0
3434
is_poisson_pcr_tdma = F
3535
is_poisson_fft = T, T
3636
/

examples/closed_box/input.nml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ cudecomp_h_comm_backend = 0, cudecomp_is_h_enable_nccl = T, cudecomp_is_h_enable
3030
/
3131

3232
&numerics
33-
is_impdiff = F, is_impdiff_1d = F
33+
impdiff_mode = 0
3434
is_poisson_pcr_tdma = F
3535
is_poisson_fft = T, T
3636
/

examples/couette/input.nml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ cudecomp_h_comm_backend = 0, cudecomp_is_h_enable_nccl = T, cudecomp_is_h_enable
3030
/
3131

3232
&numerics
33-
is_impdiff = F, is_impdiff_1d = F
33+
impdiff_mode = 0
3434
is_poisson_pcr_tdma = F
3535
is_poisson_fft = T, T
3636
/

examples/developing_channel/input.nml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ cudecomp_h_comm_backend = 0, cudecomp_is_h_enable_nccl = T, cudecomp_is_h_enable
3030
/
3131

3232
&numerics
33-
is_impdiff = F, is_impdiff_1d = F
33+
impdiff_mode = 0
3434
is_poisson_pcr_tdma = F
3535
is_poisson_fft = T, T
3636
/

examples/developing_duct/input.nml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ cudecomp_h_comm_backend = 0, cudecomp_is_h_enable_nccl = T, cudecomp_is_h_enable
3030
/
3131

3232
&numerics
33-
is_impdiff = F, is_impdiff_1d = F
33+
impdiff_mode = 0
3434
is_poisson_pcr_tdma = F
3535
is_poisson_fft = T, T
3636
/

0 commit comments

Comments
 (0)