foamToVTK.C
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) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2016-2021 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Application
28  foamToVTK
29 
30 Group
31  grpPostProcessingUtilities
32 
33 Description
34  General OpenFOAM to VTK file writer.
35 
36  Other bits
37  - Handles volFields, pointFields, surfaceScalarField, surfaceVectorField
38  fields.
39  - Mesh topo changes.
40  - Output legacy or xml VTK format in ascii or binary.
41  - Single time step writing.
42  - Write subset only.
43  - Optional decomposition of cells.
44 
45 Usage
46  \b foamToVTK [OPTION]
47 
48  Options:
49  - \par -ascii
50  Write VTK data in ASCII format instead of binary.
51 
52  - \par -legacy
53  Write VTK data in legacy format instead of XML format
54 
55  - \par -fields <fields>
56  Specify single or multiple fields to write (all by default)
57  For example,
58  \verbatim
59  -fields T
60  -fields '(p T U \"alpha.*\")'
61  \endverbatim
62  The quoting is required to avoid shell expansions and to pass the
63  information as a single argument.
64 
65  - \par -surfaceFields
66  Write surfaceScalarFields (e.g., phi)
67 
68  - \par -cellSet <name>
69  - \par -cellZone <name>
70  Restrict conversion to either the cellSet or the cellZone.
71 
72  - \par -faceSet <name>
73  - \par -pointSet <name>
74  Restrict conversion to the faceSet or pointSet.
75 
76  - \par -faceZones zone or zone list
77  Specify single faceZone or or multiple faceZones (name or regex)
78  to write
79 
80  - \par -nearCellValue
81  Output cell value on patches instead of patch value itself
82 
83  - \par -no-boundary
84  Suppress output for all boundary patches
85 
86  - \par -no-internal
87  Suppress output for internal (volume) mesh
88 
89  - \par -no-lagrangian
90  Suppress writing Lagrangian positions and fields.
91 
92  - \par -no-point-data
93  Suppress conversion of pointFields. No interpolated PointData.
94 
95  - \par -with-ids
96  Additional mesh id fields (cellID, procID, patchID)
97 
98  - \par -with-point-ids
99  Additional pointID field for internal mesh
100 
101  - \par -poly-decomp
102  Decompose polyhedral cells into tets/pyramids
103 
104  - \par -one-boundary
105  Combine all patches into a single boundary file
106 
107  - \par -patches NAME | LIST
108  Specify single patch or multiple patches (name or regex) to write
109  For example,
110  \verbatim
111  -patches top
112  -patches '( front \".*back\" )'
113  \endverbatim
114 
115  - \par -excludePatches NAME | LIST
116  Exclude single or multiple patches (name or regex) from writing.
117  For example,
118  \verbatim
119  -excludePatches '( inlet_1 inlet_2 "proc.*")'
120  \endverbatim
121 
122 Note
123  The mesh subset is handled by fvMeshSubsetProxy. Slight inconsistency in
124  interpolation: on the internal field it interpolates the whole volField
125  to the whole-mesh pointField and then selects only those values it
126  needs for the subMesh (using the fvMeshSubset cellMap(), pointMap()
127  functions). For the patches however it uses the
128  fvMeshSubset.interpolate function to directly interpolate the
129  whole-mesh values onto the subset patch.
130 
131 \*---------------------------------------------------------------------------*/
132 
133 #include "fvCFD.H"
134 #include "pointMesh.H"
135 #include "emptyPolyPatch.H"
136 #include "volPointInterpolation.H"
137 #include "faceZoneMesh.H"
138 #include "areaFields.H"
139 #include "fvMeshSubsetProxy.H"
140 #include "faceSet.H"
141 #include "pointSet.H"
142 #include "HashOps.H"
143 #include "regionProperties.H"
144 #include "stringListOps.H"
145 
146 #include "Cloud.H"
147 #include "readFields.H"
148 #include "reportFields.H"
149 
150 #include "foamVtmWriter.H"
151 #include "foamVtkInternalWriter.H"
152 #include "foamVtkPatchWriter.H"
154 #include "foamVtkLagrangianWriter.H"
156 #include "foamVtkWriteTopoSet.H"
157 #include "foamVtkSeriesWriter.H"
158 
159 #include "writeAreaFields.H"
160 #include "writeDimFields.H"
161 #include "writeVolFields.H"
162 #include "writePointFields.H"
163 #include "writeSurfaceFields.H"
164 
165 #include "memInfo.H"
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 labelList getSelectedPatches
170 (
171  const polyBoundaryMesh& patches,
172  const wordRes& allow,
173  const wordRes& deny
174 )
175 {
176  // Name-based selection
177  labelList indices
178  (
180  (
181  patches,
182  allow,
183  deny,
184  nameOp<polyPatch>()
185  )
186  );
187 
188 
189  // Remove undesirable patches
190 
191  label count = 0;
192  for (const label patchi : indices)
193  {
194  const polyPatch& pp = patches[patchi];
195 
196  if (isType<emptyPolyPatch>(pp))
197  {
198  continue;
199  }
200  else if (Pstream::parRun() && bool(isA<processorPolyPatch>(pp)))
201  {
202  break; // No processor patches for parallel output
203  }
204 
205  indices[count] = patchi;
206  ++count;
207  }
208 
209  indices.resize(count);
210 
211  return indices;
212 }
213 
214 
215 //
216 // Process args for output options (-ascii, -legacy)
217 //
218 vtk::outputOptions getOutputOptions(const argList& args)
219 {
220  // Default is inline ASCII xml
221  vtk::outputOptions opts;
222 
223  if (args.found("legacy"))
224  {
225  opts.legacy(true);
226 
227  if (!args.found("ascii"))
228  {
229  if (sizeof(floatScalar) != 4 || sizeof(label) != 4)
230  {
231  opts.ascii(true);
232 
234  << "Using ASCII rather than legacy binary VTK format since "
235  << "floatScalar and/or label are not 4 bytes in size."
236  << nl << endl;
237  }
238  else
239  {
240  opts.ascii(false);
241  }
242  }
243  }
244  else
245  {
246  opts.ascii(args.found("ascii"));
247  }
248 
249  return opts;
250 }
251 
252 
253 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
254 
255 int main(int argc, char *argv[])
256 {
257  argList::addNote
258  (
259  "General OpenFOAM to VTK file writer"
260  );
261  timeSelector::addOptions();
262 
263  // Less frequently used - reduce some clutter
264  argList::setAdvanced("decomposeParDict");
265  argList::setAdvanced("noFunctionObjects");
266 
267  argList::addBoolOption
268  (
269  "ascii",
270  "Write in ASCII format instead of binary"
271  );
272  argList::addBoolOption
273  (
274  "legacy",
275  "Write legacy format instead of xml",
276  true // mark as an advanced option
277  );
278  argList::addBoolOption
279  (
280  "poly-decomp",
281  "Decompose polyhedral cells into tets/pyramids",
282  true // mark as an advanced option
283  );
284  argList::ignoreOptionCompat
285  (
286  {"xml", 1806}, // xml is now default, use -legacy to toggle
287  false // bool option, no argument
288  );
289  argList::ignoreOptionCompat
290  (
291  {"poly", 1806}, // poly is now default, use -poly-decomp to toggle
292  false // bool option, no argument
293  );
294 
295  argList::addOption
296  (
297  "cellSet",
298  "name",
299  "Convert mesh subset corresponding to specified cellSet",
300  true // mark as an advanced option
301  );
302  argList::addOption
303  (
304  "cellZone",
305  "name",
306  "Convert mesh subset corresponding to specified cellZone",
307  true // mark as an advanced option
308  );
309  argList::addOption
310  (
311  "faceSet",
312  "name",
313  "Convert specified faceSet only",
314  true // mark as an advanced option
315  );
316  argList::addOption
317  (
318  "pointSet",
319  "name",
320  "Convert specified pointSet only",
321  true // mark as an advanced option
322  );
323  argList::addOption
324  (
325  "faceZones",
326  "wordRes",
327  "Specify single or multiple faceZones to write\n"
328  "Eg, 'cells' or '( slice \"mfp-.*\" )'.",
329  true // mark as an advanced option
330  );
331 
332  argList::addOption
333  (
334  "fields",
335  "wordRes",
336  "Specify single or multiple fields to write (all by default)\n"
337  "Eg, 'T' or '(p T U \"alpha.*\")'"
338  );
339 
340  argList::addBoolOption
341  (
342  "processor-fields",
343  "Write field values on processor boundaries only",
344  true // mark as an advanced option
345  );
346  argList::addBoolOption
347  (
348  "surfaceFields",
349  "Write surfaceScalarFields (eg, phi)",
350  true // mark as an advanced option
351  );
352  argList::addBoolOption
353  (
354  "finite-area",
355  "Write finite area fields",
356  true // mark as an advanced option
357  );
358  argList::addOptionCompat("finite-area", {"finiteAreaFields", 2012});
359  argList::addBoolOption
360  (
361  "nearCellValue",
362  "Use cell value on patches instead of patch value itself",
363  true // mark as an advanced option
364  );
365  argList::addBoolOption
366  (
367  "no-boundary",
368  "Suppress output for boundary patches"
369  );
370  argList::addBoolOption
371  (
372  "no-internal",
373  "Suppress output for internal volume mesh"
374  );
375  argList::addBoolOption
376  (
377  "no-lagrangian", // noLagrangian
378  "Suppress writing lagrangian positions and fields"
379  );
380  argList::addOptionCompat("no-lagrangian", {"noLagrangian", 1806});
381 
382  argList::addBoolOption
383  (
384  "no-point-data", // noPointValues
385  "Suppress conversion of pointFields. No interpolated PointData."
386  );
387  argList::addOptionCompat("no-point-data", {"noPointValues", 1806});
388 
389  argList::addBoolOption
390  (
391  "with-ids",
392  "Additional mesh id fields (cellID, procID, patchID)",
393  true // mark as an advanced option
394  );
395 
396  argList::addBoolOption
397  (
398  "with-point-ids",
399  "Additional pointID field for internal mesh",
400  true // mark as an advanced option
401  );
402 
403  argList::addBoolOption
404  (
405  "one-boundary", // allPatches
406  "Combine all patches into a single file"
407  );
408  argList::addOptionCompat("one-boundary", {"allPatches", 1806});
409 
410  #include "addAllRegionOptions.H"
411 
412  argList::addOption
413  (
414  "patches",
415  "wordRes",
416  "Specify single patch or multiple patches to write\n"
417  "Eg, 'top' or '( front \".*back\" )'"
418  );
419  argList::addOption
420  (
421  "excludePatches",
422  "wordRes",
423  "Exclude single or multiple patches from writing\n"
424  "Eg, 'outlet' or '( inlet \".*Wall\" )'",
425  true // mark as an advanced option
426  );
427  argList::ignoreOptionCompat
428  (
429  {"noFaceZones", 1806}, // faceZones are only enabled on demand
430  false // bool option, no argument
431  );
432  argList::ignoreOptionCompat
433  (
434  {"noLinks", 1806}, // ignore never make any links
435  false // bool option, no argument
436  );
437  argList::ignoreOptionCompat
438  (
439  {"useTimeName", 1806}, // ignore - works poorly with VTM formats
440  false // bool option, no argument
441  );
442  argList::addBoolOption
443  (
444  "overwrite",
445  "Remove any existing VTK output directory"
446  );
447  argList::addOption
448  (
449  "name",
450  "subdir",
451  "Directory name for VTK output (default: 'VTK')"
452  );
453 
454  #include "setRootCase.H"
455 
456  const bool decomposePoly = args.found("poly-decomp");
457  const bool doBoundary = !args.found("no-boundary");
458  const bool doInternal = !args.found("no-internal");
459  const bool doLagrangian = !args.found("no-lagrangian");
460  const bool doFiniteArea = args.found("finite-area");
461  const bool doSurfaceFields = args.found("surfaceFields");
462 
463  const bool oneBoundary = args.found("one-boundary") && doBoundary;
464  const bool nearCellValue = args.found("nearCellValue") && doBoundary;
465 
466  const vtk::outputOptions writeOpts = getOutputOptions(args);
467 
468  bool processorFieldsOnly = false;
469 
470  if (args.found("processor-fields"))
471  {
472  if (!Pstream::parRun())
473  {
474  Info<< "Ignoring processor patch writing in serial"
475  << nl << endl;
476  }
477  else if (writeOpts.legacy())
478  {
479  Info<< "Ignoring processor patch writing in legacy format"
480  << nl << endl;
481  }
482  else
483  {
484  processorFieldsOnly = true;
485 
486  Info<< "Writing processor patch fields only"
487  << nl << endl;
488  }
489  }
490 
491  if (nearCellValue)
492  {
493  Info<< "Using neighbouring cell value instead of patch value"
494  << nl << endl;
495  }
496 
497  const bool doPointValues = !args.found("no-point-data");
498  if (!doPointValues)
499  {
500  Info<< "Point fields and interpolated point data"
501  << " disabled with the '-no-point-data' option"
502  << nl;
503  }
504 
505  const bool withPointIds = args.found("with-point-ids");
506  if (withPointIds)
507  {
508  Info<< "Write point ids requested";
509 
510  if (!doPointValues)
511  {
512  Info<< ", but ignored due to the '-no-point-data' option";
513  }
514 
515  Info<< nl;
516  }
517 
518  const bool withMeshIds = args.found("with-ids");
519  if (withMeshIds)
520  {
521  Info<< "Writing mesh ids (cell, patch, proc) requested" << nl;
522  }
523 
524  wordRes includePatches, excludePatches;
525  if (doBoundary)
526  {
527  if (args.readListIfPresent<wordRe>("patches", includePatches))
528  {
529  Info<< "Including patches " << flatOutput(includePatches)
530  << nl << endl;
531  }
532  if (args.readListIfPresent<wordRe>("excludePatches", excludePatches))
533  {
534  Info<< "Excluding patches " << flatOutput(excludePatches)
535  << nl << endl;
536  }
537  }
538 
539  // Can be specified as empty (ie, no fields)
540  wordRes selectedFields;
541  const bool useFieldFilter =
542  args.readListIfPresent<wordRe>("fields", selectedFields);
543 
544  // Non-mandatory
545  const wordRes selectedFaceZones(args.getList<wordRe>("faceZones", false));
546 
547  #include "createTime.H"
548 
549  instantList timeDirs = timeSelector::select0(runTime, args);
550 
551  // Information for file series
552  HashTable<vtk::seriesWriter, fileName> vtkSeries;
553 
554  // Handle -allRegions, -regions, -region
555  #include "getAllRegionOptions.H"
556 
557  // Names for sets and zones
558  word cellSelectionName;
559  word faceSetName;
560  word pointSetName;
561 
562  fvMeshSubsetProxy::subsetType cellSubsetType = fvMeshSubsetProxy::NONE;
563 
564  string vtkName = args.globalCaseName();
565 
566  if (regionNames.size() == 1)
567  {
568  if (args.readIfPresent("cellSet", cellSelectionName))
569  {
570  vtkName = cellSelectionName;
571  cellSubsetType = fvMeshSubsetProxy::SET;
572 
573  Info<< "Converting cellSet " << cellSelectionName
574  << " only. New outside faces as \"oldInternalFaces\"."
575  << nl;
576  }
577  else if (args.readIfPresent("cellZone", cellSelectionName))
578  {
579  vtkName = cellSelectionName;
580  cellSubsetType = fvMeshSubsetProxy::ZONE;
581 
582  Info<< "Converting cellZone " << cellSelectionName
583  << " only. New outside faces as \"oldInternalFaces\"."
584  << nl;
585  }
586 
587  args.readIfPresent("faceSet", faceSetName);
588  args.readIfPresent("pointSet", pointSetName);
589  }
590  else
591  {
592  for
593  (
594  const word& opt
595  : { "cellSet", "cellZone", "faceSet", "pointSet" }
596  )
597  {
598  if (args.found(opt))
599  {
600  Info<< "Ignoring -" << opt << " for multi-regions" << nl;
601  }
602  }
603  }
604 
605  // ------------------------------------------------------------------------
606  // Directory management
607 
608  // Sub-directory for output
609  const word vtkDirName = args.getOrDefault<word>("name", "VTK");
610 
611  const fileName outputDir(args.globalPath()/vtkDirName);
612 
613  if (Pstream::master())
614  {
615  // Overwrite or create the VTK/regionName directories.
616  // For the default region, this is simply "VTK/"
617 
618  for (const word& regionName : regionNames)
619  {
620  const word& regionDir =
621  (
622  regionName == polyMesh::defaultRegion ? word::null : regionName
623  );
624 
625  fileName regionalDir(outputDir/regionDir);
626 
627  if (args.found("overwrite") && Foam::isDir(regionalDir))
628  {
629  Info<< "Removing old directory "
630  << args.relativePath(regionalDir)
631  << nl << endl;
632  Foam::rmDir(regionalDir);
633  }
634  Foam::mkDir(regionalDir);
635  }
636  }
637 
638  // ------------------------------------------------------------------------
639 
640  cpuTime timer;
641  memInfo mem;
642  Info<< "Initial memory " << mem.update().size() << " kB" << endl;
643 
644  #include "createNamedMeshes.H"
645  #include "createMeshAccounting.H"
646 
647  Info<< "VTK mesh topology: "
648  << timer.cpuTimeIncrement() << " s, "
649  << mem.update().size() << " kB" << endl;
650 
651 
652  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
653 
654  forAll(timeDirs, timei)
655  {
656  runTime.setTime(timeDirs[timei], timei);
657 
658  const word timeDesc = "_" + Foam::name(runTime.timeIndex());
659  const scalar timeValue = runTime.value();
660 
661  Info<< "Time: " << runTime.timeName() << endl;
662 
663 
664  // Accumulate information for multi-region VTM
665  vtk::vtmWriter vtmMultiRegion;
666 
667  // vtmMultiRegion.set(vtkDir/vtkName + timeDesc)
668 
669  forAll(regionNames, regioni)
670  {
671  const word& regionName = regionNames[regioni];
672  const word& regionDir =
673  (
674  regionName == polyMesh::defaultRegion ? word::null : regionName
675  );
676  if (regionNames.size() > 1 || !regionDir.empty())
677  {
678  Info<< "region = " << regionName << nl;
679  }
680 
681  auto& meshProxy = meshProxies[regioni];
682  auto& vtuMeshCells = vtuMappings[regioni];
683 
684  // polyMesh::readUpdateState meshState = mesh.readUpdate();
685 
686  // Check for new polyMesh/ and update mesh, fvMeshSubset
687  // and cell decomposition.
688  polyMesh::readUpdateState meshState =
689  meshProxy.readUpdate();
690 
691  const fvMesh& mesh = meshProxy.mesh();
692 
693  if
694  (
695  meshState == polyMesh::TOPO_CHANGE
696  || meshState == polyMesh::TOPO_PATCH_CHANGE
697  )
698  {
699  // Trigger change for vtk cells too
700  vtuMeshCells.clear();
701  }
702 
703  // Write topoSets before attempting anything else
704  {
705  #include "convertTopoSet.H"
706  if (wroteTopoSet)
707  {
708  continue;
709  }
710  }
711 
712  // Search for list of objects for this time
713  IOobjectList objects(meshProxy.baseMesh(), runTime.timeName());
714 
715  if (useFieldFilter)
716  {
717  objects.filterObjects(selectedFields);
718  }
719 
720  // Prune restart fields
721  objects.prune_0();
722 
723  if (!doPointValues)
724  {
725  // Prune point fields if disabled
726  objects.filterClasses
727  (
728  [](const word& clsName)
729  {
730  return fieldTypes::point.found(clsName);
731  },
732  true // prune
733  );
734  }
735 
736  if (processorFieldsOnly)
737  {
738  // Processor-patches only and continue
739  #include "convertProcessorPatches.H"
740  continue;
741  }
742 
743  // Volume, internal, point fields
744  #include "convertVolumeFields.H"
745 
746  // Surface fields
747  #include "convertSurfaceFields.H"
748 
749  // Finite-area mesh and fields - need not exist
750  #include "convertAreaFields.H"
751 
752  // Write lagrangian data
753  #include "convertLagrangian.H"
754  }
755 
756  // Emit multi-region vtm
757  if (Pstream::master() && regionNames.size() > 1)
758  {
759  fileName outputName
760  (
761  outputDir/vtkName + "-regions" + timeDesc + ".vtm"
762  );
763 
764  vtmMultiRegion.setTime(timeValue);
765  vtmMultiRegion.write(outputName);
766 
767  fileName seriesName(vtk::seriesWriter::base(outputName));
768 
769  vtk::seriesWriter& series = vtkSeries(seriesName);
770 
771  // First time?
772  // Load from file, verify against filesystem,
773  // prune time >= currentTime
774  if (series.empty())
775  {
776  series.load(seriesName, true, timeValue);
777  }
778 
779  series.append(timeValue, outputName);
780  series.write(seriesName);
781  }
782 
783  Info<< "Wrote in "
784  << timer.cpuTimeIncrement() << " s, "
785  << mem.update().size() << " kB" << endl;
786  }
787 
788 
789  Info<< "\nEnd: "
790  << timer.elapsedCpuTime() << " s, "
791  << mem.update().peak() << " kB (peak)\n" << endl;
792 
793  return 0;
794 }
795 
796 
797 // ************************************************************************* //
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:67
runTime
engineTime & runTime
Definition: createEngineTime.H:13
vtmWriter
vtk::vtmWriter vtmWriter
Definition: convertVolumeFields.H:72
regionProperties.H
writeSurfaceFields.H
Write surface fields from volume mesh.
Foam::argList::getOrDefault
T getOrDefault(const word &optName, const T &deflt) const
Get a value from the named option if present, or return default.
Definition: argListI.H:307
reportFields.H
Foam::floatScalar
float floatScalar
A typedef for float.
Definition: scalarFwd.H:45
Cloud.H
Foam::argList::globalCaseName
const fileName & globalCaseName() const noexcept
Return global case name.
Definition: argListI.H:75
Foam::PtrListOps::findMatching
labelList findMatching(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
Extract list indices for all items with 'name()' that matches.
Foam::argList::readListIfPresent
bool readListIfPresent(const word &optName, List< T > &list) const
Definition: argListI.H:394
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
Foam::instantList
List< instant > instantList
List of instants.
Definition: instantList.H:44
Foam::argList::readIfPresent
bool readIfPresent(const word &optName, T &val) const
Read a value from the named option if present.
Definition: argListI.H:323
foamVtmWriter.H
foamVtkLagrangianWriter.H
convertProcessorPatches.H
Code chunk for converting volume fields on processor boundaries, included by foamToVTK.
regionNames
wordList regionNames
Definition: getAllRegionOptions.H:37
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:296
outputName
word outputName("finiteArea-edges.obj")
regionName
Foam::word regionName
Definition: createNamedDynamicFvMesh.H:1
Foam::cpuTime
cpuTimeCxx cpuTime
Selection of preferred clock mechanism for the elapsed cpu time.
Definition: cpuTimeFwd.H:41
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
convertTopoSet.H
Code chunk for converting face and point sets - included by foamToVTK.
faceSet.H
convertSurfaceFields.H
Code chunk for post-processing surface fields to VTK PolyData.
foamVtkSeriesWriter.H
areaFields.H
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
faceZoneMesh.H
Foam::faceZoneMesh.
Foam::flatOutput
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
Definition: FlatOutput.H:216
fvMeshSubsetProxy.H
foamVtkSurfaceFieldWriter.H
meshProxies
PtrList< fvMeshSubsetProxy > meshProxies(meshes.size())
emptyPolyPatch.H
foamVtkPatchWriter.H
getAllRegionOptions.H
Priority.
volPointInterpolation.H
setRootCase.H
addAllRegionOptions.H
Foam::nl
constexpr char nl
Definition: Ostream.H:404
Foam::rmDir
bool rmDir(const fileName &directory, const bool silent=false)
Remove a directory and its contents (optionally silencing warnings)
Definition: MSwindows.C:1028
Foam::BitOps::count
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
Definition: BitOps.H:77
vtuMappings
PtrList< vtk::vtuCells > vtuMappings(meshes.size())
wroteTopoSet
bool wroteTopoSet
Definition: convertTopoSet.H:32
Foam::argList::globalPath
fileName globalPath() const
Return the full path to the global case.
Definition: argListI.H:87
createTime.H
patches
const polyBoundaryMesh & patches
Definition: convertProcessorPatches.H:65
Foam::argList::getList
List< T > getList(const label index) const
Get a List of values from the argument at index.
Foam::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
foamVtkInternalWriter.H
fvCFD.H
stringListOps.H
Operations on lists of strings.
foamVtkWriteTopoSet.H
Write topoSet in VTK format.
foamVtkSurfaceMeshWriter.H
regionDir
const word & regionDir
Definition: findMeshDefinitionDict.H:34
Foam::point
vector point
Point is a vector.
Definition: point.H:43
args
Foam::argList args(argc, argv)
Foam::mkDir
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
Definition: MSwindows.C:507
WarningInFunction
#define WarningInFunction
Report a warning using Foam::Warning.
Definition: messageStream.H:328
createNamedMeshes.H
Required Variables.
Foam::argList::relativePath
fileName relativePath(const fileName &input, const bool caseTag=false) const
Definition: argListI.H:94
pointMesh.H
HashOps.H
Foam::isDir
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
Definition: MSwindows.C:643
Foam::argList::found
bool found(const word &optName) const
Return true if the named option is found.
Definition: argListI.H:178
pointSet.H