1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
28 inline Foam::label Foam::extendedFeatureEdgeMesh::convexStart() const
34 inline Foam::label Foam::extendedFeatureEdgeMesh::concaveStart() const
40 inline Foam::label Foam::extendedFeatureEdgeMesh::mixedStart() const
46 inline Foam::label Foam::extendedFeatureEdgeMesh::nonFeatureStart() const
48 return nonFeatureStart_;
52 inline Foam::label Foam::extendedFeatureEdgeMesh::externalStart() const
54 return externalStart_;
58 inline Foam::label Foam::extendedFeatureEdgeMesh::internalStart() const
60 return internalStart_;
64 inline Foam::label Foam::extendedFeatureEdgeMesh::flatStart() const
70 inline Foam::label Foam::extendedFeatureEdgeMesh::openStart() const
76 inline Foam::label Foam::extendedFeatureEdgeMesh::multipleStart() const
78 return multipleStart_;
82 inline bool Foam::extendedFeatureEdgeMesh::featurePoint(label ptI) const
84 return ptI < nonFeatureStart_;
88 inline const Foam::vectorField& Foam::extendedFeatureEdgeMesh::normals() const
93 inline const Foam::vectorField& Foam::extendedFeatureEdgeMesh::edgeDirections()
96 return edgeDirections_;
100 inline Foam::vector Foam::extendedFeatureEdgeMesh::edgeDirection
106 const edge& e = edges()[edgeI];
108 if (ptI == e.start())
110 return edgeDirections()[edgeI];
112 else if (ptI == e.end())
114 return -edgeDirections()[edgeI];
118 FatalErrorIn("Foam::extendedFeatureEdgeMesh::edgedirection")
119 << "Requested ptI " << ptI << " is not a point on the requested "
120 << "edgeI " << edgeI << ". edgeI start and end: "
121 << e.start() << " " << e.end()
129 inline const Foam::labelListList& Foam::extendedFeatureEdgeMesh::edgeNormals()
136 inline Foam::vectorField Foam::extendedFeatureEdgeMesh::edgeNormals
138 const labelList& edgeNormIs
141 vectorField norms(edgeNormIs.size());
143 forAll(edgeNormIs, i)
145 norms[i] = normals_[edgeNormIs[i]];
152 inline Foam::vectorField Foam::extendedFeatureEdgeMesh::edgeNormals(label edgeI)
155 return edgeNormals(edgeNormals_[edgeI]);
159 inline const Foam::labelListList&
160 Foam::extendedFeatureEdgeMesh::featurePointNormals() const
162 return featurePointNormals_;
166 inline Foam::vectorField Foam::extendedFeatureEdgeMesh::featurePointNormals
171 if (!featurePoint(ptI))
173 WarningIn("vectorField extendedFeatureEdgeMesh::featurePointNormals")
174 << "Requesting the normals of a non-feature point. "
175 << "Returned zero length vectorField."
178 return vectorField(0);
181 labelList featPtNormIs(featurePointNormals_[ptI]);
183 vectorField norms(featPtNormIs.size());
185 forAll(featPtNormIs, i)
187 norms[i] = normals_[featPtNormIs[i]];
194 inline const Foam::labelList& Foam::extendedFeatureEdgeMesh::regionEdges() const
200 inline Foam::extendedFeatureEdgeMesh::pointStatus
201 Foam::extendedFeatureEdgeMesh::getPointStatus
206 if (ptI < concaveStart_)
210 else if (ptI < mixedStart_)
214 else if (ptI < nonFeatureStart_)
225 inline Foam::extendedFeatureEdgeMesh::edgeStatus
226 Foam::extendedFeatureEdgeMesh::getEdgeStatus
231 if (edgeI < internalStart_)
235 else if (edgeI < flatStart_)
239 else if (edgeI < openStart_)
243 else if (edgeI < multipleStart_)
254 // ************************************************************************* //