Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SourceIMP/utilities/RocfracPrep/Linked_List2.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 !*********************************************************************
54 
56 
57  IMPLICIT NONE
58 
59 contains
60 
61  SUBROUTINE init_procelemlist(head, tail)
62 
63  TYPE(procelemlist_data_ptr), POINTER :: head, tail
64 
65  nullify(head,tail)
66 
67  END SUBROUTINE init_procelemlist
68 
69  SUBROUTINE add_procelemlist(new, head, tail)
70 
71  TYPE(procelemlist_data_ptr), POINTER :: new, head, tail
72 
73  IF(ASSOCIATED(head))THEN
74  tail%next => new
75  nullify(new%next)
76  tail => new
77  ELSE
78  head => new
79  tail => new
80  nullify(tail%next)
81  ENDIF
82  END SUBROUTINE add_procelemlist
83 
84 SUBROUTINE list_procelemlist(head)
85 
86  TYPE(procelemlist_data_ptr), pointer :: head
87  TYPE(procelemlist_data_ptr), pointer :: ptr
88 
89  IF(.NOT. ASSOCIATED(head) ) THEN
90  print*,'list empty'
91  ELSE
92  ptr => head
93  DO WHILE (ASSOCIATED(ptr))
94  ptr => ptr%next
95  ENDDO
96  ENDIF
97 END SUBROUTINE list_procelemlist
98 
99 !! Boundary Conditions
100 
101 SUBROUTINE add_bc(new, head, tail)
102 
103  TYPE(bc_ptr), POINTER :: new, head, tail
104 
105  IF(ASSOCIATED(head))THEN
106  tail%next => new
107  nullify(new%next)
108  tail => new
109  ELSE
110  head => new
111  tail => new
112  nullify(tail%next)
113  ENDIF
114 END SUBROUTINE add_bc
115 
116 !! Surface Mesh
117 
118 !! Boundary Conditions
119 
120 SUBROUTINE add_surfmesh_tri3(new, head, tail)
121 
122  TYPE(surfmesh_tri3_ptr), POINTER :: new, head, tail
123 
124  IF(ASSOCIATED(head))THEN
125  tail%next => new
126  nullify(new%next)
127  tail => new
128  ELSE
129  head => new
130  tail => new
131  nullify(tail%next)
132  ENDIF
133 END SUBROUTINE add_surfmesh_tri3
134 
135 SUBROUTINE add_surfmesh_tri6(new, head, tail)
136 
137  TYPE(surfmesh_tri6_ptr), POINTER :: new, head, tail
138 
139  IF(ASSOCIATED(head))THEN
140  tail%next => new
141  nullify(new%next)
142  tail => new
143  ELSE
144  head => new
145  tail => new
146  nullify(tail%next)
147  ENDIF
148 END SUBROUTINE add_surfmesh_tri6
149 
150 
151 SUBROUTINE add_surfmesh_hex8(new, head, tail)
152 
153  TYPE(surfmesh_hex8_ptr), POINTER :: new, head, tail
154 
155  IF(ASSOCIATED(head))THEN
156  tail%next => new
157  nullify(new%next)
158  tail => new
159  ELSE
160  head => new
161  tail => new
162  nullify(tail%next)
163  ENDIF
164 END SUBROUTINE add_surfmesh_hex8
165 
166 
167 !!$SUBROUTINE list_ProcElemList(head)
168 !!$
169 !!$ TYPE(ProcElemList_data_ptr), pointer :: head
170 !!$ TYPE(ProcElemList_data_ptr), pointer :: ptr
171 !!$
172 !!$ IF(.NOT. ASSOCIATED(head) ) THEN
173 !!$ PRINT*,'list empty'
174 !!$ ELSE
175 !!$ ptr => head
176 !!$ DO WHILE (ASSOCIATED(ptr))
177 !!$ ptr => ptr%next
178 !!$ ENDDO
179 !!$ ENDIF
180 !!$END SUBROUTINE list_ProcElemList
181 
182 !!$INTEGER FUNCTION Get_Len_ProcElemList(List)
183 !!$ IMPLICIT NONE
184 !!$ TYPE(ProcElemList_data_type), INTENT(IN), TARGET :: List
185 !!$ TYPE(ProcElemList_data_type), INTENT(IN), TARGET :: ptr
186 !!$ INTEGER N
187 !!$
188 !!$ ptr => List
189 !!$ N = 0
190 !!$ DO WHILE(ASSOCIATED(ptr))
191 !!$ ptr => ptr%next
192 !!$ N = N + 1
193 !!$ ENDDO
194 !!$ Get_Len_ProcElemList = N
195 !!$
196 !!$ RETURN
197 !!$END FUNCTION Get_Len_ProcElemList
198 
199 END MODULE linked_list2
200 
subroutine add_surfmesh_tri6(new, head, tail)
subroutine add_surfmesh_tri3(new, head, tail)
Aff_transformation_rep_baseS2< FT > * ptr() const
virtual std::ostream & print(std::ostream &os) const
subroutine add_procelemlist(new, head, tail)
subroutine add_surfmesh_hex8(new, head, tail)