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 () | |
Default construct. More... | |
~boundaryMesh ()=default | |
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 |
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 58 of file boundaryMesh.H.
boundaryMesh | ( | ) |
Default construct.
Definition at line 433 of file boundaryMesh.C.
|
default |
Destructor.
ClassName | ( | "boundaryMesh" | ) |
Runtime type information.
void clearOut | ( | ) |
Definition at line 449 of file boundaryMesh.C.
|
inline |
Definition at line 259 of file boundaryMesh.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
Referenced by cyclicAMIPolyPatch::addAMIFaces(), faPatch::boundaryConnections(), faPatch::boundaryProcs(), faPatch::boundaryProcSizes(), fvPatch::Cf(), processorFaPatch::comm(), cyclicAMIPointPatch::coupled(), fvPatch::deltaCoeffs(), faPatch::deltaCoeffs(), faPatch::edgeCentres(), faPatch::edgeLengths(), fvPatch::lookupPatchField(), faPatch::lookupPatchField(), faPatch::magEdgeLengths(), fvPatch::magSf(), processorFaPatch::makeNonGlobalPatchPoints(), cyclicAMIFvPatch::movePoints(), cyclicACMIFvPatch::movePoints(), faPatch::ngbPolyPatchFaceNormals(), cyclicACMIPolyPatch::resetAMI(), cyclicAMIPolyPatch::resetAMI(), cyclicACMIPolyPatch::scalePatchFaceAreas(), fvPatch::Sf(), faPatch::start(), cyclicAMIPolyPatch::surfPtr(), fvPatch::weights(), and faPatch::weights().
|
inline |
Definition at line 270 of file boundaryMesh.H.
|
inline |
Label of original face in polyMesh (before patchify(...))
Definition at line 279 of file boundaryMesh.H.
|
inline |
Feature points.
Definition at line 287 of file boundaryMesh.H.
|
inline |
Feature edges. Indices into featurePoints.
Definition at line 295 of file boundaryMesh.H.
|
inline |
From index into featureEdge to index into meshedges,.
Definition at line 303 of file boundaryMesh.H.
|
inline |
From edge into featureEdges.
Definition at line 311 of file boundaryMesh.H.
|
inline |
Lists of connected featureEdges. Indices into featureEdges.
Definition at line 319 of file boundaryMesh.H.
|
inline |
Indices into edges of additional edges.
Definition at line 327 of file boundaryMesh.H.
void read | ( | const polyMesh & | mesh | ) |
Read from boundaryMesh of polyMesh.
Definition at line 455 of file boundaryMesh.C.
References polyMesh::boundaryMesh(), Foam::ensightOutput::debug, Foam::endl(), f(), forAll, mesh, patchIdentifier::name(), primitiveMesh::nBoundaryFaces(), patchIdentifier::physicalType(), PrimitivePatch< FaceList, PointField >::points(), polyMesh::points(), Foam::Pout, pp(), PtrList< T >::set(), UList< T >::size(), boundaryPatch::size(), UPtrList< T >::size(), boundaryPatch::start(), and Foam::Zero.
void readTriSurface | ( | const fileName & | fName | ) |
Read from triSurface.
Definition at line 581 of file boundaryMesh.C.
References List< T >::clear(), geometricSurfacePatch::defaultName(), UList< T >::empty(), geometricSurfacePatch::emptyType, Foam::endl(), forAll, geometricSurfacePatch::geometricType(), HashTable< T, Key, Hash >::insert(), PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), OSstream::name(), geometricSurfacePatch::name(), triSurface::patches(), Foam::Pout, labelledTri::region(), List< T >::set(), List< T >::setSize(), UList< T >::size(), boundaryPatch::size(), HashTable< T, Key, Hash >::size(), and boundaryPatch::start().
void writeTriSurface | ( | const fileName & | fName | ) | const |
Write to file.
Definition at line 749 of file boundaryMesh.C.
References forAll, mesh, patchIdentifier::name(), patchIdentifier::physicalType(), points, boundaryPatch::start(), and triSurface::write().
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 839 of file boundaryMesh.C.
References DynamicList< T, SizeMin >::append(), Foam::fieldTypes::area, boundBox::avgDim(), Foam::ensightOutput::debug, Foam::constant::electromagnetic::e, Foam::endl(), f(), primitiveMesh::faceAreas(), primitiveMesh::faceCentres(), primitiveMesh::faces(), forAll, PointIndexHit< PointType >::hit(), PointIndexHit< PointType >::index(), Foam::mag(), Foam::magSqr(), boundBox::max(), Foam::max(), mesh, boundBox::min(), n, primitiveMesh::nBoundaryFaces(), primitiveMesh::nInternalFaces(), PointIndexHit< PointType >::point(), points, primitiveMesh::points(), Foam::Pout, DynamicList< T, SizeMin >::shrink(), Foam::sign(), and UList< T >::size().
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 1092 of file boundaryMesh.C.
References List< T >::append(), polyMesh::boundaryMesh(), repatchPolyTopoChanger::changePatches(), repatchPolyTopoChanger::changePatchID(), polyPatch::clone(), Foam::ensightOutput::debug, Foam::endl(), forAll, patchIdentifier::name(), primitiveMesh::nBoundaryFaces(), polyPatch::New(), primitiveMesh::nInternalFaces(), Foam::foamVersion::patch, pFaces, patchIdentifier::physicalType(), Foam::Pout, repatchPolyTopoChanger::repatch(), PtrList< T >::set(), UList< T >::size(), UPtrList< T >::size(), HashTable< T, Key, Hash >::size(), and polyPatch::start().
Foam::label whichPatch | ( | const label | facei | ) | const |
Get index of patch face is in.
Definition at line 1517 of file boundaryMesh.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, boundaryPatch::size(), and boundaryPatch::start().
Foam::label findPatchID | ( | const word & | patchName | ) | const |
Get index of patch by name.
Definition at line 1538 of file boundaryMesh.C.
References forAll, and Foam::name().
Foam::wordList patchNames | ( | ) | const |
Get names of patches.
Definition at line 268 of file boundaryMesh.C.
References forAll, and Foam::PtrListOps::names().
void addPatch | ( | const word & | patchName | ) |
Add to back of patch list.
Definition at line 1552 of file boundaryMesh.C.
References Foam::ensightOutput::debug, Foam::endl(), forAll, mesh, patchIdentifier::name(), patchIdentifier::physicalType(), Foam::Pout, boundaryPatch::size(), and boundaryPatch::start().
void deletePatch | ( | const word & | patchName | ) |
Delete from patch list.
Definition at line 1589 of file boundaryMesh.C.
References Foam::abort(), Foam::ensightOutput::debug, Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, patchIdentifier::name(), patchIdentifier::physicalType(), Foam::Pout, PtrList< T >::set(), boundaryPatch::size(), and boundaryPatch::start().
Change patch.
Definition at line 1643 of file boundaryMesh.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, patchIdentifier::index(), patchIdentifier::name(), boundaryPatch::size(), and boundaryPatch::start().
Recalculate face ordering and patches. Return old to new.
mapping.
Definition at line 1694 of file boundaryMesh.C.
References Foam::abort(), Foam::ensightOutput::debug, Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, mesh, patchIdentifier::name(), patchID, patchIDs(), patchIdentifier::physicalType(), points, Foam::Pout, List< T >::setSize(), UList< T >::size(), boundaryPatch::size(), HashTable< T, Key, Hash >::size(), boundaryPatch::start(), and Foam::Zero.
void setFeatureEdges | ( | const scalar | minCos | ) |
Set featureEdges, edgeToFeature, featureSegments according.
to angle of faces across edge
Definition at line 1301 of file boundaryMesh.C.
References DynamicList< T, SizeMin >::append(), Foam::constant::electromagnetic::e, primitiveMesh::edgeFaces(), primitiveMesh::edges(), stdFoam::end(), forAll, mesh, nPoints, polyMesh::points(), and UList< T >::size().
void setExtraEdges | ( | const label | edgeI | ) |
Set extraEdges to edges 'near' to edgeI. Uses point-edge walk.
to determine 'near'.
Definition at line 1502 of file boundaryMesh.C.
References mesh.
Foam::label getNTris | ( | const label | facei | ) | const |
Simple triangulation of face subset. Returns number of triangles.
needed.
Definition at line 1813 of file boundaryMesh.C.
References f(), mesh, and points.
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 1822 of file boundaryMesh.C.
References List< T >::setSize().
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 1847 of file boundaryMesh.C.
References f(), forAll, mesh, points, and List< T >::setSize().
Foam::label getNPoints | ( | const label | startFacei, |
const label | nFaces | ||
) | const |
Number of points used in face subset.
Definition at line 1888 of file boundaryMesh.C.
References mesh, Foam::foamVersion::patch, and points.
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 1905 of file boundaryMesh.C.
References f(), forAll, mesh, Foam::foamVersion::patch, points, and List< T >::setSize().
Definition at line 1954 of file boundaryMesh.C.
References forAll, mesh, and List< T >::setSize().