| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mesh_t), | intent(in) | :: | mesh | |||
| integer, | intent(in) | :: | fid | |||
| integer, | intent(in) | :: | c |
integer function adjacent_cell(mesh, fid, c) result(nb) type(mesh_t), intent(in) :: mesh integer, intent(in) :: fid, c nb = 0 if (mesh%faces(fid)%owner == c) then nb = mesh%faces(fid)%neighbor if (nb <= 0) nb = mesh%faces(fid)%periodic_neighbor else if (mesh%faces(fid)%neighbor == c .or. mesh%faces(fid)%periodic_neighbor == c) then nb = mesh%faces(fid)%owner end if end function adjacent_cell