Collection of static functions to do various simple mesh related things. More...
Functions | |
bool | visNormal (const vector &n, const vectorField &faceNormals, const labelList &faceLabels) |
vectorField | calcBoxPointNormals (const primitivePatch &pp) |
vector | normEdgeVec (const primitiveMesh &, const label edgeI) |
void | writeOBJ (Ostream &os, const point &pt) |
void | writeOBJ (Ostream &os, const UList< point > &pts) |
void | writeOBJ (Ostream &os, const triad &t, const point &origin) |
void | writeOBJ (Ostream &os, const point &p1, const point &p2, label &count) |
void | writeOBJ (Ostream &os, const point &p1, const point &p2) |
void | writeOBJ (Ostream &os, const treeBoundBox &bb) |
template<class FaceType > | |
void | writeOBJ (Ostream &os, const UList< FaceType > &faces, const UList< point > &points, const labelList &faceLabels) |
template<class FaceType > | |
void | writeOBJ (Ostream &os, const UList< FaceType > &faces, const UList< point > &points) |
void | writeOBJ (Ostream &os, const cellList &cells, const faceList &faces, const UList< point > &points, const labelList &cellLabels) |
bool | edgeOnCell (const primitiveMesh &mesh, const label celli, const label edgeI) |
bool | edgeOnFace (const primitiveMesh &mesh, const label facei, const label edgeI) |
bool | faceOnCell (const primitiveMesh &mesh, const label celli, const label facei) |
label | findEdge (const edgeList &edges, const labelList &candidates, const label v0, const label v1) |
label | findEdge (const primitiveMesh &mesh, const label v0, const label v1) |
label | getSharedEdge (const primitiveMesh &mesh, const label f0, const label f1) |
label | getSharedFace (const primitiveMesh &mesh, const label cell0, const label cell1) |
void | getEdgeFaces (const primitiveMesh &mesh, const label celli, const label edgeI, label &face0, label &face1) |
label | otherEdge (const primitiveMesh &mesh, const labelList &edgeLabels, const label thisEdgeI, const label thisVertI) |
label | otherFace (const primitiveMesh &mesh, const label celli, const label facei, const label edgeI) |
label | otherCell (const primitiveMesh &mesh, const label celli, const label facei) |
label | walkFace (const primitiveMesh &mesh, const label facei, const label startEdgeI, const label startVertI, const label nEdges) |
void | constrainToMeshCentre (const polyMesh &mesh, point &pt) |
void | constrainToMeshCentre (const polyMesh &mesh, pointField &pt) |
void | constrainDirection (const polyMesh &mesh, const Vector< label > &dirs, vector &d) |
void | constrainDirection (const polyMesh &mesh, const Vector< label > &dirs, vectorField &d) |
void | getParallelEdges (const primitiveMesh &mesh, const label celli, const label e0, label &e1, label &e2, label &e3) |
vector | edgeToCutDir (const primitiveMesh &mesh, const label celli, const label edgeI) |
label | cutDirToEdge (const primitiveMesh &mesh, const label celli, const vector &cutDir) |
Variables | |
static const label | mXmYmZ = 0 |
static const label | pXmYmZ = 1 |
static const label | mXpYmZ = 2 |
static const label | pXpYmZ = 3 |
static const label | mXmYpZ = 4 |
static const label | pXmYpZ = 5 |
static const label | mXpYpZ = 6 |
static const label | pXpYpZ = 7 |
static const label | mXmYmZMask = 1 << mXmYmZ |
static const label | pXmYmZMask = 1 << pXmYmZ |
static const label | mXpYmZMask = 1 << mXpYmZ |
static const label | pXpYmZMask = 1 << pXpYmZ |
static const label | mXmYpZMask = 1 << mXmYpZ |
static const label | pXmYpZMask = 1 << pXmYpZ |
static const label | mXpYpZMask = 1 << mXpYpZ |
static const label | pXpYpZMask = 1 << pXpYpZ |
Collection of static functions to do various simple mesh related things.
bool visNormal | ( | const vector & | n, |
const vectorField & | faceNormals, | ||
const labelList & | faceLabels | ||
) |
Definition at line 30 of file meshTools.C.
References faceNormals(), forAll, and n.
Referenced by calcBoxPointNormals().
Foam::vectorField calcBoxPointNormals | ( | const primitivePatch & | pp | ) |
Definition at line 49 of file meshTools.C.
References Foam::endl(), faceNormals(), PrimitivePatch< FaceList, PointField >::faceNormals(), forAll, Foam::mag(), PrimitivePatch< FaceList, PointField >::meshPoints(), mXmYmZ, mXmYmZMask, mXmYpZ, mXmYpZMask, mXpYmZ, mXpYmZMask, mXpYpZ, mXpYpZMask, n, Foam::nl, PrimitivePatch< FaceList, PointField >::nPoints(), pFaces, PrimitivePatch< FaceList, PointField >::pointFaces(), PrimitivePatch< FaceList, PointField >::pointNormals(), PrimitivePatch< FaceList, PointField >::points(), pXmYmZ, pXmYmZMask, pXmYpZ, pXmYpZMask, pXpYmZ, pXpYmZMask, pXpYpZ, pXpYpZMask, visNormal(), WarningInFunction, and Foam::Zero.
Foam::vector normEdgeVec | ( | const primitiveMesh & | mesh, |
const label | edgeI | ||
) |
Definition at line 186 of file meshTools.C.
References mesh.
Referenced by edgeToCutDir(), and cellLooper::getMisAlignedEdge().
Definition at line 196 of file meshTools.C.
References Foam::endl(), os(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Referenced by mappedPatchBase::calcAMI(), polyDualMesh::calcFeatures(), processorPolyPatch::calcGeometry(), mappedPatchBase::calcMapping(), hexCellLooper::cut(), Foam::drawHitProblem(), meshRefinement::dumpIntersections(), processorPolyPatch::initOrder(), triangle2D::interArea(), surfaceFeatures::nearestEdges(), surfaceFeatures::nearestSamples(), Foam::operator<<(), oldCyclicPolyPatch::order(), processorPolyPatch::order(), cyclicPolyPatch::order(), dynamicIndexedOctree::print(), indexedOctree< Foam::treeDataPrimitivePatch< PatchType > >::print(), cyclicAMIPolyPatch::resetAMI(), motionSmootherAlgo::setDisplacement(), duplicatePoints::setRefinement(), refinementIterator::setRefinement(), faceCollapser::setRefinement(), removeFaces::setRefinement(), hexRef8::setRefinement(), box::writeBoxes(), cellCuts::writeCellOBJ(), AMIInterpolation::writeFaceConnectivity(), advancingFrontAMI::writeIntersectionOBJ(), AABBTree::writeOBJ(), writeOBJ(), coupledPolyPatch::writeOBJ(), enrichedPatch::writeOBJ(), surfaceFeatures::writeObj(), and cellCuts::writeOBJ().
Definition at line 206 of file meshTools.C.
References forAll, Foam::nl, os(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Definition at line 221 of file meshTools.C.
References forAll, os(), and writeOBJ().
Definition at line 235 of file meshTools.C.
References Foam::BitOps::count(), Foam::endl(), Foam::nl, os(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Definition at line 251 of file meshTools.C.
References Foam::endl(), Foam::nl, os(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
void writeOBJ | ( | Ostream & | os, |
const treeBoundBox & | bb | ||
) |
Definition at line 266 of file meshTools.C.
References Foam::constant::electromagnetic::e, Foam::nl, os(), treeBoundBox::points(), and writeOBJ().
void writeOBJ | ( | Ostream & | os, |
const UList< FaceType > & | faces, | ||
const UList< point > & | points, | ||
const labelList & | faceLabels | ||
) |
Definition at line 24 of file meshToolsTemplates.C.
References Foam::endl(), f(), forAll, os(), points, and writeOBJ().
Definition at line 60 of file meshToolsTemplates.C.
References forAll, os(), points, UList::size(), and writeOBJ().
void writeOBJ | ( | Ostream & | os, |
const cellList & | cells, | ||
const faceList & | faces, | ||
const UList< point > & | points, | ||
const labelList & | cellLabels | ||
) |
Definition at line 281 of file meshTools.C.
References cells, HashSet::insert(), os(), points, and writeOBJ().
bool edgeOnCell | ( | const primitiveMesh & | mesh, |
const label | celli, | ||
const label | edgeI | ||
) |
Definition at line 301 of file meshTools.C.
References mesh.
Referenced by cellLooper::getVertEdgesNonFace().
bool edgeOnFace | ( | const primitiveMesh & | mesh, |
const label | facei, | ||
const label | edgeI | ||
) |
Definition at line 312 of file meshTools.C.
References mesh.
Referenced by cellFeatures::isFeatureVertex().
bool faceOnCell | ( | const primitiveMesh & | mesh, |
const label | celli, | ||
const label | facei | ||
) |
Definition at line 323 of file meshTools.C.
References mesh.
Referenced by getEdgeFaces(), and cellLooper::getVertFacesNonEdge().
Foam::label findEdge | ( | const edgeList & | edges, |
const labelList & | candidates, | ||
const label | v0, | ||
const label | v1 | ||
) |
Definition at line 352 of file meshTools.C.
References Foam::constant::electromagnetic::e, and forAll.
Referenced by edgeVertex::cutPairToEdge(), faceCollapser::setRefinement(), and directionInfo::updateCell().
Foam::label findEdge | ( | const primitiveMesh & | mesh, |
const label | v0, | ||
const label | v1 | ||
) |
Definition at line 375 of file meshTools.C.
References Foam::constant::electromagnetic::e, forAll, and mesh.
Foam::label getSharedEdge | ( | const primitiveMesh & | mesh, |
const label | f0, | ||
const label | f1 | ||
) |
Definition at line 401 of file meshTools.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, and mesh.
Foam::label getSharedFace | ( | const primitiveMesh & | mesh, |
const label | cell0, | ||
const label | cell1 | ||
) |
Definition at line 434 of file meshTools.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, and mesh.
Referenced by undoableMeshCutter::getSplitFaces().
void getEdgeFaces | ( | const primitiveMesh & | mesh, |
const label | celli, | ||
const label | edgeI, | ||
label & | face0, | ||
label & | face1 | ||
) |
Definition at line 472 of file meshTools.C.
References Foam::abort(), faceOnCell(), Foam::FatalError, FatalErrorInFunction, forAll, and mesh.
Referenced by hexCellLooper::cut(), topoCellLooper::cut(), directionInfo::edgeToFaceIndex(), cellLooper::getVertFacesNonEdge(), and otherFace().
Foam::label otherEdge | ( | const primitiveMesh & | mesh, |
const labelList & | edgeLabels, | ||
const label | thisEdgeI, | ||
const label | thisVertI | ||
) |
Definition at line 514 of file meshTools.C.
References Foam::abort(), Foam::constant::electromagnetic::e, Foam::FatalError, FatalErrorInFunction, forAll, and mesh.
Referenced by directionInfo::updateCell(), and walkFace().
Foam::label otherFace | ( | const primitiveMesh & | mesh, |
const label | celli, | ||
const label | facei, | ||
const label | edgeI | ||
) |
Definition at line 548 of file meshTools.C.
References getEdgeFaces(), and mesh.
Referenced by wallBoundedParticle::crossEdgeConnectedFace(), edgeToCutDir(), getParallelEdges(), prismMatcher::matchShape(), tetWedgeMatcher::matchShape(), wedgeMatcher::matchShape(), pyrMatcher::matchShape(), tetMatcher::matchShape(), hexMatcher::matchShape(), edgeFaceCirculator::operator++(), edgeFaceCirculator::setCanonical(), and directionInfo::updateCell().
Foam::label otherCell | ( | const primitiveMesh & | mesh, |
const label | celli, | ||
const label | facei | ||
) |
Definition at line 572 of file meshTools.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and mesh.
Foam::label walkFace | ( | const primitiveMesh & | mesh, |
const label | facei, | ||
const label | startEdgeI, | ||
const label | startVertI, | ||
const label | nEdges | ||
) |
Definition at line 596 of file meshTools.C.
References mesh, and otherEdge().
Referenced by edgeToCutDir(), directionInfo::edgeToFaceIndex(), and getParallelEdges().
Definition at line 622 of file meshTools.C.
References Foam::max(), mesh, and Foam::min().
Referenced by twoDPointCorrector::correctDisplacement(), twoDPointCorrector::correctPoints(), particle< Type >::deviationFromMeshCentre(), InjectionModel< CloudType >::inject(), and InjectionModel< CloudType >::injectSteadyState().
void constrainToMeshCentre | ( | const polyMesh & | mesh, |
pointField & | pt | ||
) |
Definition at line 643 of file meshTools.C.
References forAll, Foam::max(), mesh, and Foam::min().
Definition at line 680 of file meshTools.C.
Referenced by KinematicParcel::calcVelocity(), InjectionModel< CloudType >::inject(), InjectionModel< CloudType >::injectSteadyState(), DSMCParcel::move(), and KinematicSurfaceFilm< CloudType >::splashInteraction().
void constrainDirection | ( | const polyMesh & | mesh, |
const Vector< label > & | dirs, | ||
vectorField & | d | ||
) |
Definition at line 697 of file meshTools.C.
References forAll.
void getParallelEdges | ( | const primitiveMesh & | mesh, |
const label | celli, | ||
const label | e0, | ||
label & | e1, | ||
label & | e2, | ||
label & | e3 | ||
) |
Definition at line 730 of file meshTools.C.
References mesh, otherFace(), and walkFace().
Referenced by cutDirToEdge().
Foam::vector edgeToCutDir | ( | const primitiveMesh & | mesh, |
const label | celli, | ||
const label | edgeI | ||
) |
Definition at line 756 of file meshTools.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, mesh, Vector< Cmpt >::normalise(), normEdgeVec(), otherFace(), and walkFace().
Referenced by cutDirToEdge().
Foam::label cutDirToEdge | ( | const primitiveMesh & | mesh, |
const label | celli, | ||
const vector & | cutDir | ||
) |
Definition at line 803 of file meshTools.C.
References Foam::abort(), edgeToCutDir(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, getParallelEdges(), HashSet::insert(), Foam::mag(), and mesh.
Referenced by hexCellLooper::cut().
|
static |
Definition at line 62 of file meshTools.H.
Referenced by calcBoxPointNormals().
|
static |
Definition at line 63 of file meshTools.H.
Referenced by calcBoxPointNormals().
|
static |
Definition at line 64 of file meshTools.H.
Referenced by calcBoxPointNormals().
|
static |
Definition at line 65 of file meshTools.H.
Referenced by calcBoxPointNormals().
|
static |
Definition at line 67 of file meshTools.H.
Referenced by calcBoxPointNormals().
|
static |
Definition at line 68 of file meshTools.H.
Referenced by calcBoxPointNormals().
|
static |
Definition at line 69 of file meshTools.H.
Referenced by calcBoxPointNormals().
|
static |
Definition at line 70 of file meshTools.H.
Referenced by calcBoxPointNormals().
|
static |
Definition at line 72 of file meshTools.H.
Referenced by calcBoxPointNormals().
|
static |
Definition at line 73 of file meshTools.H.
Referenced by calcBoxPointNormals().
|
static |
Definition at line 74 of file meshTools.H.
Referenced by calcBoxPointNormals().
|
static |
Definition at line 75 of file meshTools.H.
Referenced by calcBoxPointNormals().
|
static |
Definition at line 77 of file meshTools.H.
Referenced by calcBoxPointNormals().
|
static |
Definition at line 78 of file meshTools.H.
Referenced by calcBoxPointNormals().
|
static |
Definition at line 79 of file meshTools.H.
Referenced by calcBoxPointNormals().
|
static |
Definition at line 80 of file meshTools.H.
Referenced by calcBoxPointNormals().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.