outward_normal Function

private pure function outward_normal(mesh, face_id, cell_id) result(nvec)

Determines the outward unit normal relative to a specific cell.

Arguments

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

Return Value real(kind=rk), (3)


Called by

proc~~outward_normal~~CalledByGraph proc~outward_normal mod_flow_projection::outward_normal proc~compute_momentum_rhs mod_flow_projection::compute_momentum_rhs proc~compute_momentum_rhs->proc~outward_normal proc~face_normal_distance mod_flow_projection::face_normal_distance proc~compute_momentum_rhs->proc~face_normal_distance proc~pressure_gradient_cell mod_flow_projection::pressure_gradient_cell proc~compute_momentum_rhs->proc~pressure_gradient_cell proc~face_linear_vector mod_flow_projection::face_linear_vector proc~compute_momentum_rhs->proc~face_linear_vector proc~correct_cell_velocity mod_flow_projection::correct_cell_velocity proc~correct_cell_velocity->proc~outward_normal proc~face_linear_scalar mod_flow_projection::face_linear_scalar proc~correct_cell_velocity->proc~face_linear_scalar proc~face_neighbor_weight mod_flow_projection::face_neighbor_weight proc~face_neighbor_weight->proc~outward_normal proc~face_normal_distance->proc~outward_normal proc~pressure_gradient_cell->proc~outward_normal proc~pressure_gradient_cell->proc~face_linear_scalar proc~advance_projection_step mod_flow_projection::advance_projection_step proc~advance_projection_step->proc~compute_momentum_rhs proc~advance_projection_step->proc~correct_cell_velocity proc~correct_face_flux mod_flow_projection::correct_face_flux proc~advance_projection_step->proc~correct_face_flux proc~ensure_pressure_operator_cache mod_flow_projection::ensure_pressure_operator_cache proc~advance_projection_step->proc~ensure_pressure_operator_cache proc~compute_predicted_face_flux mod_flow_projection::compute_predicted_face_flux proc~advance_projection_step->proc~compute_predicted_face_flux proc~solve_pressure_correction mod_flow_projection::solve_pressure_correction proc~advance_projection_step->proc~solve_pressure_correction proc~advance_species_transport mod_species::advance_species_transport proc~advance_species_transport->proc~face_normal_distance proc~correct_face_flux->proc~face_normal_distance proc~ensure_pressure_operator_cache->proc~face_normal_distance proc~face_linear_scalar->proc~face_neighbor_weight proc~face_linear_vector->proc~face_neighbor_weight proc~compute_predicted_face_flux->proc~face_linear_vector 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_projection_step program~lowmach_react_hex->proc~advance_species_transport

Source Code

   pure function outward_normal(mesh, face_id, cell_id) result(nvec)
      type(mesh_t), intent(in) :: mesh
      integer, intent(in) :: face_id
      integer, intent(in) :: cell_id
      real(rk) :: nvec(3)

      if (mesh%faces(face_id)%owner == cell_id) then
         nvec = mesh%faces(face_id)%normal
      else
         nvec = -mesh%faces(face_id)%normal
      end if
   end function outward_normal