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.
hmxShape.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/hmxShape.H"
36 
37 
38 namespace NEM {
39 
40 namespace GEO {
41 
42 
44 {
45  // Noething
46 }
47 
49 {
50  // Noething
51 }
52 
53 std::vector<std::vector<double>> hmxShape::getVertices()
54 {
55  // Adding vertex data
56  std::vector<std::vector<double>> verts;
57  verts.resize(18);
58 
59  verts[0].resize(3);
60  verts[0][0] = -1.3973946670992046;
61  verts[0][1] = 0.8294297402753090;
62  verts[0][2] = 0.7394707591127669;
63 
64  verts[1].resize(3);
65  verts[1][0] = -0.6657703416741856;
66  verts[1][1] = -1.3009854568631263;
67  verts[1][2] = 0.4264290990409822;
68 
69  verts[2].resize(3);
70  verts[2][0] = 1.3973947035090559;
71  verts[2][1] = -0.8294297602140067;
72  verts[2][2] = -0.7394707784531516;
73 
74  verts[3].resize(3);
75  verts[3][0] = 0.6657703744131530;
76  verts[3][1] = 1.3009854476136657;
77  verts[3][2] = -0.4264291168106977;
78 
79  verts[4].resize(3);
80  verts[4][0] = 0.3835703684025527;
81  verts[4][1] = -1.5974467033338673;
82  verts[4][2] = -0.1431211054793107;
83 
84  verts[5].resize(3);
85  verts[5][0] = -0.3835703227123897;
86  verts[5][1] = 1.5974466904254172;
87  verts[5][2] = 0.1431210806800808;
88 
89  verts[6].resize(3);
90  verts[6][0] = -0.6302224609427972;
91  verts[6][1] = -0.9781790576670774;
92  verts[6][2] = -1.1521344230410329;
93 
94  verts[7].resize(3);
95  verts[7][0] = -1.1453321714573643;
96  verts[7][1] = 0.5217677283235427;
97  verts[7][2] = -0.9317333328983531;
98 
99  verts[8].resize(3);
100  verts[8][0] = -0.5198978031779152;
101  verts[8][1] = -1.4790343116441396;
102  verts[8][2] = -0.5407230456136918;
103 
104  verts[9].resize(3);
105  verts[9][0] = -0.1637657754207528;
106  verts[9][1] = -0.6248174097886718;
107  verts[9][2] = -1.4265126187846873;
108 
109  verts[10].resize(3);
110  verts[10][0] = -0.6788754859353187;
111  verts[10][1] = 0.8751293762019474;
112  verts[10][2] = -1.2061115286420081;
113 
114  verts[11].resize(3);
115  verts[11][0] = -0.2376977860165109;
116  verts[11][1] = 1.4193978378419216;
117  verts[11][2] = -0.8240310520377883;
118 
119  verts[12].resize(3);
120  verts[12][0] = 0.6788754551281021;
121  verts[12][1] = -0.8751294321178871;
122  verts[12][2] = 1.2061114962377961;
123 
124  verts[13].resize(3);
125  verts[13][0] = 0.1637657886385562;
126  verts[13][1] = 0.6248173573382960;
127  verts[13][2] = 1.4265126656883920;
128 
129  verts[14].resize(3);
130  verts[14][0] = 0.2376977724807246;
131  verts[14][1] = -1.4193978708317796;
132  verts[14][2] = 0.8240309982418957;
133 
134  verts[15].resize(3);
135  verts[15][0] = 1.1453321406501467;
136  verts[15][1] = -0.5217677842394817;
137  verts[15][2] = 0.9317333004941414;
138 
139  verts[16].resize(3);
140  verts[16][0] = 0.6302224741606013;
141  verts[16][1] = 0.9781790052167011;
142  verts[16][2] = 1.1521344699447380;
143 
144  verts[17].resize(3);
145  verts[17][0] = 0.5198978428216525;
146  verts[17][1] = 1.4790342828404699;
147  verts[17][2] = 0.5407230876168944;
148 
149  return verts;
150 
151 }
152 
153 std::vector<std::vector<int>> hmxShape::getFaces()
154 {
155  // Adding face data
156  std::vector<std::vector<int>> faces;
157  faces.resize(12);
158 
159  faces[0].resize(5);
160  faces[0][0] = 0;
161  faces[0][1] = 7;
162  faces[0][2] = 6;
163  faces[0][3] = 8;
164  faces[0][4] = 1;
165 
166  faces[1].resize(5);
167  faces[1][0] = 2;
168  faces[1][1] = 9;
169  faces[1][2] = 10;
170  faces[1][3] = 11;
171  faces[1][4] = 3;
172 
173  faces[2].resize(5);
174  faces[2][0] = 0;
175  faces[2][1] = 1;
176  faces[2][2] = 14;
177  faces[2][3] = 12;
178  faces[2][4] = 13;
179 
180  faces[3].resize(5);
181  faces[3][0] = 2;
182  faces[3][1] = 3;
183  faces[3][2] = 17;
184  faces[3][3] = 16;
185  faces[3][4] = 15;
186 
187  faces[4].resize(4);
188  faces[4][0] = 6;
189  faces[4][1] = 7;
190  faces[4][2] = 10;
191  faces[4][3] = 9;
192 
193  faces[5].resize(4);
194  faces[5][0] = 12;
195  faces[5][1] = 15;
196  faces[5][2] = 16;
197  faces[5][3] = 13;
198 
199  faces[6].resize(5);
200  faces[6][0] = 2;
201  faces[6][1] = 4;
202  faces[6][2] = 8;
203  faces[6][3] = 6;
204  faces[6][4] = 9;
205 
206  faces[7].resize(5);
207  faces[7][0] = 0;
208  faces[7][1] = 5;
209  faces[7][2] = 11;
210  faces[7][3] = 10;
211  faces[7][4] = 7;
212 
213  faces[8].resize(5);
214  faces[8][0] = 2;
215  faces[8][1] = 15;
216  faces[8][2] = 12;
217  faces[8][3] = 14;
218  faces[8][4] = 4;
219 
220  faces[9].resize(5);
221  faces[9][0] = 0;
222  faces[9][1] = 13;
223  faces[9][2] = 16;
224  faces[9][3] = 17;
225  faces[9][4] = 5;
226 
227  faces[10].resize(4);
228  faces[10][0] = 1;
229  faces[10][1] = 8;
230  faces[10][2] = 4;
231  faces[10][3] = 14;
232 
233  faces[11].resize(4);
234  faces[11][0] = 3;
235  faces[11][1] = 11;
236  faces[11][2] = 5;
237  faces[11][3] = 17;
238 
239  return faces;
240 }
241 
242 
243 }
244 
245 }
std::vector< std::vector< int > > getFaces() override
Gets faces of pack shapes.
Definition: hmxShape.C:153
~hmxShape()
hmxShape class standard destructor
Definition: hmxShape.C:48
std::vector< std::vector< double > > getVertices() override
Gets vertices of pack shapes.
Definition: hmxShape.C:53
hmxShape()
hmxShape class standard constructor
Definition: hmxShape.C:43