compute_boundary_flux Subroutine

private subroutine compute_boundary_flux(mesh, flow, bc, face_flux, local_flux)

Helper to integrated boundary flux on MPI-owned partitions.

Arguments

Type IntentOptional Attributes Name
type(mesh_t), intent(in) :: mesh
type(flow_mpi_t), intent(in) :: flow
type(bc_set_t), intent(in) :: bc
real(kind=rk), intent(in) :: face_flux(:)
real(kind=rk), intent(out) :: local_flux

Calls

proc~~compute_boundary_flux~~CallsGraph proc~compute_boundary_flux mod_flow_projection::compute_boundary_flux proc~patch_type_for_face mod_bc::patch_type_for_face proc~compute_boundary_flux->proc~patch_type_for_face

Called by

proc~~compute_boundary_flux~~CalledByGraph proc~compute_boundary_flux mod_flow_projection::compute_boundary_flux proc~compute_flow_diagnostics mod_flow_projection::compute_flow_diagnostics proc~compute_flow_diagnostics->proc~compute_boundary_flux proc~advance_projection_step mod_flow_projection::advance_projection_step proc~advance_projection_step->proc~compute_flow_diagnostics program~lowmach_react_hex lowmach_react_hex program~lowmach_react_hex->proc~compute_flow_diagnostics program~lowmach_react_hex->proc~advance_projection_step

Source Code

   subroutine compute_boundary_flux(mesh, flow, bc, face_flux, local_flux)
      type(mesh_t), intent(in) :: mesh
      type(flow_mpi_t), intent(in) :: flow
      type(bc_set_t), intent(in) :: bc
      real(rk), intent(in) :: face_flux(:)
      real(rk), intent(out) :: local_flux

      integer :: f, owner, btype

      local_flux = zero

      do f = 1, mesh%nfaces
         if (mesh%faces(f)%neighbor /= 0) cycle

         btype = patch_type_for_face(mesh, bc, f)

         if (btype == bc_periodic) cycle

         owner = mesh%faces(f)%owner

         if (.not. flow%owned(owner)) cycle

         local_flux = local_flux + face_flux(f)
      end do
   end subroutine compute_boundary_flux