SPEED
GET_NEIGHBOUR_ELEM.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine get_neighbour_elem (omega_m, npt, n, id_mpi, n_qp)
 Computes neighbouring element.
 

Function/Subroutine Documentation

◆ get_neighbour_elem()

subroutine get_neighbour_elem ( integer*4, dimension(n_qp,0:3), intent(inout)  omega_m,
integer*4, intent(in)  npt,
integer*4, intent(out)  n,
integer*4, intent(in)  id_mpi,
integer*4, intent(in)  n_qp 
)

Computes neighbouring element.

Author
Ilario Mazzieri
Date
September, 2013
Version
1.0
Parameters
[in]omega_momega_m(:,0) = block identification for the neighbouring element, omega_m(:,1) = neighbouring element number, omega_m(:,2) = neighbouring element face
[in]nptnumber of quadrature points lying on the neighbouring element
[in]id_mpinumber of process mpi
[in]n_qpnumber of quadrature points
[out]omega_m(,3)label identifying the neighbournig element for each quadrature point
[out]ntotal neighbouring elements

Definition at line 32 of file GET_NEIGHBOUR_ELEM.f90.

33
34 implicit none
35
36 integer*4 :: i, lett, j
37 integer*4, intent(in) :: npt, id_mpi, n_qp
38 integer*4, intent(out) :: n
39
40 integer*4, dimension(n_qp) :: omega_m_copy
41 integer*4, dimension(n_qp,0:3), intent(inout) :: omega_m
42
43
44 n = 0
45 i = 1
46 omega_m_copy = omega_m(:,1)
47 do while (i .le. npt)
48 lett = omega_m_copy(i)
49
50 if(lett .ne. 0) then
51 n = n + 1
52 omega_m(i,3) = n
53 endif
54
55 do j = i + 1, npt
56
57 if (omega_m(j,1) .eq. lett) then
58 omega_m(j,3) = n
59 omega_m_copy(j) = 0
60 endif
61
62 enddo
63
64 i = i + 1
65
66 enddo
67
68
69
70
71

Referenced by make_dg_interface().

Here is the caller graph for this function: