faMeshWriteEdgesOBJ.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2021-2023 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
12 
13 Description
14  OBJ output of faMesh edges
15 
16 \*---------------------------------------------------------------------------*/
17 
18 {
19  Info<< nl
20  << "Writing edges in obj format" << endl;
21 
22  word outputName("finiteArea-edges.obj");
23 
24  if (UPstream::parRun())
25  {
26  outputName = word
27  (
28  "finiteArea-edges-proc"
29  + Foam::name(UPstream::myProcNo())
30  + ".obj"
31  );
32  }
33 
34  OBJstream os(runTime.globalPath()/outputName);
35 
36  os.writeComment(outputName);
37 
38  os.write(aMesh.patch().edges(), aMesh.patch().localPoints());
39 }
40 
41 
42 // ************************************************************************* //
constexpr char nl
The newline &#39;\n&#39; character (0x0a)
Definition: Ostream.H:50
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:531
word outputName("finiteArea-edges.obj")
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition: exprTraits.C:127
OBJstream os(runTime.globalPath()/outputName)
messageStream Info
Information stream (stdout output on master, null elsewhere)