59 label featEdgeI = segment[j];
63 markedEdges[markedI++] = meshEdgeI;
71 int main(
int argc,
char *argv[])
83 Info<<
"Mesh read in = " 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();
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
void addPatch(const word &patchName)
Add to back of patch list.
#define forAll(list, i)
Loop across all elements in list.
const PtrList< boundaryPatch > & patches() const
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
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...
void off()
Switch the function objects off.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
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.
bool optionFound(const word &opt) const
Return true if the named option is found.
static void noParallel()
Remove the parallel options.
static SLList< string > validArgs
A list of valid (mandatory) arguments.
void markFaces(const labelList &protectedEdges, const label facei, boolList &visited) const
const labelList & featureToEdge() const
From index into featureEdge to index into meshedges,.
virtual bool write(const bool write=true) const
Write mesh using IO settings from time.
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.
const labelListList & featureSegments() const
Lists of connected featureEdges. Indices into featureEdges.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
const fileName & pointsInstance() const
Return the current instance directory for points.
dimensionedScalar cos(const dimensionedScalar &ds)
A mesh which allows changes in the patch distribution of the boundary faces. The change in patching i...
const labelList & meshFace() const
Label of original face in polyMesh (before patchify(...))
A class for handling words, derived from string.
double cpuTimeIncrement() const
Return CPU time (in seconds) since last call to cpuTimeIncrement()
label nEdges() const
Return number of edges in patch.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
word name(const complex &)
Return a string representation of a complex.
void setInstance(const fileName &)
Set the instance for mesh files.
label size() const
Return the number of elements in the UPtrList.
void setSize(const label)
Reset size of List.
const functionObjectList & functionObjects() const
Return the list of function objects.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
T argRead(const label index) const
Read a value from the argument at index.
label start() const
Return start label of this patch in the polyMesh face list.
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.
const bMesh & mesh() const
A patch is a list of labels that address the faces in the global face list.
Foam::argList args(argc, argv)
PrimitivePatch< faceList, const pointField > bMesh
Holder of faceList and points. (v.s. e.g. primitivePatch which references points) ...