75 label edgeI = pEdges[pEdgeI];
79 if (
e.otherVertex(v0) == v1)
86 <<
"Cannot find edge between mesh points " << v0 <<
" and " << v1
96 const label patchi =
bMesh.findPatchID(
name);
101 <<
"Cannot find patch " <<
name <<
nl 102 <<
"It should be present but of zero size" <<
endl 103 <<
"Valid patches are " <<
bMesh.names()
107 if (
bMesh[patchi].size())
110 <<
"Patch " <<
name <<
" is present but non-zero size" 117 int main(
int argc,
char *argv[])
121 "Splits mesh by making internal faces external at defined faceSet" 142 const bool overwrite =
args.
found(
"overwrite");
147 Info<<
"Read " << facesSet.size() <<
" faces to split" <<
endl <<
endl;
159 <<
"Face " << faces[i] <<
" in faceSet " << setName
160 <<
" is not an internal face." 190 const labelList& meshPoints = fPatch.meshPoints();
198 forAll(allEdgeFaces, patchEdgeI)
200 if (allEdgeFaces[patchEdgeI].size() == 1)
202 const edge&
e = fPatch.edges()[patchEdgeI];
208 meshPoints[
e.start()],
212 fenceEdges.insert(edgeI);
217 label startFacei = faces[0];
233 zoneFlip[i] = !regionInfo.sideOwner().found(faces[i]);
252 Info<<
"Adding point and face zones" <<
endl;
275 Info<<
nl <<
"Constructed topologyModifier:" <<
endl;
276 splitter[0].writeDict(
Info);
298 <<
"Failed writing polyMesh." const Type & value() const noexcept
Return const reference to value.
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurrences.
static void addNote(const string ¬e)
Add extra notes for the usage information.
static void removeFiles(const polyMesh &mesh)
Helper: remove all procAddressing files from mesh instance.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const labelListList & pointEdges() const
Cell-face mesh analysis engine.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void noParallel()
Remove the parallel options.
bool isInternalFace(const label faceIndex) const noexcept
Return true if given face label is internal to the mesh.
virtual const pointField & points() const
Return raw points.
#define forAll(list, i)
Loop across all elements in list.
A list of faces which address into the list of points.
Determines the 'side' for every face and connected to a singly-connected (through edges) region of fa...
static void removeFiles(const polyMesh &)
Helper: remove all sets files from mesh instance.
const dimensionedScalar e
Elementary charge.
const fileName & pointsInstance() const
Return the current instance directory for points.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
void addZones(PtrList< pointZone > &&pz, PtrList< faceZone > &&fz, PtrList< cellZone > &&cz)
Add mesh zones.
virtual const labelList & faceOwner() const
Return face owner.
virtual const faceList & faces() const
Return raw faces.
errorManip< error > abort(error &err)
virtual bool write(const bool writeOnProc=true) const
Write mesh using IO settings from time.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO...
This class is derived from polyMesh and serves as a tool for statically connecting pieces of a mesh b...
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
Attach/detach boundary mesh modifier. This modifier takes a set of internal faces and converts them i...
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
void setInstance(const fileName &instance, const IOobjectOption::writeOption wOpt=IOobject::AUTO_WRITE)
Set the instance for mesh files.
A List with indirect addressing. Like IndirectList but does not store addressing. ...
static void addArgument(const string &argName, const string &usage="")
Append a (mandatory) argument to validArgs.
messageStream Info
Information stream (stdout output on master, null elsewhere)
A subset of mesh faces organised as a primitive patch.
Foam::argList args(argc, argv)
bool checkPatch(const bool allGeometry, const std::string &name, const polyMesh &mesh, const PatchType &pp, const labelUList &meshEdges, labelHashSet *pointSetPtr=nullptr, labelHashSet *badEdgesPtr=nullptr)
bool found(const word &optName) const
Return true if the named option is found.