39namespace searchableSurfaceModifiers
44 searchableSurfaceModifier,
55 const searchableSurfaces& geometry,
56 const dictionary&
dict
59 searchableSurfaceModifier(geometry,
dict),
60 featureAngle_(
dict.
get<scalar>(
"featureAngle"))
68 const labelList& regions,
69 searchableSurface& geom
72 triSurface& surf = refCast<triSurfaceMesh>(geom);
74 surfaceFeatures
set(surf, 180.0-featureAngle_);
77 <<
"Feature set:" <<
nl
78 <<
" feature points : " <<
set.featurePoints().size() <<
nl
79 <<
" feature edges : " <<
set.featureEdges().size() <<
nl
81 <<
" region edges : " <<
set.nRegionEdges() <<
nl
82 <<
" external edges : " <<
set.nExternalEdges() <<
nl
83 <<
" internal edges : " <<
set.nInternalEdges() <<
nl
88 boolList borderEdge(surf.nEdges(),
false);
91 borderEdge[
set.featureEdges()[i]] =
true;
99 label regionI = regions[i];
106 if (surf[faceI].region() == regionI && subRegion[faceI] == -1)
113 Info<<
"For region " << surf.patches()[regionI].name()
114 <<
" detected sub regions " << nSub <<
endl;
119 label nOldPatches = surf.patches().size();
121 for (label subI = 0; subI < nSub; subI++)
123 geometricSurfacePatch
patch
125 surf.patches()[regionI].name() +
Foam::name(subI),
126 surf.patches().size(),
127 surf.patches()[regionI].geometricType()
131 Info<<
"For region " << surf.patches()[regionI].name()
132 <<
" creating region " <<
patch.name() <<
endl;
134 surf.patches().append(patch);
139 if (subRegion[faceI] != -1)
141 surf[faceI].region() = nOldPatches + subRegion[faceI];
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Patchify triangles based on a feature angle. Replacement of surfaceAutoPatch.
virtual bool modify(const labelList ®ions, searchableSurface &) const
Apply this selector.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
void set(List< bool > &bools, const labelUList &locations)
Set the listed locations (assign 'true').
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
const std::string patch
OpenFOAM patch number as a std::string.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< bool > boolList
A List of bools.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.