Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SourceIMP/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 
172  TYPE(link_type) :: Link
173  TYPE(user_data_type_bc), POINTER :: DATA
174  END TYPE user_type_bc
175 
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
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 
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 ! Node numbering for implicit solver
356  INTEGER, ALLOCATABLE, DIMENSION(:) :: NumNP_loc_implicit, StartNumNP_loc_implicit
357  INTEGER, ALLOCATABLE, DIMENSION(:) :: MapNodeImp, NodeProcImpGlobal
358  INTEGER, POINTER, DIMENSION(:) :: NodeNumGlobalImp
359  INTEGER, POINTER, DIMENSION(:) :: NodeProcImp
360  LOGICAL :: IMP
361 ! end
362 
363 
364 END MODULE meshdata
365 
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)