53 void mergeDuplicateBoundaryFaces
71 if (duplicates[bFacei] != -1)
79 <<
"Duplicate face " << facei
80 <<
" is on a processorPolyPatch."
81 <<
"This is not allowed." <<
nl
94 label otherFacei = duplicates[bFacei];
96 if (otherFacei != -1 && otherFacei > bFacei)
103 label own0 = faceOwner[face0];
104 label own1 = faceOwner[face1];
141 int main(
int argc,
char *argv[])
145 "Detect faces that share points (baffles)\n"
146 "and merge them into internal faces."
179 mergeDuplicateBoundaryFaces(mesh, meshMod);
197 Info<<
"Writing mesh to time " << runTime.name() <<
endl;
Field reading functions for post-processing utilities.
#define forAll(list, i)
Loop across all elements in list.
List of IOobjects with searching and retrieving facilities.
static void addNote(const string &)
Add extra notes for the usage information.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
bool optionFound(const word &opt) const
Return true if the named option is found.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static labelList findDuplicateFaces(const primitiveMesh &, const labelList &)
Helper routine to find baffles (two boundary faces using the.
Mesh consisting of general polyhedral cells.
virtual const faceList & faces() const
Return raw faces.
virtual const labelList & faceOwner() const
Return face owner.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
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.
Direct mesh changes based on v1.3 polyTopoChange syntax.
void removeFace(const label, const label)
Remove face / merge faces.
autoPtr< polyTopoChangeMap > changeMesh(polyMesh &mesh, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
Inplace changes mesh without change of patches.
void modifyFace(const face &f, const label facei, const label own, const label nei, const bool flipFaceFlux, const label patchID)
Modify vertices or cell of face.
label nInternalFaces() const
virtual bool write(const bool write=true) const
Write using setting from DB.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
int main(int argc, char *argv[])
const fvPatchList & patches
Info<< "Calculating turbulent flame speed field St\n"<< endl;volScalarField St(IOobject("St", runTime.name(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), flameWrinkling->Xi() *Su);multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
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.
errorManip< error > abort(error &err)
labelList identityMap(const label len)
Create identity map (map[i] == i) of given length.
Foam::argList args(argc, argv)