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(rMesh, markedEdges);
132 if (unsetFacei == -1)
142 patchName =
"auto" +
name(suffix++);
154 rMesh.
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.
const rMesh & mesh() const
Access the boundary mesh.
#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.
const word & name() const
Return name.
void off()
Switch the function objects off.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
void setFeatureEdges(const scalar minCos)
Set featureEdges, edgeToFeature, featureSegments according.
void read(const polyMesh &)
Read from repatchMesh of polyMesh.
Unit conversion functions.
void changePatchType(const word &patchName, const word &type)
Change patch.
static unsigned int defaultPrecision()
Return the default precision.
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.
virtual bool write(const bool write=true) const
Write mesh using IO settings from time.
const PtrList< repatchPatch > & patches() const
Access the patches.
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
Various functions to operate on Lists.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
const labelList & meshFace() const
Label of original face in polyMesh (before patchify(...))
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...
A class for handling words, derived from string.
double cpuTimeIncrement() const
Return CPU time (in seconds) since last call to cpuTimeIncrement()
label findPatchID(const word &patchName) const
Get index of patch by name.
label nEdges() const
Return number of edges in patch.
const labelListList & featureSegments() const
Lists of connected featureEdges. Indices into featureEdges.
void markFaces(const labelList &protectedEdges, const label facei, boolList &visited) const
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.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface...
const functionObjectList & functionObjects() const
Return the list of function objects.
void addPatch(const word &patchName)
Add to back of patch list.
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.
A patch is a list of labels that address the faces in the global face list.
Foam::argList args(argc, argv)
const labelList & featureToEdge() const
From index into featureEdge to index into meshedges,.
Like polyPatch but without reference to mesh. patchIdentifier::index is not used. Used in repatchMesh...