Skip to content

Commit 8709609

Browse files
Renamed model subroutines to use the s_ prefix for consistency with the rest of the code
1 parent 0099975 commit 8709609

4 files changed

Lines changed: 17 additions & 17 deletions

File tree

src/common/m_model.fpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ module m_model
2323
gpu_total_vertices, stl_bounding_boxes
2424

2525
! Subroutines for STL immersed boundaries
26-
public :: f_check_boundary, f_register_edge, f_model_is_inside_flat, &
27-
f_distance_normals_3D, f_distance_normals_2D, s_pack_model_for_gpu
26+
public :: s_check_boundary, s_register_edge, f_model_is_inside_flat, &
27+
s_distance_normals_3D, s_distance_normals_2D, s_pack_model_for_gpu
2828

2929
!! array of STL models that can be allocated and then used in IB marker and levelset compute
3030
type(t_model_array), allocatable, target :: models(:)
@@ -695,7 +695,7 @@ contains
695695
!> This procedure checks and labels edges shared by two or more triangles facets of the 2D STL model.
696696
!! @param model Model to search in.
697697
!! @param boundary_vertex_count Output total boundary vertex count
698-
subroutine f_check_boundary(model, boundary_v, boundary_vertex_count, boundary_edge_count)
698+
subroutine s_check_boundary(model, boundary_v, boundary_vertex_count, boundary_edge_count)
699699

700700
type(t_model), intent(in) :: model
701701
real(wp), allocatable, intent(out), dimension(:, :, :) :: boundary_v !< Output boundary vertices/normals
@@ -721,17 +721,17 @@ contains
721721
! First edge (v1, v2)
722722
edge(1, 1:2) = model%trs(i)%v(1, 1:2)
723723
edge(2, 1:2) = model%trs(i)%v(2, 1:2)
724-
call f_register_edge(temp_boundary_v, edge, edge_index, edge_count)
724+
call s_register_edge(temp_boundary_v, edge, edge_index, edge_count)
725725

726726
! Second edge (v2, v3)
727727
edge(1, 1:2) = model%trs(i)%v(2, 1:2)
728728
edge(2, 1:2) = model%trs(i)%v(3, 1:2)
729-
call f_register_edge(temp_boundary_v, edge, edge_index, edge_count)
729+
call s_register_edge(temp_boundary_v, edge, edge_index, edge_count)
730730

731731
! Third edge (v3, v1)
732732
edge(1, 1:2) = model%trs(i)%v(3, 1:2)
733733
edge(2, 1:2) = model%trs(i)%v(1, 1:2)
734-
call f_register_edge(temp_boundary_v, edge, edge_index, edge_count)
734+
call s_register_edge(temp_boundary_v, edge, edge_index, edge_count)
735735
end do
736736

737737
! Check all edges and count repeated edges
@@ -805,10 +805,10 @@ contains
805805
boundary_v(i, 3, 2) = ynormal/v_norm
806806
end do
807807

808-
end subroutine f_check_boundary
808+
end subroutine s_check_boundary
809809

810810
!> This procedure appends the edge end vertices to a temporary buffer.
811-
subroutine f_register_edge(temp_boundary_v, edge, edge_index, edge_count)
811+
subroutine s_register_edge(temp_boundary_v, edge, edge_index, edge_count)
812812

813813
integer, intent(inout) :: edge_index !< Edge index iterator
814814
integer, intent(inout) :: edge_count !< Total number of edges
@@ -820,7 +820,7 @@ contains
820820
temp_boundary_v(edge_index, 1, 1:2) = edge(1, 1:2)
821821
temp_boundary_v(edge_index, 2, 1:2) = edge(2, 1:2)
822822

823-
end subroutine f_register_edge
823+
end subroutine s_register_edge
824824

825825
!> This procedure determines the levelset distance and normals of 3D models
826826
!! by computing the exact closest point via projection onto triangle surfaces.
@@ -831,7 +831,7 @@ contains
831831
!! @param point The cell center of the current levelset cell
832832
!! @param normals Output levelset normals
833833
!! @param distance Output levelset distance
834-
subroutine f_distance_normals_3D(ntrs, trs_v, trs_n, pid, point, normals, distance)
834+
subroutine s_distance_normals_3D(ntrs, trs_v, trs_n, pid, point, normals, distance)
835835
$:GPU_ROUTINE(parallelism='[seq]')
836836

837837
integer, intent(in) :: ntrs
@@ -946,7 +946,7 @@ contains
946946

947947
distance = dist_min
948948

949-
end subroutine f_distance_normals_3D
949+
end subroutine s_distance_normals_3D
950950

951951
!> This procedure determines the levelset distance and normals of 2D models
952952
!! by computing the exact closest point via projection onto boundary edges.
@@ -956,7 +956,7 @@ contains
956956
!! @param point The cell center of the current levelset cell
957957
!! @param normals Output levelset normals
958958
!! @param distance Output levelset distance
959-
subroutine f_distance_normals_2D(boundary_v, pid, boundary_edge_count, point, normals, distance)
959+
subroutine s_distance_normals_2D(boundary_v, pid, boundary_edge_count, point, normals, distance)
960960
$:GPU_ROUTINE(parallelism='[seq]')
961961

962962
real(wp), dimension(:, :, :, :), intent(in) :: boundary_v
@@ -1013,7 +1013,7 @@ contains
10131013

10141014
distance = dist_min
10151015

1016-
end subroutine f_distance_normals_2D
1016+
end subroutine s_distance_normals_2D
10171017

10181018
subroutine s_pack_model_for_gpu(ma)
10191019
type(t_model_array), intent(inout) :: ma

src/pre_process/m_icpp_patches.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1652,7 +1652,7 @@ contains
16521652
print *, ' * Number of input model vertices:', 3*model%ntrs
16531653
end if
16541654

1655-
call f_check_boundary(model, boundary_v, boundary_vertex_count, boundary_edge_count)
1655+
call s_check_boundary(model, boundary_v, boundary_vertex_count, boundary_edge_count)
16561656

16571657
! Show the number of edges and boundary edges in 2D STL models
16581658
if (proc_rank == 0 .and. p == 0) then

src/simulation/m_compute_levelset.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ contains
685685
! 3D models
686686
if (p > 0) then
687687
! Get the boundary normals and shortest distance between the cell center and the model boundary
688-
call f_distance_normals_3D(gpu_ntrs(patch_id), gpu_trs_v, gpu_trs_n, patch_id, xyz_local, normals, distance)
688+
call s_distance_normals_3D(gpu_ntrs(patch_id), gpu_trs_v, gpu_trs_n, patch_id, xyz_local, normals, distance)
689689

690690
! Get the shortest distance between the cell center and the model boundary
691691
gp%levelset = distance
@@ -695,7 +695,7 @@ contains
695695
gp%levelset_norm = matmul(rotation, normals(1:3))
696696
else
697697
! 2D models
698-
call f_distance_normals_2D(gpu_boundary_v, patch_id, &
698+
call s_distance_normals_2D(gpu_boundary_v, patch_id, &
699699
boundary_edge_count, &
700700
xyz_local, normals, distance)
701701
gp%levelset = -abs(distance)

src/simulation/m_ib_patches.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ contains
10191019
end if
10201020
10211021
! Need the cells that form the boundary of the flat projection in 2D
1022-
if (p == 0) call f_check_boundary(model, boundary_v, boundary_vertex_count, boundary_edge_count)
1022+
if (p == 0) call s_check_boundary(model, boundary_v, boundary_vertex_count, boundary_edge_count)
10231023
10241024
! Show the number of edges and boundary edges in 2D STL models
10251025
if (proc_rank == 0 .and. p == 0) then

0 commit comments

Comments
 (0)