1 | include(dom.inc)
2 |
3 | SUBROUTINE create_cell_link(ndirs, s)
4 |
5 | ! ================================================================!
6 | ! !
7 | ! create_cell_link.F : Creates the linking between neighbour !
8 | ! cells. !
9 | ! !
10 | ! in : The number of directions 'ndirs' !
11 | ! The list of directions 's(ndirs,3)' !
12 | ! out : The linked data structure !
13 | ! !
14 | ! author : J. AMAYA (avril 2007) !
15 | ! !
16 | ! ================================================================!
17 |
18 | USE datas
19 | IMPLICIT NONE
20 |
21 | ! IN
22 | DOM_INT :: ndirs
23 | DOM_REAL, DIMENSION(4, ndirs) :: s
24 |
25 | ! LOCAL
26 | DOM_INT :: i
27 |
28 | ! --------------------------!
29 | ! For all cells in the list !
30 | ! --------------------------!
31 | current_cell => cell_list
32 |
33 | DO WHILE (ASSOCIATED(current_cell))
34 |
35 | ! ----------------------------------------------------!
36 | ! Create linking of neighbour cells on all directions !
37 | ! ----------------------------------------------------!
38 | ALLOCATE(current_cell%cell_dir (ndirs))
39 |
40 | DO i=1, ndirs
41 | NULLIFY(current_cell%cell_dir(ndirs)%cell_ptr)
42 | CALL link_neighbour_cell(i,s(1:3,i),ndirs)
43 | ENDDO
44 |
45 | current_cell => current_cell%next_cell
46 |
47 | ENDDO
48 |
49 | END SUBROUTINE create_cell_link
create_cell_link.F could be called by: