Public Member Functions | |
boundaryLayerOptimisation (polyMeshGen &mesh) | |
construct from polyMeshGen More... | |
boundaryLayerOptimisation (polyMeshGen &mesh, const meshSurfaceEngine &) | |
Construct from polyMeshGen and meshSurfaceEngine. More... | |
~boundaryLayerOptimisation () | |
void | setMaxNumIterations (const label maxNumIterations) |
set the maximum number of iterations More... | |
void | setNumNormalsSmoothingIterations (const label nSmoothNormal) |
set the number of normal smoothing iterations (default is 5) More... | |
void | recalculateNormals (const bool) |
shall normals be re-calculated (default true) More... | |
void | setRelativeThicknessTolerance (const scalar) |
set the relative thickness tolerance (default 0.15) More... | |
void | setFeatureSizeFactor (const scalar) |
set the feature size factor (default 0.3) More... | |
const edgeLongList & | hairEdges () const |
return hair edges More... | |
const VRWGraph & | hairEdgesAtBndPoint () const |
hair edges attached to a boundary point More... | |
const boolList & | isBaseFace () const |
const boolList & | isExitFace () const |
boundary faces where the layers exit at the boundary More... | |
void | optimiseLayer () |
performs boundary layer optimisation More... | |
Static Public Member Functions | |
static void | readSettings (const dictionary &, boundaryLayerOptimisation &) |
read the settings from dictionary More... | |
Private Types | |
enum | hairEdgeTypes_ { NONE = 0, ATEDGE = 1, ATCORNER = 2, BOUNDARY = 4, INSIDE = 8, FEATUREEDGE = 16 } |
typedef std::map< label, std::pair< point, scalar > > | patchNormalType |
typedef std::map< label, patchNormalType > | pointNormalsType |
Private Member Functions | |
const meshSurfaceEngine & | meshSurface () const |
access to mesh surface More... | |
const meshSurfacePartitioner & | surfacePartitioner () const |
access to meshSurfacePartitioner More... | |
void | calculateNormalVectors (const direction eType, pointNormalsType &) const |
void | calculateNormalVectorsSmother (const direction eType, pointNormalsType &) |
calculate normal vectors More... | |
void | calculateHairEdges () |
calculate hairEdges More... | |
void | calculateHairVectorsAtTheBoundary (vectorField &) |
calculate hair vectors at the boundary More... | |
void | optimiseHairNormalsAtTheBoundary () |
void | optimiseHairNormalsInside () |
optimise hair normals inside the mesh More... | |
void | hairEdgesAtBndFace (const label cellI, const label baseFaceI, DynList< edge > &) const |
calculate hair edges at a boundary faces More... | |
scalar | calculateThickness (const label heI, const label heJ) const |
scalar | calculateThicknessOverCell (const label heI, const label cellI, const label baseFaceI) const |
void | optimiseThicknessVariation (const direction edgeType=(INSIDE|BOUNDARY)) |
optimise thickness variation More... | |
bool | optimiseLayersAtExittingFaces () |
optimise layers at exitting faces due to requests from the inside More... | |
void | writeHairEdges (const fileName &fName, const direction eType, const vectorField &vecs) const |
write vector correcposing to hair edges. Helper for debugging More... | |
void | writeHairEdges (const fileName &fName, const direction eType) const |
write selected hair edges into a file More... | |
boundaryLayerOptimisation (const boundaryLayerOptimisation &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const boundaryLayerOptimisation &) |
Disallow default bitwise assignment. More... | |
Static Private Member Functions | |
static void | writeVTK (const fileName &fName, const pointField &origin, const vectorField &vecs) |
write vectors into a VTK file. Helper for debugging More... | |
Private Attributes | |
polyMeshGen & | mesh_ |
reference to polyMeshGen More... | |
const meshSurfaceEngine * | meshSurfacePtr_ |
const pointer to meshSurfaceEngine More... | |
const bool | deleteMeshSurface_ |
const meshSurfacePartitioner * | partitionerPtr_ |
mesh surface partitioner More... | |
edgeLongList | hairEdges_ |
boundary layer hairs More... | |
VRWGraph | hairEdgesAtBndPoint_ |
hair edges attached to a boundary point More... | |
VRWGraph | hairEdgesNearHairEdge_ |
hair edge to other hair edges More... | |
boolList | isBndLayerBase_ |
is boundary face a base for a prism in the bnd layer More... | |
boolList | isExitFace_ |
is boundary face part of a layer where a layer exits More... | |
List< direction > | hairEdgeType_ |
classification of hair edges More... | |
boolList | thinnedHairEdge_ |
stores information where boundary hairs are made thinner More... | |
label | maxNumIterations_ |
maximum number of iterations More... | |
label | nSmoothNormals_ |
number of iterations for smoothing of hairs More... | |
scalar | relThicknessTol_ |
relative tolerance for thickness variation More... | |
scalar | featureSizeFactor_ |
feature size factor used for curvature-based optimisation More... | |
bool | reCalculateNormals_ |
activate calculation of normals More... | |
Definition at line 62 of file boundaryLayerOptimisation.H.
|
private |
calculate normal vector for all patches at a point points can be filtered by a type of hair edges
Definition at line 120 of file boundaryLayerOptimisation.H.
|
private |
Definition at line 121 of file boundaryLayerOptimisation.H.
|
private |
Enumerator | |
---|---|
NONE | |
ATEDGE | |
ATCORNER | |
BOUNDARY | |
INSIDE | |
FEATUREEDGE |
Definition at line 210 of file boundaryLayerOptimisation.H.
|
private |
Disallow default bitwise copy construct.
boundaryLayerOptimisation | ( | polyMeshGen & | mesh | ) |
construct from polyMeshGen
Definition at line 40 of file boundaryLayerOptimisation.C.
References boundaryLayerOptimisation::calculateHairEdges().
boundaryLayerOptimisation | ( | polyMeshGen & | mesh, |
const meshSurfaceEngine & | mse | ||
) |
Construct from polyMeshGen and meshSurfaceEngine.
Definition at line 63 of file boundaryLayerOptimisation.C.
Definition at line 90 of file boundaryLayerOptimisation.C.
References Foam::deleteDemandDrivenData(), boundaryLayerOptimisation::deleteMeshSurface_, boundaryLayerOptimisation::meshSurfacePtr_, and boundaryLayerOptimisation::partitionerPtr_.
|
private |
access to mesh surface
Definition at line 187 of file boundaryLayerOptimisationFunctions.C.
References Foam::abort(), Foam::FatalError, FatalErrorIn, boundaryLayerOptimisation::mesh_, and boundaryLayerOptimisation::meshSurfacePtr_.
Referenced by boundaryLayerOptimisation::calculateHairEdges(), boundaryLayerOptimisation::optimiseHairNormalsAtTheBoundary(), boundaryLayerOptimisation::optimiseHairNormalsInside(), boundaryLayerOptimisation::optimiseLayer(), and boundaryLayerOptimisation::surfacePartitioner().
|
private |
access to meshSurfacePartitioner
Definition at line 207 of file boundaryLayerOptimisationFunctions.C.
References Foam::abort(), Foam::FatalError, FatalErrorIn, boundaryLayerOptimisation::meshSurface(), and boundaryLayerOptimisation::partitionerPtr_.
Referenced by boundaryLayerOptimisation::calculateHairEdges().
|
private |
calculate point normals with respect to all patches at a point
create an entry in a map
sum normals of faces attached to a point
gather information about face normals on other processors
finally, calculate normal vectors
Definition at line 55 of file boundaryLayerOptimisationNormals.C.
References meshSurfaceEngine::boundaryFacePatches(), meshSurfaceEngine::bp(), meshSurfaceEngine::bpAtProcs(), meshSurfaceEngine::bpNeiProcs(), labelledPointScalar::coordinates(), Foam::help::exchangeMap(), meshSurfaceEngine::faceNormals(), forAll, forAllConstIter(), forAllIter, forAllRow, meshSurfaceEngine::globalToLocalBndPointAddressing(), refLabelledPointScalar::lps(), Foam::mag(), UPstream::myProcNo(), refLabelledPointScalar::objectLabel(), UPstream::parRun(), meshSurfaceEngine::pointFaces(), labelledPointScalar::pointLabel(), and labelledPointScalar::scalarValue().
Referenced by boundaryLayerOptimisation::optimiseHairNormalsInside().
|
private |
calculate normal vectors
create an entry in a map
find patches at this point
create points
create points originating from triangles
create a new tetrahedron
create partTeMeshSimplex
activate volume optimizer
Definition at line 196 of file boundaryLayerOptimisationNormals.C.
References DynList< T, staticSize >::append(), DynList< T, staticSize >::appendIfNotIn(), meshSurfaceEngine::bp(), partTetMeshSimplex::centrePoint(), Foam::endl(), forAll, forAllRow, he, Foam::Info, Foam::mag(), partTriMesh::meshSurfacePointLabelInTriMesh(), n, volumeOptimizer::optimizeNodePosition(), partTriMesh::pointLabelInMeshSurface(), points, partTriMesh::points(), meshSurfaceEngine::points(), partTriMesh::pointTriangles(), labelledTri::region(), DynList< T, staticSize >::size(), meshSurfacePartitioner::surfaceEngine(), and partTriMesh::triangles().
|
private |
calculate hairEdges
detect layers in the mesh
mark boundary faces which are base face for the boundary layer
check if a face is an exiting face for a bnd layer
avoid edges at inter-processor boundaries
both faces have to be part of the same cell
check if the feature edge is attachd to exittin faces
classify hair edges as they require different tretment in the smoothing procedure
check if it is a boundary edge
calculate which other hair edges influence a hair edges and store it in a graph
find mesh faces comprising of the current hair edge
face must be a quad
check if the current face comprises of the hair edge
check if the opposite edge is also a hair edge
Definition at line 226 of file boundaryLayerOptimisationFunctions.C.
References polyMeshGenFaces::addFaceSubset(), polyMeshGenFaces::addFaceToSubset(), polyMeshGenPoints::addPointSubset(), polyMeshGenPoints::addPointToSubset(), DynList< T, staticSize >::append(), VRWGraph::appendIfNotIn(), boundaryLayerOptimisation::ATCORNER, boundaryLayerOptimisation::ATEDGE, polyMeshGenFaces::boundaries(), boundaryLayerOptimisation::BOUNDARY, meshSurfaceEngine::boundaryFaces(), meshSurfaceEngine::boundaryPointEdges(), meshSurfaceEngine::bp(), Foam::constant::universal::c, cells, polyMeshGenCells::cells(), meshSurfacePartitioner::corners(), Foam::e, meshSurfaceEngine::edgeFaces(), meshSurfacePartitioner::edgePoints(), meshSurfaceEngine::edges(), f(), f1, detectBoundaryLayers::faceInLayer(), meshSurfaceEngine::faceOwners(), polyMeshGenFaces::faces(), boundaryLayerOptimisation::FEATUREEDGE, meshSurfacePartitioner::featureEdges(), forAll, forAllRow, HashTable::found(), detectBoundaryLayers::hairEdges(), boundaryLayerOptimisation::hairEdges_, detectBoundaryLayers::hairEdgesAtBndPoint(), boundaryLayerOptimisation::hairEdgesAtBndPoint_, boundaryLayerOptimisation::hairEdgesNearHairEdge_, boundaryLayerOptimisation::hairEdgeType_, boundaryLayerOptimisation::INSIDE, boundaryLayerOptimisation::isBndLayerBase_, boundaryLayerOptimisation::isExitFace_, boundaryLayerOptimisation::mesh_, boundaryLayerOptimisation::meshSurface(), boundaryLayerOptimisation::NONE, VRWGraph::setRow(), List::setSize(), VRWGraph::setSize(), List::size(), LongList< T, Offset >::size(), VRWGraph::size(), UList::size(), VRWGraph::sizeOfRow(), boundaryLayerOptimisation::surfacePartitioner(), boundaryLayerOptimisation::thinnedHairEdge_, and polyMeshGen::write().
Referenced by boundaryLayerOptimisation::boundaryLayerOptimisation().
|
private |
calculate hair vectors at the boundary
set the size of hairVecs
do not modify hair vectors at feature edges
this is a case of O-layer at a corner or feature edge
find the surface edges corresponding to the hair edge
find the vector at the same angle from both feature edges
collect data at inter-processor boundaries
filte out edges which are not relevant
calculate new normal vectors
Definition at line 323 of file boundaryLayerOptimisationNormals.C.
References Foam::abort(), LongList< T, Offset >::append(), meshSurfaceEngine::boundaryFaces(), meshSurfaceEngine::boundaryPointEdges(), meshSurfaceEngine::bp(), labelledPoint::coordinates(), Foam::e, meshSurfaceEngine::edgeFaces(), meshSurfaceEngine::edges(), Foam::endl(), Foam::help::exchangeMap(), face::faceEdge(), Foam::FatalError, FatalErrorIn, forAll, forAllConstIter(), forAllRow, found, meshSurfaceEngine::globalToLocalBndPointAddressing(), he, Foam::Info, Foam::mag(), UPstream::myProcNo(), face::normal(), UPstream::parRun(), labelledPoint::pointLabel(), points, Foam::pos(), face::prevLabel(), edge::vec(), face::which(), and Vector< scalar >::zero.
Referenced by boundaryLayerOptimisation::optimiseHairNormalsAtTheBoundary().
|
private |
optimise hair normals at the boundary these are the regions where boundary layers exit the domain
calculate direction of hair vector based on the surface normal
calculate hair vectors they point in the normal direction to the surface
calulate new normal vectors
keep existing hair vectors
smooth the variation of normals to reduce the twisting of faces
hair vectors at feature edges must not be modified
find the best fitting vector at the surface of the mesh
check if the neighbour hair edge shares a boundary face with the current hair edge
collect data at inter-processor boundaries
filte out edges which are not relevant
calculate new normal vectors
transfer new hair vectors to the hairVecs list
move vertices to the new locations
Definition at line 552 of file boundaryLayerOptimisationNormals.C.
References Foam::abort(), polyMeshGenCells::addressingData(), LongList< T, Offset >::append(), DynList< T, staticSize >::append(), boundaryLayerOptimisation::ATCORNER, boundaryLayerOptimisation::ATEDGE, boundaryLayerOptimisation::BOUNDARY, meshSurfaceEngine::boundaryFaces(), meshSurfaceEngine::bp(), boundaryLayerOptimisation::calculateHairVectorsAtTheBoundary(), labelledPoint::coordinates(), Foam::e, polyMeshGenAddressing::edgeAtProcs(), polyMeshGenAddressing::edgeNeiProcs(), polyMeshGenAddressing::edges(), Foam::endl(), Foam::help::exchangeMap(), face::faceEdge(), Foam::FatalError, FatalErrorIn, boundaryLayerOptimisation::FEATUREEDGE, forAll, forAllConstIter(), forAllRow, found, polyMeshGenAddressing::globalEdgeLabel(), meshSurfaceEngine::globalToLocalBndPointAddressing(), polyMeshGenAddressing::globalToLocalEdgeAddressing(), boundaryLayerOptimisation::hairEdges_, boundaryLayerOptimisation::hairEdgesAtBndPoint_, boundaryLayerOptimisation::hairEdgesNearHairEdge_, boundaryLayerOptimisation::hairEdgeType_, he, Foam::Info, Foam::mag(), boundaryLayerOptimisation::mesh_, boundaryLayerOptimisation::meshSurface(), UPstream::myProcNo(), boundaryLayerOptimisation::nSmoothNormals_, UPstream::parRun(), pFaces, polyMeshGenAddressing::pointEdges(), meshSurfaceEngine::pointFaces(), labelledPoint::pointLabel(), points, polyMeshGenPoints::points(), boundaryLayerOptimisation::reCalculateNormals_, Foam::help::scalarToText(), LongList< T, Offset >::size(), boundaryLayerOptimisation::writeHairEdges(), and Vector< scalar >::zero.
Referenced by boundaryLayerOptimisation::optimiseLayer().
|
private |
optimise hair normals inside the mesh
calculate direction of hair vector based on the surface normal
they point in the normal direction to the surface
calculate point normals with respect to all patches at a point
initialise boundary hair vectors. They influence internal hairs connected to them
initialise boundary hair vectors.
smooth the variation of normals to reduce twisting of faces
hair vectors at feature edges must not be modified
edges at inter-processor boundaries contribute at two sides are given weight 0.5
find the best fitting vector at the surface of the mesh
edges at inter-processor boundaries contribute at two sides are given weight 0.5
copy the existing hair vector
collect data at inter-processor boundaries
handle boundary points, only
calculate new normal vectors
transfer new hair vectors to the hairVecs list
move vertices to the new locations
Definition at line 825 of file boundaryLayerOptimisationNormals.C.
References Foam::abort(), polyMeshGenCells::addressingData(), LongList< T, Offset >::append(), boundaryLayerOptimisation::ATCORNER, boundaryLayerOptimisation::ATEDGE, boundaryLayerOptimisation::BOUNDARY, meshSurfaceEngine::boundaryPointEdges(), meshSurfaceEngine::bp(), boundaryLayerOptimisation::calculateNormalVectors(), labelledPoint::coordinates(), Foam::e, polyMeshGenAddressing::edgeAtProcs(), polyMeshGenAddressing::edgeNeiProcs(), meshSurfaceEngine::edges(), polyMeshGenAddressing::edges(), Foam::endl(), Foam::help::exchangeMap(), Foam::FatalError, FatalErrorIn, forAll, forAllConstIter(), forAllRow, found, polyMeshGenAddressing::globalEdgeLabel(), meshSurfaceEngine::globalToLocalBndPointAddressing(), polyMeshGenAddressing::globalToLocalEdgeAddressing(), boundaryLayerOptimisation::hairEdges_, boundaryLayerOptimisation::hairEdgesAtBndPoint_, boundaryLayerOptimisation::hairEdgesNearHairEdge_, boundaryLayerOptimisation::hairEdgeType_, he, Foam::Info, boundaryLayerOptimisation::INSIDE, Foam::mag(), boundaryLayerOptimisation::mesh_, boundaryLayerOptimisation::meshSurface(), UPstream::myProcNo(), n, boundaryLayerOptimisation::nSmoothNormals_, UPstream::parRun(), polyMeshGenAddressing::pointEdges(), labelledPoint::pointLabel(), points, polyMeshGenPoints::points(), boundaryLayerOptimisation::reCalculateNormals_, Foam::help::scalarToText(), LongList< T, Offset >::size(), boundaryLayerOptimisation::writeHairEdges(), and Vector< scalar >::zero.
Referenced by boundaryLayerOptimisation::optimiseLayer().
|
private |
calculate hair edges at a boundary faces
check cell topology
find the face attached to the edge after the current point
find the face attached to the edge before the current point
there exists a common edge which shall be used as a hair
Definition at line 49 of file boundaryLayerOptimisationThickness.C.
References DynList< T, staticSize >::append(), Foam::constant::universal::c, DynList< T, staticSize >::containsAtPosition(), Foam::e, f(), forAll, Foam::pos(), DynList< T, staticSize >::setSize(), List::size(), and DynList< T, staticSize >::size().
calculate the thickness of the layer for edge heI respective to the height of edge heJ
references to hair edges
distance vector between the surface points of hair edges
calculate layer thickness
calculate layer height at the current point
calculate the height of the layer at the neighbour point
check if the current thickness is Ok for the local curvature
max allowed thickness and layer height due to curvature
max allowed neighbour hair thickness and layer height due to curvature
check the height variation
Definition at line 138 of file boundaryLayerOptimisationThickness.C.
References Foam::acos(), Foam::constant::atomic::alpha, beta(), he, Foam::mag(), Foam::max(), Foam::min(), Foam::help::nearestPointOnTheEdge(), points, Foam::sign(), and Foam::sin().
|
private |
calculate thickness of the layer by checking intersections between the hair edge and the quad faces extruded from nighbouring faces
the base face must not contain the hair edge this is the case at exitting layers
Definition at line 236 of file boundaryLayerOptimisationThickness.C.
References Foam::constant::universal::c, f(), face::faceEdge(), forAll, he, Foam::help::lineFaceIntersection(), Foam::mag(), Foam::min(), points, and Foam::help::shareAnEdge().
optimise thickness variation
reduce thickness of the layer such that the variation of layer thickness It is an iterative process where the layer is thinned in the regions where the tangent is greater than the tolerance value or the curvature permits thicker boundary layers.
check if the hair edge intersects some other face in the cells attached to the hair edge
check if there exist any self-intersections
check thickness variation over all hair edges
make the hair edge shorter
collect data at inter-processor boundaries
reduce the information over all processors
move boundary vertices to the new positions
mark edges which may be changed
Definition at line 287 of file boundaryLayerOptimisationThickness.C.
References LongList< T, Offset >::append(), DynList< T, staticSize >::append(), meshSurfaceEngine::boundaryFaces(), meshSurfaceEngine::bp(), Foam::e, Foam::help::exchangeMap(), meshSurfaceEngine::faceOwners(), forAll, forAllConstIter(), forAllRow, found, meshSurfaceEngine::globalToLocalBndPointAddressing(), he, Foam::mag(), Foam::min(), UPstream::myProcNo(), n, UPstream::parRun(), pFaces, meshSurfaceEngine::pointFaces(), points, Foam::reduce(), s(), labelledScalar::scalarLabel(), edge::start(), List::transfer(), labelledScalar::value(), and face::which().
Referenced by boundaryLayerOptimisation::optimiseLayer().
|
private |
optimise layers at exitting faces due to requests from the inside
find edge points inside the mesh with more than one hair edge attached to it
find the points with more than one hair edge which was modified in the previous procedure
Definition at line 481 of file boundaryLayerOptimisationFunctions.C.
References Foam::endl(), forAll, boundaryLayerOptimisation::hairEdges_, Foam::Info, boundaryLayerOptimisation::mesh_, polyMeshGenPoints::points(), Foam::reduce(), pointFieldPMG::size(), and boundaryLayerOptimisation::thinnedHairEdge_.
Referenced by boundaryLayerOptimisation::optimiseLayer().
|
staticprivate |
write vectors into a VTK file. Helper for debugging
write the header
write points
write lines
Definition at line 58 of file boundaryLayerOptimisationFunctions.C.
References Foam::abort(), Foam::FatalError, FatalErrorIn, forAll, Foam::nl, p, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
|
private |
write vector correcposing to hair edges. Helper for debugging
count the number of hair edges matching this criteria
copy edge vector
write data to file
Definition at line 104 of file boundaryLayerOptimisationFunctions.C.
References Foam::abort(), Foam::FatalError, FatalErrorIn, forAll, he, points, and Foam::writeVTK().
Referenced by boundaryLayerOptimisation::optimiseHairNormalsAtTheBoundary(), and boundaryLayerOptimisation::optimiseHairNormalsInside().
write selected hair edges into a file
count the number of hair edges matching this criteria
copy edge vector
write data to file
Definition at line 150 of file boundaryLayerOptimisationFunctions.C.
References forAll, he, points, and Foam::writeVTK().
|
private |
Disallow default bitwise assignment.
void setMaxNumIterations | ( | const label | maxNumIterations | ) |
set the maximum number of iterations
Definition at line 101 of file boundaryLayerOptimisation.C.
Referenced by boundaryLayerOptimisation::readSettings().
void setNumNormalsSmoothingIterations | ( | const label | nSmoothNormal | ) |
set the number of normal smoothing iterations (default is 5)
Definition at line 109 of file boundaryLayerOptimisation.C.
Referenced by boundaryLayerOptimisation::readSettings().
void recalculateNormals | ( | const bool | shallRecalculate | ) |
shall normals be re-calculated (default true)
Definition at line 116 of file boundaryLayerOptimisation.C.
References boundaryLayerOptimisation::reCalculateNormals_.
Referenced by boundaryLayerOptimisation::readSettings().
void setRelativeThicknessTolerance | ( | const scalar | relThicknessTol | ) |
set the relative thickness tolerance (default 0.15)
Definition at line 122 of file boundaryLayerOptimisation.C.
Referenced by boundaryLayerOptimisation::readSettings().
void setFeatureSizeFactor | ( | const scalar | featureSizeFactor | ) |
set the feature size factor (default 0.3)
Definition at line 130 of file boundaryLayerOptimisation.C.
Referenced by boundaryLayerOptimisation::readSettings().
const edgeLongList & hairEdges | ( | ) | const |
return hair edges
Definition at line 137 of file boundaryLayerOptimisation.C.
References boundaryLayerOptimisation::hairEdges_.
const VRWGraph & hairEdgesAtBndPoint | ( | ) | const |
hair edges attached to a boundary point
Definition at line 142 of file boundaryLayerOptimisation.C.
References boundaryLayerOptimisation::hairEdgesAtBndPoint_.
const boolList & isBaseFace | ( | ) | const |
boundary faces which serve as base faces of a boundary layer are set to true
Definition at line 147 of file boundaryLayerOptimisation.C.
References boundaryLayerOptimisation::isBndLayerBase_.
Referenced by meshOptimizer::optimizeBoundaryLayer().
const boolList & isExitFace | ( | ) | const |
boundary faces where the layers exit at the boundary
Definition at line 152 of file boundaryLayerOptimisation.C.
References boundaryLayerOptimisation::isExitFace_.
void optimiseLayer | ( | ) |
performs boundary layer optimisation
create surface smoother
lock exitting faces and feature edges
calculate normals at the boundary
smoothing thickness variation of boundary hairs
optimise normals inside the mesh
optimise thickness variation inside the mesh
Definition at line 533 of file boundaryLayerOptimisationFunctions.C.
References LongList< T, Offset >::append(), boundaryLayerOptimisation::BOUNDARY, Foam::endl(), forAll, Foam::Info, boundaryLayerOptimisation::INSIDE, boundaryLayerOptimisation::isExitFace_, meshSurfaceOptimizer::lockBoundaryFaces(), meshSurfaceOptimizer::lockFeatureEdges(), boundaryLayerOptimisation::maxNumIterations_, boundaryLayerOptimisation::meshSurface(), boundaryLayerOptimisation::optimiseHairNormalsAtTheBoundary(), boundaryLayerOptimisation::optimiseHairNormalsInside(), boundaryLayerOptimisation::optimiseLayersAtExittingFaces(), boundaryLayerOptimisation::optimiseThicknessVariation(), meshSurfaceOptimizer::optimizeSurface(), Foam::reduce(), boundaryLayerOptimisation::thinnedHairEdge_, and meshSurfaceEngineModifier::updateGeometry().
Referenced by meshOptimizer::optimizeBoundaryLayer().
|
static |
read the settings from dictionary
Definition at line 158 of file boundaryLayerOptimisation.C.
References Foam::exit(), Foam::FatalError, FatalErrorIn, dictionary::found(), dictionary::lookup(), Foam::readBool(), Foam::readLabel(), Foam::readScalar(), boundaryLayerOptimisation::recalculateNormals(), boundaryLayerOptimisation::setFeatureSizeFactor(), boundaryLayerOptimisation::setMaxNumIterations(), boundaryLayerOptimisation::setNumNormalsSmoothingIterations(), boundaryLayerOptimisation::setRelativeThicknessTolerance(), and dictionary::subDict().
Referenced by meshOptimizer::optimizeBoundaryLayer().
|
private |
reference to polyMeshGen
Definition at line 66 of file boundaryLayerOptimisation.H.
Referenced by boundaryLayerOptimisation::calculateHairEdges(), boundaryLayerOptimisation::meshSurface(), boundaryLayerOptimisation::optimiseHairNormalsAtTheBoundary(), boundaryLayerOptimisation::optimiseHairNormalsInside(), and boundaryLayerOptimisation::optimiseLayersAtExittingFaces().
|
mutableprivate |
const pointer to meshSurfaceEngine
Definition at line 69 of file boundaryLayerOptimisation.H.
Referenced by boundaryLayerOptimisation::meshSurface(), and boundaryLayerOptimisation::~boundaryLayerOptimisation().
|
private |
Definition at line 70 of file boundaryLayerOptimisation.H.
Referenced by boundaryLayerOptimisation::~boundaryLayerOptimisation().
|
mutableprivate |
mesh surface partitioner
Definition at line 73 of file boundaryLayerOptimisation.H.
Referenced by boundaryLayerOptimisation::surfacePartitioner(), and boundaryLayerOptimisation::~boundaryLayerOptimisation().
|
private |
boundary layer hairs
Definition at line 76 of file boundaryLayerOptimisation.H.
Referenced by boundaryLayerOptimisation::calculateHairEdges(), boundaryLayerOptimisation::hairEdges(), boundaryLayerOptimisation::optimiseHairNormalsAtTheBoundary(), boundaryLayerOptimisation::optimiseHairNormalsInside(), and boundaryLayerOptimisation::optimiseLayersAtExittingFaces().
|
private |
hair edges attached to a boundary point
Definition at line 79 of file boundaryLayerOptimisation.H.
Referenced by boundaryLayerOptimisation::calculateHairEdges(), boundaryLayerOptimisation::hairEdgesAtBndPoint(), boundaryLayerOptimisation::optimiseHairNormalsAtTheBoundary(), and boundaryLayerOptimisation::optimiseHairNormalsInside().
|
private |
hair edge to other hair edges
Definition at line 82 of file boundaryLayerOptimisation.H.
Referenced by boundaryLayerOptimisation::calculateHairEdges(), boundaryLayerOptimisation::optimiseHairNormalsAtTheBoundary(), and boundaryLayerOptimisation::optimiseHairNormalsInside().
|
private |
is boundary face a base for a prism in the bnd layer
Definition at line 85 of file boundaryLayerOptimisation.H.
Referenced by boundaryLayerOptimisation::calculateHairEdges(), and boundaryLayerOptimisation::isBaseFace().
|
private |
is boundary face part of a layer where a layer exits
Definition at line 88 of file boundaryLayerOptimisation.H.
Referenced by boundaryLayerOptimisation::calculateHairEdges(), boundaryLayerOptimisation::isExitFace(), and boundaryLayerOptimisation::optimiseLayer().
classification of hair edges
Definition at line 91 of file boundaryLayerOptimisation.H.
Referenced by boundaryLayerOptimisation::calculateHairEdges(), boundaryLayerOptimisation::optimiseHairNormalsAtTheBoundary(), and boundaryLayerOptimisation::optimiseHairNormalsInside().
|
private |
stores information where boundary hairs are made thinner
Definition at line 94 of file boundaryLayerOptimisation.H.
Referenced by boundaryLayerOptimisation::calculateHairEdges(), boundaryLayerOptimisation::optimiseLayer(), and boundaryLayerOptimisation::optimiseLayersAtExittingFaces().
|
private |
maximum number of iterations
Definition at line 97 of file boundaryLayerOptimisation.H.
Referenced by boundaryLayerOptimisation::optimiseLayer().
|
private |
number of iterations for smoothing of hairs
Definition at line 100 of file boundaryLayerOptimisation.H.
Referenced by boundaryLayerOptimisation::optimiseHairNormalsAtTheBoundary(), and boundaryLayerOptimisation::optimiseHairNormalsInside().
|
private |
relative tolerance for thickness variation
Definition at line 103 of file boundaryLayerOptimisation.H.
|
private |
feature size factor used for curvature-based optimisation
Definition at line 106 of file boundaryLayerOptimisation.H.
|
private |
activate calculation of normals
Definition at line 109 of file boundaryLayerOptimisation.H.
Referenced by boundaryLayerOptimisation::optimiseHairNormalsAtTheBoundary(), boundaryLayerOptimisation::optimiseHairNormalsInside(), and boundaryLayerOptimisation::recalculateNormals().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.