Skip to content

Commit 26c112c

Browse files
Added deprication statements. We should remove patch geometries 7, 13, adn 15 in a future release
1 parent 28e7312 commit 26c112c

File tree

1 file changed

+10
-193
lines changed

1 file changed

+10
-193
lines changed

src/pre_process/m_patches.fpp

Lines changed: 10 additions & 193 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,72 +1359,16 @@ contains
13591359
!! @param patch_id_fp Array to track patch ids
13601360
!! @param q_prim_vf Array of primitive variables
13611361
subroutine s_1D_analytical(patch_id, patch_id_fp, q_prim_vf)
1362-
1363-
! print *, "WARNING"
1364-
! :: The use of the 1D analytical patch geometry has been depricated and will be removed in a future release. Use patch_icpp(patch_id)%geometry: 1 instead'
1365-
1366-
! Patch identifier
13671362
integer, intent(in) :: patch_id
13681363
integer, dimension(0:m, 0:n, 0:p), intent(inout) :: patch_id_fp
13691364
type(scalar_field), dimension(1:sys_size), intent(inout) :: q_prim_vf
13701365

1371-
! Generic loop iterators
1372-
integer :: i, j, k
1373-
1374-
! Placeholders for the cell boundary values
1375-
real(wp) :: pi_inf, gamma, lit_gamma
1376-
1377-
@:HardcodedDimensionsExtrusion()
1378-
@:Hardcoded1DVariables()
1379-
13801366
print *, "WARNING :: The use of the 1D analytical patch geometry has &
13811367
& been depricated and will be removed in a future release. Use &
13821368
& `patch_icpp(patch_id)%geometry: 1` instead"
1383-
return
1384-
1385-
pi_inf = fluid_pp(1)%pi_inf
1386-
gamma = fluid_pp(1)%gamma
1387-
lit_gamma = (1._wp + gamma)/gamma
1388-
j = 0.0_wp
1389-
k = 0.0_wp
1390-
1391-
! Transferring the patch's centroid and length information
1392-
x_centroid = patch_icpp(patch_id)%x_centroid
1393-
length_x = patch_icpp(patch_id)%length_x
1394-
1395-
! Computing the beginning and the end x- and y-coordinates
1396-
! of the patch based on its centroid and lengths
1397-
x_boundary%beg = x_centroid - 0.5_wp*length_x
1398-
x_boundary%end = x_centroid + 0.5_wp*length_x
1399-
1400-
! Since the patch doesn't allow for its boundaries to be
1401-
! smoothed out, the pseudo volume fraction is set to 1 to
1402-
! ensure that only the current patch contributes to the fluid
1403-
! state in the cells that this patch covers.
1404-
eta = 1._wp
1405-
1406-
! Checking whether the line segment covers a particular cell in the
1407-
! domain and verifying whether the current patch has the permission
1408-
! to write to that cell. If both queries check out, the primitive
1409-
! variables of the current patch are assigned to this cell.
1410-
do i = 0, m
1411-
if (x_boundary%beg <= x_cc(i) .and. &
1412-
x_boundary%end >= x_cc(i) .and. &
1413-
patch_icpp(patch_id)%alter_patch(patch_id_fp(i, 0, 0))) then
1414-
1415-
call s_assign_patch_primitive_variables(patch_id, i, 0, 0, &
1416-
eta, q_prim_vf, patch_id_fp)
1417-
1418-
@:Hardcoded1D()
1419-
1420-
! Updating the patch identities bookkeeping variable
1421-
if (1._wp - eta < 1.e-16_wp) patch_id_fp(i, 0, 0) = patch_id
1422-
1423-
end if
1424-
end do
1425-
1426-
@:HardcodedDellacation()
14271369

1370+
call s_line_segment(patch_id, patch_id_fp, q_prim_vf)
1371+
14281372
end subroutine s_1D_analytical
14291373

14301374
!! @param patch_id is the patch identifier
@@ -1494,73 +1438,15 @@ contains
14941438
!! @param patch_id_fp Array to track patch ids
14951439
!! @param q_prim_vf Array of primitive variables
14961440
subroutine s_2D_analytical(patch_id, patch_id_fp, q_prim_vf)
1497-
! print *, "WARNING :: The use of the 2D analytical patch geometry has &
1498-
! & been depricated and will be removed in a future release. Use &
1499-
! & `patch_icpp(patch_id)%geometry: 3` instead"
1500-
15011441
integer, intent(in) :: patch_id
15021442
integer, dimension(0:m, 0:n, 0:p), intent(inout) :: patch_id_fp
15031443
type(scalar_field), dimension(1:sys_size), intent(inout) :: q_prim_vf
15041444

1505-
integer :: i, j, k !< generic loop iterators
1506-
1507-
real(wp) :: pi_inf, gamma, lit_gamma !< equation of state parameters
1508-
real(wp) :: l, U0 !< Taylor Green Vortex parameters
1509-
@:HardcodedDimensionsExtrusion()
1510-
@:Hardcoded2DVariables()
1511-
1512-
pi_inf = fluid_pp(1)%pi_inf
1513-
gamma = fluid_pp(1)%gamma
1514-
lit_gamma = (1._wp + gamma)/gamma
1515-
1516-
k = 0.0_wp
1517-
1518-
! Transferring the patch's centroid and length information
1519-
x_centroid = patch_icpp(patch_id)%x_centroid
1520-
y_centroid = patch_icpp(patch_id)%y_centroid
1521-
length_x = patch_icpp(patch_id)%length_x
1522-
length_y = patch_icpp(patch_id)%length_y
1523-
1524-
! Computing the beginning and the end x- and y-coordinates
1525-
! of the patch based on its centroid and lengths
1526-
x_boundary%beg = x_centroid - 0.5_wp*length_x
1527-
x_boundary%end = x_centroid + 0.5_wp*length_x
1528-
y_boundary%beg = y_centroid - 0.5_wp*length_y
1529-
y_boundary%end = y_centroid + 0.5_wp*length_y
1530-
1531-
! Since the patch doesn't allow for its boundaries to be
1532-
! smoothed out, the pseudo volume fraction is set to 1 to
1533-
! ensure that only the current patch contributes to the fluid
1534-
! state in the cells that this patch covers.
1535-
eta = 1._wp
1536-
l = 1._wp
1537-
U0 = 0.1_wp
1538-
! Checking whether the patch covers a particular cell in the
1539-
! domain and verifying whether the current patch has the
1540-
! permission to write to that cell. If both queries check out,
1541-
! the primitive variables of the current patch are assigned
1542-
! to this cell.
1543-
1544-
do j = 0, n
1545-
do i = 0, m
1546-
if (x_boundary%beg <= x_cc(i) .and. &
1547-
x_boundary%end >= x_cc(i) .and. &
1548-
y_boundary%beg <= y_cc(j) .and. &
1549-
y_boundary%end >= y_cc(j) .and. &
1550-
patch_icpp(patch_id)%alter_patch(patch_id_fp(i, j, 0))) then
1551-
1552-
call s_assign_patch_primitive_variables(patch_id, i, j, 0, &
1553-
eta, q_prim_vf, patch_id_fp)
1554-
1555-
@:Hardcoded2D()
1556-
! Updating the patch identities bookkeeping variable
1557-
if (1._wp - eta < 1.e-16_wp) patch_id_fp(i, j, 0) = patch_id
1558-
1559-
end if
1560-
end do
1561-
end do
1445+
print *, "WARNING :: The use of the 2D analytical patch geometry has &
1446+
& been depricated and will be removed in a future release. Use &
1447+
& `patch_icpp(patch_id)%geometry: 3` instead"
15621448

1563-
@:HardcodedDellacation()
1449+
call s_rectangle(patch_id, patch_id_fp, q_prim_vf)
15641450

15651451
end subroutine s_2D_analytical
15661452

@@ -1570,86 +1456,17 @@ contains
15701456
!! @param patch_id_fp Array to track patch ids
15711457
!! @param q_prim_vf Array of primitive variables
15721458
subroutine s_3D_analytical(patch_id, patch_id_fp, q_prim_vf)
1573-
! print *, "WARNING :: The use of the 1D analytical patch geometry has &
1574-
! & been depricated and will be removed in a future release. Use &
1575-
! & `patch_icpp(patch_id)%geometry: 1` instead"
15761459

15771460
integer, intent(in) :: patch_id
15781461
integer, dimension(0:m, 0:n, 0:p), intent(inout) :: patch_id_fp
15791462
type(scalar_field), dimension(1:sys_size), intent(inout) :: q_prim_vf
15801463

1581-
integer :: i, j, k !< generic loop iterators
1582-
real(wp) :: pi_inf, gamma, lit_gamma !< equation of state parameters
1583-
@:HardcodedDimensionsExtrusion()
1584-
@:Hardcoded3DVariables()
1585-
1586-
pi_inf = fluid_pp(1)%pi_inf
1587-
gamma = fluid_pp(1)%gamma
1588-
lit_gamma = (1._wp + gamma)/gamma
1589-
1590-
! Transferring the patch's centroid and length information
1591-
x_centroid = patch_icpp(patch_id)%x_centroid
1592-
y_centroid = patch_icpp(patch_id)%y_centroid
1593-
z_centroid = patch_icpp(patch_id)%z_centroid
1594-
length_x = patch_icpp(patch_id)%length_x
1595-
length_y = patch_icpp(patch_id)%length_y
1596-
length_z = patch_icpp(patch_id)%length_z
1597-
1598-
! Computing the beginning and the end x-, y- and z-coordinates of
1599-
! the patch based on its centroid and lengths
1600-
x_boundary%beg = x_centroid - 0.5_wp*length_x
1601-
x_boundary%end = x_centroid + 0.5_wp*length_x
1602-
y_boundary%beg = y_centroid - 0.5_wp*length_y
1603-
y_boundary%end = y_centroid + 0.5_wp*length_y
1604-
z_boundary%beg = z_centroid - 0.5_wp*length_z
1605-
z_boundary%end = z_centroid + 0.5_wp*length_z
1606-
1607-
! Since the analytical patch does not allow for its boundaries to get
1608-
! smoothed out, the pseudo volume fraction is set to 1 to make sure
1609-
! that only the current patch contributes to the fluid state in the
1610-
! cells that this patch covers.
1611-
eta = 1._wp
1612-
1613-
! Checking whether the patch covers a particular cell in the domain
1614-
! and verifying whether the current patch has permission to write to
1615-
! to that cell. If both queries check out, the primitive variables
1616-
! of the current patch are assigned to this cell.
1617-
do k = 0, p
1618-
do j = 0, n
1619-
do i = 0, m
1620-
1621-
if (grid_geometry == 3) then
1622-
call s_convert_cylindrical_to_cartesian_coord(y_cc(j), z_cc(k))
1623-
else
1624-
cart_y = y_cc(j)
1625-
cart_z = z_cc(k)
1626-
end if
1627-
1628-
if (x_boundary%beg <= x_cc(i) .and. &
1629-
x_boundary%end >= x_cc(i) .and. &
1630-
y_boundary%beg <= cart_y .and. &
1631-
y_boundary%end >= cart_y .and. &
1632-
z_boundary%beg <= cart_z .and. &
1633-
z_boundary%end >= cart_z &
1634-
.and. &
1635-
patch_icpp(patch_id)%alter_patch(patch_id_fp(i, j, k))) &
1636-
then
1637-
1638-
call s_assign_patch_primitive_variables(patch_id, i, j, k, &
1639-
eta, q_prim_vf, patch_id_fp)
1640-
1641-
@:Hardcoded3D()
1642-
1643-
! Updating the patch identities bookkeeping variable
1644-
if (1._wp - eta < 1.e-16_wp) patch_id_fp(i, j, k) = patch_id
1645-
1646-
end if
1464+
print *, "WARNING :: The use of the 3D analytical patch geometry has &
1465+
& been depricated and will be removed in a future release. Use &
1466+
& `patch_icpp(patch_id)%geometry: 3` instead"
16471467

1648-
end do
1649-
end do
1650-
end do
1468+
call s_cuboid(patch_id, patch_id_fp, q_prim_vf)
16511469

1652-
@:HardcodedDellacation()
16531470
end subroutine s_3D_analytical
16541471

16551472
!> This patch generates the shape of the spherical harmonics

0 commit comments

Comments
 (0)