Go to the documentation of this file.
33 #include "triSurface.H"
39 int main(
int argc,
char *argv[])
48 Info<<
"Reading surface from " << surfFileName <<
endl;
52 word outExtension = outFileName.ext();
57 bool anyZoneRemoved =
false;
59 label iterationNo = 0;
60 label iterationLimit = 10;
62 Info<<
"Splitting off baffle parts " <<
endl;
66 anyZoneRemoved =
false;
77 if (edFaces[i].size() > 2)
79 multipleEdges[i] =
true;
96 for (
label z = 0; z < nZones; z++)
106 if (edFaces[faceEds[
f][fe]].size() < 2)
110 anyZoneRemoved =
true;
127 nonBaffle[
f] = keepZone;
128 baffle[
f] = !keepZone;
133 Info<<
" Iteration " << iterationNo <<
endl;
137 if (baffleSurf.
size())
143 +
"." + outExtension;
145 Info<<
" Writing baffle part to " << bafflePartFileName <<
endl;
147 baffleSurf.
write(bafflePartFileName);
150 surf = surf.subsetMesh(nonBaffle, pointMap,
faceMap);
152 if (iterationNo == iterationLimit)
155 <<
"Iteration limit of " << iterationLimit <<
"reached" <<
endl;
160 }
while (anyZoneRemoved && iterationNo < iterationLimit);
162 Info<<
"Writing new surface to " << outFileName <<
endl;
164 surf.
write(outFileName);
174 if (edFaces[i].size() > 2)
176 multipleEdges[i] =
true;
182 Info<<
"Splitting remaining multiply connected parts" <<
endl;
184 for (
label z = 0; z < nZones; z++)
206 +
"." + outExtension;
208 Info<<
" Writing mulitple part "
209 << z <<
" to " << remainingPartFileName <<
endl;
211 zoneSurf.
write(remainingPartFileName);
static SLList< string > validArgs
A list of valid (mandatory) arguments.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
A class for handling words, derived from string.
A class for handling file names.
#define forAll(list, i)
Loop across all elements in list.
Extract command arguments and options from the supplied argc and argv parameters.
Ostream & endl(Ostream &os)
Add newline and flush stream.
fileName lessExt() const
Return file name without extension (part before last .)
triSurface subsetMesh(const boolList &include, labelList &pointMap, labelList &faceMap) const
Return new surface. Returns pointMap, faceMap from.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Triangulated surface description with patch information.
A subset of mesh faces organised as a primitive patch.
virtual Ostream & write(const token &)=0
Write next token to stream.
int main(int argc, char *argv[])
static HashTable< string > validOptions
A list of valid options.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
stringList::subList additionalArgs() const
Return arguments that are additional to the executable.
void size(const label)
Override size to be inconsistent with allocated storage.
static void noParallel()
Remove the parallel options.
void write(const fileName &, const word &ext, const bool sort) const
Generic write routine. Chooses writer based on extension.
Foam::argList args(argc, argv)
#define WarningInFunction
Report a warning using Foam::Warning.
word name(const complex &)
Return a string representation of a complex.