Skip to content

Commit

Permalink
fix IGG setup in 2D miniapps
Browse files Browse the repository at this point in the history
  • Loading branch information
albert-de-montserrat committed Dec 17, 2023
1 parent fa47249 commit 3636476
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ n = 128
nx = n*ar - 2
ny = n - 2
igg = if !(JustRelax.MPI.Initialized()) # initialize (or not) MPI grid
IGG(init_global_grid(nx, ny, 0; init_MPI= true)...)
IGG(init_global_grid(nx, ny, 1; init_MPI= true)...)
else
igg
end
Expand Down
2 changes: 1 addition & 1 deletion miniapps/benchmarks/stokes2D/VanKeken.jl/VanKeken.jl
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ n = 128 + 2
nx = n - 2
ny = n - 2
igg = if !(JustRelax.MPI.Initialized())
IGG(init_global_grid(nx, ny, 0; init_MPI = true)...)
IGG(init_global_grid(nx, ny, 1; init_MPI = true)...)
else
igg
end
Expand Down
2 changes: 1 addition & 1 deletion miniapps/benchmarks/stokes2D/shear_band/ShearBand2D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ nx = n - 2
ny = n - 2
figdir = "ShearBands2D"
igg = if !(JustRelax.MPI.Initialized())
IGG(init_global_grid(nx, ny, 0; init_MPI = true)...)
IGG(init_global_grid(nx, ny, 1; init_MPI = true)...)
else
igg
end
Expand Down
2 changes: 1 addition & 1 deletion miniapps/benchmarks/stokes2D/solcx/SolCx.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function solCx(
ni = nx, ny # number of nodes in x- and y-
li = lx, ly # domain length in x- and y-
origin = zero(nx), zero(ny)
igg = IGG(init_global_grid(nx, ny, 0; init_MPI=init_MPI)...) #init MPI
igg = IGG(init_global_grid(nx, ny, 1; init_MPI=init_MPI)...) #init MPI
di = @. li / (nx_g(), ny_g()) # grid step in x- and -y
xci, xvi = lazy_grid(di, li, ni; origin=origin) # nodes at the center and vertices of the cells
g = 1
Expand Down
2 changes: 1 addition & 1 deletion miniapps/benchmarks/stokes2D/solkz/SolKz.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function solKz(;
ni = nx, ny # number of nodes in x- and y-
li = lx, ly # domain length in x- and y-
origin = zero(nx), zero(ny)
igg = IGG(init_global_grid(nx, ny, 0; init_MPI=init_MPI)...) # init MPI
igg = IGG(init_global_grid(nx, ny, 1; init_MPI=init_MPI)...) # init MPI
di = @. li / (nx_g(), ny_g()) # grid step in x- and -y
xci, xvi = lazy_grid(di, li, ni; origin=origin) # nodes at the center and vertices of the cells
g = 1 # gravity
Expand Down
2 changes: 1 addition & 1 deletion miniapps/benchmarks/stokes2D/solvi/SolVi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function solVi(;
ni = (nx, ny) # number of nodes in x- and y-
li = (lx, ly) # domain length in x- and y-
origin = zero(nx), zero(ny)
igg = IGG(init_global_grid(nx, ny, 0; init_MPI=init_MPI)...) # init MPI
igg = IGG(init_global_grid(nx, ny, 1; init_MPI=init_MPI)...) # init MPI
di = @. li / (nx_g(), ny_g()) # grid step in x- and -y
xci, xvi = lazy_grid(di, li, ni; origin=origin) # nodes at the center and vertices of the cells

Expand Down

0 comments on commit 3636476

Please sign in to comment.