39 namespace searchableSurfaceModifiers
44 searchableSurfaceModifier,
55 const searchableSurfaces& geometry,
56 const dictionary&
dict 59 searchableSurfaceModifier(geometry,
dict),
60 featureAngle_(
dict.
get<scalar>(
"featureAngle"))
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);
89 forAll(
set.featureEdges(), i)
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];
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
autoPatch(const searchableSurfaces &geometry, const dictionary &dict)
Construct from dictionary.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
defineTypeNameAndDebug(combustionModel, 0)
const std::string patch
OpenFOAM patch number as a std::string.
messageStream Info
Information stream (stdout output on master, null elsewhere)
List< label > labelList
A List of labels.
List< bool > boolList
A List of bools.
virtual bool modify(const labelList ®ions, searchableSurface &) const
Apply this selector.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)