field_set_x_face_from_field Subroutine

public subroutine field_set_x_face_from_field(f, f_start, c_end, bc_start, bc_end, flow_rate_diff, nx, ny, nz)

Set domain X_FACE boundary values with a spatially-varying inlet.

Both f and f_start are DIR_X VERT fields with shape (SZ, nx, n_y_blocks*nz). The inlet plane is pencil index 1 of each, so f(i, 1, b) <- f_start(i, 1, b) for every real (i, b). Only the i = 1 pencil-index plane of f_start is read; the rest is ignored.

Launch convention (matches field_set_x_face exactly): threads = dim3(64, 1, 1) blocks = dim3((SZ-1)/64 + 1, n_y_blocks*nz, 1) Threads beyond the real pencil width (SZ in interior y-blocks, n_mod in the last y-block) are masked out by the i_max guard.

c_end is the convective velocity Uc = uxmax * gdt / dx used in the outflow scheme du/dt + Uc*du/dx = 0 at the right face.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout), device, dimension(:, :, :) :: f
real(kind=dp), intent(in), device, dimension(:, :, :) :: f_start
real(kind=dp), intent(in), value :: c_end
integer, intent(in), value :: bc_start
integer, intent(in), value :: bc_end
real(kind=dp), intent(in), value :: flow_rate_diff
integer, intent(in), value :: nx
integer, intent(in), value :: ny
integer, intent(in), value :: nz

Called by

proc~~field_set_x_face_from_field~~CalledByGraph proc~field_set_x_face_from_field m_cuda_kernels_fieldops::field_set_x_face_from_field proc~field_set_face_from_field_cuda m_cuda_backend::cuda_backend_t%field_set_face_from_field_cuda proc~field_set_face_from_field_cuda->proc~field_set_x_face_from_field