1# 1 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
29 type(
integer_field),
dimension(1:num_dims,1:2),
intent(inout) :: bc_type
30 integer,
intent(in) :: patch_id
35 if (patch_bc(patch_id)%dir == 1)
then
37 length_y = patch_bc(patch_id)%length(2)
43# 43 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
44 if (patch_bc(patch_id)%loc == -1 .and.
bc_x%beg < 0)
then
47 bc_type(1, 1)%sf(0,
j, 0) = patch_bc(patch_id)%type
51# 43 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
52 if (patch_bc(patch_id)%loc == 1 .and.
bc_x%end < 0)
then
55 bc_type(1, 2)%sf(0,
j, 0) = patch_bc(patch_id)%type
59# 51 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
63 if (patch_bc(patch_id)%dir == 2)
then
65 length_x = patch_bc(patch_id)%length(1)
71# 63 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
72 if (patch_bc(patch_id)%loc == -1 .and.
bc_y%beg < 0)
then
75 bc_type(2, 1)%sf(
j, 0, 0) = patch_bc(patch_id)%type
79# 63 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
80 if (patch_bc(patch_id)%loc == 1 .and.
bc_y%end < 0)
then
83 bc_type(2, 2)%sf(
j, 0, 0) = patch_bc(patch_id)%type
87# 71 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
95 type(
integer_field),
dimension(1:num_dims,1:2),
intent(inout) :: bc_type
96 integer,
intent(in) :: patch_id
99 if (patch_bc(patch_id)%dir == 1)
then
102 radius = patch_bc(patch_id)%radius
104# 88 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
105 if (patch_bc(patch_id)%loc == -1 .and.
bc_x%beg < 0)
then
109 bc_type(1, 1)%sf(0,
j,
k) = patch_bc(patch_id)%type
114# 88 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
115 if (patch_bc(patch_id)%loc == 1 .and.
bc_x%end < 0)
then
119 bc_type(1, 2)%sf(0,
j,
k) = patch_bc(patch_id)%type
124# 98 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
126 if (patch_bc(patch_id)%dir == 2)
then
129 radius = patch_bc(patch_id)%radius
131# 105 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
132 if (patch_bc(patch_id)%loc == -1 .and.
bc_y%beg < 0)
then
136 bc_type(2, 1)%sf(
j, 0,
k) = patch_bc(patch_id)%type
141# 105 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
142 if (patch_bc(patch_id)%loc == 1 .and.
bc_y%end < 0)
then
146 bc_type(2, 2)%sf(
j, 0,
k) = patch_bc(patch_id)%type
151# 115 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
153 if (patch_bc(patch_id)%dir == 3)
then
156 radius = patch_bc(patch_id)%radius
157# 121 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
158 if (patch_bc(patch_id)%loc == -1 .and.
bc_z%beg < 0)
then
162 bc_type(3, 1)%sf(
j,
k, 0) = patch_bc(patch_id)%type
167# 121 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
168 if (patch_bc(patch_id)%loc == 1 .and.
bc_z%end < 0)
then
172 bc_type(3, 2)%sf(
j,
k, 0) = patch_bc(patch_id)%type
177# 131 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
185 type(
integer_field),
dimension(1:num_dims,1:2),
intent(inout) :: bc_type
186 integer,
intent(in) :: patch_id
189 if (patch_bc(patch_id)%dir == 1)
then
192 length_y = patch_bc(patch_id)%length(2)
193 length_z = patch_bc(patch_id)%length(3)
201# 155 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
202 if (patch_bc(patch_id)%loc == -1 .and.
bc_x%beg < 0)
then
207 bc_type(1, 1)%sf(0,
j,
k) = patch_bc(patch_id)%type
212# 155 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
213 if (patch_bc(patch_id)%loc == 1 .and.
bc_x%end < 0)
then
218 bc_type(1, 2)%sf(0,
j,
k) = patch_bc(patch_id)%type
223# 166 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
225 if (patch_bc(patch_id)%dir == 2)
then
228 length_x = patch_bc(patch_id)%length(1)
229 length_z = patch_bc(patch_id)%length(3)
237# 180 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
238 if (patch_bc(patch_id)%loc == -1 .and.
bc_y%beg < 0)
then
243 bc_type(2, 1)%sf(
j, 0,
k) = patch_bc(patch_id)%type
248# 180 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
249 if (patch_bc(patch_id)%loc == 1 .and.
bc_y%end < 0)
then
254 bc_type(2, 2)%sf(
j, 0,
k) = patch_bc(patch_id)%type
259# 191 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
261 if (patch_bc(patch_id)%dir == 3)
then
264 length_x = patch_bc(patch_id)%length(1)
265 length_y = patch_bc(patch_id)%length(2)
272# 204 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
273 if (patch_bc(patch_id)%loc == -1 .and.
bc_z%beg < 0)
then
278 bc_type(3, 1)%sf(
j,
k, 0) = patch_bc(patch_id)%type
283# 204 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
284 if (patch_bc(patch_id)%loc == 1 .and.
bc_z%end < 0)
then
289 bc_type(3, 2)%sf(
j,
k, 0) = patch_bc(patch_id)%type
294# 215 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
309 do i = 1, num_bc_patches
311 print *,
'Processing boundary condition patch', i
314 if (patch_bc(i)%geometry == 2)
then
316 else if (patch_bc(i)%geometry == 3)
then
322 do i = 1, num_bc_patches
324 print *,
'Processing boundary condition patch', i
327 if (patch_bc(i)%geometry == 1)
then
Applies spatially varying boundary condition patches along domain edges and faces.
type(bounds_info) z_boundary
impure subroutine, public s_apply_boundary_patches(q_prim_vf, bc_type)
Iterate over all boundary condition patches and dispatch them by geometry type.
impure subroutine s_circle_bc(patch_id, bc_type)
Apply a circular boundary condition patch on a domain face in 3D.
impure subroutine s_line_segment_bc(patch_id, bc_type)
Apply a line-segment boundary condition patch along a domain edge in 2D.
impure subroutine s_rectangle_bc(patch_id, bc_type)
Apply a rectangular boundary condition patch on a domain face in 3D.
type(bounds_info) y_boundary
type(bounds_info) x_boundary
Platform-specific file and directory operations: create, delete, inquire, getcwd, and basename.
Rank-staggered file access delays to prevent I/O contention on parallel file systems.
Shared derived types for field data, patch geometry, bubble dynamics, and MPI I/O structures.
Defines global parameters for the computational domain, simulation algorithm, and initial conditions.
type(int_bounds_info) bc_z
Boundary conditions in the x-, y- and z-coordinate directions.
real(wp), dimension(:), allocatable y_cc
integer proc_rank
Rank of the local processor Number of cells in the x-, y- and z-coordinate directions.
type(int_bounds_info) bc_y
real(wp), dimension(:), allocatable x_cc
Locations of cell-centers (cc) in x-, y- and z-directions, respectively.
type(int_bounds_info) bc_x
real(wp), dimension(:), allocatable z_cc
Derived type adding beginning (beg) and end bounds info as attributes.
Derived type annexing an integer scalar field (SF).
Derived type annexing a scalar field (SF).