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.
rocPack.H
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 #ifndef NEMOSYS_ROCPACK_H_
30 #define NEMOSYS_ROCPACK_H_
31 
32 #include <string>
33 
34 #include "nemosys_export.h"
35 #include "Mesh/meshBase.H"
36 
37 namespace NEM {
38 
39 namespace GEO {
40 
41 /**
42  @brief A struct to respresent quaternion.
43  @param Components of a quaternion (q = w + xi + yj + zk)
44 **/
45 struct rocQuaternion {
46  double w, x, y, z;
47 };
48 
49 /** @brief This class converts Rockpack output file into periodic geometry and
50  writes into STL, VTK, .MSH, and ExodusII file format. User can define
51 other supported extensions for output file. This class can also be used for
52 generating 3D periodic tetrahedral mesh using periodic geometry. Currently the
53 shapes supported are as follows.
54 
55  - Shapes
56  -# Sphere
57  -# Ellipsoid
58  -# Cylinder
59  -# HMX (Octogen crystal)
60  -# PETN (Pentaerythritol tetranitrate crystal)
61  -# ICOSIDODECAHEDRON
62 
63  Methods for creating spheres, cylinders and ellisoids are contained
64  in this class. For other shapes, methods wrapped around abstract
65  class "rocPackShape" are used.
66 **/
67 
68 // TODOs
69 // 1. Boolean(OCC) is not working with ellipsoid volumes created by GEO
70 // methods. Find a way to make them periodic using some other boolean
71 // methods.
72 // 2. Cohesive elements needs to be extended to finite thickness. This should be
73 // fairly very easy once we have zero thickness method working flawlessly.
74 // Also, this method only works with just 2 physical groups enabled.
75 // 3.
76 
77 class NEMOSYS_EXPORT rocPack {
78  // Constructors, Deconstructor, Access
79  public:
80  /** @brief rocPack default constructor. Options for periodic geometry
81  and removing boundary packs are off by default. To enable these
82  options, user can specify following keywords anywhere in RocPack
83  output file. (Default for both keyword is false.)
84  - "SetPeriodicity = true"
85  - "RemoveBoundaryPacks = true"
86 
87  These can also be switched on using newly added public methods.
88  - removeBoundaryVolumes()
89  - setPeriodicGeometry()
90  - setPeriodicMesh()
91 
92  @param fname Rocpack output file name
93  @param outName Output STL, VTK, .MSH, .exo file names
94  **/
95  rocPack(const std::string &fname, const std::string &outName);
96 
97  /** @brief rocPack standard destructor
98  **/
99  ~rocPack() { std::cout << "rockPack class destroyed" << std::endl; }
100 
101  /** @brief rocPack2Surf method converts Rocpack output file into STL/VTK
102  surface mesh and writes into current folder.
103  **/
104  void rocPack2Surf();
105 
106  /** @brief This method creates cohesive elements using existing vtu file.
107  @param filename Input vtu file name
108  @param output file name
109  **/
110  void createCohesiveElements(const std::string &filename,
111  const std::string &outname);
112 
113  /** @brief rocPack2Periodic3D method converts Rocpack output file into
114  3D periodic mesh. Writes the output file in current path.
115  **/
116  void rocPack2Periodic3D();
117 
118  /** @brief Enables an option to remove volumes intersecting boundary.
119  **/
120  void removeBoundaryVolumes();
121 
122  /** @brief Enables an option to enforce periodicity on generated geometry.
123  **/
124  void setPeriodicGeometry();
125 
126  /** @brief Enables an option to enforce periodicity on generated mesh.
127  **/
128  void setPeriodicMesh();
129 
130  /** @brief Shrinks the volumes by defined percentage
131  @param percntg Percentage between 0 and 1 by which the pack should be
132  shrinked
133  **/
134  void shrinkVolumes(const double percntg);
135 
136  /** @brief Performs surface smoothing over every volume in pack geometry
137  @param smoothingParam Smoothing Iterations.
138  **/
139  void smoothSurfaces(const int smoothingParam);
140 
141  /** @brief Set mesh size for periodic mesh
142  @param size Mesh Size
143  **/
144  void setMeshSize(const double size);
145 
146  /** @brief Enables physical grouping in final mesh
147  **/
148  void enablePhysicalGrps();
149 
150  /** @brief Enables two physical groups in final mesh
151  **/
152  void enableTwoPhysGrps();
153 
154  /** @brief Enables .stl, .vtu. .msh format output in addition to udf output
155  **/
156  void enableDefOuts();
157 
158  /** @brief Enables 6 surface patches for all sides of box
159  **/
160  void enableSurfacePatches();
161 
162  /** @brief Enables physical group per shape
163  **/
164  void enablePhysicalGroupsPerShape();
165 
166  /** @brief Translates the whole geometry along user-defined parameters.
167  @param X Coordinate
168  @param Y Coordinate
169  @param Z Coordinate
170  **/
171  void translateAll(const double &X, const double &Y, const double &Z);
172 
173  /** @brief Sets custom domain size defined by users
174  **/
175  void setCustomDomain(const std::vector<double> &domainBounds);
176 
177  /** @brief Sets meshing algorithm of user's choice
178  **/
179  void setMeshingAlgorithm(const int &mshAlg);
180 
181  /** @brief Sanity check for cohesive element method when there are no
182  volumes in domain
183  **/
184  void sanityCheckOn();
185 
186  /** @brief For internal testing purpose.
187  **/
188  void setNodeLocations(const int &x, const int &y, const int &z);
189 
190  /** @brief For internal testing purpose.
191  **/
192  void setRandomSurface(const int &surf);
193 
194  /** @brief Enables cohesive elements
195  **/
196  void enableCohesiveElements();
197 
198  /** @brief This method is for internal testing purpose only. Compares spatial
199  location of several periodic nodes in periodic mesh.
200  @return Boolean for test
201  **/
202  bool getTestResult();
203 
204  /** @brief Assigns refinement levels to mesh
205  @param refineLvl Refinement level defined by user
206  **/
207  void assignRefinement(const int &refineLvl);
208 
209  /** @brief Assigns limiting filters for geometry sizes
210  @param upperThreshold Upper limit for filtering
211  @param lowerThreshold Lower limit for filtering
212  **/
213  void applyFilter(const double &upperThreshold, const double &lowerThreshold);
214 
215  /** @brief Sets program for size preservation instead of volume fraction
216  **/
217  void setSizePreservation();
218 
219  /** @brief Sets element order
220  **/
221  void setElementOrder(const int &order);
222 
223  // rocPack2STL internal use only
224  private:
225  /** @brief This method parses Rocpack output file and collects data for
226  creation of pack geometries.
227  **/
228  void rocParser();
229 
230  /** @brief This method obtains parsed data from Rocpack output and creates
231  periodic pack geometries.
232  **/
233  void rocToGeom();
234 
235  /** @brief This method creates surface mesh for final geometry and writes
236  into surface files (.stl, .vtk, .msh)
237  **/
238  void geomToSurf();
239 
240  /** @brief Performs operations on generated geometry
241  **/
242  void geomToVolFrac();
243 
244  // rocParser Internal methods
245  private:
246  /** @brief Finds particular word in file stream
247  @param word Word that user wants to find
248  @return line containing that word in file
249  **/
250  std::string findWord(const std::string &word);
251 
252  /** @brief Reads the current line and returns the translate, rotate, and
253  scale data for the pack shape
254  @param iter Line number to read in file
255  @param a string of delimiters for parsing
256  @param L Line to read
257  @return Vector of tokens for input line L
258  **/
259  std::vector<std::string> getShapeData(const int &iter, const std::string &a,
260  const std::vector<std::string> &L);
261 
262  // rocToGeom and geomToSurface Internal methods
263  private:
264  /** @brief Initializes GMSH for workflow
265  **/
266  void initialize();
267 
268  /** @brief Enforced periodicity on geometry
269  @param rmbPacks boolean for removing boundary packs
270  **/
271  void makePeriodic(const bool rmbPacks);
272 
273  /** @brief Normalizes shape vertices
274  **/
275  void normalizeVerts();
276 
277  /** @brief Scales all volumes by shrinking percentage
278  **/
279  void scaleVols(const int &vol, const int &index);
280 
281  /** @brief Performs laplacian smoothing on all packs if requested
282  **/
283  void performSmoothing();
284 
285  /** @brief This method writes periodic pack geometries into STL format
286  @param writeFile Output File Name
287  **/
288  void geomToSTL(const std::string &writeFile);
289 
290  /** @brief This method writes periodic pack geometries into VTK format
291  @param writeFile Output File Name
292  **/
293  void geomToVTK(const std::string &writeFile);
294 
295  /** @brief This method writes periodic pack geometries into .MSH format
296  @param writeFile Output File Name
297  **/
298  void geomToMsh(const std::string &writeFile);
299 
300  /** @brief Removes 2D elements from INP mesh file
301  @param modifyFile File name to modify
302  **/
303  void modifyInpMesh(const std::string &modifyFile);
304 
305  /** @brief Generates a Quaternion using Euler 3D rotation
306  parameters
307  @param r Rotation parameters in form (x,y,z,angle)
308  @return Quaternion in form \f$ q = w + x i + y j + z k \f$.
309  **/
310  rocQuaternion toQuaternion(const std::vector<double> &r);
311 
312  /** @brief Rotates a 3D Vector by unit Quaternion. First, converts
313  input vector into quaternion form by making "w" component
314  zero (i.e \f$ v = 0 + x i + y j + z k \f$). Then performs
315  transformation using \f$ v_{'} = q.v.q\textsuperscript{-1} \f$.
316  if we write quaternion in this form \f$ q = w + p(x,y,z) \f$,
317  then \f$ v_{'} = 2\(p.v\)p + \(w_2 - p.p\)v + 2w\(p\times v\) \f$.
318  This method is computationally efficient compared to performing
319  direct quaternion products (i.e
320  \f$ v_{'} = q.v.q\textsuperscript{-1} \f$)
321  @param q A Quaternion in form \f$ q = w + x i + y j + z k \f$.
322  @param v Vector that needs to be rotated
323  @return Rotated vector
324  **/
325  std::vector<double> rotateByQuaternion(const rocQuaternion &q,
326  const std::vector<double> &v);
327 
328  /** @brief This method removes the pack shapes intersecting boundary
329  @param n Index for pack number
330  **/
331  void tagBoundaryPacks();
332 
333  // Internal methods for 3D periodic mesh module
334  private:
335  /** @brief This method maps surfaces in X,Y, and Z direction which are
336  periodic and then enforces that into gmsh model
337  @param prevTags Currently existing model entities
338  **/
339  void mapPeriodicSurfaces(const std::vector<std::pair<int, int>> &prevTags);
340 
341  /** @brief This method writes 3D periodic mesh into .msh and vtu format
342  **/
343  void geomToPeriodic3D();
344 
345  /** @brief This method gets points that belongs to surfaces
346  @param surfaces A vector pair of surface tags
347  @return Vector of vertices.
348  **/
349  std::vector<std::vector<std::pair<int, int>>> getAllPoints(
350  std::vector<std::pair<int, int>> surfaces);
351 
352  /** @brief This method find which surfaces are periodic on opposite sides
353  @param vertsOneSide Vertices on one side
354  @param vertsOtherSide Vertices on other side
355  @param indexTranslate Index for which direction to translate
356  @param amountTranslate Distance for translation
357  @return Vector pair of periodic surfaces
358  **/
359  std::vector<std::pair<int, int>> getPeriodicSurfs(
360  const std::vector<std::vector<std::pair<int, int>>> &vertsOneSide,
361  const std::vector<std::vector<std::pair<int, int>>> &vertsOtherSide,
362  const int &indexTranslate, const double &amountTranslate);
363 
364  /** @brief This method allows mapping of nodes on periodic boundaries. Writes
365  periodic nodes surface wise in CSV file.
366  **/
367  void writePeriodicNodes();
368 
369  /** @brief This method check if cohesive element face lies on any of the
370  periodic boundaries
371  @param getPt1 Point 1 of triangular face
372  @param getPt2 Point 2 of triangular face
373  @param getPt3 Point 3 of triangular face
374  @return true or false
375  **/
376  bool existsOnPeriodicBoundary(const std::vector<double> &getPt1,
377  const std::vector<double> &getPt2,
378  const std::vector<double> &getPt);
379 
380  // Basic shape methods
381  private:
382  /** @brief Creates sphere pack shapes
383  @param n Index for pack number
384 **/
385  void makeSphere(const int &n);
386 
387  /** @brief Creates Ellipsoid pack shapes
388  @param n Index for pack number
389  **/
390  void makeEllipsoid(const int &n);
391 
392  /** @brief Creates cylinder pack shapes
393  @param n Index for pack number
394  **/
395  void makeCylinder(const int &n);
396 
397  /** @brief Creates a crystal shape based on Rocpack output file
398  @param n Index for pack number
399  @param index Index for pack data access
400  **/
401  void makeCrystalShape(const int &n, const int &index);
402 
403  /** @brief creates VTK cell
404  **/
405  void createVtkCell(vtkSmartPointer<vtkUnstructuredGrid> dataSet,
406  const int cellType, std::vector<int> &vrtIds);
407 
408  /** @brief Assigns nodes n0, nx, ny, nz for periodic equation file
409  **/
410  void assignPeriodicEqNodes();
411 
412  // Pointers and/or parameters
413  private:
414  /** @brief rocPack output file name
415  **/
416  std::string InFile;
417 
418  /** @brief Output STL/VTK file name
419  **/
420  std::string OutFile;
421 
422  /** @brief Vector for storing base shape names
423  **/
424  std::vector<std::string> shapeNames;
425 
426  /** @brief Vector for storing shapes
427  **/
428  std::vector<std::string> uniqueNames;
429 
430  /** @brief Vector for storing crystal names
431  **/
432  std::vector<std::string> crystalNames;
433 
434  // Box Parameters
435  /** @brief X dimension of box geometry
436  **/
437  double Xdim;
438 
439  /** @brief Y dimension of box geometry
440  **/
441  double Ydim;
442 
443  /** @brief Z dimension of box geometry
444  **/
445  double Zdim;
446 
447  /** @brief Vector of box starting coordinates
448  **/
449  std::vector<double> boxPt;
450 
451  // Pack shapes parameters
452  /** @brief Vector of Ellipsoid radii
453  **/
454  std::vector<double> ellipsoidRad;
455 
456  /** @brief Vector of cylinder parameters
457  **/
458  std::vector<double> cylParams;
459 
460  /** @brief Vector of crystal shape vertices
461  **/
462  std::vector<std::vector<std::vector<double>>> verts;
463 
464  /** @brief Vector of crystal shape faces
465  **/
466  std::vector<std::vector<std::vector<int>>> faces;
467 
468  /** @brief Vector of translate coordinates for all packs
469  **/
470  std::vector<std::vector<double>> translateParams;
471 
472  /** @brief Vector of rotate coordinates for all packs
473  **/
474  std::vector<std::vector<double>> rotateParams;
475 
476  /** @brief Vector of scales for all packs
477  **/
478  std::vector<double> scaleOfPack;
479 
480  /** @brief Vector of pack shape names
481  **/
482  std::vector<std::string> nameOfPcks;
483 
484  /** @brief Name of pack shape
485  **/
486  std::string packName;
487 
488  /** @brief Ellipsoid packs cannot be made periodic as of now.
489  This boolean will be true when ellipsoid packs are present.
490  **/
491  bool ellipsoidPresent = false;
492 
493  /** @brief Boolean to opt for non-periodic geometry (as generated by rocPack)
494  **/
495  bool enablePeriodicity = false;
496 
497  /** @brief Boolean to opt for removing packs on boundaries. (Resultant
498  geometry will automatically be periodic)
499  **/
500  bool removeBoundaryPacks = false;
501 
502  /** @brief Stores volume index of packs interseting boundary.
503  **/
504  std::vector<std::pair<int, int>> bndryPackTags;
505 
506  /** @brief Boolean for 3D periodic mesh generation
507  **/
508  bool periodic3D = false;
509 
510  /** @brief Surfaces linked to master periodic surface in X direction
511  **/
512  std::vector<int> slaveX;
513 
514  /** @brief Surfaces linked to master periodic surface in Y direction
515  **/
516  std::vector<int> slaveY;
517 
518  /** @brief Surfaces linked to master periodic surface in Z direction
519  **/
520  std::vector<int> slaveZ;
521 
522  /** @brief Master periodic surfaces in X direction
523  **/
524  std::vector<int> MasterX;
525 
526  /** @brief Master periodic surfaces in Y direction
527  **/
528  std::vector<int> MasterY;
529 
530  /** @brief Master periodic surfaces in Z direction
531  **/
532  std::vector<int> MasterZ;
533 
534  /** @brief For testing
535  **/
536  int randomNodeX = 0;
537 
538  /** @brief For testing
539  **/
540  int randomNodeY = 0;
541 
542  /** @brief For testing
543  **/
544  int randomNodeZ = 0;
545 
546  /** @brief Nodes for testing
547  **/
548  bool matchingCoords = false;
549 
550  /** @brief X Nodes for testing
551  **/
552  bool matchingCoordsX = false;
553 
554  /** @brief Y Nodes for testing
555  **/
556  bool matchingCoordsY = false;
557 
558  /** @brief Z Nodes for testing
559  **/
560  bool matchingCoordsZ = false;
561 
562  /** @brief Shrink Scale
563  **/
564  double shrinkScale = 1.0;
565 
566  /** @brief some smoothing parameter
567  **/
568  int smoothingIter = 0;
569 
570  /** @brief Enables smoothing
571  **/
572  bool enableSmoothing = false;
573 
574  /** @brief Enables Shrinking
575  **/
576  bool enableScaling = false;
577 
578  /** @brief Mesh Size
579  **/
580  double meshSz = -1;
581 
582  /** @brief Enable Physical Grouping in Final Mesh
583  **/
584  bool enablePhysGrp = false;
585 
586  /** @brief Enable Two Physical Groups in Final Mesh
587  **/
588  bool just2Physgrps = false;
589 
590  /** @brief Stores node tags for surronding physical group
591  **/
592  std::vector<std::size_t> surrNodeTags;
593 
594  /** @brief Stores node coordinates for surronding physical group
595  **/
596  std::vector<double> surrCoords;
597 
598  /** @brief Stores node tags for geometries physical group
599  **/
600  std::vector<std::size_t> geomsNodeTags;
601 
602  /** @brief Stores node coordinates for geometries physical group
603  **/
604  std::vector<double> geomsCoords;
605 
606  /** @brief Tag number
607  **/
609 
610  /** @brief Tag number
611  **/
612  int packGrp;
613 
614  /** @brief Vector for stroing nodes at conformal interface
615  **/
616  std::vector<std::size_t> interfaceNodes;
617 
618  /** @brief A boolean for user to enable assignement of surface patches
619  **/
620  bool assignSidePatches = false;
621 
622  /** @brief X coordinate for user-defined translate.
623  **/
624  double xUDF = 0;
625 
626  /** @brief Y coordinate for user-defined translate
627  **/
628  double yUDF = 0;
629 
630  /** @brief Z coordinate for user-defined translate
631  **/
632  double zUDF = 0;
633 
634  /** @brief Custom Domain Boolean
635  **/
636  bool cstmDomain = false;
637 
638  /** @brief Random location for a surface
639  **/
640  int randomSurfTest = 0;
641 
642  /** @brief Meshing Algorithm
643  **/
644  int meshingAlgorithm = 1;
645 
646  /** @brief Output control
647  **/
648  bool defOutputs = false;
649 
650  /** @brief Boolean for physical group per shape
651  **/
652  bool physGrpPerShape = false;
653 
654  /** @brief Map for storing shape names against volume
655  Sphere = 0
656  Ellipsoid = 1
657  Cylinder = 2
658  HMX = 3
659  PETN = 4
660  Icosidodecahedron = 5
661  Surrounding = 6
662  **/
663  // std::vector<std::pair<int,int>> storeShapeNames;
664  std::map<int, int> storeShapeNames;
665 
666  /** @brief Arrays for group per shape
667  **/
668  std::vector<int> spherePhysicalGroup;
669 
670  /** @brief Arrays for group per shape
671  **/
672  std::vector<int> cylindersPhysicalGroup;
673 
674  /** @brief Arrays for group per shape
675  **/
676  std::vector<int> ellipsoidPhysicalGroup;
677 
678  /** @brief Arrays for group per shape
679  **/
680  std::vector<int> hmxPhysicalGroup;
681 
682  /** @brief Arrays for group per shape
683  **/
684  std::vector<int> petnPhysicalGroup;
685 
686  /** @brief Arrays for group per shape
687  **/
689 
690  /** @brief Vector of all volumes for multi-physical groups
691  **/
692  std::vector<int> linkMultiPhysGrps;
693 
694  /** @brief Stores all physical groups in index sized by total volumes
695  **/
696  std::vector<std::vector<int>> storeMultiPhysGrps;
697 
698  /** @brief Group indices for multi groups (useful in cohesive elements)
699  **/
700  std::vector<int> multiGrpIndices;
701 
702  /** @brief Store cells in surrounding for cohesive elements without
703  physical groups
704  **/
705  std::vector<int> geomElementIds;
706 
707  /** @brief Stores node ids n0,nx,ny,nz
708  **/
709  std::vector<int> eqRefNodes = std::vector<int>(4);
710 
711  /** @brief Boolean to enable cohesive elements
712  **/
713  bool internalCohesiveBool = false;
714 
715  /** @brief Storage vector for linking interface and duplicate nodes
716  Replaces new duplicated nodes at place of old interface points
717  **/
718  std::vector<int> ptsReplacer;
719 
720  /** @brief Storage vector for identifying which slave nodes are interface
721  nodes
722  **/
723  std::vector<int> slaveInterfaceId;
724 
725  /** @brief psudo-physical group vector for cohesive elements material
726  assignment
727  **/
728  std::vector<int> ptsCohesiveGrp;
729 
730  /** @brief Sanity Check
731  **/
732  bool sntChk = false;
733 
734  /** @brief Total numer of points in mesh
735  **/
736  int nptsMsh = 0;
737 
738  /** @brief Global scale for all pack geometries
739  **/
740  double globalScaling = 1;
741 
742  /** @brief mesh refinement iterations
743  **/
744  int refineIter = 0;
745 
746  /** @brief Upper limit for filtering
747  **/
748  double filterAbove = 0.0;
749 
750  /** @brief Lower limit for filtering
751  **/
752  double filterBelow = 0.0;
753 
754  /** @brief Boolean for filter
755  **/
756  bool filterOn = false;
757 
758  /** @brief Vector for identification of removed geometries
759  **/
760  std::vector<int> filteredGeoms;
761 
762  /** @brief Boolean for size preservation
763  **/
764  bool enableSizePreserve = false;
765 
766  /** @brief Sets mesh element order
767  **/
768  int elementOrder = 1;
769 };
770 
771 } // namespace GEO
772 
773 } // namespace NEM
774 
775 #endif // NEMOSYS_ROCPACK_H_
int packGrp
Tag number.
Definition: rocPack.H:612
std::vector< std::vector< double > > rotateParams
Vector of rotate coordinates for all packs.
Definition: rocPack.H:474
std::vector< int > MasterZ
Master periodic surfaces in Z direction.
Definition: rocPack.H:532
double Zdim
Z dimension of box geometry.
Definition: rocPack.H:445
std::vector< std::vector< std::vector< double > > > verts
Vector of crystal shape vertices.
Definition: rocPack.H:462
double Xdim
X dimension of box geometry.
Definition: rocPack.H:437
std::vector< std::size_t > surrNodeTags
Stores node tags for surronding physical group.
Definition: rocPack.H:592
This class converts Rockpack output file into periodic geometry and writes into STL, VTK, .MSH, and ExodusII file format.
Definition: rocPack.H:77
std::string InFile
rocPack output file name
Definition: rocPack.H:416
std::string packName
Name of pack shape.
Definition: rocPack.H:486
std::vector< int > slaveInterfaceId
Storage vector for identifying which slave nodes are interface nodes.
Definition: rocPack.H:723
A struct to respresent quaternion.
Definition: rocPack.H:45
std::string OutFile
Output STL/VTK file name.
Definition: rocPack.H:420
std::vector< int > slaveY
Surfaces linked to master periodic surface in Y direction.
Definition: rocPack.H:516
std::vector< int > ellipsoidPhysicalGroup
Arrays for group per shape.
Definition: rocPack.H:676
std::vector< int > slaveX
Surfaces linked to master periodic surface in X direction.
Definition: rocPack.H:512
std::vector< double > ellipsoidRad
Vector of Ellipsoid radii.
Definition: rocPack.H:454
std::vector< std::vector< double > > translateParams
Vector of translate coordinates for all packs.
Definition: rocPack.H:470
std::vector< double > scaleOfPack
Vector of scales for all packs.
Definition: rocPack.H:478
std::vector< int > spherePhysicalGroup
Arrays for group per shape.
Definition: rocPack.H:668
std::vector< std::vector< std::vector< int > > > faces
Vector of crystal shape faces.
Definition: rocPack.H:466
std::vector< std::size_t > geomsNodeTags
Stores node tags for geometries physical group.
Definition: rocPack.H:600
std::vector< double > cylParams
Vector of cylinder parameters.
Definition: rocPack.H:458
std::vector< int > icosidodecahedronPhysicalGroup
Arrays for group per shape.
Definition: rocPack.H:688
std::vector< int > petnPhysicalGroup
Arrays for group per shape.
Definition: rocPack.H:684
std::vector< std::string > crystalNames
Vector for storing crystal names.
Definition: rocPack.H:432
std::vector< double > boxPt
Vector of box starting coordinates.
Definition: rocPack.H:449
std::vector< int > MasterY
Master periodic surfaces in Y direction.
Definition: rocPack.H:528
VTKCellType cellType
Definition: inpGeoMesh.C:129
~rocPack()
rocPack standard destructor
Definition: rocPack.H:99
std::vector< std::size_t > interfaceNodes
Vector for stroing nodes at conformal interface.
Definition: rocPack.H:616
std::vector< int > slaveZ
Surfaces linked to master periodic surface in Z direction.
Definition: rocPack.H:520
std::vector< double > surrCoords
Stores node coordinates for surronding physical group.
Definition: rocPack.H:596
std::vector< int > geomElementIds
Store cells in surrounding for cohesive elements without physical groups.
Definition: rocPack.H:705
std::map< std::string, std::vector< std::pair< vtkIdType, int > > > surfaces
Map from SURFACE name to (element id, side) (id and side both use .inp IDs)
Definition: inpGeoMesh.C:157
std::map< int, int > storeShapeNames
Map for storing shape names against volume Sphere = 0 Ellipsoid = 1 Cylinder = 2 HMX = 3 PETN = 4 Ico...
Definition: rocPack.H:664
std::vector< int > multiGrpIndices
Group indices for multi groups (useful in cohesive elements)
Definition: rocPack.H:700
std::vector< int > hmxPhysicalGroup
Arrays for group per shape.
Definition: rocPack.H:680
std::vector< int > ptsReplacer
Storage vector for linking interface and duplicate nodes Replaces new duplicated nodes at place of ol...
Definition: rocPack.H:718
std::vector< std::string > uniqueNames
Vector for storing shapes.
Definition: rocPack.H:428
int surroundingGrp
Tag number.
Definition: rocPack.H:608
double Ydim
Y dimension of box geometry.
Definition: rocPack.H:441
std::vector< std::string > nameOfPcks
Vector of pack shape names.
Definition: rocPack.H:482
std::vector< std::vector< int > > storeMultiPhysGrps
Stores all physical groups in index sized by total volumes.
Definition: rocPack.H:696
std::vector< std::pair< int, int > > bndryPackTags
Stores volume index of packs interseting boundary.
Definition: rocPack.H:504
std::vector< int > filteredGeoms
Vector for identification of removed geometries.
Definition: rocPack.H:760
std::vector< std::string > shapeNames
Vector for storing base shape names.
Definition: rocPack.H:424
std::vector< int > MasterX
Master periodic surfaces in X direction.
Definition: rocPack.H:524
std::vector< int > cylindersPhysicalGroup
Arrays for group per shape.
Definition: rocPack.H:672
std::vector< int > linkMultiPhysGrps
Vector of all volumes for multi-physical groups.
Definition: rocPack.H:692
std::vector< int > ptsCohesiveGrp
psudo-physical group vector for cohesive elements material assignment
Definition: rocPack.H:728
std::vector< double > geomsCoords
Stores node coordinates for geometries physical group.
Definition: rocPack.H:604