Public Member Functions | |
cutRegion (const boundBox &) | |
Construct from boundBox. More... | |
~cutRegion () | |
const DynList< point, 64 > & | points () const |
return the vertices of the feasible region More... | |
void | planeCut (const plane &plane) |
cut the region woth the plane More... | |
void | createPolyMeshFromRegion (polyMeshGen &) const |
export the feasible region as polyMeshGen More... | |
Private Types | |
enum | vTypes { NONE = 0, KEEP = 1, INPLANE = 2, USED = 4 } |
Private Member Functions | |
bool | findNewVertices (const plane &plane) |
void | findNewEdges () |
void | findNewFaces () |
void | tieBreak (const DynList< label, 8 > &f) |
void | removeCoincidentVertices () |
remove coincident vertices to improve tie breaking More... | |
void | createInitialConfiguration (const boundBox &) |
Private Attributes | |
DynList< point, 64 > * | pointsPtr_ |
DynList< edge, 128 > * | edgesPtr_ |
DynList< DynList< label, 8 >, 64 > * | facesPtr_ |
DynList< point, 64 > * | cPtsPtr_ |
helper data More... | |
DynList< edge, 128 > * | cEdgesPtr_ |
DynList< DynList< label, 8 >, 64 > * | cFacesPtr_ |
DynList< label, 64 > | newVertexLabel_ |
DynList< scalar, 64 > | vertexDistance_ |
DynList< direction, 64 > | vertexTypes_ |
DynList< label, 128 > | newEdgeLabel_ |
label | origNumVertices_ |
scalar | tol_ |
bool | valid_ |
Definition at line 60 of file meshUntangler.H.
|
private |
Enumerator | |
---|---|
NONE | |
KEEP | |
INPLANE | |
USED |
Definition at line 96 of file meshUntangler.H.
Construct from boundBox.
Definition at line 164 of file meshUntanglerCutRegion.C.
References meshUntangler::cutRegion::createInitialConfiguration().
~cutRegion | ( | ) |
Definition at line 183 of file meshUntanglerCutRegion.C.
References Foam::deleteDemandDrivenData().
|
private |
Definition at line 50 of file meshUntanglerCutRegionPoints.C.
References Foam::deleteDemandDrivenData(), Foam::endl(), forAll, Foam::Info, n, plane::normal(), p, points, and plane::refPoint().
|
private |
start edge vertex is not visible, but the other one is
end edge vertex is not visible, but the other one is
Definition at line 40 of file meshUntanglerCutRegionEdges.C.
References DynList< T, staticSize >::append(), meshUntangler::cutRegion::cEdgesPtr_, meshUntangler::cutRegion::cPtsPtr_, Foam::e, meshUntangler::cutRegion::edgesPtr_, Foam::endl(), forAll, Foam::Info, meshUntangler::cutRegion::KEEP, meshUntangler::cutRegion::newEdgeLabel_, meshUntangler::cutRegion::newVertexLabel_, Foam::nl, meshUntangler::cutRegion::pointsPtr_, DynList< T, staticSize >::setSize(), DynList< T, staticSize >::size(), meshUntangler::cutRegion::vertexDistance_, and meshUntangler::cutRegion::vertexTypes_.
Referenced by meshUntangler::cutRegion::tieBreak().
|
private |
find edges which form the faceInPlane
Definition at line 44 of file meshUntanglerCutRegionFaces.C.
References Foam::abort(), DynList< T, staticSize >::append(), List::append(), meshUntangler::cutRegion::cEdgesPtr_, meshUntangler::cutRegion::cFacesPtr_, meshUntangler::cutRegion::cPtsPtr_, Foam::e, meshUntangler::cutRegion::edgesPtr_, Foam::endl(), f(), meshUntangler::cutRegion::facesPtr_, Foam::FatalError, FatalErrorIn, forAll, Foam::Info, meshUntangler::cutRegion::newEdgeLabel_, DynList< T, staticSize >::setSize(), List::size(), DynList< T, staticSize >::size(), meshUntangler::cutRegion::tieBreak(), meshUntangler::cutRegion::valid_, and meshUntangler::cutRegion::vertexTypes_.
tie break to resolve problems due to truncation errors
delete pointer data
there are more than two regions which need to be cut off
there should be only one cut-off region there this region will be determined by the most negative distance from plane
create new points
find new edges and continue creating faces
Definition at line 41 of file meshUntanglerCutRegionTieBreak.C.
References Foam::abort(), DynList< T, staticSize >::append(), meshUntangler::cutRegion::cEdgesPtr_, meshUntangler::cutRegion::cFacesPtr_, meshUntangler::cutRegion::cPtsPtr_, Foam::deleteDemandDrivenData(), meshUntangler::cutRegion::edgesPtr_, Foam::endl(), f(), Foam::FatalError, FatalErrorIn, meshUntangler::cutRegion::findNewEdges(), forAll, found, fv(), Foam::Info, meshUntangler::cutRegion::INPLANE, meshUntangler::cutRegion::KEEP, meshUntangler::cutRegion::newVertexLabel_, meshUntangler::cutRegion::origNumVertices_, meshUntangler::cutRegion::points(), meshUntangler::cutRegion::pointsPtr_, DynList< T, staticSize >::setSize(), DynList< T, staticSize >::size(), sortEdgesIntoChains::sortedChains(), meshUntangler::cutRegion::tol_, meshUntangler::cutRegion::valid_, meshUntangler::cutRegion::vertexDistance_, and meshUntangler::cutRegion::vertexTypes_.
Referenced by meshUntangler::cutRegion::findNewFaces().
|
private |
remove coincident vertices to improve tie breaking
remove edges which contain the same vertex
renumber faces
Definition at line 115 of file meshUntanglerCutRegionPoints.C.
References DynList< T, staticSize >::append(), meshUntangler::cutRegion::cEdgesPtr_, meshUntangler::cutRegion::cFacesPtr_, Foam::deleteDemandDrivenData(), Foam::e, meshUntangler::cutRegion::edgesPtr_, Foam::endl(), f(), meshUntangler::cutRegion::facesPtr_, forAll, found, Foam::Info, Foam::mag(), meshUntangler::cutRegion::newEdgeLabel_, meshUntangler::cutRegion::points(), meshUntangler::cutRegion::pointsPtr_, DynList< T, staticSize >::setSize(), DynList< T, staticSize >::size(), and meshUntangler::cutRegion::tol_.
|
private |
set vertices
set edges
edges in x direction
edges in y direction
edges in z direction
set faces
faces in x direction
faces in y direction
faces in z direction
Definition at line 50 of file meshUntanglerCutRegion.C.
References DynList< T, staticSize >::append(), Foam::constant::universal::c, Foam::endl(), f(), Foam::Info, boundBox::max(), boundBox::min(), List::setSize(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Referenced by meshUntangler::cutRegion::cutRegion().
return the vertices of the feasible region
Definition at line 115 of file meshUntangler.H.
References meshUntangler::cutRegion::pointsPtr_.
Referenced by meshUntangler::optimizeNodePosition(), meshUntangler::cutRegion::removeCoincidentVertices(), and meshUntangler::cutRegion::tieBreak().
void planeCut | ( | const plane & | plane | ) |
cut the region woth the plane
Definition at line 195 of file meshUntanglerCutRegion.C.
References Foam::abort(), Time::controlDictName, Foam::deleteDemandDrivenData(), Foam::FatalError, and FatalErrorIn.
Referenced by meshUntangler::optimizeNodePosition().
void createPolyMeshFromRegion | ( | polyMeshGen & | mesh | ) | const |
export the feasible region as polyMeshGen
Definition at line 249 of file meshUntanglerCutRegion.C.
References Foam::abort(), DynList< T, staticSize >::append(), cells, polyMeshGenModifier::cellsAccess(), Foam::endl(), f(), polyMeshGenModifier::facesAccess(), Foam::FatalError, FatalErrorIn, forAll, Foam::Info, mesh, points, polyMeshGenModifier::pointsAccess(), faceListPMG::setSize(), sf(), and sortEdgesIntoChains::sortedChains().
Definition at line 63 of file meshUntangler.H.
Referenced by meshUntangler::cutRegion::findNewEdges(), meshUntangler::cutRegion::points(), meshUntangler::cutRegion::removeCoincidentVertices(), and meshUntangler::cutRegion::tieBreak().
Definition at line 64 of file meshUntangler.H.
Referenced by meshUntangler::cutRegion::findNewEdges(), meshUntangler::cutRegion::findNewFaces(), meshUntangler::cutRegion::removeCoincidentVertices(), and meshUntangler::cutRegion::tieBreak().
Definition at line 65 of file meshUntangler.H.
Referenced by meshUntangler::cutRegion::findNewFaces(), and meshUntangler::cutRegion::removeCoincidentVertices().
helper data
Definition at line 68 of file meshUntangler.H.
Referenced by meshUntangler::cutRegion::findNewEdges(), meshUntangler::cutRegion::findNewFaces(), and meshUntangler::cutRegion::tieBreak().
Definition at line 69 of file meshUntangler.H.
Referenced by meshUntangler::cutRegion::findNewEdges(), meshUntangler::cutRegion::findNewFaces(), meshUntangler::cutRegion::removeCoincidentVertices(), and meshUntangler::cutRegion::tieBreak().
Definition at line 70 of file meshUntangler.H.
Referenced by meshUntangler::cutRegion::findNewFaces(), meshUntangler::cutRegion::removeCoincidentVertices(), and meshUntangler::cutRegion::tieBreak().
Definition at line 72 of file meshUntangler.H.
Referenced by meshUntangler::cutRegion::findNewEdges(), and meshUntangler::cutRegion::tieBreak().
|
private |
Definition at line 73 of file meshUntangler.H.
Referenced by meshUntangler::cutRegion::findNewEdges(), and meshUntangler::cutRegion::tieBreak().
Definition at line 74 of file meshUntangler.H.
Referenced by meshUntangler::cutRegion::findNewEdges(), meshUntangler::cutRegion::findNewFaces(), and meshUntangler::cutRegion::tieBreak().
Definition at line 75 of file meshUntangler.H.
Referenced by meshUntangler::cutRegion::findNewEdges(), meshUntangler::cutRegion::findNewFaces(), and meshUntangler::cutRegion::removeCoincidentVertices().
|
private |
Definition at line 76 of file meshUntangler.H.
Referenced by meshUntangler::cutRegion::tieBreak().
|
private |
Definition at line 78 of file meshUntangler.H.
Referenced by meshUntangler::cutRegion::removeCoincidentVertices(), and meshUntangler::cutRegion::tieBreak().
|
private |
Definition at line 79 of file meshUntangler.H.
Referenced by meshUntangler::cutRegion::findNewFaces(), and meshUntangler::cutRegion::tieBreak().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.