Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
2951c12
attemtped merge
okBrian Mar 15, 2025
2ecd168
test
okBrian Mar 18, 2025
9c8d196
revert changes
okBrian Mar 18, 2025
5162888
finish merge?
okBrian Mar 24, 2025
ce31cdd
Updates
wilfonba Mar 24, 2025
c1ffeac
test suite, format, lint
wilfonba Mar 24, 2025
db4efb2
fix ling
wilfonba Mar 24, 2025
a40ac60
fix no mpi build
wilfonba Mar 24, 2025
63bd748
fix documentation build
wilfonba Mar 24, 2025
37d626a
add checking to BC Patches
okBrian Mar 26, 2025
34bedcd
fixed checker, bc directory won't be created w/o bc patches defined
okBrian Mar 26, 2025
6ab721e
merge
okBrian Mar 26, 2025
6ca58d2
fix test suite
wilfonba Mar 26, 2025
5142a08
fixed m_checker for -17 & fixed boundary condition files to be create…
okBrian Mar 31, 2025
f1383af
fixed bc check for -17
okBrian Mar 31, 2025
3542ef2
asdf
wilfonba Apr 2, 2025
7665c5c
fix seg fault
okBrian Apr 9, 2025
abeeb3e
added regressino test and fixed spelling
okBrian Apr 9, 2025
0f5af3f
merge w/ master
okBrian Apr 14, 2025
420d716
fix merge
okBrian Apr 14, 2025
e08c93a
prettyify, lint, and fix test suite
okBrian Apr 14, 2025
fa9e724
merge
okBrian Apr 14, 2025
e214f26
fix lint and format
okBrian Apr 14, 2025
aaaabc7
address comments
wilfonba Apr 17, 2025
4ca0c25
format
wilfonba Apr 17, 2025
7167f40
fix symmetry
wilfonba Apr 17, 2025
0e3e05b
fix num_bc_patches checker
wilfonba Apr 17, 2025
a69e49f
wip remove macros
okBrian Apr 20, 2025
c93f211
removed fypp macros
okBrian Apr 21, 2025
7ccbe7a
added color function, added qbmm, fixed k, l ordering
okBrian Apr 24, 2025
abcdf2f
fixed 2D cases
okBrian Apr 28, 2025
f2dcbaf
some requested changes and test suite (on CPUs)
wilfonba Apr 30, 2025
727e9d9
fix GPU bug
wilfonba Apr 30, 2025
e462db4
white space cleanup
wilfonba Apr 30, 2025
997f2c4
(CPU) works?
okBrian May 1, 2025
6ebfbec
fix gpu
wilfonba May 1, 2025
c0bb0a8
format
wilfonba May 1, 2025
8b96995
documentation and additional input checks
wilfonba May 2, 2025
a89512e
format and remove extra file
wilfonba May 2, 2025
cf4f611
spell check
wilfonba May 2, 2025
03c9c66
bug fix
wilfonba May 2, 2025
dcde7a1
update BC enumeration
wilfonba May 2, 2025
9e68edd
fix debug and format
okBrian May 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/include/inline_boundary_conditions.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
end do
#:enddef

#:def COLOR_FUNC_BC(DEST, SRC)
#:def COLOR_FUNC_EXTRAPOLATION(DEST, SRC)
do i = 1, num_dims + 1
do j = 1, buff_size
c_divs(i)%sf(${DEST}$) = c_divs(i)%sf(${SRC}$)
Expand Down
959 changes: 480 additions & 479 deletions src/common/m_boundary_common.fpp

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions src/common/m_constants.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ module m_constants
integer, parameter :: fourier_rings = 5 !< Fourier filter ring limit
integer, parameter :: num_fluids_max = 10 !< Maximum number of fluids in the simulation
integer, parameter :: num_probes_max = 10 !< Maximum number of flow probes in the simulation
integer, parameter :: num_patches_max = 25
integer, parameter :: num_patches_max = 10
integer, parameter :: num_bc_patches_max = 10
integer, parameter :: pathlen_max = 400
integer, parameter :: nnode = 4 !< Number of QBMM nodes
real(wp), parameter :: dflt_alf_factor = 10._wp
integer, parameter :: gp_layers = 3 !< Number of ghost point layers for IBM
real(wp), parameter :: capillary_cutoff = 1e-6 !< color function gradient magnitude at which to apply the surface tension fluxes
real(wp), parameter :: acoustic_spatial_support_width = 2.5_wp !< Spatial support width of acoustic source, used in s_source_spatial
Expand Down
64 changes: 17 additions & 47 deletions src/common/m_mpi_common.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,76 +50,46 @@ contains
subroutine s_initialize_mpi_common_module

#ifdef MFC_MPI

#ifdef MFC_PRE_PROCESS
if (n > 0) then
if (p > 0) then

halo_size = -1 + buff_size*sys_size* &
& (m + 2*buff_size + 1)* &
& (n + 2*buff_size + 1)* &
& (p + 2*buff_size + 1)/ &
& (min(m, n, p) + 2*buff_size + 1)
else
halo_size = -1 + buff_size*sys_size* &
& (max(m, n) + 2*buff_size + 1)
end if
else
halo_size = -1 + buff_size*sys_size
end if

v_size = sys_size

allocate (q_prims_buff_send(0:halo_size))

allocate (q_prims_buff_recv(0:ubound(q_prims_buff_send, 1)))
#endif

! Allocating q_prims_buff_send/recv and ib_buff_send/recv. Please note that
! for the sake of simplicity, both variables are provided sufficient
! storage to hold the largest buffer in the computational domain.
#ifdef MFC_SIMULATION
if (qbmm .and. .not. polytropic) then
if (n > 0) then
if (p > 0) then
@:ALLOCATE(q_prims_buff_send(0:-1 + buff_size*(sys_size + 2*nb*4)* &
halo_size = -1 + buff_size*(sys_size + 2*nb*4)* &
& (m + 2*buff_size + 1)* &
& (n + 2*buff_size + 1)* &
& (p + 2*buff_size + 1)/ &
& (min(m, n, p) + 2*buff_size + 1)))
& (min(m, n, p) + 2*buff_size + 1)
else
@:ALLOCATE(q_prims_buff_send(0:-1 + buff_size*(sys_size + 2*nb*4)* &
& (max(m, n) + 2*buff_size + 1)))
halo_size = -1 + buff_size*(sys_size + 2*nb*4)* &
& (max(m, n) + 2*buff_size + 1)
end if
else
@:ALLOCATE(q_prims_buff_send(0:-1 + buff_size*(sys_size + 2*nb*4)))
halo_size = -1 + buff_size*(sys_size + 2*nb*4)
end if

@:ALLOCATE(q_prims_buff_recv(0:ubound(q_prims_buff_send, 1)))

v_size = sys_size + 2*nb*4
else
if (n > 0) then
if (p > 0) then
@:ALLOCATE(q_prims_buff_send(0:-1 + buff_size*sys_size* &
& (m + 2*buff_size + 1)* &
& (n + 2*buff_size + 1)* &
& (p + 2*buff_size + 1)/ &
& (min(m, n, p) + 2*buff_size + 1)))
halo_size = -1 + buff_size*sys_size* &
& (m + 2*buff_size + 1)* &
& (n + 2*buff_size + 1)* &
& (p + 2*buff_size + 1)/ &
& (min(m, n, p) + 2*buff_size + 1)
else
@:ALLOCATE(q_prims_buff_send(0:-1 + buff_size*sys_size* &
& (max(m, n) + 2*buff_size + 1)))
halo_size = -1 + buff_size*sys_size* &
& (max(m, n) + 2*buff_size + 1)
end if
else
@:ALLOCATE(q_prims_buff_send(0:-1 + buff_size*sys_size))
halo_size = -1 + buff_size*sys_size
end if
end if

@:ALLOCATE(q_prims_buff_recv(0:ubound(q_prims_buff_send, 1)))
v_size = sys_size

v_size = sys_size
end if
#endif
allocate (q_prims_buff_send(0:halo_size))

allocate (q_prims_buff_recv(0:ubound(q_prims_buff_send, 1)))
#endif

end subroutine s_initialize_mpi_common_module
Expand Down
4 changes: 3 additions & 1 deletion src/pre_process/m_checker.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,10 @@ contains
subroutine s_check_bc

integer :: i
character(len=5) :: iStr !< for int to string conversion

@:PROHIBIT(num_bc_patches > num_bc_patches_max, "num_bc_patches must be <= 10")
call s_int_to_str(i, iStr)
@:PROHIBIT(num_bc_patches > num_bc_patches_max, "num_bc_patches must be <= "//trim(iStr))

do i = 1, num_bc_patches

Expand Down
5 changes: 0 additions & 5 deletions src/pre_process/m_perturbation.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ module m_perturbation
use m_eigen_solver ! Subroutines to solve eigenvalue problem for

use m_boundary_common ! Boundary conditions module
! complex general matrix

use m_helper

use ieee_arithmetic

Expand All @@ -31,8 +28,6 @@ module m_perturbation

real(wp), allocatable, dimension(:, :, :, :) :: q_prim_temp

! real(wp) :: bcxb, bcxe, bcyb, bcye, bczb, bcze

contains

subroutine s_initialize_perturbation_module()
Expand Down
2 changes: 0 additions & 2 deletions src/pre_process/m_start_up.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,6 @@ contains
pref = 1._wp
end if
call s_initialize_mpi_common_module()
! call s_initialize_mpi_proxy_module()
call s_initialize_data_output_module()
call s_initialize_variables_conversion_module()
call s_initialize_grid_module()
Expand Down Expand Up @@ -933,7 +932,6 @@ contains

! Deallocation procedures for the modules
call s_finalize_mpi_common_module()
! call s_finalize_mpi_proxy_module()
call s_finalize_grid_module()
call s_finalize_variables_conversion_module()
call s_finalize_data_output_module()
Expand Down
2 changes: 1 addition & 1 deletion toolchain/mfc/run/case_dicts.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def analytic(self):
'bubbles_lagrange': ParamType.LOG,
})

for ib_id in range(1, 25+1):
for ib_id in range(1, 10+1):
for real_attr, ty in [("geometry", ParamType.INT), ("radius", ParamType.REAL),
("theta", ParamType.REAL), ("slip", ParamType.LOG),
("c", ParamType.REAL), ("p", ParamType.REAL),
Expand Down
Loading