From 6f4901d463c5d3ac513904d4e2a9c30da676f019 Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sat, 21 Feb 2026 00:01:59 -0500 Subject: [PATCH 1/7] Fix s_create_directory called with /* wildcard creating junk directory Co-Authored-By: Claude Opus 4.6 --- src/pre_process/m_start_up.fpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pre_process/m_start_up.fpp b/src/pre_process/m_start_up.fpp index 3b45547c29..64bf6e8d5c 100644 --- a/src/pre_process/m_start_up.fpp +++ b/src/pre_process/m_start_up.fpp @@ -505,7 +505,7 @@ contains ! process may be cleaned out to make room for new pre-process data. ! In addition, the time-step folder that will contain the new grid ! and initial condition data are also generated. - call s_create_directory(trim(proc_rank_dir)//'/*') + call s_delete_directory(trim(proc_rank_dir)) call s_create_directory(trim(proc_rank_dir)//'/0') end subroutine s_read_serial_ic_data_files From 8ab703dcaf4c1c0744ccb6c77ecca760204dfef0 Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sat, 21 Feb 2026 00:11:38 -0500 Subject: [PATCH 2/7] Fix second instance of quoted-glob wildcard in s_read_serial_grid_data_files Co-Authored-By: Claude Opus 4.6 --- src/pre_process/m_start_up.fpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pre_process/m_start_up.fpp b/src/pre_process/m_start_up.fpp index 64bf6e8d5c..92b721a31d 100644 --- a/src/pre_process/m_start_up.fpp +++ b/src/pre_process/m_start_up.fpp @@ -355,7 +355,7 @@ contains ! the time-step directory that will contain the new grid and initial ! condition data are also generated. if (old_ic .neqv. .true.) then - call s_delete_directory(trim(proc_rank_dir)//'/*') + call s_delete_directory(trim(proc_rank_dir)) call s_create_directory(trim(proc_rank_dir)//'/0') end if From 3ecb2dede2ee1f8e726b8f2cfec490a3f5bd4c61 Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Fri, 20 Feb 2026 22:17:46 -0500 Subject: [PATCH 3/7] Fix integral zmin/zmax never initialized (copy-paste of ymin/ymax) The z-bounds initialization for volume integrals repeats ymin/ymax instead of zmin/zmax. 3D volume integrals use uninitialized z-bounds. Co-Authored-By: Claude Opus 4.6 --- src/simulation/m_global_parameters.fpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simulation/m_global_parameters.fpp b/src/simulation/m_global_parameters.fpp index aa45e2668b..691138fb1f 100644 --- a/src/simulation/m_global_parameters.fpp +++ b/src/simulation/m_global_parameters.fpp @@ -814,8 +814,8 @@ contains integral(i)%xmax = dflt_real integral(i)%ymin = dflt_real integral(i)%ymax = dflt_real - integral(i)%ymin = dflt_real - integral(i)%ymax = dflt_real + integral(i)%zmin = dflt_real + integral(i)%zmax = dflt_real end do ! GRCBC flags From b39ce6cc09d39e857d427934120542afef15d05e Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Fri, 20 Feb 2026 22:18:38 -0500 Subject: [PATCH 4/7] Fix OBJ reader using j as both triangle counter and vertex index When reading face lines, j is overwritten by the third vertex index from the file, then used as the triangle index for model%trs(j). Introduces a separate iv3 variable for the third vertex index. Co-Authored-By: Claude Opus 4.6 --- src/common/m_model.fpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/m_model.fpp b/src/common/m_model.fpp index cf6d23effd..be7cd72084 100644 --- a/src/common/m_model.fpp +++ b/src/common/m_model.fpp @@ -226,7 +226,7 @@ contains character(LEN=*), intent(in) :: filepath type(t_model), intent(out) :: model - integer :: i, j, k, l, iunit, iostat, nVertices + integer :: i, j, k, l, iv3, iunit, iostat, nVertices real(wp), dimension(1:3), allocatable :: vertices(:, :) @@ -275,10 +275,10 @@ contains read (line(3:), *) vertices(i, :) i = i + 1 case ("f ") - read (line(3:), *) k, l, j + read (line(3:), *) k, l, iv3 model%trs(j)%v(1, :) = vertices(k, :) model%trs(j)%v(2, :) = vertices(l, :) - model%trs(j)%v(3, :) = vertices(j, :) + model%trs(j)%v(3, :) = vertices(iv3, :) j = j + 1 case default print *, "Error: unknown line type in OBJ file ", filepath From 1136e3dfa464e7a87fc336bcd18b49e2152a135c Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Fri, 20 Feb 2026 22:21:36 -0500 Subject: [PATCH 5/7] Fix time_real used uninitialized in Lagrangian bubble output time_real is declared but never assigned from file_time after the MPI broadcast. The time column in output contains garbage. Co-Authored-By: Claude Opus 4.6 --- src/post_process/m_data_output.fpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/post_process/m_data_output.fpp b/src/post_process/m_data_output.fpp index ff0aeeee6f..d475d0d393 100644 --- a/src/post_process/m_data_output.fpp +++ b/src/post_process/m_data_output.fpp @@ -1102,6 +1102,7 @@ contains call MPI_BCAST(file_time, 1, mpi_p, 0, MPI_COMM_WORLD, ierr) call MPI_BCAST(file_dt, 1, mpi_p, 0, MPI_COMM_WORLD, ierr) call MPI_BCAST(file_num_procs, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr) + time_real = file_time allocate (proc_bubble_counts(file_num_procs)) @@ -1271,6 +1272,7 @@ contains call MPI_BCAST(file_time, 1, mpi_p, 0, MPI_COMM_WORLD, ierr) call MPI_BCAST(file_dt, 1, mpi_p, 0, MPI_COMM_WORLD, ierr) call MPI_BCAST(file_num_procs, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr) + time_real = file_time allocate (proc_bubble_counts(file_num_procs)) From 925cd7dc965f0aa0fcac1b264e61998aa0a5365f Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Fri, 20 Feb 2026 22:21:56 -0500 Subject: [PATCH 6/7] Fix s_write_intf_data_file using wrong loop index for distance check euc_d was computed outside the inner loop using the outer variable i (stale from a previous loop) instead of the current stored-point index. Moved distance computation inside the do-loop over stored points and changed cycle to exit for correct early termination when a candidate point is too close to any existing point. Co-Authored-By: Claude Opus 4.6 --- src/post_process/m_data_output.fpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/post_process/m_data_output.fpp b/src/post_process/m_data_output.fpp index d475d0d393..025c71c915 100644 --- a/src/post_process/m_data_output.fpp +++ b/src/post_process/m_data_output.fpp @@ -1548,19 +1548,16 @@ contains counter = counter + 1 x_d1(counter) = x_cc(j) y_d1(counter) = y_cc(k) - euc_d = sqrt((x_cc(j) - x_d1(i))**2 + (y_cc(k) - y_d1(i))**2) - tgp = sqrt(dx(j)**2 + dy(k)**2) else - euc_d = sqrt((x_cc(j) - x_d1(i))**2 + (y_cc(k) - y_d1(i))**2) tgp = sqrt(dx(j)**2 + dy(k)**2) do i = 1, counter + euc_d = sqrt((x_cc(j) - x_d1(i))**2 + (y_cc(k) - y_d1(i))**2) if (euc_d < tgp) then - cycle - elseif (euc_d > tgp .and. i == counter) then + exit + elseif (i == counter) then counter = counter + 1 x_d1(counter) = x_cc(j) y_d1(counter) = y_cc(k) - end if end do end if From 63ae8fee213ab112fb3696bfd9ecfacb67eab0dc Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sat, 21 Feb 2026 00:03:27 -0500 Subject: [PATCH 7/7] Fix 2D simplex noise using mod(i,255) instead of iand(i,255) Co-Authored-By: Claude Opus 4.6 --- src/pre_process/m_simplex_noise.fpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pre_process/m_simplex_noise.fpp b/src/pre_process/m_simplex_noise.fpp index 442f0985d9..5dacdda7b6 100644 --- a/src/pre_process/m_simplex_noise.fpp +++ b/src/pre_process/m_simplex_noise.fpp @@ -205,8 +205,8 @@ contains x2 = x0 - 1._wp + 2._wp*G2 y2 = y0 - 1._wp + 2._wp*G2 - ii = mod(i, 255) - jj = mod(j, 255) + ii = iand(i, 255) + jj = iand(j, 255) gi0 = mod(p_vec(ii + p_vec(jj)), 10) + 1 gi1 = mod(p_vec(ii + i1 + p_vec(jj + j1)), 10) + 1