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 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
12
13Description
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 (Pstream::parRun())
25 {
26 outputName = word
27 (
28 "finiteArea-edges-proc"
29 + Foam::name(Pstream::myProcNo())
30 + ".obj"
31 );
32 }
34 OBJstream os(runTime.globalPath()/outputName);
35
36 os.writeQuoted
37 (
38 ("# " + outputName + "\n"),
39 false
40 );
41
42 os.write(aMesh.patch().edges(), aMesh.patch().localPoints());
44
46// ************************************************************************* //
engineTime & runTime
word outputName("finiteArea-edges.obj")
OBJstream os(runTime.globalPath()/outputName)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
constexpr char nl
The newline '\n' character (0x0a)
Definition: Ostream.H:53
faMesh aMesh(mesh)