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.
NEM::GEO::icosidodecahedronShape Class Reference

This class wraps around abstract class rocPackShape. More...

Detailed Description

This particular shape is called "icosidodecahedron"

Definition at line 44 of file icosidodecahedronShape.H.

Public Member Functions

 icosidodecahedronShape ()
 icosidodecahedronShape class standard constructor More...
 
 ~icosidodecahedronShape ()
 icosidodecahedronShape class standard destructor More...
 
std::vector< std::vector< double > > getVertices () override
 Gets vertices of pack shapes. More...
 
std::vector< std::vector< int > > getFaces () override
 Gets faces of pack shapes. More...
 

Static Public Member Functions

static std::shared_ptr< rocPackShapegetShape (const std::string &shapeName)
 Creates shape object for requsted shape. More...
 

Inherits NEM::GEO::rocPackShape.

Constructor & Destructor Documentation

◆ icosidodecahedronShape()

NEM::GEO::icosidodecahedronShape::icosidodecahedronShape ( )

Definition at line 42 of file icosidodecahedronShape.C.

43 {
44  // Nothing
45 }

◆ ~icosidodecahedronShape()

NEM::GEO::icosidodecahedronShape::~icosidodecahedronShape ( )

Definition at line 47 of file icosidodecahedronShape.C.

48 {
49  // Nothing
50 }

Member Function Documentation

◆ getFaces()

std::vector< std::vector< int > > NEM::GEO::icosidodecahedronShape::getFaces ( )
overridevirtual

Implements NEM::GEO::rocPackShape.

Definition at line 184 of file icosidodecahedronShape.C.

185 {
186  // Adding face data
187  std::vector<std::vector<int>> faces;
188  faces.resize(32);
189 
190  faces[0].resize(3);
191  faces[0][0] = 23;
192  faces[0][1] = 29;
193  faces[0][2] = 26;
194 
195  faces[1].resize(3);
196  faces[1][0] = 15;
197  faces[1][1] = 26;
198  faces[1][2] = 25;
199 
200  faces[2].resize(3);
201  faces[2][0] = 20;
202  faces[2][1] = 29;
203  faces[2][2] = 28;
204 
205  faces[3].resize(3);
206  faces[3][0] = 18;
207  faces[3][1] = 23;
208  faces[3][2] = 22;
209 
210  faces[4].resize(5);
211  faces[4][0] = 18;
212  faces[4][1] = 27;
213  faces[4][2] = 28;
214  faces[4][3] = 29;
215  faces[4][4] = 23;
216 
217  faces[5].resize(5);
218  faces[5][0] = 20;
219  faces[5][1] = 24;
220  faces[5][2] = 25;
221  faces[5][3] = 26;
222  faces[5][4] = 29;
223 
224  faces[6].resize(5);
225  faces[6][0] = 15;
226  faces[6][1] = 21;
227  faces[6][2] = 22;
228  faces[6][3] = 23;
229  faces[6][4] = 26;
230 
231  faces[7].resize(3);
232  faces[7][0] = 27;
233  faces[7][1] = 18;
234  faces[7][2] = 17;
235 
236  faces[8].resize(3);
237  faces[8][0] = 13;
238  faces[8][1] = 28;
239  faces[8][2] = 27;
240 
241  faces[9].resize(3);
242  faces[9][0] = 9;
243  faces[9][1] = 22;
244  faces[9][2] = 21;
245 
246  faces[10].resize(3);
247  faces[10][0] = 21;
248  faces[10][1] = 15;
249  faces[10][2] = 14;
250 
251  faces[11].resize(3);
252  faces[11][0] = 11;
253  faces[11][1] = 25;
254  faces[11][2] = 24;
255 
256  faces[12].resize(3);
257  faces[12][0] = 24;
258  faces[12][1] = 20;
259  faces[12][2] = 19;
260 
261  faces[13].resize(5);
262  faces[13][0] = 9;
263  faces[13][1] = 16;
264  faces[13][2] = 17;
265  faces[13][3] = 18;
266  faces[13][4] = 22;
267 
268  faces[14].resize(5);
269  faces[14][0] = 5;
270  faces[14][1] = 19;
271  faces[14][2] = 20;
272  faces[14][3] = 28;
273  faces[14][4] = 13;
274 
275  faces[15].resize(5);
276  faces[15][0] = 2;
277  faces[15][1] = 14;
278  faces[15][2] = 15;
279  faces[15][3] = 25;
280  faces[15][4] = 11;
281 
282  faces[16].resize(5);
283  faces[16][0] = 7;
284  faces[16][1] = 12;
285  faces[16][2] = 13;
286  faces[16][3] = 27;
287  faces[16][4] = 17;
288 
289  faces[17].resize(5);
290  faces[17][0] = 4;
291  faces[17][1] = 10;
292  faces[17][2] = 11;
293  faces[17][3] = 24;
294  faces[17][4] = 19;
295 
296  faces[18].resize(5);
297  faces[18][0] = 1;
298  faces[18][1] = 8;
299  faces[18][2] = 9;
300  faces[18][3] = 21;
301  faces[18][4] = 14;
302 
303  faces[19].resize(3);
304  faces[19][0] = 7;
305  faces[19][1] = 17;
306  faces[19][2] = 16;
307 
308  faces[20].resize(3);
309  faces[20][0] = 5;
310  faces[20][1] = 13;
311  faces[20][2] = 12;
312 
313  faces[21].resize(3);
314  faces[21][0] = 4;
315  faces[21][1] = 19;
316  faces[21][2] = 5;
317 
318  faces[22].resize(3);
319  faces[22][0] = 16;
320  faces[22][1] = 9;
321  faces[22][2] = 8;
322 
323  faces[23].resize(3);
324  faces[23][0] = 2;
325  faces[23][1] = 11;
326  faces[23][2] = 10;
327 
328  faces[24].resize(3);
329  faces[24][0] = 1;
330  faces[24][1] = 14;
331  faces[24][2] = 2;
332 
333  faces[25].resize(5);
334  faces[25][0] = 3;
335  faces[25][1] = 0;
336  faces[25][2] = 1;
337  faces[25][3] = 2;
338  faces[25][4] = 10;
339 
340  faces[26].resize(5);
341  faces[26][0] = 0;
342  faces[26][1] = 6;
343  faces[26][2] = 7;
344  faces[26][3] = 16;
345  faces[26][4] = 8;
346 
347  faces[27].resize(5);
348  faces[27][0] = 6;
349  faces[27][1] = 3;
350  faces[27][2] = 4;
351  faces[27][3] = 5;
352  faces[27][4] = 12;
353 
354  faces[28].resize(3);
355  faces[28][0] = 10;
356  faces[28][1] = 4;
357  faces[28][2] = 3;
358 
359  faces[29].resize(3);
360  faces[29][0] = 0;
361  faces[29][1] = 8;
362  faces[29][2] = 1;
363 
364  faces[30].resize(3);
365  faces[30][0] = 12;
366  faces[30][1] = 7;
367  faces[30][2] = 6;
368 
369  faces[31].resize(3);
370  faces[31][0] = 3;
371  faces[31][1] = 6;
372  faces[31][2] = 0;
373 
374  return faces;
375 }

◆ getShape()

std::shared_ptr< rocPackShape > NEM::GEO::rocPackShape::getShape ( const std::string &  shapeName)
staticinherited
Parameters
shapeNameName of shape requested Shape pointer

Definition at line 38 of file rocPackShape.C.

Referenced by NEM::GEO::rocPack::rocParser().

39  {
40  if (shapeName == "hmx") {
41  std::shared_ptr<hmxShape> assignShape(new hmxShape());
42  return assignShape;
43  } else if (shapeName == "petn") {
44  std::shared_ptr<petnShape> assignShape(new petnShape());
45  return assignShape;
46  } else if (shapeName == "icosidodecahedron") {
47  std::shared_ptr<icosidodecahedronShape> assignShape(
48  new icosidodecahedronShape());
49  return assignShape;
50  } else {
51  std::cerr << "The " << shapeName << " shape is not supported yet!"
52  << std::endl;
53  throw;
54  }
55 }

◆ getVertices()

std::vector< std::vector< double > > NEM::GEO::icosidodecahedronShape::getVertices ( )
overridevirtual

Implements NEM::GEO::rocPackShape.

Definition at line 52 of file icosidodecahedronShape.C.

53 {
54  // Adding vertex data
55  std::vector<std::vector<double>> verts;
56  verts.resize(30);
57 
58  for (int i=0; i<verts.size(); i++)
59  verts[i].resize(3);
60 
61  verts[0][0] = 0.35682146441852025;
62  verts[0][1] = -1.5265543675337354e-17;
63  verts[0][2] = 0.9341725978266664;
64 
65  verts[1][0] = 0.7557598656204081;
66  verts[1][1] = 0.3090165361727076;
67  verts[1][2] = 0.5773491334111481;
68 
69  verts[2][0] = 0.4670852989148342;
70  verts[2][1] = 0.8090157856843972;
71  verts[2][2] = 0.35682146441852025;
72 
73  verts[3][0] = -0.17841073220926015;
74  verts[3][1] = 0.30899953619822423;
75  verts[3][2] = 0.9341725978266664;
76 
77  verts[4][0] = -0.6454960311240943;
78  verts[4][1] = 0.49998224953720627;
79  verts[4][2] = 0.5773491334111481;
80 
81  verts[5][0] = -0.9341705978296684;
82  verts[5][1] = -1.5265543675337354e-17;
83  verts[5][2] = 0.35682146441852025;
84 
85  verts[6][0] = -0.17841073220926015;
86  verts[6][1] = -0.30899953619822423;
87  verts[6][2] = 0.9341725978266664;
88 
89  verts[7][0] = -0.1102638344963139;
90  verts[7][1] = -0.8089987857099138;
91  verts[7][2] = 0.5773491334111481;
92 
93  verts[8][0] = 0.7557598656204081;
94  verts[8][1] = -0.30899953619822423;
95  verts[8][2] = 0.5773491334111481;
96 
97  verts[9][0] = 0.8660237001167221;
98  verts[9][1] = -0.49998224953720627;
99  verts[9][2] = -2.220442716412706e-17;
100 
101  verts[10][0] = -0.1102638344963139;
102  verts[10][1] = 0.8089987857099138;
103  verts[10][2] = 0.5773491334111481;
104 
105  verts[11][0] = -1.480295144275137e-17;
106  verts[11][1] = 0.9999984990233793;
107  verts[11][2] = -2.220442716412706e-17;
108 
109  verts[12][0] = -0.6454960311240943;
110  verts[12][1] = -0.49998224953720627;
111  verts[12][2] = 0.5773491334111481;
112 
113  verts[13][0] = -0.8660237001167221;
114  verts[13][1] = -0.49999924951168967;
115  verts[13][2] = -2.220442716412706e-17;
116 
117  verts[14][0] = 0.8660237001167221;
118  verts[14][1] = 0.49999924951168967;
119  verts[14][2] = -2.220442716412706e-17;
120 
121  verts[15][0] = 0.6454960311240943;
122  verts[15][1] = 0.49998224953720627;
123  verts[15][2] = -0.5773491334111481;
124 
125  verts[16][0] = 0.4670852989148342;
126  verts[16][1] = -0.8089987857099138;
127  verts[16][2] = 0.35682146441852025;
128 
129  verts[17][0] = -1.480295144275137e-17;
130  verts[17][1] = -0.9999984990233793;
131  verts[17][2] = -2.220442716412706e-17;
132 
133  verts[18][0] = 0.11026383449631387;
134  verts[18][1] = -0.8089987857099138;
135  verts[18][2] = -0.5773491334111481;
136 
137  verts[19][0] = -0.8660237001167221;
138  verts[19][1] = 0.49998224953720627;
139  verts[19][2] = -2.220442716412706e-17;
140 
141  verts[20][0] = -0.7557598656204081;
142  verts[20][1] = 0.30899953619822423;
143  verts[20][2] = -0.5773491334111481;
144 
145  verts[21][0] = 0.9341705978296684;
146  verts[21][1] = -1.5265543675337354e-17;
147  verts[21][2] = -0.35682146441852025;
148 
149  verts[22][0] = 0.6454960311240943;
150  verts[22][1] = -0.49998224953720627;
151  verts[22][2] = -0.5773491334111481;
152 
153  verts[23][0] = 0.1784107322092601;
154  verts[23][1] = -0.30899953619822423;
155  verts[23][2] = -0.9341725978266664;
156 
157  verts[24][0] = -0.4670852989148342;
158  verts[24][1] = 0.8089987857099138;
159  verts[24][2] = -0.35682146441852025;
160 
161  verts[25][0] = 0.11026383449631387;
162  verts[25][1] = 0.8089987857099138;
163  verts[25][2] = -0.5773491334111481;
164 
165  verts[26][0] = 0.1784107322092601;
166  verts[26][1] = 0.30899953619822423;
167  verts[26][2] = -0.9341725978266664;
168 
169  verts[27][0] = -0.4670852989148342;
170  verts[27][1] = -0.8090157856843972;
171  verts[27][2] = -0.35682146441852025;
172 
173  verts[28][0] = -0.7557598656204081;
174  verts[28][1] = -0.3090165361727076;
175  verts[28][2] = -0.5773491334111481;
176 
177  verts[29][0] = -0.35682146441852025;
178  verts[29][1] = -1.5265543675337354e-17;
179  verts[29][2] = -0.9341725978266664;
180 
181  return verts;
182 }

The documentation for this class was generated from the following files: