/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | foam-extend: Open Source CFD
\\ / O peration | Version: 3.2
\\ / A nd | Web: http://www.foam-extend.org
\\/ M anipulation | For copyright notice see file Copyright
-------------------------------------------------------------------------------
License
This file is part of foam-extend.
foam-extend is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
foam-extend is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with foam-extend. If not, see .
Class
Foam::boundaryMesh
Description
Addressing for all faces on surface of mesh. Can either be read
from polyMesh or from triSurface. Used for repatching existing meshes.
SourceFiles
boundaryMesh.C
\*---------------------------------------------------------------------------*/
#ifndef boundaryMesh_H
#define boundaryMesh_H
#include "bMesh.H"
#include "boundaryPatch.H"
#include "PrimitivePatch.H"
#include "PtrList.H"
#include "polyPatchList.H"
#include "className.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// Forward declaration of classes
class Time;
class polyMesh;
class primitiveMesh;
/*---------------------------------------------------------------------------*\
Class boundaryMesh Declaration
\*---------------------------------------------------------------------------*/
class boundaryMesh
{
// Static data
//- Normal along which to divide faces into categories
// (used in getNearest)
static const vector splitNormal_;
//- Distance to face tolerance for getNearest. Triangles are considered
// near if they are nearer than distanceTol_*typDim where typDim is
// the largest distance from face centre to one of its vertices.
static const scalar distanceTol_;
// Private data
//- All boundary mesh data. Reconstructed every time faces are repatched
bMesh* meshPtr_;
//- Patches. Reconstructed every time faces are repatched.
PtrList patches_;
//- For every face in mesh() gives corresponding polyMesh face
// (not sensible if mesh read from triSurface)
labelList meshFace_;
//
// Edge handling
//
//- points referenced by feature edges.
pointField featurePoints_;
//- feature edges. Indices into featurePoints.
edgeList featureEdges_;
//- from feature edge to mesh edge.
labelList featureToEdge_;
//- from mesh edges to featureEdges_;
labelList edgeToFeature_;
//- Feature 'segments'. Collections of connected featureEdges.
// Indices into featureEdges_.
labelListList featureSegments_;
//- Additional edges (indices of mesh edges)
labelList extraEdges_;
// Private Member Functions
//- Number of connected feature edges.
label nFeatureEdges(label pointI) const;
//- Step to next feature edge
label nextFeatureEdge(const label edgeI, const label vertI) const;
//- Return connected list of feature edges.
labelList collectSegment
(
const boolList& isFeaturePoint,
const label startEdgeI,
boolList& featVisited
) const;
//- Do point-edge walk to determine nearest (to edgeI). Stops if
// distance >= maxDistance. Used to determine edges close to seed
// point.
void markEdges
(
const label maxDistance,
const label edgeI,
const label distance,
labelList& minDistance,
DynamicList