63 markedEdges[markedI++] = meshEdgeI;
71 int main(
int argc,
char *argv[])
80 const word oldInstance = mesh.pointsInstance();
82 Info<<
"Mesh read in = "
83 << runTime.cpuTimeIncrement()
87 const scalar featureAngle =
args.
argRead<scalar>(1);
92 Info<<
"Feature:" << featureAngle <<
endl
93 <<
"minCos :" << minCos <<
endl
109 collectFeatureEdges(rMesh, markedEdges);
131 if (unsetFacei == -1)
141 patchName =
"auto" +
name(suffix++);
153 rMesh.
markFaces(markedEdges, unsetFacei, visited);
165 patchIDs[facei] = newPatchi;
169 Info<<
"Assigned " << nVisited <<
" faces to patch " << patchName
189 newPatchPtrList[newPatchi] =
227 polyMeshRepatcher.changePatches(newPatchPtrList);
238 label meshFacei = meshFace[facei];
240 polyMeshRepatcher.changePatchID(meshFacei, patchIDs[facei]);
243 polyMeshRepatcher.repatch();
248 mesh.setInstance(oldInstance);
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
static unsigned int defaultPrecision()
Return the default precision.
void setSize(const label)
Reset size of List.
An ordered pair of two objects of type <T> with first() and second() elements.
label nEdges() const
Return number of edges in patch.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
label size() const
Return the number of elements in the UPtrList.
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.
T argRead(const label index) const
Read a value from the argument at index.
const word & name() const
Return name.
A patch is a list of labels that address the faces in the global 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.
label start() const
Return start label of this patch in the polyMesh face list.
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
void addPatch(const word &patchName)
Add to back of patch list.
void setFeatureEdges(const scalar minCos)
Set featureEdges, edgeToFeature, featureSegments according.
const rMesh & mesh() const
Access the boundary mesh.
const labelList & featureToEdge() const
From index into featureEdge to index into meshedges,.
const labelList & meshFace() const
Label of original face in polyMesh (before patchify(...))
label findPatchID(const word &patchName) const
Get index of patch by name.
void markFaces(const labelList &protectedEdges, const label facei, boolList &visited) const
const labelListList & featureSegments() const
Lists of connected featureEdges. Indices into featureEdges.
void read(const polyMesh &)
Read from repatchMesh of polyMesh.
void changePatchType(const word &patchName, const word &type)
Change patch.
const PtrList< repatchPatch > & patches() const
Access the patches.
Like polyPatch but without reference to mesh. patchIdentifier::index is not used. Used in repatchMesh...
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.
int main(int argc, char *argv[])
const fvPatchList & patches
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
dimensionedScalar cos(const dimensionedScalar &ds)
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
Foam::argList args(argc, argv)
Unit conversion functions.