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
45# 44 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
48 bc_type(1, 1)%sf(0,
j, 0) = patch_bc(patch_id)%type
49# 47 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
53# 43 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
54 if (patch_bc(patch_id)%loc == 1 .and.
bc_x%end < 0)
then
55# 44 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
58 bc_type(1, 2)%sf(0,
j, 0) = patch_bc(patch_id)%type
59# 47 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
63# 51 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
67 if (patch_bc(patch_id)%dir == 2)
then
69 length_x = patch_bc(patch_id)%length(1)
75# 63 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
76 if (patch_bc(patch_id)%loc == -1 .and.
bc_y%beg < 0)
then
77# 64 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
80 bc_type(2, 1)%sf(
j, 0, 0) = patch_bc(patch_id)%type
81# 67 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
85# 63 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
86 if (patch_bc(patch_id)%loc == 1 .and.
bc_y%end < 0)
then
87# 64 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
90 bc_type(2, 2)%sf(
j, 0, 0) = patch_bc(patch_id)%type
91# 67 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
95# 71 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
103 type(
integer_field),
dimension(1:num_dims,1:2),
intent(inout) :: bc_type
104 integer,
intent(in) :: patch_id
107 if (patch_bc(patch_id)%dir == 1)
then
110 radius = patch_bc(patch_id)%radius
112# 88 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
113 if (patch_bc(patch_id)%loc == -1 .and.
bc_x%beg < 0)
then
114# 89 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
118 bc_type(1, 1)%sf(0,
j,
k) = patch_bc(patch_id)%type
119# 93 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
124# 88 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
125 if (patch_bc(patch_id)%loc == 1 .and.
bc_x%end < 0)
then
126# 89 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
130 bc_type(1, 2)%sf(0,
j,
k) = patch_bc(patch_id)%type
131# 93 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
136# 98 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
138 if (patch_bc(patch_id)%dir == 2)
then
141 radius = patch_bc(patch_id)%radius
143# 105 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
144 if (patch_bc(patch_id)%loc == -1 .and.
bc_y%beg < 0)
then
145# 106 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
149 bc_type(2, 1)%sf(
j, 0,
k) = patch_bc(patch_id)%type
150# 110 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
155# 105 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
156 if (patch_bc(patch_id)%loc == 1 .and.
bc_y%end < 0)
then
157# 106 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
161 bc_type(2, 2)%sf(
j, 0,
k) = patch_bc(patch_id)%type
162# 110 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
167# 115 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
169 if (patch_bc(patch_id)%dir == 3)
then
172 radius = patch_bc(patch_id)%radius
173# 121 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
174 if (patch_bc(patch_id)%loc == -1 .and.
bc_z%beg < 0)
then
175# 122 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
179 bc_type(3, 1)%sf(
j,
k, 0) = patch_bc(patch_id)%type
180# 126 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
185# 121 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
186 if (patch_bc(patch_id)%loc == 1 .and.
bc_z%end < 0)
then
187# 122 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
191 bc_type(3, 2)%sf(
j,
k, 0) = patch_bc(patch_id)%type
192# 126 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
197# 131 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
205 type(
integer_field),
dimension(1:num_dims,1:2),
intent(inout) :: bc_type
206 integer,
intent(in) :: patch_id
209 if (patch_bc(patch_id)%dir == 1)
then
212 length_y = patch_bc(patch_id)%length(2)
213 length_z = patch_bc(patch_id)%length(3)
221# 155 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
222 if (patch_bc(patch_id)%loc == -1 .and.
bc_x%beg < 0)
then
223# 156 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
228 bc_type(1, 1)%sf(0,
j,
k) = patch_bc(patch_id)%type
229# 161 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
234# 155 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
235 if (patch_bc(patch_id)%loc == 1 .and.
bc_x%end < 0)
then
236# 156 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
241 bc_type(1, 2)%sf(0,
j,
k) = patch_bc(patch_id)%type
242# 161 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
247# 166 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
249 if (patch_bc(patch_id)%dir == 2)
then
252 length_x = patch_bc(patch_id)%length(1)
253 length_z = patch_bc(patch_id)%length(3)
261# 180 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
262 if (patch_bc(patch_id)%loc == -1 .and.
bc_y%beg < 0)
then
263# 181 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
268 bc_type(2, 1)%sf(
j, 0,
k) = patch_bc(patch_id)%type
269# 186 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
274# 180 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
275 if (patch_bc(patch_id)%loc == 1 .and.
bc_y%end < 0)
then
276# 181 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
281 bc_type(2, 2)%sf(
j, 0,
k) = patch_bc(patch_id)%type
282# 186 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
287# 191 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
289 if (patch_bc(patch_id)%dir == 3)
then
292 length_x = patch_bc(patch_id)%length(1)
293 length_y = patch_bc(patch_id)%length(2)
300# 204 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
301 if (patch_bc(patch_id)%loc == -1 .and.
bc_z%beg < 0)
then
302# 205 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
307 bc_type(3, 1)%sf(
j,
k, 0) = patch_bc(patch_id)%type
308# 210 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
313# 204 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
314 if (patch_bc(patch_id)%loc == 1 .and.
bc_z%end < 0)
then
315# 205 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
320 bc_type(3, 2)%sf(
j,
k, 0) = patch_bc(patch_id)%type
321# 210 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
326# 215 "/home/runner/work/MFC/MFC/src/pre_process/m_boundary_conditions.fpp"
341 do i = 1, num_bc_patches
343 print *,
'Processing boundary condition patch', i
346 if (patch_bc(i)%geometry == 2)
then
348 else if (patch_bc(i)%geometry == 3)
then
354 do i = 1, num_bc_patches
356 print *,
'Processing boundary condition patch', i
359 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).