NEMoSys  0.63.0
A modular, extensible resource with robust automated mesh generation, mesh quality analysis, adaptive mesh refinement, and data transfer between arbitrary meshes.
petnShape.C
Go to the documentation of this file.
1 /*******************************************************************************
2 * Promesh *
3 * Copyright (C) 2022, IllinoisRocstar LLC. All rights reserved. *
4 * *
5 * Promesh is the property of IllinoisRocstar LLC. *
6 * *
7 * IllinoisRocstar LLC *
8 * Champaign, IL *
9 * www.illinoisrocstar.com *
10 * promesh@illinoisrocstar.com *
11 *******************************************************************************/
12 /*******************************************************************************
13 * This file is part of Promesh *
14 * *
15 * This version of Promesh is free software: you can redistribute it and/or *
16 * modify it under the terms of the GNU Lesser General Public License as *
17 * published by the Free Software Foundation, either version 3 of the License, *
18 * or (at your option) any later version. *
19 * *
20 * Promesh is distributed in the hope that it will be useful, but WITHOUT ANY *
21 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *
22 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more *
23 * details. *
24 * *
25 * You should have received a copy of the GNU Lesser General Public License *
26 * along with this program. If not, see <https://www.gnu.org/licenses/>. *
27 * *
28 *******************************************************************************/
29 #include <iostream>
30 #include <fstream>
31 #include <sstream>
32 #include <string>
33 #include <vector>
34 #include "Geometry/rocPackShape.H"
35 #include "Geometry/petnShape.H"
36 
37 
38 namespace NEM {
39 
40 namespace GEO {
41 
42 
44 {
45  // Nothing
46 }
47 
49 {
50  // Nothing
51 }
52 
53 
54 std::vector<std::vector<double>> petnShape::getVertices()
55 {
56  // Adding vertex data
57  std::vector<std::vector<double>> verts;
58  verts.resize(18);
59 
60  verts[0].resize(3);
61  verts[0][0] = 0.00;
62  verts[0][1] = -0.45;
63  verts[0][2] = 0.00;
64 
65  verts[1].resize(3);
66  verts[1][0] = 0.20;
67  verts[1][1] = -0.25;
68  verts[1][2] = -0.20;
69 
70  verts[2].resize(3);
71  verts[2][0] = 0.20;
72  verts[2][1] = -0.35;
73  verts[2][2] = 0.00;
74 
75  verts[3].resize(3);
76  verts[3][0] = 0.00;
77  verts[3][1] = -0.35;
78  verts[3][2] = -0.20;
79 
80  verts[4].resize(3);
81  verts[4][0] = 0.20;
82  verts[4][1] = -0.25;
83  verts[4][2] = 0.20;
84 
85  verts[5].resize(3);
86  verts[5][0] = 0.00;
87  verts[5][1] = -0.35;
88  verts[5][2] = 0.20;
89 
90  verts[6].resize(3);
91  verts[6][0] = -0.20;
92  verts[6][1] = -0.25;
93  verts[6][2] = 0.20;
94 
95  verts[7].resize(3);
96  verts[7][0] = -0.20;
97  verts[7][1] = -0.35;
98  verts[7][2] = 0.00;
99 
100  verts[8].resize(3);
101  verts[8][0] = -0.20;
102  verts[8][1] = -0.25;
103  verts[8][2] = -0.20;
104 
105  verts[9].resize(3);
106  verts[9][0] = 0.00;
107  verts[9][1] = 0.45;
108  verts[9][2] = 0.00;
109 
110  verts[10].resize(3);
111  verts[10][0] = 0.20;
112  verts[10][1] = 0.25;
113  verts[10][2] = -0.20;
114 
115  verts[11].resize(3);
116  verts[11][0] = 0.20;
117  verts[11][1] = 0.35;
118  verts[11][2] = 0.00;
119 
120  verts[12].resize(3);
121  verts[12][0] = 0.00;
122  verts[12][1] = 0.35;
123  verts[12][2] = -0.20;
124 
125  verts[13].resize(3);
126  verts[13][0] = 0.20;
127  verts[13][1] = 0.25;
128  verts[13][2] = 0.20;
129 
130  verts[14].resize(3);
131  verts[14][0] = 0.00;
132  verts[14][1] = 0.35;
133  verts[14][2] = 0.20;
134 
135  verts[15].resize(3);
136  verts[15][0] = -0.20;
137  verts[15][1] = 0.25;
138  verts[15][2] = 0.20;
139 
140  verts[16].resize(3);
141  verts[16][0] = -0.20;
142  verts[16][1] = 0.35;
143  verts[16][2] = 0.00;
144 
145  verts[17].resize(3);
146  verts[17][0] = -0.20;
147  verts[17][1] = 0.25;
148  verts[17][2] = -0.20;
149 
150  return verts;
151 }
152 
153 std::vector<std::vector<int>> petnShape::getFaces()
154 {
155  // Adding face data
156  std::vector<std::vector<int>> faces;
157  faces.resize(12);
158 
159  faces[0].resize(6);
160  faces[0][0] = 10;
161  faces[0][1] = 11;
162  faces[0][2] = 13;
163  faces[0][3] = 4;
164  faces[0][4] = 2;
165  faces[0][5] = 1;
166 
167  faces[1].resize(6);
168  faces[1][0] = 13;
169  faces[1][1] = 14;
170  faces[1][2] = 15;
171  faces[1][3] = 6;
172  faces[1][4] = 5;
173  faces[1][5] = 4;
174 
175  faces[2].resize(6);
176  faces[2][0] = 15;
177  faces[2][1] = 16;
178  faces[2][2] = 17;
179  faces[2][3] = 8;
180  faces[2][4] = 7;
181  faces[2][5] = 6;
182 
183  faces[3].resize(4);
184  faces[3][0] = 14;
185  faces[3][1] = 13;
186  faces[3][2] = 11;
187  faces[3][3] = 9;
188 
189  faces[4].resize(4);
190  faces[4][0] = 16;
191  faces[4][1] = 15;
192  faces[4][2] = 14;
193  faces[4][3] = 9;
194 
195  faces[5].resize(4);
196  faces[5][0] = 7;
197  faces[5][1] = 8;
198  faces[5][2] = 3;
199  faces[5][3] = 0;
200 
201  faces[6].resize(4);
202  faces[6][0] = 3;
203  faces[6][1] = 1;
204  faces[6][2] = 2;
205  faces[6][3] = 0;
206 
207  faces[7].resize(4);
208  faces[7][0] = 11;
209  faces[7][1] = 10;
210  faces[7][2] = 12;
211  faces[7][3] = 9;
212 
213  faces[8].resize(4);
214  faces[8][0] = 5;
215  faces[8][1] = 6;
216  faces[8][2] = 7;
217  faces[8][3] = 0;
218 
219  faces[9].resize(6);
220  faces[9][0] = 3;
221  faces[9][1] = 8;
222  faces[9][2] = 17;
223  faces[9][3] = 12;
224  faces[9][4] = 10;
225  faces[9][5] = 1;
226 
227  faces[10].resize(4);
228  faces[10][0] = 9;
229  faces[10][1] = 12;
230  faces[10][2] = 17;
231  faces[10][3] = 16;
232 
233  faces[11].resize(4);
234  faces[11][0] = 5;
235  faces[11][1] = 0;
236  faces[11][2] = 2;
237  faces[11][3] = 4;
238 
239  return faces;
240 }
241 
242 }
243 
244 }
std::vector< std::vector< int > > getFaces() override
Gets faces of pack shapes.
Definition: petnShape.C:153
std::vector< std::vector< double > > getVertices() override
Gets vertices of pack shapes.
Definition: petnShape.C:54
petnShape()
petnShape class standard constructor
Definition: petnShape.C:43
~petnShape()
petnShape class standard destructor
Definition: petnShape.C:48