Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface. Used for repatching existing meshes. More...
Public Member Functions | |
ClassName ("boundaryMesh") | |
Runtime type information. More... | |
boundaryMesh () | |
Construct null. More... | |
boundaryMesh (const boundaryMesh &)=delete | |
Disallow default bitwise copy construction. More... | |
~boundaryMesh () | |
Destructor. More... | |
void | clearOut () |
const bMesh & | mesh () const |
const PtrList< boundaryPatch > & | patches () const |
const labelList & | meshFace () const |
Label of original face in polyMesh (before patchify(...)) More... | |
const pointField & | featurePoints () const |
Feature points. More... | |
const edgeList & | featureEdges () const |
Feature edges. Indices into featurePoints. More... | |
const labelList & | featureToEdge () const |
From index into featureEdge to index into meshedges,. More... | |
const labelList & | edgeToFeature () const |
From edge into featureEdges. More... | |
const labelListList & | featureSegments () const |
Lists of connected featureEdges. Indices into featureEdges. More... | |
const labelList & | extraEdges () const |
Indices into edges of additional edges. More... | |
void | read (const polyMesh &) |
Read from boundaryMesh of polyMesh. More... | |
void | readTriSurface (const fileName &) |
Read from triSurface. More... | |
void | writeTriSurface (const fileName &) const |
Write to file. More... | |
labelList | getNearest (const primitiveMesh &pMesh, const vector &searchSpan) const |
Get bMesh index of nearest face for every boundary face in. More... | |
void | patchify (const labelList &nearest, const polyBoundaryMesh &oldPatches, polyMesh &newMesh) const |
Take over patches onto polyMesh from nearest face in *this. More... | |
label | whichPatch (const label facei) const |
Get index of patch face is in. More... | |
label | findPatchID (const word &patchName) const |
Get index of patch by name. More... | |
wordList | patchNames () const |
Get names of patches. More... | |
void | addPatch (const word &patchName) |
Add to back of patch list. More... | |
void | deletePatch (const word &patchName) |
Delete from patch list. More... | |
void | changePatchType (const word &patchName, const word &type) |
Change patch. More... | |
void | changeFaces (const labelList &patchIDs, labelList &oldToNew) |
Recalculate face ordering and patches. Return old to new. More... | |
void | setFeatureEdges (const scalar minCos) |
Set featureEdges, edgeToFeature, featureSegments according. More... | |
void | setExtraEdges (const label edgeI) |
Set extraEdges to edges 'near' to edgeI. Uses point-edge walk. More... | |
label | getNTris (const label facei) const |
Simple triangulation of face subset. Returns number of triangles. More... | |
label | getNTris (const label startFacei, const label nFaces, labelList &nTris) const |
Simple triangulation of face subset. TotalNTris is total number. More... | |
void | triangulate (const label startFacei, const label nFaces, const label totalNTris, labelList &triVerts) const |
Simple triangulation of face subset. TotalNTris is total number. More... | |
label | getNPoints (const label startFacei, const label nFaces) const |
Number of points used in face subset. More... | |
void | triangulateLocal (const label startFacei, const label nFaces, const label totalNTris, labelList &triVerts, labelList &localToGlobal) const |
Same as triangulate but in local vertex numbering. More... | |
void | markFaces (const labelList &protectedEdges, const label facei, boolList &visited) const |
void | operator= (const boundaryMesh &)=delete |
Disallow default bitwise assignment. More... | |
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface. Used for repatching existing meshes.
Definition at line 59 of file boundaryMesh.H.
boundaryMesh | ( | ) |
Construct null.
Definition at line 437 of file boundaryMesh.C.
|
delete |
Disallow default bitwise copy construction.
~boundaryMesh | ( | ) |
Destructor.
Definition at line 453 of file boundaryMesh.C.
References boundaryMesh::clearOut().
ClassName | ( | "boundaryMesh" | ) |
Runtime type information.
void clearOut | ( | ) |
Definition at line 459 of file boundaryMesh.C.
Referenced by boundaryMesh::changeFaces(), boundaryMesh::read(), boundaryMesh::readTriSurface(), and boundaryMesh::~boundaryMesh().
|
inline |
Definition at line 199 of file boundaryMesh.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
Referenced by boundaryMesh::addPatch(), boundaryMesh::changeFaces(), cyclicAMIPointPatch::coupled(), cyclicAMIFvPatch::coupled(), boundaryMesh::getNearest(), boundaryMesh::getNPoints(), boundaryMesh::getNTris(), fvPatch::lookupPatchField(), boundaryMesh::markFaces(), cyclicACMIPolyPatch::resetAMI(), cyclicAMIPolyPatch::resetAMI(), boundaryMesh::setExtraEdges(), boundaryMesh::setFeatureEdges(), cyclicAMIPolyPatch::surfPtr(), boundaryMesh::triangulate(), boundaryMesh::triangulateLocal(), and boundaryMesh::writeTriSurface().
|
inline |
Definition at line 210 of file boundaryMesh.H.
|
inline |
Label of original face in polyMesh (before patchify(...))
Definition at line 217 of file boundaryMesh.H.
|
inline |
Feature points.
Definition at line 223 of file boundaryMesh.H.
|
inline |
Feature edges. Indices into featurePoints.
Definition at line 229 of file boundaryMesh.H.
|
inline |
From index into featureEdge to index into meshedges,.
Definition at line 235 of file boundaryMesh.H.
|
inline |
From edge into featureEdges.
Definition at line 241 of file boundaryMesh.H.
|
inline |
Lists of connected featureEdges. Indices into featureEdges.
Definition at line 247 of file boundaryMesh.H.
|
inline |
Indices into edges of additional edges.
Definition at line 253 of file boundaryMesh.H.
References boundaryMesh::addPatch(), boundaryMesh::changeFaces(), boundaryMesh::changePatchType(), boundaryMesh::deletePatch(), boundaryMesh::getNearest(), boundaryMesh::getNPoints(), boundaryMesh::getNTris(), boundaryMesh::markFaces(), boundaryMesh::operator=(), boundaryMesh::patchify(), boundaryMesh::patchNames(), boundaryMesh::read(), boundaryMesh::readTriSurface(), boundaryMesh::setExtraEdges(), boundaryMesh::setFeatureEdges(), boundaryMesh::triangulate(), boundaryMesh::triangulateLocal(), Foam::type(), and boundaryMesh::writeTriSurface().
void read | ( | const polyMesh & | mesh | ) |
Read from boundaryMesh of polyMesh.
Definition at line 472 of file boundaryMesh.C.
References polyMesh::boundaryMesh(), boundaryMesh::clearOut(), Foam::endl(), f(), forAll, patchIdentifier::name(), PrimitivePatch< FaceList, PointField >::nEdges(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), patchi, patchIdentifier::physicalType(), PrimitivePatch< FaceList, PointField >::points(), polyMesh::points(), Foam::Pout, List< T >::setSize(), UPtrList< T >::size(), boundaryPatch::size(), List< T >::size(), boundaryPatch::start(), polyPatch::start(), and Foam::Zero.
Referenced by boundaryMesh::extraEdges().
void readTriSurface | ( | const fileName & | fName | ) |
Read from triSurface.
Definition at line 602 of file boundaryMesh.C.
References boundaryMesh::clearOut(), UList< T >::empty(), Foam::endl(), forAll, geometricSurfacePatch::geometricType(), HashTable< T, Key, Hash >::insert(), PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), geometricSurfacePatch::name(), Foam::name(), PrimitivePatch< FaceList, PointField >::nEdges(), triSurface::patches(), patchi, Foam::Pout, labelledTri::region(), List< T >::setSize(), boundaryPatch::size(), List< T >::size(), HashTable< T, Key, Hash >::size(), and boundaryPatch::start().
Referenced by boundaryMesh::extraEdges().
void writeTriSurface | ( | const fileName & | fName | ) | const |
Write to file.
Definition at line 771 of file boundaryMesh.C.
References forAll, boundaryMesh::getNearest(), boundaryMesh::getNTris(), boundaryMesh::mesh(), patchIdentifier::name(), patchi, patchIdentifier::physicalType(), points, boundaryPatch::start(), and boundaryMesh::triangulate().
Referenced by boundaryMesh::extraEdges().
Foam::labelList getNearest | ( | const primitiveMesh & | pMesh, |
const vector & | searchSpan | ||
) | const |
Get bMesh index of nearest face for every boundary face in.
pMesh. Gets passed initial search box. If not found returns -1 for the face.
Definition at line 861 of file boundaryMesh.C.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), boundBox::avgDim(), Foam::endl(), f(), primitiveMesh::faceAreas(), primitiveMesh::faceCentres(), PrimitivePatch< FaceList, PointField >::faceNormals(), primitiveMesh::faces(), forAll, PointIndexHit< Point >::hit(), PointIndexHit< Point >::hitPoint(), PointIndexHit< Point >::index(), Foam::mag(), Foam::magSqr(), boundBox::max(), Foam::max(), boundaryMesh::mesh(), boundBox::min(), n, primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), boundaryMesh::patchify(), points, primitiveMesh::points(), Foam::Pout, DynamicList< T, SizeInc, SizeMult, SizeDiv >::shrink(), Foam::sign(), List< T >::size(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Referenced by boundaryMesh::extraEdges(), and boundaryMesh::writeTriSurface().
void patchify | ( | const labelList & | nearest, |
const polyBoundaryMesh & | oldPatches, | ||
polyMesh & | newMesh | ||
) | const |
Take over patches onto polyMesh from nearest face in *this.
(from call to getNearest). Insert as -new set of patches (newMesh.addPatches) -topoChanges to change faces. nearest is list of nearest face in *this for every boundary face. oldPatches is list of existing patches in mesh. newMesh is the mesh to which the new patches are added. (so has to be constructed without patches).
Definition at line 1116 of file boundaryMesh.C.
References List< T >::append(), polyMesh::boundaryMesh(), repatchPolyTopoChanger::changePatches(), repatchPolyTopoChanger::changePatchID(), polyPatch::clone(), Foam::endl(), forAll, patchIdentifier::name(), polyPatch::New(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), patchi, pFaces, patchIdentifier::physicalType(), Foam::Pout, repatchPolyTopoChanger::repatch(), List< T >::size(), and polyPatch::start().
Referenced by boundaryMesh::extraEdges(), and boundaryMesh::getNearest().
Foam::label whichPatch | ( | const label | facei | ) | const |
Get index of patch face is in.
Definition at line 1535 of file boundaryMesh.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, patchi, boundaryPatch::size(), and boundaryPatch::start().
Foam::label findPatchID | ( | const word & | patchName | ) | const |
Get index of patch by name.
Definition at line 1556 of file boundaryMesh.C.
References forAll, Foam::name(), and patchi.
Foam::wordList patchNames | ( | ) | const |
Get names of patches.
Definition at line 271 of file boundaryMesh.C.
References primitiveMesh::edgeFaces(), UList< T >::empty(), Foam::endl(), primitiveMesh::faceEdges(), forAll, mesh, patchi, Foam::Pout, List< T >::setSize(), List< T >::size(), and polyPatch::start().
Referenced by boundaryMesh::extraEdges().
void addPatch | ( | const word & | patchName | ) |
Add to back of patch list.
Definition at line 1570 of file boundaryMesh.C.
References Foam::endl(), forAll, boundaryMesh::mesh(), patchIdentifier::name(), patchi, patchIdentifier::physicalType(), Foam::Pout, boundaryPatch::size(), and boundaryPatch::start().
Referenced by boundaryMesh::extraEdges().
void deletePatch | ( | const word & | patchName | ) |
Delete from patch list.
Definition at line 1607 of file boundaryMesh.C.
References Foam::abort(), boundaryMesh::changePatchType(), Foam::clone(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, patchIdentifier::name(), patchi, patchIdentifier::physicalType(), Foam::Pout, PtrList< T >::set(), boundaryPatch::size(), and boundaryPatch::start().
Referenced by boundaryMesh::extraEdges().
Change patch.
Definition at line 1663 of file boundaryMesh.C.
References Foam::abort(), boundaryMesh::changeFaces(), Foam::clone(), Foam::FatalError, FatalErrorInFunction, forAll, patchIdentifier::index(), patchIdentifier::name(), patchi, boundaryPatch::size(), and boundaryPatch::start().
Referenced by boundaryMesh::deletePatch(), and boundaryMesh::extraEdges().
Recalculate face ordering and patches. Return old to new.
mapping.
Definition at line 1714 of file boundaryMesh.C.
References Foam::abort(), boundaryMesh::clearOut(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, boundaryMesh::mesh(), patchIdentifier::name(), patchi, patchIdentifier::physicalType(), points, Foam::Pout, List< T >::setSize(), boundaryPatch::size(), List< T >::size(), boundaryPatch::start(), and List< T >::transfer().
Referenced by boundaryMesh::changePatchType(), and boundaryMesh::extraEdges().
void setFeatureEdges | ( | const scalar | minCos | ) |
Set featureEdges, edgeToFeature, featureSegments according.
to angle of faces across edge
Definition at line 1319 of file boundaryMesh.C.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), PrimitivePatch< FaceList, PointField >::edgeFaces(), PrimitivePatch< FaceList, PointField >::edges(), edge::end(), PrimitivePatch< FaceList, PointField >::faceNormals(), forAll, boundaryMesh::mesh(), nPoints, PrimitivePatch< FaceList, PointField >::points(), List< T >::setSize(), List< T >::size(), and edge::start().
Referenced by boundaryMesh::extraEdges().
void setExtraEdges | ( | const label | edgeI | ) |
Set extraEdges to edges 'near' to edgeI. Uses point-edge walk.
to determine 'near'.
Definition at line 1520 of file boundaryMesh.C.
References boundaryMesh::mesh(), and List< T >::transfer().
Referenced by boundaryMesh::extraEdges().
Foam::label getNTris | ( | const label | facei | ) | const |
Simple triangulation of face subset. Returns number of triangles.
needed.
Definition at line 1832 of file boundaryMesh.C.
References f(), boundaryMesh::mesh(), face::nTriangles(), and points.
Referenced by boundaryMesh::extraEdges(), boundaryMesh::getNTris(), and boundaryMesh::writeTriSurface().
Foam::label getNTris | ( | const label | startFacei, |
const label | nFaces, | ||
labelList & | nTris | ||
) | const |
Simple triangulation of face subset. TotalNTris is total number.
of triangles, nTris is per face number of triangles.
Definition at line 1841 of file boundaryMesh.C.
References boundaryMesh::getNTris(), List< T >::setSize(), and boundaryMesh::triangulate().
void triangulate | ( | const label | startFacei, |
const label | nFaces, | ||
const label | totalNTris, | ||
labelList & | triVerts | ||
) | const |
Simple triangulation of face subset. TotalNTris is total number.
of triangles (from call to getNTris) triVerts is triangle vertices, three per triangle.
Definition at line 1866 of file boundaryMesh.C.
References f(), forAll, boundaryMesh::getNPoints(), boundaryMesh::mesh(), face::nTriangles(), points, List< T >::setSize(), and face::triangles().
Referenced by boundaryMesh::extraEdges(), boundaryMesh::getNTris(), and boundaryMesh::writeTriSurface().
Foam::label getNPoints | ( | const label | startFacei, |
const label | nFaces | ||
) | const |
Number of points used in face subset.
Definition at line 1907 of file boundaryMesh.C.
References boundaryMesh::mesh(), PrimitivePatch< FaceList, PointField >::nPoints(), points, and boundaryMesh::triangulateLocal().
Referenced by boundaryMesh::extraEdges(), and boundaryMesh::triangulate().
void triangulateLocal | ( | const label | startFacei, |
const label | nFaces, | ||
const label | totalNTris, | ||
labelList & | triVerts, | ||
labelList & | localToGlobal | ||
) | const |
Same as triangulate but in local vertex numbering.
(Map returned).
Definition at line 1922 of file boundaryMesh.C.
References f(), forAll, PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), boundaryMesh::markFaces(), boundaryMesh::mesh(), PrimitivePatch< FaceList, PointField >::meshPoints(), face::nTriangles(), points, List< T >::setSize(), and face::triangles().
Referenced by boundaryMesh::extraEdges(), and boundaryMesh::getNPoints().
Definition at line 1969 of file boundaryMesh.C.
References forAll, boundaryMesh::mesh(), and List< T >::setSize().
Referenced by boundaryMesh::extraEdges(), and boundaryMesh::triangulateLocal().
|
delete |
Disallow default bitwise assignment.
Referenced by boundaryMesh::extraEdges().