Skip to content

Commit

Permalink
BC and smoothing stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
wilfonba committed Feb 20, 2025
1 parent 0a26135 commit 95b76a4
Show file tree
Hide file tree
Showing 6 changed files with 314 additions and 52 deletions.
3 changes: 3 additions & 0 deletions src/common/m_derived_types.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ module m_derived_types
integer :: beg
integer :: end

logical :: b_extrap_ic
logical :: e_extrap_ic

real(wp) :: vb1
real(wp) :: vb2
real(wp) :: vb3
Expand Down
2 changes: 1 addition & 1 deletion src/pre_process/m_global_parameters.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ contains

! Computational domain parameters
m = dflt_int; n = 0; p = 0

cyl_coord = .false.

x_domain%beg = dflt_real
Expand Down
46 changes: 46 additions & 0 deletions src/pre_process/m_mpi_proxy.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,22 @@ contains
end if
end do
! Boundary condition at the beginning
if (proc_coords(3) > 0 .or. (bc_z%beg == -1 .and. num_procs_z > 1)) then
proc_coords(3) = proc_coords(3) - 1
call MPI_CART_RANK(MPI_COMM_CART, proc_coords, &
bc_z%beg, ierr)
proc_coords(3) = proc_coords(3) + 1
end if
! Boundary condition at the end
if (proc_coords(3) > 0 .or. (bc_z%end == -1 .and. num_procs_z > 1)) then
proc_coords(3) = proc_coords(3) + 1
call MPI_CART_RANK(MPI_COMM_CART, proc_coords, &
bc_z%end, ierr)
proc_coords(3) = proc_coords(3) - 1
end if
! Beginning and end sub-domain boundary locations
if (parallel_io .neqv. .true.) then
if (old_grid .neqv. .true.) then
Expand Down Expand Up @@ -457,6 +473,22 @@ contains
end if
end do
! Boundary condition at the beginning
if (proc_coords(2) > 0 .or. (bc_y%beg == -1 .and. num_procs_y > 1)) then
proc_coords(2) = proc_coords(2) - 1
call MPI_CART_RANK(MPI_COMM_CART, proc_coords, &
bc_y%beg, ierr)
proc_coords(2) = proc_coords(2) + 1
end if
! Boundary condition at the end
if (proc_coords(2) < num_procs_y - 1 .or. (bc_y%end == -1 .and. num_procs_y > 1)) then
proc_coords(2) = proc_coords(2) + 1
call MPI_CART_RANK(MPI_COMM_CART, proc_coords, &
bc_y%end, ierr)
proc_coords(2) = proc_coords(2) - 1
end if
! Beginning and end sub-domain boundary locations
if (parallel_io .neqv. .true.) then
if (old_grid .neqv. .true.) then
Expand Down Expand Up @@ -522,6 +554,20 @@ contains
end if
end do
! Boundary condition at the beginning
if (proc_coords(1) > 0 .or. (bc_x%beg == -1 .and. num_procs_x > 1)) then
proc_coords(1) = proc_coords(1) - 1
call MPI_CART_RANK(MPI_COMM_CART, proc_coords, bc_x%beg, ierr)
proc_coords(1) = proc_coords(1) + 1
end if
! Boundary condition at the end
if (proc_coords(1) < num_procs_x - 1 .or. (bc_x%end == -1 .and. num_procs_x > 1)) then
proc_coords(1) = proc_coords(1) + 1
call MPI_CART_RANK(MPI_COMM_CART, proc_coords, bc_x%end, ierr)
proc_coords(1) = proc_coords(1) - 1
end if
! Beginning and end sub-domain boundary locations
if (parallel_io .neqv. .true.) then
if (old_grid .neqv. .true.) then
Expand Down
Loading

0 comments on commit 95b76a4

Please sign in to comment.