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