62 markedEdges[markedI++] = meshEdgeI;
70 int main(
int argc,
char *argv[])
81 Info<<
"Mesh read in = "
82 << runTime.cpuTimeIncrement()
89 const scalar minCos =
Foam::cos(featureAngle);
92 <<
"minCos :" << minCos <<
endl
108 collectFeatureEdges(rMesh, markedEdges);
130 if (unsetFacei == -1)
140 patchName =
"auto" +
name(suffix++);
142 while (rMesh.
findIndex(patchName) != -1);
152 rMesh.
markFaces(markedEdges, unsetFacei, visited);
164 patchIDs[facei] = newPatchi;
168 Info<<
"Assigned " << nVisited <<
" faces to patch " << patchName
188 newPatchPtrList[newPatchi] =
226 polyMeshRepatcher.changePatches(newPatchPtrList);
237 label meshFacei = meshFace[facei];
239 polyMeshRepatcher.changePatchID(meshFacei, patchIDs[facei]);
242 polyMeshRepatcher.repatch();
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 <Type> 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 UList.
label size() const
Return the number of elements in the UPtrList.
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.
virtual bool write(const bool write=true) const
Write mesh using IO settings from time.
const word & name() const
Return name.
const fileName & pointsInstance() const
Return the current instance directory for points.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
void setInstance(const fileName &)
Set the instance for mesh files.
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.
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.
label findIndex(const word &patchName) const
Get index of patch by name.
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(...))
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.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
int main(int argc, char *argv[])
const fvPatchList & patches
scalar radToDeg(const scalar rad)
Convert radians to degrees.
scalar degToRad(const scalar deg)
Convert degrees to radians.
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.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
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)
Foam::argList args(argc, argv)