Skip to content

Commit 99cd729

Browse files
committed
Remove unused variables, fix stale comments, and rename HardcodedDellacation to HardcodedDeallocation
1 parent a6cdd95 commit 99cd729

2 files changed

Lines changed: 23 additions & 25 deletions

File tree

src/common/include/ExtrusionHardcodedIC.fpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
!>
1111
!> **File Reading Operations:**
1212
!> - Reads primitive variable data from multiple files with pattern:
13-
!> `prim.<file_number>.00.<timestep>.dat` where timestep uses `zeros_default` padding
14-
!> - Files are read from directory specified by `init_dir` parameter
13+
!> `prim.<file_number>.00.<file_extension>.dat`
14+
!> - Files are read from directory specified by `files_dir` parameter
1515
!> - Supports 1D, 2D, and 3D computational domains
1616
!>
1717
!> **Grid Structure Detection:**
@@ -31,25 +31,23 @@
3131
!> - Uses files_loaded flag to prevent redundant file operations
3232
!> - Preserves data across multiple macro calls within same simulation
3333
!>
34-
!> @note File pattern uses `zeros_default` parameter (default: "000000") for timestep padding
35-
!> @note Directory path is hardcoded in `init_dir` parameter - modify as needed
34+
!> @note File pattern timestep field is controlled by the `file_extension` parameter
35+
!> @note Directory path is set via the `files_dir` parameter
3636
!> @warning Aborts execution if file reading errors occur.
3737

3838
#:def HardcodedDimensionsExtrusion()
3939
integer :: xRows, yRows, nRows, iix, iiy, max_files
40-
integer :: f, iter, unit, unit2, idx, idy, index_x, index_y, jump, line_count, ycount
41-
real(wp) :: x_len, x_step, y_len, y_step
40+
integer :: f, iter, unit, unit2, idx, idy, index_x, index_y, jump, line_count
41+
real(wp) :: x_step, y_step
4242
real(wp) :: dummy_x, dummy_y, dummy_z, x0, y0
4343
integer :: global_offset_x, global_offset_y !< MPI subdomain offset
4444
real(wp) :: delta_x, delta_y
4545
character(len=300), dimension(sys_size) :: fileNames !< Arrays to store all data from files
46-
character(len=200) :: errmsg
4746
real(wp), allocatable :: stored_values(:,:,:)
4847
real(wp), allocatable :: x_coords(:), y_coords(:)
4948
logical :: files_loaded = .false.
50-
real(wp) :: domain_xstart, domain_xend, domain_ystart, domain_yend
49+
real(wp) :: domain_xstart
5150
character(len=20) :: file_num_str !< For storing the file number as a string
52-
character(len=20) :: zeros_part !< For the trailing zeros part
5351
integer :: ios
5452
integer :: ios2
5553
#:enddef
@@ -192,7 +190,7 @@
192190
end select
193191
#:enddef
194192

195-
#:def HardcodedDellacation()
193+
#:def HardcodedDeallocation()
196194
if (allocated(stored_values)) then
197195
@:DEALLOCATE(stored_values)
198196
@:DEALLOCATE(x_coords)

src/pre_process/m_icpp_patches.fpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ contains
208208
if (1._wp - eta < sgm_eps) patch_id_fp(i, 0, 0) = patch_id
209209
end if
210210
end do
211-
@:HardcodedDellacation()
211+
@:HardcodedDeallocation()
212212
213213
end subroutine s_icpp_line_segment
214214
@@ -272,7 +272,7 @@ contains
272272
end if
273273
end do
274274
end do
275-
@:HardcodedDellacation()
275+
@:HardcodedDeallocation()
276276

277277
end subroutine s_icpp_spiral
278278

@@ -327,7 +327,7 @@ contains
327327
end if
328328
end do
329329
end do
330-
@:HardcodedDellacation()
330+
@:HardcodedDeallocation()
331331
332332
end subroutine s_icpp_circle
333333
@@ -384,7 +384,7 @@ contains
384384
end if
385385
end do
386386
end do
387-
@:HardcodedDellacation()
387+
@:HardcodedDeallocation()
388388

389389
end subroutine s_icpp_varcircle
390390

@@ -447,7 +447,7 @@ contains
447447
end do
448448
end do
449449
end do
450-
@:HardcodedDellacation()
450+
@:HardcodedDeallocation()
451451
452452
end subroutine s_icpp_3dvarcircle
453453
@@ -503,7 +503,7 @@ contains
503503
end if
504504
end do
505505
end do
506-
@:HardcodedDellacation()
506+
@:HardcodedDeallocation()
507507

508508
end subroutine s_icpp_ellipse
509509

@@ -574,7 +574,7 @@ contains
574574
end do
575575
end do
576576
end do
577-
@:HardcodedDellacation()
577+
@:HardcodedDeallocation()
578578
579579
end subroutine s_icpp_ellipsoid
580580
@@ -644,7 +644,7 @@ contains
644644
end if
645645
end do
646646
end do
647-
@:HardcodedDellacation()
647+
@:HardcodedDeallocation()
648648

649649
end subroutine s_icpp_rectangle
650650

@@ -703,7 +703,7 @@ contains
703703
end if
704704
end do
705705
end do
706-
@:HardcodedDellacation()
706+
@:HardcodedDeallocation()
707707

708708
end subroutine s_icpp_sweep_line
709709

@@ -772,7 +772,7 @@ contains
772772
end if
773773
end do
774774
end do
775-
@:HardcodedDellacation()
775+
@:HardcodedDeallocation()
776776
777777
end subroutine s_icpp_2D_TaylorGreen_Vortex
778778
@@ -826,7 +826,7 @@ contains
826826
end if
827827
end if
828828
end do
829-
@:HardcodedDellacation()
829+
@:HardcodedDeallocation()
830830

831831
end subroutine s_icpp_1D_bubble_pulse
832832

@@ -1014,7 +1014,7 @@ contains
10141014
end do
10151015
end do
10161016
end do
1017-
@:HardcodedDellacation()
1017+
@:HardcodedDeallocation()
10181018
10191019
end subroutine s_icpp_sphere
10201020
@@ -1084,7 +1084,7 @@ contains
10841084
end do
10851085
end do
10861086
end do
1087-
@:HardcodedDellacation()
1087+
@:HardcodedDeallocation()
10881088

10891089
end subroutine s_icpp_cuboid
10901090

@@ -1179,7 +1179,7 @@ contains
11791179
end do
11801180
end do
11811181
end do
1182-
@:HardcodedDellacation()
1182+
@:HardcodedDeallocation()
11831183

11841184
end subroutine s_icpp_cylinder
11851185

@@ -1250,7 +1250,7 @@ contains
12501250
end do
12511251
end do
12521252
end do
1253-
@:HardcodedDellacation()
1253+
@:HardcodedDeallocation()
12541254

12551255
end subroutine s_icpp_sweep_plane
12561256

0 commit comments

Comments
 (0)