59 label featEdgeI = segment[j];
63 markedEdges[markedI++] = meshEdgeI;
71 int main(
int argc,
char *argv[])
79 runTime.functionObjects().off();
83 Info<<
"Mesh read in = " 84 << runTime.cpuTimeIncrement()
85 <<
" s\n" << endl <<
endl;
88 const scalar featureAngle =
args.
argRead<scalar>(1);
93 Info<<
"Feature:" << featureAngle << endl
94 <<
"minCos :" << minCos << endl
110 collectFeatureEdges(bMesh, markedEdges);
132 if (unsetFacei == -1)
142 patchName =
"auto" +
name(suffix++);
144 while (bMesh.findPatchID(patchName) != -1);
154 bMesh.
markFaces(markedEdges, unsetFacei, visited);
166 patchIDs[facei] = newPatchi;
170 Info<<
"Assigned " << nVisited <<
" faces to patch " << patchName
190 newPatchPtrList[newPatchi] =
228 polyMeshRepatcher.changePatches(newPatchPtrList);
239 label meshFacei = meshFace[facei];
241 polyMeshRepatcher.changePatchID(meshFacei, patchIDs[facei]);
244 polyMeshRepatcher.repatch();
void addPatch(const word &patchName)
Add to back of patch list.
const labelList & featureToEdge() const
From index into featureEdge to index into meshedges,.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void read(const polyMesh &)
Read from boundaryMesh of polyMesh.
void setFeatureEdges(const scalar minCos)
Set featureEdges, edgeToFeature, featureSegments according.
Like polyPatch but without reference to mesh. patchIdentifier::index is not used. Used in boundaryMes...
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
void markFaces(const labelList &protectedEdges, const label facei, boolList &visited) const
Unit conversion functions.
static unsigned int defaultPrecision()
Return the default precision.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface...
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void noParallel()
Remove the parallel options.
static SLList< string > validArgs
A list of valid (mandatory) arguments.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
void changePatchType(const word &patchName, const word &type)
Change patch.
Various functions to operate on Lists.
dimensionedScalar cos(const dimensionedScalar &ds)
A mesh which allows changes in the patch distribution of the boundary faces. The change in patching i...
label start() const
Return start label of this patch in the polyMesh face list.
bool optionFound(const word &opt) const
Return true if the named option is found.
A class for handling words, derived from string.
const labelList & meshFace() const
Label of original face in polyMesh (before patchify(...))
const labelListList & featureSegments() const
Lists of connected featureEdges. Indices into featureEdges.
const word & name() const
Return name.
const bMesh & mesh() const
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.
word name(const complex &)
Return a string representation of a complex.
T argRead(const label index) const
Read a value from the argument at index.
void setInstance(const fileName &)
Set the instance for mesh files.
label nEdges() const
Return number of edges in patch.
void setSize(const label)
Reset size of List.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
const fileName & pointsInstance() const
Return the current instance directory for points.
const PtrList< boundaryPatch > & patches() const
static autoPtr< polyPatch > New(const word &patchType, const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm)
Return a pointer to a new patch created on freestore from.
A patch is a list of labels that address the faces in the global face list.
Foam::argList args(argc, argv)
PrimitivePatch< face, List, const pointField > bMesh
Holder of faceList and points. (v.s. e.g. primitivePatch which references points) ...
virtual bool write() const
Write mesh using IO settings from time.
label size() const
Return the number of elements in the UPtrList.