Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
utilities/RocfracPrep/meshdata.f90
Go to the documentation of this file.
1 !*********************************************************************
2 !* Illinois Open Source License *
3 !* *
4 !* University of Illinois/NCSA *
5 !* Open Source License *
6 !* *
7 !* Copyright@2008, University of Illinois. All rights reserved. *
8 !* *
9 !* Developed by: *
10 !* *
11 !* Center for Simulation of Advanced Rockets *
12 !* *
13 !* University of Illinois *
14 !* *
15 !* www.csar.uiuc.edu *
16 !* *
17 !* Permission is hereby granted, free of charge, to any person *
18 !* obtaining a copy of this software and associated documentation *
19 !* files (the "Software"), to deal with the Software without *
20 !* restriction, including without limitation the rights to use, *
21 !* copy, modify, merge, publish, distribute, sublicense, and/or *
22 !* sell copies of the Software, and to permit persons to whom the *
23 !* Software is furnished to do so, subject to the following *
24 !* conditions: *
25 !* *
26 !* *
27 !* @ Redistributions of source code must retain the above copyright *
28 !* notice, this list of conditions and the following disclaimers. *
29 !* *
30 !* @ Redistributions in binary form must reproduce the above *
31 !* copyright notice, this list of conditions and the following *
32 !* disclaimers in the documentation and/or other materials *
33 !* provided with the distribution. *
34 !* *
35 !* @ Neither the names of the Center for Simulation of Advanced *
36 !* Rockets, the University of Illinois, nor the names of its *
37 !* contributors may be used to endorse or promote products derived *
38 !* from this Software without specific prior written permission. *
39 !* *
40 !* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
41 !* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
42 !* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
43 !* NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
44 !* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
45 !* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
46 !* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
47 !* USE OR OTHER DEALINGS WITH THE SOFTWARE. *
48 !*********************************************************************
49 !* Please acknowledge The University of Illinois Center for *
50 !* Simulation of Advanced Rockets in works and publications *
51 !* resulting from this software or its derivatives. *
52 !*********************************************************************
53 MODULE meshdata
54 
55 
59 
60  IMPLICIT NONE
61 
62  INTEGER :: io_input ! unit id of control deck
63  parameter(io_input = 10)
64 
65 ! - DECK FILE PRAMETERS
66  CHARACTER*20 :: prefx ! I/O file prefx
67  INTEGER :: prefx_lngth ! length of prefx
68 ! - Fastest Dilatitial wave speed
69  REAL*8 :: cd_fastest
70 ! - Derive Type for the boundary conditions
71  TYPE bcvalues
72  INTEGER :: b1, b2, b3
73  REAL*8 :: bc1, bc2, bc3
74  END TYPE bcvalues
75 ! - Stores the boundary conditions data values
76  TYPE(bcvalues), DIMENSION(32) :: bc_conditions
77 
78 ! PRIMARY MESH DATA (i.e. mesh created with ansys, patran, or mesh3d):
79 
80 ! - Number of nodes
81  INTEGER :: numnp_prmry
82 ! - Number of volumetric elements
83  INTEGER :: numelv_prmry
84 ! - meshing software flag
85  INTEGER :: iansys ! 0- no, 1-yes
86  INTEGER :: ipatran ! 0- no, 1-yes
87  INTEGER :: itetmesh ! 0- no, 1-yes
88  INTEGER :: ipatcohin ! 0- no, 1-yes
89  INTEGER :: itetcohin ! 0- no, 1-yes
90 
91  INTEGER :: numvertx
92 
93  REAL*8 :: convertunit
94 
95 
96 ! - Coordinate array
97  REAL*8, ALLOCATABLE, DIMENSION(:,:) :: coor
98 ! - Coordinate array
99  REAL*8, ALLOCATABLE, DIMENSION(:) :: press_nodal
100 ! - Connectivity array for volumetric elements
101  INTEGER, ALLOCATABLE, DIMENSION(:,:) :: lmelv_prmry
102 
103 
104 ! - Nodal corner boundary flag
105  INTEGER, ALLOCATABLE, DIMENSION(:) :: ibcaxi
106 ! - Partioned element's processor (from METIS)
107  INTEGER, ALLOCATABLE, DIMENSION(:) :: epart
108 
109 ! - Number of surface triangles with applied tractions
110 ! INTEGER, ALLOCATABLE, DIMENSION(:,:) :: numel_2d
111 ! - Number of surface nodes with applied mesh motion velocity
112  INTEGER, ALLOCATABLE, DIMENSION(:) :: numnp_2d
113  INTEGER, ALLOCATABLE, DIMENSION(:) :: numelperproc
114  INTEGER, ALLOCATABLE, DIMENSION(:) :: numndperproc
115 ! sub
116  INTEGER, DIMENSION(:,:), ALLOCATABLE :: lmtri
117  INTEGER, DIMENSION(:), ALLOCATABLE :: elm_2d
118  INTEGER, DIMENSION(:), ALLOCATABLE :: elm_2d_flag
119  INTEGER, ALLOCATABLE, DIMENSION(:,:) :: neigh_2d
120  INTEGER, DIMENSION(:), ALLOCATABLE :: epart_2d
121 ! sub
122 
123 ! - Node tracking
124  INTEGER :: numnodeio
125  INTEGER, ALLOCATABLE, DIMENSION(:) :: nodeio
126 
127 ! - Node
128 
129  INTEGER :: ioformat ! 0 = unformatted (default), 1 = formatted
130  ! 0 = no output, 1 = output
131  INTEGER :: iopmvis ! PMVIS software to view the partition 0=no, 1 = yes
132  INTEGER :: ipress ! flag for if we have pressure loading 0=no, 1 = yes
133 
134  INTEGER :: intfaceflag
135 
136 !
137 ! -- derived surface type
138 !
139 !$$$ TYPE request
140 !$$$ INTEGER, DIMENSION(1:6) :: Conn ! list of nodes
141 !$$$ INTEGER :: NumEl
142 !$$$ INTEGER :: NumNp
143 !$$$ TYPE(request), POINTER :: next
144 !$$$ END TYPE request
145 !$$$
146 !$$$ TYPE(request), POINTER :: head, tail
147 !$$$ TYPE(request), POINTER :: item, first
148 
149  INTEGER, ALLOCATABLE, DIMENSION(:) :: indsburnflg
150 
151  INTEGER :: nummat
152 
153  INTEGER, DIMENSION(:), ALLOCATABLE :: matid
154  INTEGER, DIMENSION(:), ALLOCATABLE :: eltypeid
155 
156  ! limit of 10 nodes to monitor history
157 
158  INTEGER, DIMENSION(1:10) :: ndhistory
159  INTEGER :: numndhistory
160 
161  INTEGER :: numbc_prmry
162  INTEGER :: numbc_prmry_mm
163  INTEGER :: numbc_prmry_ht
164 !----- dimension: <1> old node number <2> processor
165  INTEGER, ALLOCATABLE, DIMENSION(:,:) :: ik1
166 
167 ! User-defined list element
168 ! The Link_Type field MUST be the FIRST in the user-defined list element
169 ! Note pointer to data so as to easily create sublists
170 
171  TYPE user_type_bc
172  TYPE(link_type) :: link
173  TYPE(user_data_type_bc), POINTER :: data
174  END TYPE user_type_bc
175 
176  TYPE user_data_type_bc
177  INTEGER :: bc_nodeglb
178  INTEGER :: bc_flagglb
179  END TYPE user_data_type_bc
180 
181 ! Auxilliary data type required for the transfer function
182  TYPE user_ptr_type_bc
183  TYPE(user_type_bc), POINTER :: p
184  END TYPE user_ptr_type_bc
185 
186  TYPE(user_ptr_type_bc) :: user_bc
187 
188  TYPE(list_type) :: bc_structural
189  TYPE(list_type) :: bc_meshmotion
190  TYPE(list_type) :: bc_thermal
191 
192  TYPE user_type_mapnd
193  TYPE(link_type) :: link
194  TYPE(user_data_type_mapnd), POINTER :: data
195  END TYPE user_type_mapnd
196 
198  INTEGER :: locnd
199  INTEGER :: proc
200  END TYPE user_data_type_mapnd
201 
202 ! Auxilliary data type required for the transfer function
204  TYPE(user_type_mapnd), POINTER :: p
205  END TYPE user_ptr_type_mapnd
206 
207  TYPE(user_ptr_type_mapnd) :: user_mapnd
208 
209  TYPE(list_type), ALLOCATABLE, DIMENSION(:) :: mapnd_glb2locproc
210 
211  INTEGER, ALLOCATABLE, DIMENSION(:) :: numbc_structural, numbc_meshmotion, numbc_thermal
212 
213 
214  INTEGER, PARAMETER :: maxnumberofprocstosharenode = 8
215 
216  INTEGER, ALLOCATABLE, DIMENSION(:,:) :: procndlist
217  INTEGER, ALLOCATABLE, DIMENSION(:) :: numprocpernd
218 
219  INTEGER, ALLOCATABLE, DIMENSION(:) :: nodeflag
220 
221 ! User-defined list element
222 ! The Link_Type field MUST be the FIRST in the user-defined list element
223 ! Note pointer to data so as to easily create sublists
224 
226  TYPE(link_type) :: link
227  TYPE(user_data_type_surfmesh_tri3), POINTER :: data
228  END TYPE user_type_surfmesh_tri3
229 
231  INTEGER, DIMENSION(1:4) :: elemdata
233 
234 ! Auxilliary data type required for the transfer function
236  TYPE(user_type_surfmesh_tri3), POINTER :: p
238 
239  TYPE(user_ptr_type_surfmesh_tri3) :: user_surfmesh_tri3
240 
241  TYPE(list_type) :: surfmesh_tri3_s
242  TYPE(list_type) :: surfmesh_tri3_sf
243 
244 ! User-defined list element
245 ! The Link_Type field MUST be the FIRST in the user-defined list element
246 ! Note pointer to data so as to easily create sublists
247 
249  TYPE(link_type) :: link
250  TYPE(user_data_type_surfmesh_tri6), POINTER :: data
251  END TYPE user_type_surfmesh_tri6
252 
254  INTEGER, DIMENSION(1:7) :: elemdata
256 
257 ! Auxilliary data type required for the transfer function
259  TYPE(user_type_surfmesh_tri6), POINTER :: p
261 
262  TYPE(user_ptr_type_surfmesh_tri6) :: user_surfmesh_tri6
263 
264  TYPE(list_type) :: surfmesh_tri6_s
265  TYPE(list_type) :: surfmesh_tri6_sf
266 
267 ! User-defined list element
268 ! The Link_Type field MUST be the FIRST in the user-defined list element
269 ! Note pointer to data so as to easily create sublists
270 
272  TYPE(link_type) :: link
273  TYPE(user_data_type_surfmesh_hex8), POINTER :: data
274  END TYPE user_type_surfmesh_hex8
275 
277  INTEGER, DIMENSION(1:5) :: elemdata
279 
280 ! Auxilliary data type required for the transfer function
282  TYPE(user_type_surfmesh_hex8), POINTER :: p
284 
285  TYPE(user_ptr_type_surfmesh_hex8) :: user_surfmesh_hex8
286 
287  TYPE(list_type) :: surfmesh_hex8_s
288  TYPE(list_type) :: surfmesh_hex8_sf
289 
290 ! User-defined list element
291 ! The Link_Type field MUST be the FIRST in the user-defined list element
292 ! Note pointer to data so as to easily create sublists
293 
295  TYPE(link_type) :: link
296  TYPE(user_data_type_procnodelist), POINTER :: data
297  END TYPE user_type_procnodelist
298 
300  INTEGER :: locndnum
302 
303 ! Auxilliary data type required for the transfer function
305  TYPE(user_type_procnodelist), POINTER :: p
307 
308  TYPE(user_ptr_type_procnodelist) :: user_procnodelist
309 
310  TYPE(list_type), POINTER, DIMENSION(:) :: procnodelist
311 
312 ! type of surface mesh
313  ! = 3 for all tri
314  ! = 4 for all quad
315  ! = 5 for mixed
316 
317  INTEGER :: meshtype2d
318 
319  INTEGER, DIMENSION(:), POINTER :: elflag
320 
321  INTEGER, DIMENSION(:,:),POINTER :: numelhex2d
322  INTEGER, DIMENSION(:,:),POINTER :: numeltet2d
323 
324  INTEGER, DIMENSION(:,:), POINTER :: elconntable
325  INTEGER, DIMENSION(:), POINTER :: mattype
326 
327 
328  INTEGER, DIMENSION(:), POINTER :: numelvolmat
329  INTEGER, DIMENSION(:), POINTER :: numelpartbndrymat
330 
331 
332  INTEGER, DIMENSION(:,:),POINTER :: nodeflag_str
333  INTEGER, DIMENSION(:,:),POINTER :: nodeflag_mm
334  INTEGER, DIMENSION(:,:),POINTER :: nodeflag_th
335 
336  INTEGER, DIMENSION(:), POINTER :: numneighprocs_list
337 
338  INTEGER, DIMENSION(:), POINTER :: nodestocommunicate,id_sendto_list
339  INTEGER :: nodestocommunicate_cnt
340 
341  INTEGER, DIMENSION(:,:), ALLOCATABLE :: bc_flag
342 
343  INTEGER, DIMENSION(:), ALLOCATABLE :: numbc_flag
344  INTEGER, POINTER, DIMENSION(:) :: pconn_comm
345 
346  INTEGER :: maxnumbc_str,maxnumbc_mm,maxnumbc_th, numserbc
347 
348  INTEGER, POINTER, DIMENSION(:,:) :: bc_values_mm, bc_values_str
349  INTEGER, POINTER, DIMENSION(:) :: bc_values_th
350  REAL*8, POINTER, DIMENSION(:) :: bcvalue
351 
352  LOGICAL :: interactmesh
353  LOGICAL :: overlaymesh
354 
355 
356 END MODULE meshdata
357 
subroutine, public li_add_to_head(Link, List)
type(link_ptr_type) function, public li_get_head(List)
logical function, public li_associated(Link)
type(link_ptr_type) function, public li_get_next(Link)
type(link_ptr_type) function, public li_remove_head(List)