Loading...
Searching...
No Matches
convertTopoSet.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) 2018-2021 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
12
13Description
14 Code chunk for converting face and point sets - included by foamToVTK.
15
16\*---------------------------------------------------------------------------*/
17
18// flag to top-level code to signal early stop.
19bool wroteTopoSet = false;
20
21// Write faceSet (as PolyData)
22if (faceSetName.size())
23{
24 // Load
25 faceSet set(mesh, faceSetName);
26
27 fileName outputName
28 (
29 outputDir/regionDir/"face-set"
30 / set.name()/set.name() + timeDesc
31 );
32
33 Info<< " faceSet : "
34 << args.relativePath(outputName) << nl;
35
36 vtk::writeFaceSet
37 (
38 mesh,
39 set,
40 writeOpts,
42 UPstream::parRun()
43 );
44
45 wroteTopoSet = true;
46}
47
48
49// Write pointSet (as PolyData)
50if (pointSetName.size())
51{
52 // Load
53 pointSet set(mesh, pointSetName);
54
55 fileName outputName
56 (
57 outputDir/regionDir/"point-set"
58 / set.name()/set.name() + timeDesc
59 );
60
61 Info<< " pointSet : "
62 << args.relativePath(outputName) << nl;
63
64 vtk::writePointSet
65 (
66 mesh,
67 set,
68 writeOpts,
70 UPstream::parRun()
71 );
72
73 wroteTopoSet = true;
74}
75
76
77// ************************************************************************* //
bool wroteTopoSet
dynamicFvMesh & mesh
word outputName("finiteArea-edges.obj")
const word & regionDir
Foam::argList args(argc, argv)