Skip to content

Commit d23d5f1

Browse files
Now that we are accurately computing the Ib markers, it is clean that the MFC Character test is actually quite ill-posed, as the model is constantly pointing inside of itself. Now that the other STL cases are corrected, it should probably be deprecated from the test suite until we undertand how those instabilities are handled
1 parent 9e4c7ad commit d23d5f1

6 files changed

Lines changed: 94 additions & 97 deletions

File tree

src/common/m_model.fpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,16 +1032,14 @@ contains
10321032
norm(2) = boundary_v(i, 3, 2, pid)
10331033
else if (t < 0._wp) then ! negative t means that v1 is the closest point on the edge
10341034
dist = sqrt((point(1) - v1(1))**2 + (point(2) - v1(2))**2)
1035-
norm(1) = point(1) - v1(1)
1036-
norm(2) = point(2) - v1(2)
1037-
norm_mag = sqrt(dot_product(norm, norm))
1038-
norm = norm/norm_mag
1035+
norm(1) = v1(1) - point(1)
1036+
norm(2) = v1(2) - point(2)
1037+
norm = norm/dist
10391038
else ! t > 1 means that v2 is the closest point on the line edge
10401039
dist = sqrt((point(1) - v2(1))**2 + (point(2) - v2(2))**2)
1041-
norm(1) = point(1) - v2(1)
1042-
norm(2) = point(2) - v2(2)
1043-
norm_mag = sqrt(dot_product(norm, norm))
1044-
norm = norm/norm_mag
1040+
norm(1) = v2(1) - point(1)
1041+
norm(2) = v2(2) - point(2)
1042+
norm = norm/dist
10451043
end if
10461044

10471045
if (dist < dist_min) then

src/simulation/m_compute_levelset.fpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ contains
3333

3434
integer :: i, patch_id, patch_geometry
3535

36-
print *, "num_gps: ", num_gps
36+
print *, num_gps
3737

3838
! 3D Patch Geometries
3939
if (p > 0) then
@@ -83,11 +83,6 @@ contains
8383

8484
end if
8585

86-
$:GPU_UPDATE(host='[gps]')
87-
do i = 1, num_gps
88-
print *, gps(i)%loc, gps(i)%levelset, gps(i)%levelset_norm
89-
end do
90-
9186
end subroutine s_apply_levelset
9287

9388
!> @brief Computes the signed distance and outward normal from a ghost point to a circular immersed boundary.

src/simulation/m_ib_patches.fpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ contains
867867
patch_id, xy_local)
868868
869869
! Reading STL boundary vertices and compute the levelset and levelset_norm
870-
if (eta > 0.5_wp) then
870+
if (eta > threshold) then
871871
ib_markers%sf(i, j, 0) = patch_id
872872
end if
873873
end do
@@ -929,8 +929,7 @@ contains
929929
gpu_trs_v, gpu_trs_n, &
930930
patch_id, xyz_local)
931931
932-
! if (eta > patch_ib(patch_id)%model_threshold) then
933-
if (eta > 0.5_wp) then
932+
if (eta > patch_ib(patch_id)%model_threshold) then
934933
ib_markers%sf(i, j, k) = patch_id
935934
end if
936935
end do
@@ -1103,8 +1102,6 @@ contains
11031102
end if
11041103
end block
11051104
1106-
print *, "Finished reading models"
1107-
11081105
end subroutine s_instantiate_STL_models
11091106
11101107
!> Subroutine that computes a rotation matrix for converting to the rotating frame of the boundary

tests/0A362971/golden-metadata.txt

Lines changed: 77 additions & 71 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)