face_effective_neighbor Function

public function face_effective_neighbor(mesh, bc, face_id, cell_id) result(neighbor)

Returns the neighbor cell index, accounting for periodic connectivity.

If the face is on a periodic boundary, this returns the periodic_neighbor stored in the face structure. Otherwise, it returns the standard neighbor.

Arguments

Type IntentOptional Attributes Name
type(mesh_t), intent(in) :: mesh

The computational mesh.

type(bc_set_t), intent(in) :: bc

The active BC set.

integer, intent(in) :: face_id

Global index of the face.

integer, intent(in) :: cell_id

Index of the cell requesting the neighbor.

Return Value integer


Calls

proc~~face_effective_neighbor~~CallsGraph proc~face_effective_neighbor mod_bc::face_effective_neighbor proc~is_periodic_face mod_bc::is_periodic_face proc~face_effective_neighbor->proc~is_periodic_face proc~patch_type_for_face mod_bc::patch_type_for_face proc~is_periodic_face->proc~patch_type_for_face

Called by

proc~~face_effective_neighbor~~CalledByGraph proc~face_effective_neighbor mod_bc::face_effective_neighbor proc~advance_energy_transport mod_energy::advance_energy_transport proc~advance_energy_transport->proc~face_effective_neighbor proc~advance_species_transport mod_species::advance_species_transport proc~advance_species_transport->proc~face_effective_neighbor proc~compute_momentum_rhs mod_flow_projection::compute_momentum_rhs proc~compute_momentum_rhs->proc~face_effective_neighbor proc~pressure_gradient_cell mod_flow_projection::pressure_gradient_cell proc~compute_momentum_rhs->proc~pressure_gradient_cell proc~compute_predicted_face_flux mod_flow_projection::compute_predicted_face_flux proc~compute_predicted_face_flux->proc~face_effective_neighbor proc~correct_cell_velocity mod_flow_projection::correct_cell_velocity proc~correct_cell_velocity->proc~face_effective_neighbor proc~correct_face_flux mod_flow_projection::correct_face_flux proc~correct_face_flux->proc~face_effective_neighbor proc~ensure_pressure_operator_cache mod_flow_projection::ensure_pressure_operator_cache proc~ensure_pressure_operator_cache->proc~face_effective_neighbor proc~pressure_gradient_cell->proc~face_effective_neighbor proc~advance_projection_step mod_flow_projection::advance_projection_step proc~advance_projection_step->proc~compute_momentum_rhs proc~advance_projection_step->proc~compute_predicted_face_flux proc~advance_projection_step->proc~correct_cell_velocity proc~advance_projection_step->proc~correct_face_flux proc~advance_projection_step->proc~ensure_pressure_operator_cache proc~solve_pressure_correction mod_flow_projection::solve_pressure_correction proc~advance_projection_step->proc~solve_pressure_correction proc~pressure_matvec mod_flow_projection::pressure_matvec proc~pressure_matvec->proc~ensure_pressure_operator_cache proc~solve_pressure_correction->proc~ensure_pressure_operator_cache proc~solve_pressure_correction->proc~pressure_matvec program~lowmach_react_hex lowmach_react_hex program~lowmach_react_hex->proc~advance_energy_transport program~lowmach_react_hex->proc~advance_species_transport program~lowmach_react_hex->proc~advance_projection_step

Source Code

   integer function face_effective_neighbor(mesh, bc, face_id, cell_id) result(neighbor)
      type(mesh_t), intent(in) :: mesh
      type(bc_set_t), intent(in) :: bc
      integer, intent(in) :: face_id
      integer, intent(in) :: cell_id

      if (mesh%faces(face_id)%owner == cell_id) then
         neighbor = mesh%faces(face_id)%neighbor
      else
         neighbor = mesh%faces(face_id)%owner
      end if

      if (neighbor == 0 .and. is_periodic_face(mesh, bc, face_id)) then
         neighbor = mesh%faces(face_id)%periodic_neighbor
      end if
   end function face_effective_neighbor