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 () | |
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 61 of file boundaryMesh.H.
boundaryMesh | ( | ) |
Construct null.
Definition at line 439 of file boundaryMesh.C.
~boundaryMesh | ( | ) |
Destructor.
Definition at line 455 of file boundaryMesh.C.
ClassName | ( | "boundaryMesh" | ) |
Runtime type information.
void clearOut | ( | ) |
Definition at line 461 of file boundaryMesh.C.
|
inline |
Definition at line 205 of file boundaryMesh.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
Referenced by fvPatch::Cf(), fvPatch::Cn(), processorFaPatch::comm(), fvPatch::deltaCoeffs(), faPatch::deltaCoeffs(), faPatch::edgeCentres(), faPatch::edgeFaceCentres(), faPatch::edgeLengths(), faPatch::magEdgeLengths(), fvPatch::magSf(), processorFaPatch::makeNonGlobalPatchPoints(), faPatch::ngbPolyPatchFaceNormals(), faPatch::ngbPolyPatchFaces(), cyclicACMIPolyPatch::resetAMI(), cyclicAMIPolyPatch::resetAMI(), fvPatch::Sf(), faPatch::start(), cyclicAMIPolyPatch::surfPtr(), fvPatch::weights(), and faPatch::weights().
|
inline |
Definition at line 216 of file boundaryMesh.H.
|
inline |
Label of original face in polyMesh (before patchify(...))
Definition at line 223 of file boundaryMesh.H.
|
inline |
Feature points.
Definition at line 229 of file boundaryMesh.H.
|
inline |
Feature edges. Indices into featurePoints.
Definition at line 235 of file boundaryMesh.H.
|
inline |
From index into featureEdge to index into meshedges,.
Definition at line 241 of file boundaryMesh.H.
|
inline |
From edge into featureEdges.
Definition at line 247 of file boundaryMesh.H.
|
inline |
Lists of connected featureEdges. Indices into featureEdges.
Definition at line 253 of file boundaryMesh.H.
|
inline |
Indices into edges of additional edges.
Definition at line 259 of file boundaryMesh.H.
void read | ( | const polyMesh & | mesh | ) |
Read from boundaryMesh of polyMesh.
Definition at line 474 of file boundaryMesh.C.
References polyMesh::boundaryMesh(), Foam::expressions::patchExpr::debug, Foam::endl(), f(), forAll, mesh, patchIdentifier::name(), primitiveMesh::nBoundaryFaces(), patchIdentifier::physicalType(), PrimitivePatch< Face, FaceList, PointField, PointType >::points(), polyMesh::points(), Foam::Pout, PtrList< T >::set(), boundaryPatch::size(), boundaryPatch::start(), polyPatch::start(), and Foam::Zero.
void readTriSurface | ( | const fileName & | fName | ) |
Read from triSurface.
Definition at line 604 of file boundaryMesh.C.
References List< T >::clear(), Foam::endl(), forAll, geometricSurfacePatch::geometricType(), PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), OSstream::name(), geometricSurfacePatch::name(), Foam::name(), triSurface::patches(), Foam::Pout, labelledTri::region(), List< T >::set(), List< T >::setSize(), boundaryPatch::size(), and boundaryPatch::start().
void writeTriSurface | ( | const fileName & | fName | ) | const |
Write to file.
Definition at line 773 of file boundaryMesh.C.
References forAll, mesh, patchIdentifier::name(), patchIdentifier::physicalType(), points, and boundaryPatch::start().
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 863 of file boundaryMesh.C.
References DynamicList< T, SizeMin >::append(), Foam::fieldTypes::area, boundBox::avgDim(), Foam::expressions::patchExpr::debug, Foam::constant::electromagnetic::e, Foam::endl(), f(), primitiveMesh::faceAreas(), primitiveMesh::faceCentres(), primitiveMesh::faces(), forAll, PointIndexHit< Point >::hit(), PointIndexHit< Point >::hitPoint(), PointIndexHit< Point >::index(), Foam::mag(), Foam::magSqr(), boundBox::max(), Foam::max(), mesh, boundBox::min(), n, primitiveMesh::nBoundaryFaces(), primitiveMesh::nInternalFaces(), points, primitiveMesh::points(), Foam::Pout, DynamicList< T, SizeMin >::shrink(), Foam::sign(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
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 1118 of file boundaryMesh.C.
References List< T >::append(), polyMesh::boundaryMesh(), repatchPolyTopoChanger::changePatches(), repatchPolyTopoChanger::changePatchID(), polyPatch::clone(), Foam::expressions::patchExpr::debug, Foam::endl(), forAll, patchIdentifier::name(), primitiveMesh::nBoundaryFaces(), polyPatch::New(), primitiveMesh::nInternalFaces(), Foam::foamVersion::patch, pFaces, patchIdentifier::physicalType(), Foam::Pout, repatchPolyTopoChanger::repatch(), and polyPatch::start().
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, 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, and Foam::name().
Foam::wordList patchNames | ( | ) | const |
void addPatch | ( | const word & | patchName | ) |
Add to back of patch list.
Definition at line 1570 of file boundaryMesh.C.
References Foam::expressions::patchExpr::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 1607 of file boundaryMesh.C.
References Foam::abort(), Foam::expressions::patchExpr::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 1663 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 1714 of file boundaryMesh.C.
References Foam::abort(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, mesh, patchIdentifier::name(), patchID, patchIdentifier::physicalType(), points, Foam::Pout, List< T >::setSize(), 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 1319 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 Foam::start.
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 mesh.
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(), 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 1841 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 1866 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 1907 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 1922 of file boundaryMesh.C.
References f(), forAll, mesh, Foam::foamVersion::patch, points, and List< T >::setSize().
Definition at line 1969 of file boundaryMesh.C.
References forAll, mesh, and List< T >::setSize().