build_cell_faces Subroutine

private subroutine build_cell_faces(m)

Builds the cell-to-face mapping by inverting the face owner/neighbor data.

Arguments

Type IntentOptional Attributes Name
type(mesh_t), intent(inout) :: m

Calls

proc~~build_cell_faces~~CallsGraph proc~build_cell_faces mod_mesh_io::build_cell_faces proc~append_cell_face mod_mesh_io::append_cell_face proc~build_cell_faces->proc~append_cell_face proc~fatal_error mod_kinds::fatal_error proc~build_cell_faces->proc~fatal_error proc~append_cell_face->proc~fatal_error

Called by

proc~~build_cell_faces~~CalledByGraph proc~build_cell_faces mod_mesh_io::build_cell_faces proc~read_native_mesh mod_mesh_io::read_native_mesh proc~read_native_mesh->proc~build_cell_faces program~lowmach_react_hex lowmach_react_hex program~lowmach_react_hex->proc~read_native_mesh

Source Code

   subroutine build_cell_faces(m)
      type(mesh_t), intent(inout) :: m

      integer :: f, c

      allocate(m%ncell_faces(m%ncells))
      allocate(m%cell_faces(max_cell_faces, m%ncells))
      m%ncell_faces = 0
      m%cell_faces = 0

      do f = 1, m%nfaces
         c = m%faces(f)%owner
         call append_cell_face(m, c, f)

         c = m%faces(f)%neighbor
         if (c > 0) call append_cell_face(m, c, f)
      end do

      do c = 1, m%ncells
         if (m%ncell_faces(c) /= max_cell_faces) then
            call fatal_error('mesh_io', 'each v1 cuboid cell must have exactly six faces')
         end if
      end do
   end subroutine build_cell_faces