Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ReadSurfaceMesh.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 subroutine readsufacemesh(glb,NumProcs,iunit,iElType2D,myid)
54 
55 
56  integer :: iunit
57 
58  integer :: iaux,k,kk,id2d
59 
60  READ(15,*) iaux, glb%iElType2D
61  DO i = 1, numprocs
62  READ(iunit,*) id2d ! processor id
63  IF(id2d.EQ.myid+1)THEN
64 !
65 ! Read No Solid/Fluid mesh
66 !
67  READ(iunit,*) glb%InterfaceSNumNodes, glb%InterfaceSNumElems
68  ALLOCATE(glb%InterfaceSNodalCoors(1:3,1:glb%InterfaceSNumNodes))
69  ALLOCATE(glb%MapNodeS(1:glb%InterfaceSNumNodes))
70 
71  DO j = 1, glb%InterfaceSNumNodes
72  READ(iunit,*) glb%InterfaceSNodalCoors(1,j), &
73  glb%InterfaceSNodalCoors(2,j), &
74  glb%InterfaceSNodalCoors(3,j), glb%MapNodeS(j)
75  ENDDO
76 
77  ALLOCATE(glb%InterfaceSElemConn(1:glb%iElType2D,1:glb%InterfaceSNumElems))
78  IF(glb%EnforceTractionS)THEN
79  ALLOCATE(glb%MapSElVolEl(1:glb%InterfaceSNumElems))
80  DO j = 1, glb%InterfaceSNumElems
81  IF ( glb%iElType2D==3) THEN
82  READ(iunit,*) glb%InterfaceSElemConn(1,j),&
83  glb%InterfaceSElemConn(2,j),&
84  glb%InterfaceSElemConn(3,j),&
85  glb%MapSElVolEl(j)
86  ELSE IF ( glb%iElType2D==6) THEN
87  READ(iunit,*) glb%InterfaceSElemConn(1,j),&
88  glb%InterfaceSElemConn(2,j),&
89  glb%InterfaceSElemConn(3,j),&
90  glb%InterfaceSElemConn(4,j),&
91  glb%InterfaceSElemConn(5,j),&
92  glb%InterfaceSElemConn(6,j),&
93  glb%MapSElVolEl(j)
94  ELSE IF ( glb%iElType2D==4) THEN
95  READ(iunit,*) glb%InterfaceSElemConn(1,j),&
96  glb%InterfaceSElemConn(2,j),&
97  glb%InterfaceSElemConn(3,j),&
98  glb%InterfaceSElemConn(4,j),&
99  glb%MapSElVolEl(j)
100  END IF
101  ENDDO
102  EXIT
103  ELSE
104  DO j = 1, glb%InterfaceSNumElems
105  IF ( glb%iElType2D==3) THEN
106  READ(iunit,*) glb%InterfaceSElemConn(1,j),&
107  glb%InterfaceSElemConn(2,j),&
108  glb%InterfaceSElemConn(3,j)
109  ELSE IF ( glb%iElType2D==6) THEN
110  READ(iunit,*) glb%InterfaceSElemConn(1,j),&
111  glb%InterfaceSElemConn(2,j),&
112  glb%InterfaceSElemConn(3,j),&
113  glb%InterfaceSElemConn(4,j),&
114  glb%InterfaceSElemConn(5,j),&
115  glb%InterfaceSElemConn(6,j)
116  ELSE IF ( glb%iElType2D==4) THEN
117  READ(iunit,*) glb%InterfaceSElemConn(1,j),&
118  glb%InterfaceSElemConn(2,j),&
119  glb%InterfaceSElemConn(3,j),&
120  glb%InterfaceSElemConn(4,j)
121  END IF
122  ENDDO
123  EXIT
124  ENDIF
125  ELSE ! Not the processor's surface mesh
126  READ(iunit,*) k, kk
127  DO j = 1, k
128  READ(iunit,'()')
129  ENDDO
130  DO j = 1, kk
131  READ(iunit,'()')
132  ENDDO
133  ENDIF
134  ENDDO
135 
j indices k indices k
Definition: Indexing.h:6
blockLoc i
Definition: read.cpp:79
j indices j
Definition: Indexing.h:6