107 using namespace Foam;
113 int main(
int argc,
char *argv[])
129 label nNodes(readLabel(str));
148 label nTets(readLabel(str));
160 label domain(readLabel(str));
165 <<
"Cannot handle multiple domains"
166 <<
nl <<
"Ignoring domain " << domain <<
" setting on line "
167 << str.lineNumber() <<
endl;
170 tetPoints[1] = readLabel(str) - 1;
171 tetPoints[0] = readLabel(str) - 1;
172 tetPoints[2] = readLabel(str) - 1;
173 tetPoints[3] = readLabel(str) - 1;
180 label nFaces(readLabel(str));
196 forAll(boundaryFaces, faceI)
198 label patchI(readLabel(str));
203 <<
"Invalid boundary region number " << patchI
204 <<
" on line " << str.lineNumber()
209 maxPatch =
max(maxPatch, patchI);
211 triFace tri(readLabel(str)-1, readLabel(str)-1, readLabel(str)-1);
214 boundaryFaces[faceI].setSize(3);
215 boundaryFaces[faceI][0] = tri[0];
216 boundaryFaces[faceI][1] = tri[1];
217 boundaryFaces[faceI][2] = tri[2];
220 vertsToBoundary.insert(tri, faceI);
239 const face&
f = tris[i];
246 if (iter != vertsToBoundary.
end())
248 label faceI = iter();
249 const triFace& tri = iter.key();
256 if (((fc - cc) & fn) < 0)
259 boundaryFaces[faceI] = boundaryFaces[faceI].reverseFace();
263 vertsToBoundary.erase(iter);
269 if (vertsToBoundary.size())
273 <<
"There are boundary faces without attached cells."
274 <<
"Boundary faces (as triFaces):" << vertsToBoundary.toc()
303 allPatchFaces[patchI].append(boundaryFaces[faceI]);
307 <<
"\tNeutral Boundary\tPatch name\tSize" <<
nl
308 <<
"\t----------------\t----------\t----" <<
endl;
310 forAll(allPatchFaces, patchI)
312 Info<<
'\t' << patchI <<
"\t\t\t"
314 << allPatchFaces[patchI].
size() <<
endl;
316 patchFaces[patchI].transfer(allPatchFaces[patchI]);
341 Info<<
"Writing mesh to " << runTime.constant() << endl <<
endl;