Skip to content

Commit f25e61d

Browse files
Finished invisid case
1 parent b7f00d1 commit f25e61d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/simulation/m_ibm.fpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,7 @@ contains
10101010
torques = 0._wp
10111011
10121012
! TODO :: This is currently only valid inviscid, and needs to be extended to add viscocity
1013+
$:GPU_PARALLEL_LOOP(private='[ib_idx,radial_vector,pressure_divergence,cell_volume]', copy='[forces,torques]', copyin='[ib_markers]', collapse=3)
10131014
do i = 0, m
10141015
do j = 0, n
10151016
do k = 0, p
@@ -1038,6 +1039,11 @@ contains
10381039
end do
10391040
end do
10401041
end do
1042+
$:END_GPU_PARALLEL_LOOP()
1043+
1044+
! reduce the forces across all MPI ranks
1045+
call s_mpi_allreduce_sum(forces, forces)
1046+
call s_mpi_allreduce_sum(torques, torques)
10411047
10421048
! apply the summed forces
10431049
do i = 1, num_ibs

0 commit comments

Comments
 (0)