openfoam/applications/utilities/finiteArea/makeFaMesh/faMeshWriteEdgesOBJ.H
Mark Olesen 783934ccad ENH: add global topology check in checkMesh and makeFaMesh (#2771)
- detect when boundary patches are multiply connected across edges

STYLE: initialize some faMesh values
2023-05-09 19:30:58 +02:00

47 lines
1.2 KiB
C

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
Description
OBJ output of faMesh edges
\*---------------------------------------------------------------------------*/
{
Info<< nl
<< "Writing edges in obj format" << endl;
word outputName("finiteArea-edges.obj");
if (UPstream::parRun())
{
outputName = word
(
"finiteArea-edges-proc"
+ Foam::name(UPstream::myProcNo())
+ ".obj"
);
}
OBJstream os(runTime.globalPath()/outputName);
os.writeQuoted
(
("# " + outputName + "\n"),
false
);
os.write(aMesh.patch().edges(), aMesh.patch().localPoints());
}
// ************************************************************************* //