1 | include(dom.inc)
2 | MODULE datas
3 |
4 | ! ===============================================================!
5 | ! !
6 | ! mod_datas.F : module that contains all data structure for the !
7 | ! geometrical treatement !
8 | ! !
9 | ! contains : The list of nodes, faces and cells. !
10 | ! The current node, current face and current cell !
11 | ! pointers. !
12 | ! A pointer to the last element of each list. !
13 | ! The data structures for each element !
14 | ! !
15 | ! author : J. AMAYA (avril 2007) !
16 | ! !
17 | ! ===============================================================!
18 |
19 | IMPLICIT NONE
20 |
21 | ! ---------!
22 | ! The face !
23 | ! ---------!
24 |
25 | TYPE face
26 | DOM_INT :: face_id
27 | DOM_INT :: i_nbnodes
28 | DOM_INT :: i_nbparents
29 | DOM_INT :: i_patchnb
30 | logical :: bndyface
31 | DOM_REAL :: area
32 | DOM_REAL :: x, y, z
33 | DOM_INT :: parent_cell(2)
34 | DOM_INT, allocatable, dimension(:,:) :: face_point
35 | DOM_REAL :: face_normal(4,2)
36 | type(face), pointer :: next_face
37 | type(face), pointer :: prev_face
38 | type(cell), pointer :: parent1_ptr
39 | type(cell), pointer :: parent2_ptr
40 | END TYPE face
41 |
42 | TYPE ptr_face
43 | type(face), pointer :: face_ptr
44 | END TYPE ptr_face
45 |
46 | ! -------------------!
47 | ! Faces at each node !
48 | ! -------------------!
49 |
50 | TYPE fatnode
51 | type(face), pointer :: fatthisnode
52 | type(fatnode),pointer :: next_fatnode
53 | END TYPE fatnode
54 |
55 | TYPE ptr_fat
56 | type(fatnode), pointer:: fatnode_ptr
57 | END TYPE ptr_fat
58 |
59 | ! ---------!
60 | ! The cell !
61 | ! ---------!
62 |
63 | TYPE ptr_cell
64 | type(cell), pointer :: cell_ptr
65 | END TYPE ptr_cell
66 |
67 | TYPE cell
68 | DOM_INT :: cell_id
69 | DOM_INT :: i_nbfaces
70 | DOM_INT :: celltype
71 | DOM_INT, allocatable, dimension(:) :: cellnodes
72 | DOM_REAL,allocatable, dimension(:,:) :: nodenormals
73 | DOM_REAL :: volume
74 | type(ptr_face), allocatable, dimension(:) :: cell_face
75 | type(ptr_cell), allocatable, dimension(:) :: cell_dir
76 | type(ptr_cell), allocatable, dimension(:) :: cell_udir
77 | type(cell), pointer :: next_cell
78 | END TYPE cell
79 |
80 | ! ----------------------!
81 | ! Pointers to the lists !
82 | ! ----------------------!
83 |
84 | DOM_INT, allocatable, dimension(:,:) :: nodepatch
85 |
86 | type(face), pointer :: face_list
87 | type(face), pointer :: last_face
88 | type(face), pointer :: current_face
89 |
90 | type(ptr_face),allocatable, dimension (:) :: faceidx
91 | type(ptr_fat), allocatable, dimension (:) :: facesatnode
92 |
93 | type(cell), pointer :: cell_list
94 | type(cell), pointer :: last_cell
95 | type(cell), pointer :: current_cell
96 |
97 | DOM_INT :: i_nnodes = 0
98 | DOM_INT :: i_ncells = 0
99 | DOM_INT :: i_nfaces = 0
100 | DOM_INT :: i_nfacesmax = 0
101 |
102 | DOM_REAL, allocatable, dimension (:,:) :: node_list
103 |
104 | END MODULE datas
mod_datas.F could be called by: