Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface. Used for repatching existing meshes. More...
Public Types | |
typedef PrimitivePatch< faceList, const pointField > | rMesh |
Type of the mesh. More... | |
Public Member Functions | |
ClassName ("repatchMesh") | |
Runtime type information. More... | |
repatchMesh () | |
Construct null. More... | |
repatchMesh (const repatchMesh &)=delete | |
Disallow default bitwise copy construction. More... | |
~repatchMesh () | |
Destructor. More... | |
const rMesh & | mesh () const |
Access the boundary mesh. More... | |
const PtrList< repatchPatch > & | patches () const |
Access the patches. More... | |
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... | |
void | read (const polyMesh &) |
Read from repatchMesh of polyMesh. More... | |
void | readTriSurface (const fileName &) |
Read from triSurface. More... | |
labelList | getNearest (const primitiveMesh &pMesh, const vector &searchSpan) const |
Get rMesh index of nearest face for every boundary face in. 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... | |
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 | setFeatureEdges (const scalar minCos) |
Set featureEdges, edgeToFeature, featureSegments according. More... | |
void | markFaces (const labelList &protectedEdges, const label facei, boolList &visited) const |
void | operator= (const repatchMesh &)=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 57 of file repatchMesh.H.
typedef PrimitivePatch<faceList, const pointField> rMesh |
Type of the mesh.
Definition at line 64 of file repatchMesh.H.
repatchMesh | ( | ) |
Construct null.
Definition at line 327 of file repatchMesh.C.
|
delete |
Disallow default bitwise copy construction.
~repatchMesh | ( | ) |
Destructor.
Definition at line 342 of file repatchMesh.C.
ClassName | ( | "repatchMesh" | ) |
Runtime type information.
|
inline |
Access the boundary mesh.
Definition at line 180 of file repatchMesh.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and autoPtr< T >::valid().
Referenced by repatchMesh::addPatch(), repatchMesh::getNearest(), repatchMesh::markFaces(), and repatchMesh::setFeatureEdges().
|
inline |
Access the patches.
Definition at line 192 of file repatchMesh.H.
|
inline |
Label of original face in polyMesh (before patchify(...))
Definition at line 198 of file repatchMesh.H.
|
inline |
Feature points.
Definition at line 204 of file repatchMesh.H.
|
inline |
Feature edges. Indices into featurePoints.
Definition at line 210 of file repatchMesh.H.
|
inline |
From index into featureEdge to index into meshedges,.
Definition at line 216 of file repatchMesh.H.
|
inline |
From edge into featureEdges.
Definition at line 222 of file repatchMesh.H.
|
inline |
Lists of connected featureEdges. Indices into featureEdges.
Definition at line 228 of file repatchMesh.H.
References repatchMesh::addPatch(), repatchMesh::changePatchType(), repatchMesh::deletePatch(), repatchMesh::findPatchID(), repatchMesh::getNearest(), repatchMesh::markFaces(), repatchMesh::operator=(), repatchMesh::read(), repatchMesh::readTriSurface(), repatchMesh::setFeatureEdges(), Foam::type(), and repatchMesh::whichPatch().
void read | ( | const polyMesh & | mesh | ) |
Read from repatchMesh of polyMesh.
Definition at line 348 of file repatchMesh.C.
References polyMesh::boundaryMesh(), 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(), repatchPatch::size(), List< T >::size(), repatchPatch::start(), polyPatch::start(), and Foam::Zero.
Referenced by repatchMesh::featureSegments().
void readTriSurface | ( | const fileName & | fName | ) |
Read from triSurface.
Definition at line 474 of file repatchMesh.C.
References UList< T >::empty(), Foam::endl(), forAll, geometricSurfacePatch::geometricType(), repatchMesh::getNearest(), HashTable< T, Key, Hash >::insert(), PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), geometricSurfacePatch::name(), Foam::name(), triSurface::patches(), patchi, Foam::Pout, labelledTri::region(), List< T >::setSize(), repatchPatch::size(), List< T >::size(), HashTable< T, Key, Hash >::size(), and repatchPatch::start().
Referenced by repatchMesh::featureSegments().
Foam::labelList getNearest | ( | const primitiveMesh & | pMesh, |
const vector & | searchSpan | ||
) | const |
Get rMesh 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 651 of file repatchMesh.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(), repatchMesh::mesh(), boundBox::min(), n, primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), 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 repatchMesh::featureSegments(), and repatchMesh::readTriSurface().
Foam::label whichPatch | ( | const label | facei | ) | const |
Get index of patch face is in.
Definition at line 1106 of file repatchMesh.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, patchi, repatchPatch::size(), and repatchPatch::start().
Referenced by repatchMesh::featureSegments().
Foam::label findPatchID | ( | const word & | patchName | ) | const |
Get index of patch by name.
Definition at line 1127 of file repatchMesh.C.
References forAll, Foam::name(), and patchi.
Referenced by repatchMesh::changePatchType(), repatchMesh::deletePatch(), and repatchMesh::featureSegments().
void addPatch | ( | const word & | patchName | ) |
Add to back of patch list.
Definition at line 1141 of file repatchMesh.C.
References Foam::endl(), forAll, repatchMesh::mesh(), patchIdentifier::name(), patchi, patchIdentifier::physicalType(), Foam::Pout, repatchPatch::size(), and repatchPatch::start().
Referenced by repatchMesh::featureSegments().
void deletePatch | ( | const word & | patchName | ) |
Delete from patch list.
Definition at line 1178 of file repatchMesh.C.
References Foam::abort(), repatchMesh::changePatchType(), Foam::clone(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, repatchMesh::findPatchID(), forAll, patchIdentifier::name(), patchi, patchIdentifier::physicalType(), Foam::Pout, PtrList< T >::set(), repatchPatch::size(), and repatchPatch::start().
Referenced by repatchMesh::featureSegments().
Change patch.
Definition at line 1234 of file repatchMesh.C.
References Foam::abort(), Foam::clone(), Foam::FatalError, FatalErrorInFunction, repatchMesh::findPatchID(), forAll, patchIdentifier::index(), repatchMesh::markFaces(), patchIdentifier::name(), patchi, repatchPatch::size(), and repatchPatch::start().
Referenced by repatchMesh::deletePatch(), and repatchMesh::featureSegments().
void setFeatureEdges | ( | const scalar | minCos | ) |
Set featureEdges, edgeToFeature, featureSegments according.
to angle of faces across edge
Definition at line 905 of file repatchMesh.C.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), PrimitivePatch< FaceList, PointField >::edgeFaces(), PrimitivePatch< FaceList, PointField >::edges(), edge::end(), PrimitivePatch< FaceList, PointField >::faceNormals(), forAll, repatchMesh::mesh(), nPoints, PrimitivePatch< FaceList, PointField >::points(), List< T >::setSize(), List< T >::size(), and edge::start().
Referenced by repatchMesh::featureSegments().
Definition at line 1285 of file repatchMesh.C.
References forAll, repatchMesh::mesh(), and List< T >::setSize().
Referenced by repatchMesh::changePatchType(), and repatchMesh::featureSegments().
|
delete |
Disallow default bitwise assignment.
Referenced by repatchMesh::featureSegments().