This class converts Rockpack output file into periodic geometry and writes into STL, VTK, .MSH, and ExodusII file format. More...
User can define other supported extensions for output file. This class can also be used for generating 3D periodic tetrahedral mesh using periodic geometry. Currently the shapes supported are as follows.
- Shapes -# Sphere -# Ellipsoid -# Cylinder -# HMX (Octogen crystal) -# PETN (Pentaerythritol tetranitrate crystal) -# ICOSIDODECAHEDRON Methods for creating spheres, cylinders and ellisoids are contained in this class. For other shapes, methods wrapped around abstract class "rocPackShape" are used.
Public Member Functions | |
rocPack (const std::string &fname, const std::string &outName) | |
rocPack default constructor. More... | |
~rocPack () | |
rocPack standard destructor More... | |
void | rocPack2Surf () |
rocPack2Surf method converts Rocpack output file into STL/VTK surface mesh and writes into current folder. More... | |
void | createCohesiveElements (const std::string &filename, const std::string &outname) |
This method creates cohesive elements using existing vtu file. More... | |
void | rocPack2Periodic3D () |
rocPack2Periodic3D method converts Rocpack output file into 3D periodic mesh. More... | |
void | removeBoundaryVolumes () |
Enables an option to remove volumes intersecting boundary. More... | |
void | setPeriodicGeometry () |
Enables an option to enforce periodicity on generated geometry. More... | |
void | setPeriodicMesh () |
Enables an option to enforce periodicity on generated mesh. More... | |
void | shrinkVolumes (const double percntg) |
Shrinks the volumes by defined percentage. More... | |
void | smoothSurfaces (const int smoothingParam) |
Performs surface smoothing over every volume in pack geometry. More... | |
void | setMeshSize (const double size) |
Set mesh size for periodic mesh. More... | |
void | enablePhysicalGrps () |
Enables physical grouping in final mesh. More... | |
void | enableTwoPhysGrps () |
Enables two physical groups in final mesh. More... | |
void | enableDefOuts () |
Enables .stl, .vtu. More... | |
void | enableSurfacePatches () |
Enables 6 surface patches for all sides of box. More... | |
void | enablePhysicalGroupsPerShape () |
Enables physical group per shape. More... | |
void | translateAll (const double &X, const double &Y, const double &Z) |
Translates the whole geometry along user-defined parameters. More... | |
void | setCustomDomain (const std::vector< double > &domainBounds) |
Sets custom domain size defined by users. More... | |
void | setMeshingAlgorithm (const int &mshAlg) |
Sets meshing algorithm of user's choice. More... | |
void | sanityCheckOn () |
Sanity check for cohesive element method when there are no volumes in domain. More... | |
void | setNodeLocations (const int &x, const int &y, const int &z) |
For internal testing purpose. More... | |
void | setRandomSurface (const int &surf) |
For internal testing purpose. More... | |
void | enableCohesiveElements () |
Enables cohesive elements. More... | |
bool | getTestResult () |
This method is for internal testing purpose only. More... | |
void | assignRefinement (const int &refineLvl) |
Assigns refinement levels to mesh. More... | |
void | applyFilter (const double &upperThreshold, const double &lowerThreshold) |
Assigns limiting filters for geometry sizes. More... | |
void | setSizePreservation () |
Sets program for size preservation instead of volume fraction. More... | |
void | setElementOrder (const int &order) |
Sets element order. More... | |
Private Member Functions | |
void | rocParser () |
This method parses Rocpack output file and collects data for creation of pack geometries. More... | |
void | rocToGeom () |
This method obtains parsed data from Rocpack output and creates periodic pack geometries. More... | |
void | geomToSurf () |
This method creates surface mesh for final geometry and writes into surface files (.stl, .vtk, .msh) More... | |
void | geomToVolFrac () |
Performs operations on generated geometry. More... | |
std::string | findWord (const std::string &word) |
Finds particular word in file stream. More... | |
std::vector< std::string > | getShapeData (const int &iter, const std::string &a, const std::vector< std::string > &L) |
Reads the current line and returns the translate, rotate, and scale data for the pack shape. More... | |
void | initialize () |
Initializes GMSH for workflow. More... | |
void | makePeriodic (const bool rmbPacks) |
Enforced periodicity on geometry. More... | |
void | normalizeVerts () |
Normalizes shape vertices. More... | |
void | scaleVols (const int &vol, const int &index) |
Scales all volumes by shrinking percentage. More... | |
void | performSmoothing () |
Performs laplacian smoothing on all packs if requested. More... | |
void | geomToSTL (const std::string &writeFile) |
This method writes periodic pack geometries into STL format. More... | |
void | geomToVTK (const std::string &writeFile) |
This method writes periodic pack geometries into VTK format. More... | |
void | geomToMsh (const std::string &writeFile) |
This method writes periodic pack geometries into .MSH format. More... | |
void | modifyInpMesh (const std::string &modifyFile) |
Removes 2D elements from INP mesh file. More... | |
rocQuaternion | toQuaternion (const std::vector< double > &r) |
Generates a Quaternion using Euler 3D rotation parameters. More... | |
std::vector< double > | rotateByQuaternion (const rocQuaternion &q, const std::vector< double > &v) |
Rotates a 3D Vector by unit Quaternion. More... | |
void | tagBoundaryPacks () |
This method removes the pack shapes intersecting boundary. More... | |
void | mapPeriodicSurfaces (const std::vector< std::pair< int, int >> &prevTags) |
This method maps surfaces in X,Y, and Z direction which are periodic and then enforces that into gmsh model. More... | |
void | geomToPeriodic3D () |
This method writes 3D periodic mesh into .msh and vtu format. More... | |
std::vector< std::vector< std::pair< int, int > > > | getAllPoints (std::vector< std::pair< int, int >> surfaces) |
This method gets points that belongs to surfaces. More... | |
std::vector< std::pair< int, int > > | getPeriodicSurfs (const std::vector< std::vector< std::pair< int, int >>> &vertsOneSide, const std::vector< std::vector< std::pair< int, int >>> &vertsOtherSide, const int &indexTranslate, const double &amountTranslate) |
This method find which surfaces are periodic on opposite sides. More... | |
void | writePeriodicNodes () |
This method allows mapping of nodes on periodic boundaries. More... | |
bool | existsOnPeriodicBoundary (const std::vector< double > &getPt1, const std::vector< double > &getPt2, const std::vector< double > &getPt) |
This method check if cohesive element face lies on any of the periodic boundaries. More... | |
void | makeSphere (const int &n) |
Creates sphere pack shapes. More... | |
void | makeEllipsoid (const int &n) |
Creates Ellipsoid pack shapes. More... | |
void | makeCylinder (const int &n) |
Creates cylinder pack shapes. More... | |
void | makeCrystalShape (const int &n, const int &index) |
Creates a crystal shape based on Rocpack output file. More... | |
void | createVtkCell (vtkSmartPointer< vtkUnstructuredGrid > dataSet, const int cellType, std::vector< int > &vrtIds) |
creates VTK cell More... | |
void | assignPeriodicEqNodes () |
Assigns nodes n0, nx, ny, nz for periodic equation file. More... | |
Private Attributes | |
std::string | InFile |
rocPack output file name More... | |
std::string | OutFile |
Output STL/VTK file name. More... | |
std::vector< std::string > | shapeNames |
Vector for storing base shape names. More... | |
std::vector< std::string > | uniqueNames |
Vector for storing shapes. More... | |
std::vector< std::string > | crystalNames |
Vector for storing crystal names. More... | |
double | Xdim |
X dimension of box geometry. More... | |
double | Ydim |
Y dimension of box geometry. More... | |
double | Zdim |
Z dimension of box geometry. More... | |
std::vector< double > | boxPt |
Vector of box starting coordinates. More... | |
std::vector< double > | ellipsoidRad |
Vector of Ellipsoid radii. More... | |
std::vector< double > | cylParams |
Vector of cylinder parameters. More... | |
std::vector< std::vector< std::vector< double > > > | verts |
Vector of crystal shape vertices. More... | |
std::vector< std::vector< std::vector< int > > > | faces |
Vector of crystal shape faces. More... | |
std::vector< std::vector< double > > | translateParams |
Vector of translate coordinates for all packs. More... | |
std::vector< std::vector< double > > | rotateParams |
Vector of rotate coordinates for all packs. More... | |
std::vector< double > | scaleOfPack |
Vector of scales for all packs. More... | |
std::vector< std::string > | nameOfPcks |
Vector of pack shape names. More... | |
std::string | packName |
Name of pack shape. More... | |
bool | ellipsoidPresent = false |
Ellipsoid packs cannot be made periodic as of now. More... | |
bool | enablePeriodicity = false |
Boolean to opt for non-periodic geometry (as generated by rocPack) More... | |
bool | removeBoundaryPacks = false |
Boolean to opt for removing packs on boundaries. More... | |
std::vector< std::pair< int, int > > | bndryPackTags |
Stores volume index of packs interseting boundary. More... | |
bool | periodic3D = false |
Boolean for 3D periodic mesh generation. More... | |
std::vector< int > | slaveX |
Surfaces linked to master periodic surface in X direction. More... | |
std::vector< int > | slaveY |
Surfaces linked to master periodic surface in Y direction. More... | |
std::vector< int > | slaveZ |
Surfaces linked to master periodic surface in Z direction. More... | |
std::vector< int > | MasterX |
Master periodic surfaces in X direction. More... | |
std::vector< int > | MasterY |
Master periodic surfaces in Y direction. More... | |
std::vector< int > | MasterZ |
Master periodic surfaces in Z direction. More... | |
int | randomNodeX = 0 |
For testing. More... | |
int | randomNodeY = 0 |
For testing. More... | |
int | randomNodeZ = 0 |
For testing. More... | |
bool | matchingCoords = false |
Nodes for testing. More... | |
bool | matchingCoordsX = false |
X Nodes for testing. More... | |
bool | matchingCoordsY = false |
Y Nodes for testing. More... | |
bool | matchingCoordsZ = false |
Z Nodes for testing. More... | |
double | shrinkScale = 1.0 |
Shrink Scale. More... | |
int | smoothingIter = 0 |
some smoothing parameter More... | |
bool | enableSmoothing = false |
Enables smoothing. More... | |
bool | enableScaling = false |
Enables Shrinking. More... | |
double | meshSz = -1 |
Mesh Size. More... | |
bool | enablePhysGrp = false |
Enable Physical Grouping in Final Mesh. More... | |
bool | just2Physgrps = false |
Enable Two Physical Groups in Final Mesh. More... | |
std::vector< std::size_t > | surrNodeTags |
Stores node tags for surronding physical group. More... | |
std::vector< double > | surrCoords |
Stores node coordinates for surronding physical group. More... | |
std::vector< std::size_t > | geomsNodeTags |
Stores node tags for geometries physical group. More... | |
std::vector< double > | geomsCoords |
Stores node coordinates for geometries physical group. More... | |
int | surroundingGrp |
Tag number. More... | |
int | packGrp |
Tag number. More... | |
std::vector< std::size_t > | interfaceNodes |
Vector for stroing nodes at conformal interface. More... | |
bool | assignSidePatches = false |
A boolean for user to enable assignement of surface patches. More... | |
double | xUDF = 0 |
X coordinate for user-defined translate. More... | |
double | yUDF = 0 |
Y coordinate for user-defined translate. More... | |
double | zUDF = 0 |
Z coordinate for user-defined translate. More... | |
bool | cstmDomain = false |
Custom Domain Boolean. More... | |
int | randomSurfTest = 0 |
Random location for a surface. More... | |
int | meshingAlgorithm = 1 |
Meshing Algorithm. More... | |
bool | defOutputs = false |
Output control. More... | |
bool | physGrpPerShape = false |
Boolean for physical group per shape. More... | |
std::map< int, int > | storeShapeNames |
Map for storing shape names against volume Sphere = 0 Ellipsoid = 1 Cylinder = 2 HMX = 3 PETN = 4 Icosidodecahedron = 5 Surrounding = 6. More... | |
std::vector< int > | spherePhysicalGroup |
Arrays for group per shape. More... | |
std::vector< int > | cylindersPhysicalGroup |
Arrays for group per shape. More... | |
std::vector< int > | ellipsoidPhysicalGroup |
Arrays for group per shape. More... | |
std::vector< int > | hmxPhysicalGroup |
Arrays for group per shape. More... | |
std::vector< int > | petnPhysicalGroup |
Arrays for group per shape. More... | |
std::vector< int > | icosidodecahedronPhysicalGroup |
Arrays for group per shape. More... | |
std::vector< int > | linkMultiPhysGrps |
Vector of all volumes for multi-physical groups. More... | |
std::vector< std::vector< int > > | storeMultiPhysGrps |
Stores all physical groups in index sized by total volumes. More... | |
std::vector< int > | multiGrpIndices |
Group indices for multi groups (useful in cohesive elements) More... | |
std::vector< int > | geomElementIds |
Store cells in surrounding for cohesive elements without physical groups. More... | |
std::vector< int > | eqRefNodes = std::vector<int>(4) |
Stores node ids n0,nx,ny,nz. More... | |
bool | internalCohesiveBool = false |
Boolean to enable cohesive elements. More... | |
std::vector< int > | ptsReplacer |
Storage vector for linking interface and duplicate nodes Replaces new duplicated nodes at place of old interface points. More... | |
std::vector< int > | slaveInterfaceId |
Storage vector for identifying which slave nodes are interface nodes. More... | |
std::vector< int > | ptsCohesiveGrp |
psudo-physical group vector for cohesive elements material assignment More... | |
bool | sntChk = false |
Sanity Check. More... | |
int | nptsMsh = 0 |
Total numer of points in mesh. More... | |
double | globalScaling = 1 |
Global scale for all pack geometries. More... | |
int | refineIter = 0 |
mesh refinement iterations More... | |
double | filterAbove = 0.0 |
Upper limit for filtering. More... | |
double | filterBelow = 0.0 |
Lower limit for filtering. More... | |
bool | filterOn = false |
Boolean for filter. More... | |
std::vector< int > | filteredGeoms |
Vector for identification of removed geometries. More... | |
bool | enableSizePreserve = false |
Boolean for size preservation. More... | |
int | elementOrder = 1 |
Sets mesh element order. More... | |
NEM::GEO::rocPack::rocPack | ( | const std::string & | fname, |
const std::string & | outName | ||
) |
Options for periodic geometry and removing boundary packs are off by default. To enable these options, user can specify following keywords anywhere in RocPack output file. (Default for both keyword is false.)
These can also be switched on using newly added public methods.
fname | Rocpack output file name |
outName | Output STL, VTK, .MSH, .exo file names |
Definition at line 62 of file rocPack.C.
References InFile, and OutFile.
|
inline |
Definition at line 99 of file rocPack.H.
References cellType, surfaces, NEM::GEO::rocQuaternion::x, NEM::GEO::rocQuaternion::y, and NEM::GEO::rocQuaternion::z.
void NEM::GEO::rocPack::applyFilter | ( | const double & | upperThreshold, |
const double & | lowerThreshold | ||
) |
upperThreshold | Upper limit for filtering |
lowerThreshold | Lower limit for filtering |
Definition at line 126 of file rocPack.C.
References filterAbove, filterBelow, and filterOn.
|
private |
Definition at line 2675 of file rocPack.C.
References boxPt, cellType, eqRefNodes, Xdim, Ydim, and Zdim.
Referenced by writePeriodicNodes().
void NEM::GEO::rocPack::assignRefinement | ( | const int & | refineLvl | ) |
refineLvl | Refinement level defined by user |
Definition at line 124 of file rocPack.C.
References refineIter.
void NEM::GEO::rocPack::createCohesiveElements | ( | const std::string & | filename, |
const std::string & | outname | ||
) |
filename | Input vtu file name |
output | file name |
Definition at line 2298 of file rocPack.C.
References meshBase::Create(), createVtkCell(), enablePhysGrp, existsOnPeriodicBoundary(), geomElementIds, geomsCoords, geomsNodeTags, meshBase::getCellDataArray(), meshBase::getDataSet(), meshBase::getNumberOfCells(), interfaceNodes, just2Physgrps, multiGrpIndices, NEM::MSH::New(), packGrp, physGrpPerShape, ptsCohesiveGrp, ptsReplacer, vtkMesh::report(), vtkMesh::setCellDataArray(), slaveInterfaceId, sntChk, storeMultiPhysGrps, surrCoords, surrNodeTags, surroundingGrp, and vtkMesh::write().
Referenced by rocPack2Periodic3D().
|
private |
Definition at line 2635 of file rocPack.C.
References NEM::MSH::New().
Referenced by createCohesiveElements().
void NEM::GEO::rocPack::enableCohesiveElements | ( | ) |
Definition at line 106 of file rocPack.C.
References internalCohesiveBool.
void NEM::GEO::rocPack::enableDefOuts | ( | ) |
.msh format output in addition to udf output
Definition at line 2669 of file rocPack.C.
References defOutputs.
void NEM::GEO::rocPack::enablePhysicalGroupsPerShape | ( | ) |
Definition at line 2673 of file rocPack.C.
References physGrpPerShape.
void NEM::GEO::rocPack::enablePhysicalGrps | ( | ) |
Definition at line 133 of file rocPack.C.
References enablePhysGrp.
void NEM::GEO::rocPack::enableSurfacePatches | ( | ) |
Definition at line 137 of file rocPack.C.
References assignSidePatches.
void NEM::GEO::rocPack::enableTwoPhysGrps | ( | ) |
Definition at line 135 of file rocPack.C.
References just2Physgrps.
|
private |
getPt1 | Point 1 of triangular face |
getPt2 | Point 2 of triangular face |
getPt3 | Point 3 of triangular face |
Definition at line 2761 of file rocPack.C.
References boxPt, Xdim, Ydim, and Zdim.
Referenced by createCohesiveElements().
|
private |
word | Word that user wants to find |
Definition at line 1080 of file rocPack.C.
References InFile.
Referenced by rocParser().
|
private |
writeFile | Output File Name |
Definition at line 571 of file rocPack.C.
Referenced by geomToPeriodic3D(), geomToSurf(), and geomToVTK().
|
private |
Definition at line 497 of file rocPack.C.
References assignSidePatches, defOutputs, elementOrder, enablePhysGrp, geomToMsh(), geomToSTL(), geomToVTK(), just2Physgrps, meshingAlgorithm, meshSz, modifyInpMesh(), nptsMsh, OutFile, physGrpPerShape, and refineIter.
Referenced by rocPack2Periodic3D().
|
private |
writeFile | Output File Name |
Definition at line 553 of file rocPack.C.
Referenced by geomToPeriodic3D(), and geomToSurf().
|
private |
Definition at line 456 of file rocPack.C.
References defOutputs, geomToMsh(), geomToSTL(), geomToVTK(), meshingAlgorithm, meshSz, OutFile, and refineIter.
Referenced by rocPack2Surf().
|
private |
|
private |
writeFile | Output File Name |
Definition at line 558 of file rocPack.C.
References meshBase::exportGmshToVtk(), geomToMsh(), meshBase::getNumberOfPoints(), nptsMsh, and meshBase::write().
Referenced by geomToPeriodic3D(), and geomToSurf().
|
private |
surfaces | A vector pair of surface tags |
Definition at line 1869 of file rocPack.C.
References surfaces, and verts.
Referenced by mapPeriodicSurfaces().
|
private |
vertsOneSide | Vertices on one side |
vertsOtherSide | Vertices on other side |
indexTranslate | Index for which direction to translate |
amountTranslate | Distance for translation |
Definition at line 1887 of file rocPack.C.
Referenced by mapPeriodicSurfaces().
|
private |
iter | Line number to read in file |
a | string of delimiters for parsing |
L | Line to read |
Definition at line 1088 of file rocPack.C.
References nemAux::Tokenize().
Referenced by rocParser().
bool NEM::GEO::rocPack::getTestResult | ( | ) |
Compares spatial location of several periodic nodes in periodic mesh.
Definition at line 2272 of file rocPack.C.
References matchingCoordsX, matchingCoordsY, and matchingCoordsZ.
|
private |
|
private |
n | Index for pack number |
index | Index for pack data access |
Definition at line 1370 of file rocPack.C.
References faces, nameOfPcks, physGrpPerShape, rotateByQuaternion(), rotateParams, scaleOfPack, storeShapeNames, toQuaternion(), translateParams, and verts.
Referenced by rocToGeom().
|
private |
n | Index for pack number |
Definition at line 1266 of file rocPack.C.
References cylParams, physGrpPerShape, rotateByQuaternion(), rotateParams, scaleOfPack, storeShapeNames, toQuaternion(), and translateParams.
Referenced by rocToGeom().
|
private |
n | Index for pack number |
Definition at line 1104 of file rocPack.C.
References ellipsoidRad, physGrpPerShape, rotateByQuaternion(), rotateParams, scaleOfPack, storeShapeNames, toQuaternion(), and translateParams.
Referenced by rocToGeom().
|
private |
rmbPacks | boolean for removing boundary packs |
Definition at line 576 of file rocPack.C.
References bndryPackTags, boxPt, cylindersPhysicalGroup, ellipsoidPhysicalGroup, enablePhysGrp, hmxPhysicalGroup, icosidodecahedronPhysicalGroup, internalCohesiveBool, linkMultiPhysGrps, mapPeriodicSurfaces(), nameOfPcks, periodic3D, petnPhysicalGroup, physGrpPerShape, spherePhysicalGroup, storeMultiPhysGrps, storeShapeNames, Xdim, Ydim, and Zdim.
Referenced by rocToGeom().
|
private |
n | Index for pack number |
Definition at line 1094 of file rocPack.C.
References physGrpPerShape, scaleOfPack, storeShapeNames, and translateParams.
Referenced by rocToGeom().
|
private |
prevTags | Currently existing model entities |
Definition at line 1556 of file rocPack.C.
References assignSidePatches, boxPt, cylindersPhysicalGroup, ellipsoidPhysicalGroup, enablePhysGrp, getAllPoints(), getPeriodicSurfs(), hmxPhysicalGroup, icosidodecahedronPhysicalGroup, just2Physgrps, MasterX, MasterY, MasterZ, multiGrpIndices, packGrp, petnPhysicalGroup, physGrpPerShape, slaveX, slaveY, slaveZ, spherePhysicalGroup, storeMultiPhysGrps, surroundingGrp, Xdim, Ydim, and Zdim.
Referenced by makePeriodic(), and rocToGeom().
|
private |
modifyFile | File name to modify |
Definition at line 2793 of file rocPack.C.
References elementOrder.
Referenced by geomToPeriodic3D().
|
private |
Definition at line 1460 of file rocPack.C.
References verts.
Referenced by rocParser().
|
private |
void NEM::GEO::rocPack::removeBoundaryVolumes | ( | ) |
Definition at line 104 of file rocPack.C.
References removeBoundaryPacks.
void NEM::GEO::rocPack::rocPack2Periodic3D | ( | ) |
Writes the output file in current path.
Definition at line 82 of file rocPack.C.
References createCohesiveElements(), geomToPeriodic3D(), internalCohesiveBool, OutFile, periodic3D, rocParser(), rocToGeom(), and writePeriodicNodes().
void NEM::GEO::rocPack::rocPack2Surf | ( | ) |
Definition at line 68 of file rocPack.C.
References geomToSurf(), rocParser(), and rocToGeom().
|
private |
Definition at line 152 of file rocPack.C.
References boxPt, crystalNames, cstmDomain, cylParams, ellipsoidPresent, ellipsoidRad, enablePeriodicity, enableSizePreserve, faces, findWord(), NEM::GEO::rocPackShape::getShape(), getShapeData(), globalScaling, InFile, nameOfPcks, normalizeVerts(), periodic3D, removeBoundaryPacks, rotateParams, scaleOfPack, shapeNames, shrinkScale, nemAux::strToChar(), nemAux::Tokenize(), nemAux::toLower(), translateParams, uniqueNames, verts, Xdim, xUDF, Ydim, yUDF, Zdim, and zUDF.
Referenced by rocPack2Periodic3D(), and rocPack2Surf().
|
private |
Definition at line 385 of file rocPack.C.
References bndryPackTags, crystalNames, cstmDomain, ellipsoidPresent, enablePeriodicity, filterAbove, filterBelow, filteredGeoms, filterOn, initialize(), makeCrystalShape(), makeCylinder(), makeEllipsoid(), makePeriodic(), makeSphere(), mapPeriodicSurfaces(), nameOfPcks, periodic3D, removeBoundaryPacks, scaleOfPack, shapeNames, tagBoundaryPacks(), and uniqueNames.
Referenced by rocPack2Periodic3D(), and rocPack2Surf().
|
private |
First, converts input vector into quaternion form by making "w" component zero (i.e \( v = 0 + x i + y j + z k \)). Then performs transformation using \( v_{'} = q.v.q\textsuperscript{-1} \). if we write quaternion in this form \( q = w + p(x,y,z) \), then \( v_{'} = 2\(p.v\)p + \(w_2 - p.p\)v + 2w\(p\times v\) \). This method is computationally efficient compared to performing direct quaternion products (i.e \( v_{'} = q.v.q\textsuperscript{-1} \))
q | A Quaternion in form \( q = w + x i + y j + z k \). |
v | Vector that needs to be rotated |
Definition at line 1523 of file rocPack.C.
References NEM::GEO::rocQuaternion::w, NEM::GEO::rocQuaternion::x, NEM::GEO::rocQuaternion::y, and NEM::GEO::rocQuaternion::z.
Referenced by makeCrystalShape(), makeCylinder(), and makeEllipsoid().
void NEM::GEO::rocPack::sanityCheckOn | ( | ) |
|
private |
Definition at line 2279 of file rocPack.C.
References shrinkScale, and translateParams.
void NEM::GEO::rocPack::setCustomDomain | ( | const std::vector< double > & | domainBounds | ) |
Definition at line 2650 of file rocPack.C.
References boxPt, cstmDomain, Xdim, xUDF, Ydim, yUDF, Zdim, and zUDF.
void NEM::GEO::rocPack::setElementOrder | ( | const int & | order | ) |
void NEM::GEO::rocPack::setMeshingAlgorithm | ( | const int & | mshAlg | ) |
void NEM::GEO::rocPack::setMeshSize | ( | const double | size | ) |
void NEM::GEO::rocPack::setNodeLocations | ( | const int & | x, |
const int & | y, | ||
const int & | z | ||
) |
void NEM::GEO::rocPack::setPeriodicGeometry | ( | ) |
Definition at line 108 of file rocPack.C.
References enablePeriodicity.
void NEM::GEO::rocPack::setPeriodicMesh | ( | ) |
Definition at line 110 of file rocPack.C.
References periodic3D.
void NEM::GEO::rocPack::setRandomSurface | ( | const int & | surf | ) |
Definition at line 2270 of file rocPack.C.
References randomSurfTest.
void NEM::GEO::rocPack::setSizePreservation | ( | ) |
Definition at line 139 of file rocPack.C.
References enableSizePreserve.
void NEM::GEO::rocPack::shrinkVolumes | ( | const double | percntg | ) |
percntg | Percentage between 0 and 1 by which the pack should be shrinked |
Definition at line 112 of file rocPack.C.
References enableScaling, and shrinkScale.
void NEM::GEO::rocPack::smoothSurfaces | ( | const int | smoothingParam | ) |
smoothingParam | Smoothing Iterations. |
Definition at line 117 of file rocPack.C.
References enableSmoothing, and smoothingIter.
|
private |
n | Index for pack number |
Definition at line 1478 of file rocPack.C.
References bndryPackTags, boxPt, just2Physgrps, removeBoundaryPacks, sntChk, Xdim, Ydim, and Zdim.
Referenced by rocToGeom().
|
private |
r | Rotation parameters in form (x,y,z,angle) |
Definition at line 1544 of file rocPack.C.
References NEM::GEO::rocQuaternion::w, NEM::GEO::rocQuaternion::x, NEM::GEO::rocQuaternion::y, and NEM::GEO::rocQuaternion::z.
Referenced by makeCrystalShape(), makeCylinder(), and makeEllipsoid().
void NEM::GEO::rocPack::translateAll | ( | const double & | X, |
const double & | Y, | ||
const double & | Z | ||
) |
X | Coordinate |
Y | Coordinate |
Z | Coordinate |
Definition at line 2644 of file rocPack.C.
References xUDF, yUDF, and zUDF.
|
private |
Writes periodic nodes surface wise in CSV file.
Definition at line 1935 of file rocPack.C.
References assignPeriodicEqNodes(), eqRefNodes, internalCohesiveBool, MasterX, MasterY, MasterZ, matchingCoordsX, matchingCoordsY, matchingCoordsZ, nptsMsh, ptsReplacer, randomNodeX, randomNodeY, randomNodeZ, randomSurfTest, slaveInterfaceId, slaveX, slaveY, and slaveZ.
Referenced by rocPack2Periodic3D().
|
private |
Definition at line 620 of file rocPack.H.
Referenced by enableSurfacePatches(), geomToPeriodic3D(), and mapPeriodicSurfaces().
|
private |
Definition at line 504 of file rocPack.H.
Referenced by makePeriodic(), rocToGeom(), and tagBoundaryPacks().
|
private |
Definition at line 449 of file rocPack.H.
Referenced by assignPeriodicEqNodes(), existsOnPeriodicBoundary(), makePeriodic(), mapPeriodicSurfaces(), rocParser(), setCustomDomain(), and tagBoundaryPacks().
|
private |
Definition at line 432 of file rocPack.H.
Referenced by rocParser(), and rocToGeom().
|
private |
Definition at line 636 of file rocPack.H.
Referenced by rocParser(), rocToGeom(), and setCustomDomain().
|
private |
Definition at line 672 of file rocPack.H.
Referenced by makePeriodic(), and mapPeriodicSurfaces().
|
private |
Definition at line 458 of file rocPack.H.
Referenced by makeCylinder(), and rocParser().
|
private |
Definition at line 648 of file rocPack.H.
Referenced by enableDefOuts(), geomToPeriodic3D(), and geomToSurf().
|
private |
Definition at line 768 of file rocPack.H.
Referenced by geomToPeriodic3D(), modifyInpMesh(), and setElementOrder().
|
private |
Definition at line 676 of file rocPack.H.
Referenced by makePeriodic(), and mapPeriodicSurfaces().
|
private |
This boolean will be true when ellipsoid packs are present.
Definition at line 491 of file rocPack.H.
Referenced by rocParser(), and rocToGeom().
|
private |
Definition at line 454 of file rocPack.H.
Referenced by makeEllipsoid(), and rocParser().
|
private |
Definition at line 495 of file rocPack.H.
Referenced by rocParser(), rocToGeom(), and setPeriodicGeometry().
|
private |
Definition at line 584 of file rocPack.H.
Referenced by createCohesiveElements(), enablePhysicalGrps(), geomToPeriodic3D(), makePeriodic(), and mapPeriodicSurfaces().
|
private |
Definition at line 576 of file rocPack.H.
Referenced by shrinkVolumes().
|
private |
Definition at line 764 of file rocPack.H.
Referenced by rocParser(), and setSizePreservation().
|
private |
Definition at line 572 of file rocPack.H.
Referenced by smoothSurfaces().
|
private |
Definition at line 709 of file rocPack.H.
Referenced by assignPeriodicEqNodes(), and writePeriodicNodes().
|
private |
Definition at line 466 of file rocPack.H.
Referenced by makeCrystalShape(), and rocParser().
|
private |
Definition at line 748 of file rocPack.H.
Referenced by applyFilter(), and rocToGeom().
|
private |
Definition at line 752 of file rocPack.H.
Referenced by applyFilter(), and rocToGeom().
|
private |
Definition at line 760 of file rocPack.H.
Referenced by rocToGeom().
|
private |
Definition at line 756 of file rocPack.H.
Referenced by applyFilter(), and rocToGeom().
|
private |
Definition at line 705 of file rocPack.H.
Referenced by createCohesiveElements().
|
private |
Definition at line 604 of file rocPack.H.
Referenced by createCohesiveElements().
|
private |
Definition at line 600 of file rocPack.H.
Referenced by createCohesiveElements().
|
private |
Definition at line 740 of file rocPack.H.
Referenced by rocParser().
|
private |
Definition at line 680 of file rocPack.H.
Referenced by makePeriodic(), and mapPeriodicSurfaces().
|
private |
Definition at line 688 of file rocPack.H.
Referenced by makePeriodic(), and mapPeriodicSurfaces().
|
private |
Definition at line 416 of file rocPack.H.
Referenced by findWord(), rocPack(), and rocParser().
|
private |
Definition at line 616 of file rocPack.H.
Referenced by createCohesiveElements().
|
private |
Definition at line 713 of file rocPack.H.
Referenced by enableCohesiveElements(), makePeriodic(), rocPack2Periodic3D(), and writePeriodicNodes().
|
private |
Definition at line 588 of file rocPack.H.
Referenced by createCohesiveElements(), enableTwoPhysGrps(), geomToPeriodic3D(), mapPeriodicSurfaces(), and tagBoundaryPacks().
|
private |
Definition at line 692 of file rocPack.H.
Referenced by makePeriodic().
|
private |
Definition at line 524 of file rocPack.H.
Referenced by mapPeriodicSurfaces(), and writePeriodicNodes().
|
private |
Definition at line 528 of file rocPack.H.
Referenced by mapPeriodicSurfaces(), and writePeriodicNodes().
|
private |
Definition at line 532 of file rocPack.H.
Referenced by mapPeriodicSurfaces(), and writePeriodicNodes().
|
private |
Definition at line 552 of file rocPack.H.
Referenced by getTestResult(), and writePeriodicNodes().
|
private |
Definition at line 556 of file rocPack.H.
Referenced by getTestResult(), and writePeriodicNodes().
|
private |
Definition at line 560 of file rocPack.H.
Referenced by getTestResult(), and writePeriodicNodes().
|
private |
Definition at line 644 of file rocPack.H.
Referenced by geomToPeriodic3D(), geomToSurf(), and setMeshingAlgorithm().
|
private |
Definition at line 580 of file rocPack.H.
Referenced by geomToPeriodic3D(), geomToSurf(), and setMeshSize().
|
private |
Definition at line 700 of file rocPack.H.
Referenced by createCohesiveElements(), and mapPeriodicSurfaces().
|
private |
Definition at line 482 of file rocPack.H.
Referenced by makeCrystalShape(), makePeriodic(), rocParser(), and rocToGeom().
|
private |
Definition at line 736 of file rocPack.H.
Referenced by geomToPeriodic3D(), geomToVTK(), and writePeriodicNodes().
|
private |
Definition at line 420 of file rocPack.H.
Referenced by geomToPeriodic3D(), geomToSurf(), rocPack(), and rocPack2Periodic3D().
|
private |
Definition at line 612 of file rocPack.H.
Referenced by createCohesiveElements(), and mapPeriodicSurfaces().
|
private |
Definition at line 508 of file rocPack.H.
Referenced by makePeriodic(), rocPack2Periodic3D(), rocParser(), rocToGeom(), and setPeriodicMesh().
|
private |
Definition at line 684 of file rocPack.H.
Referenced by makePeriodic(), and mapPeriodicSurfaces().
|
private |
Definition at line 652 of file rocPack.H.
Referenced by createCohesiveElements(), enablePhysicalGroupsPerShape(), geomToPeriodic3D(), makeCrystalShape(), makeCylinder(), makeEllipsoid(), makePeriodic(), makeSphere(), and mapPeriodicSurfaces().
|
private |
Definition at line 728 of file rocPack.H.
Referenced by createCohesiveElements().
|
private |
Definition at line 718 of file rocPack.H.
Referenced by createCohesiveElements(), and writePeriodicNodes().
|
private |
Definition at line 536 of file rocPack.H.
Referenced by setNodeLocations(), and writePeriodicNodes().
|
private |
Definition at line 540 of file rocPack.H.
Referenced by setNodeLocations(), and writePeriodicNodes().
|
private |
Definition at line 544 of file rocPack.H.
Referenced by setNodeLocations(), and writePeriodicNodes().
|
private |
Definition at line 640 of file rocPack.H.
Referenced by setRandomSurface(), and writePeriodicNodes().
|
private |
Definition at line 744 of file rocPack.H.
Referenced by assignRefinement(), geomToPeriodic3D(), and geomToSurf().
|
private |
(Resultant geometry will automatically be periodic)
Definition at line 500 of file rocPack.H.
Referenced by removeBoundaryVolumes(), rocParser(), rocToGeom(), and tagBoundaryPacks().
|
private |
Definition at line 474 of file rocPack.H.
Referenced by makeCrystalShape(), makeCylinder(), makeEllipsoid(), and rocParser().
|
private |
Definition at line 478 of file rocPack.H.
Referenced by makeCrystalShape(), makeCylinder(), makeEllipsoid(), makeSphere(), rocParser(), and rocToGeom().
|
private |
Definition at line 424 of file rocPack.H.
Referenced by rocParser(), and rocToGeom().
|
private |
Definition at line 564 of file rocPack.H.
Referenced by rocParser(), scaleVols(), and shrinkVolumes().
|
private |
Definition at line 723 of file rocPack.H.
Referenced by createCohesiveElements(), and writePeriodicNodes().
|
private |
Definition at line 512 of file rocPack.H.
Referenced by mapPeriodicSurfaces(), and writePeriodicNodes().
|
private |
Definition at line 516 of file rocPack.H.
Referenced by mapPeriodicSurfaces(), and writePeriodicNodes().
|
private |
Definition at line 520 of file rocPack.H.
Referenced by mapPeriodicSurfaces(), and writePeriodicNodes().
|
private |
Definition at line 568 of file rocPack.H.
Referenced by performSmoothing(), and smoothSurfaces().
|
private |
Definition at line 732 of file rocPack.H.
Referenced by createCohesiveElements(), sanityCheckOn(), and tagBoundaryPacks().
|
private |
Definition at line 668 of file rocPack.H.
Referenced by makePeriodic(), and mapPeriodicSurfaces().
|
private |
Definition at line 696 of file rocPack.H.
Referenced by createCohesiveElements(), makePeriodic(), and mapPeriodicSurfaces().
|
private |
Definition at line 664 of file rocPack.H.
Referenced by makeCrystalShape(), makeCylinder(), makeEllipsoid(), makePeriodic(), and makeSphere().
|
private |
Definition at line 596 of file rocPack.H.
Referenced by createCohesiveElements().
|
private |
Definition at line 592 of file rocPack.H.
Referenced by createCohesiveElements().
|
private |
Definition at line 608 of file rocPack.H.
Referenced by createCohesiveElements(), and mapPeriodicSurfaces().
|
private |
Definition at line 470 of file rocPack.H.
Referenced by makeCrystalShape(), makeCylinder(), makeEllipsoid(), makeSphere(), rocParser(), and scaleVols().
|
private |
Definition at line 428 of file rocPack.H.
Referenced by rocParser(), and rocToGeom().
|
private |
Definition at line 462 of file rocPack.H.
Referenced by getAllPoints(), makeCrystalShape(), normalizeVerts(), and rocParser().
|
private |
Definition at line 437 of file rocPack.H.
Referenced by assignPeriodicEqNodes(), existsOnPeriodicBoundary(), makePeriodic(), mapPeriodicSurfaces(), rocParser(), setCustomDomain(), and tagBoundaryPacks().
|
private |
Definition at line 624 of file rocPack.H.
Referenced by rocParser(), setCustomDomain(), and translateAll().
|
private |
Definition at line 441 of file rocPack.H.
Referenced by assignPeriodicEqNodes(), existsOnPeriodicBoundary(), makePeriodic(), mapPeriodicSurfaces(), rocParser(), setCustomDomain(), and tagBoundaryPacks().
|
private |
Definition at line 628 of file rocPack.H.
Referenced by rocParser(), setCustomDomain(), and translateAll().
|
private |
Definition at line 445 of file rocPack.H.
Referenced by assignPeriodicEqNodes(), existsOnPeriodicBoundary(), makePeriodic(), mapPeriodicSurfaces(), rocParser(), setCustomDomain(), and tagBoundaryPacks().
|
private |
Definition at line 632 of file rocPack.H.
Referenced by rocParser(), setCustomDomain(), and translateAll().