49
public :: halo_communicator, element_owned, element_owner, node_owned, assemble_ele, &
50
& surface_element_owned, nowned_nodes
49
public :: halo_communicator, element_owned, element_neighbour_owned, &
50
& element_owner, node_owned, assemble_ele, &
51
& surface_element_owned, nowned_nodes
51
52
! Apparently ifort has a problem with the generic name node_owned
52
53
public :: node_owned_mesh, zero_non_owned
61
62
& element_owned_vector, element_owned_tensor
62
63
end interface element_owned
65
interface element_neighbour_owned
66
module procedure element_neighbour_owned_mesh, &
67
& element_neighbour_owned_scalar, element_neighbour_owned_vector, &
68
& element_neighbour_owned_tensor
69
end interface element_neighbour_owned
64
71
interface element_owner
65
72
module procedure element_owner_mesh, element_owner_scalar, &
66
73
& element_owner_vector, element_owner_tensor
274
281
end function element_owned_tensor
283
function element_neighbour_owned_mesh(mesh, element_number) result(owned)
284
!!< Return .true. if ELEMENT_NUMBER has a neighbour in MESH that
285
!!< is owned by this process otherwise .false.
287
!! Effectively, this computes whether ELEMENT_NUMBER is in the L1
289
type(mesh_type), intent(in) :: mesh
290
integer, intent(in) :: element_number
292
integer, dimension(:), pointer :: neighbours
293
integer :: i, n_neigh
295
neighbours => ele_neigh(mesh, element_number)
296
n_neigh = size(neighbours)
299
! If element_number is in the halo, then some of the neighbour
300
! data might not be available, in which case neighbours(i) can
301
! be invalid (missing data are marked by negative values).
302
if ( neighbours(i) <= 0 ) cycle
303
if ( element_owned(mesh, neighbours(i)) ) then
308
end function element_neighbour_owned_mesh
310
function element_neighbour_owned_scalar(field, element_number) result(owned)
311
!!< Return .true. if ELEMENT_NUMBER has a neighbour in FIELD that
312
!!< is owned by this process otherwise .false.
314
!! Effectively, this computes whether ELEMENT_NUMBER is in the L1
316
type(scalar_field), intent(in) :: field
317
integer, intent(in) :: element_number
320
owned = element_neighbour_owned(field%mesh, element_number)
321
end function element_neighbour_owned_scalar
323
function element_neighbour_owned_vector(field, element_number) result(owned)
324
!!< Return .true. if ELEMENT_NUMBER has a neighbour in FIELD that
325
!!< is owned by this process otherwise .false.
327
!! Effectively, this computes whether ELEMENT_NUMBER is in the L1
329
type(vector_field), intent(in) :: field
330
integer, intent(in) :: element_number
333
owned = element_neighbour_owned(field%mesh, element_number)
334
end function element_neighbour_owned_vector
336
function element_neighbour_owned_tensor(field, element_number) result(owned)
337
!!< Return .true. if ELEMENT_NUMBER has a neighbour in FIELD that
338
!!< is owned by this process otherwise .false.
340
!! Effectively, this computes whether ELEMENT_NUMBER is in the L1
342
type(tensor_field), intent(in) :: field
343
integer, intent(in) :: element_number
346
owned = element_neighbour_owned(field%mesh, element_number)
347
end function element_neighbour_owned_tensor
276
349
function element_owner_mesh(mesh, element_number) result(owner)
277
350
!!< Return number of processor that owns the supplied element in the