energy_outward_normal Function

private function energy_outward_normal(mesh, face_id, cell_id) result(nvec)

Outward unit normal from cell_id for face_id.

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~~energy_outward_normal~~CalledByGraph proc~energy_outward_normal mod_energy::energy_outward_normal proc~energy_face_normal_distance mod_energy::energy_face_normal_distance proc~energy_face_normal_distance->proc~energy_outward_normal proc~advance_energy_transport mod_energy::advance_energy_transport proc~advance_energy_transport->proc~energy_face_normal_distance program~lowmach_react_hex lowmach_react_hex program~lowmach_react_hex->proc~advance_energy_transport

Source Code

   function energy_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 energy_outward_normal