vtkPVFoam.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2026 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::vtkPVFoam
26 
27 Description
28  Provides a reader interface for OpenFOAM to VTK interaction.
29 
30 SourceFiles
31  vtkPVFoam.C
32  vtkPVFoam.H
33  vtkPVFoamFields.C
34  vtkPVFoamMesh.C
35  vtkPVFoamMeshLagrangian.C
36  vtkPVFoamTemplates.C
37  vtkPVFoamMeshSet.C
38  vtkPVFoamMeshVolume.C
39  vtkPVFoamMeshZone.C
40  vtkPVFoamSurfaceField.H
41  vtkPVFoamLagrangianFields.H
42  vtkPVFoamPatchField.H
43  vtkPVFoamPointFields.H
44  vtkPVFoamPoints.H
45  vtkPVFoamUpdateInfo.C
46  vtkPVFoamUtils.C
47  vtkPVFoamVolFields.H
48  vtkPVFoamAddToSelection.H
49 
50 \*---------------------------------------------------------------------------*/
51 
52 #ifndef vtkPVFoam_H
53 #define vtkPVFoam_H
54 
55 // do not include legacy strstream headers
56 #ifndef VTK_EXCLUDE_STRSTREAM_HEADERS
57  #define VTK_EXCLUDE_STRSTREAM_HEADERS
58 #endif
59 
60 #include "className.H"
61 #include "fileName.H"
62 #include "stringList.H"
63 #include "wordList.H"
64 #include "primitivePatch.H"
66 #include "dictionary.H"
67 #include "PtrList.H"
68 #include "HashSet.H"
69 #include "IOField.H"
70 #include "volFieldsFwd.H"
71 #include "surfaceFieldsFwd.H"
72 #include "pointFieldsFwd.H"
73 
74 #undef Log
75 
76 // * * * * * * * * * * * * * Forward Declarations * * * * * * * * * * * * * //
77 
78 class vtkDataArraySelection;
79 class vtkDataSet;
80 class vtkPoints;
81 class vtkPVFoamReader;
82 class vtkRenderer;
83 class vtkTextActor;
84 class vtkMultiBlockDataSet;
85 class vtkPolyData;
86 class vtkUnstructuredGrid;
87 class vtkIndent;
88 
89 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90 
91 namespace Foam
92 {
93 
94 // OpenFOAM class forward declarations
95 class argList;
96 class Time;
97 class processorRunTimes;
98 class domainDecomposition;
99 class fvMesh;
100 class IOobjectList;
101 class polyPatch;
102 class faceSet;
103 class pointSet;
104 class fvFieldReconstructor;
105 class pointFieldReconstructor;
106 class lagrangianFieldReconstructor;
107 class LagrangianMesh;
108 class LagrangianFieldReconstructor;
109 
110 /*---------------------------------------------------------------------------*\
111  Class vtkPVFoam Declaration
112 \*---------------------------------------------------------------------------*/
113 
114 class vtkPVFoam
115 {
116  // Private classes
117 
118  //- Bookkeeping for GUI checklists and the multi-block organisation
119  class arrayRange
120  {
121  const char *name_;
122  int block_;
123  int start_;
124  int size_;
125 
126  public:
127 
128  arrayRange(const char *name, const int blockNo=0)
129  :
130  name_(name),
131  block_(blockNo),
132  start_(0),
133  size_(0)
134  {}
135 
136  //- Return the block holding these datasets
137  int block() const
138  {
139  return block_;
140  }
141 
142  //- Assign block number, return previous value
143  int block(int blockNo)
144  {
145  int prev = block_;
146  block_ = blockNo;
147  return prev;
148  }
149 
150  //- Return block name
151  const char* name() const
152  {
153  return name_;
154  }
155 
156  //- Return array start index
157  int start() const
158  {
159  return start_;
160  }
161 
162  //- Return array end index
163  int end() const
164  {
165  return start_ + size_;
166  }
167 
168  //- Return sublist size
169  int size() const
170  {
171  return size_;
172  }
173 
174  bool empty() const
175  {
176  return !size_;
177  }
178 
179  //- Reset the size to zero and optionally assign a new start
180  void reset(const int startAt = 0)
181  {
182  start_ = startAt;
183  size_ = 0;
184  }
185 
186  //- Increment the size
187  void operator+=(const int n)
188  {
189  size_ += n;
190  }
191  };
192 
193  //- Bookkeeping for polyhedral cell decomposition
194  // hide in extra pointMap (cellSet/cellZone) for now
195  class polyDecomp
196  {
197  labelList superCells_;
198  labelList addPointCellLabels_;
199  labelList pointMap_;
200 
201  public:
202 
203  polyDecomp()
204  {}
205 
206  //- Label of original cell for decomposed cells
207  labelList& superCells()
208  {
209  return superCells_;
210  }
211 
212  //- Label of original cell for decomposed cells
213  const labelList& superCells() const
214  {
215  return superCells_;
216  }
217 
218  //- Cell-centre labels for additional points of decomposed cells
219  labelList& addPointCellLabels()
220  {
221  return addPointCellLabels_;
222  }
223 
224  //- Cell-centre labels for additional points of decomposed cells
225  const labelList& addPointCellLabels() const
226  {
227  return addPointCellLabels_;
228  }
229 
230  //- Point labels for subsetted meshes
231  labelList& pointMap()
232  {
233  return pointMap_;
234  }
235 
236  //- Point labels for subsetted meshes
237  const labelList& pointMap() const
238  {
239  return pointMap_;
240  }
241 
242 
243  //- Clear
244  void clear()
245  {
246  superCells_.clear();
247  addPointCellLabels_.clear();
248  pointMap_.clear();
249  }
250  };
251 
252 
253  // Private Data
254 
255  //- Access to the controlling vtkPVFoamReader
256  vtkPVFoamReader* reader_;
257 
258  //- Configuration dictionary
259  dictionary configDict_;
260 
261  //- OpenFOAM time controls
262  autoPtr<processorRunTimes> procDbsPtr_;
263 
264  //- OpenFOAM meshes
265  autoPtr<domainDecomposition> procMeshesPtr_;
266 
267  //- The mesh in the optional meshes sub-directory
268  word meshMesh_;
269 
270  //- Path to the mesh in the optional meshes sub-directory
271  word meshPath_;
272 
273  //- The mesh region
274  word meshRegion_;
275 
276  //- The mesh directory
277  fileName meshDir_;
278 
279  //- The time index
280  int timeIndex_;
281 
282  //- Selected geometrical parts (internalMesh, patches, ...)
283  boolList partStatus_;
284 
285  //- Datasets corresponding to selected geometrical pieces
286  // a negative number indicates that no vtkmesh exists for this piece
287  labelList partDataset_;
288 
289  //- First instance and size of various mesh parts
290  // used to index into partStatus_ and partDataset_
291  arrayRange arrayRangeVolume_;
292  arrayRange arrayRangePatches_;
293  arrayRange arrayRangelagrangian_;
294  arrayRange arrayRangeLagrangian_;
295  arrayRange arrayRangeCellZones_;
296  arrayRange arrayRangeFaceZones_;
297  arrayRange arrayRangePointZones_;
298  arrayRange arrayRangeCellSets_;
299  arrayRange arrayRangeFaceSets_;
300  arrayRange arrayRangePointSets_;
301 
302  //- Decomposed cells information (mesh regions)
303  List<polyDecomp> regionPolyDecomp_;
304 
305  //- Decomposed cells information (cellZones)
306  List<polyDecomp> zonePolyDecomp_;
307 
308  //- Decomposed cells information (cellSets)
309  List<polyDecomp> setPolyDecomp_;
310 
311  //- List of patch names for rendering to window
312  List<vtkTextActor*> patchTextActorsPtrs_;
313 
314  //- Finite-volume field reconstructor
315  autoPtr<fvFieldReconstructor> fvReconstructorPtr_;
316 
317  //- Point field reconstructor
318  autoPtr<pointFieldReconstructor> pointReconstructorPtr_;
319 
320  //- lagrangian field reconstructors
321  PtrList<lagrangianFieldReconstructor> lagrangianReconstructors_;
322 
323  //- Lagrangian meshes
324  PtrList<LagrangianMesh> LagrangianMeshes_;
325 
326  //- Lagrangian field reconstructors
327  PtrList<LagrangianFieldReconstructor> LagrangianReconstructors_;
328 
329 
330  // Private Member Functions
331 
332  // Convenience method use to convert the readers from VTK 5
333  // multiblock API to the current composite data infrastructure
334  static void AddToBlock
335  (
336  vtkMultiBlockDataSet* output,
337  vtkDataSet* dataset,
338  const arrayRange&,
339  const label datasetNo,
340  const std::string& datasetName
341  );
342 
343  // Convenience method use to convert the readers from VTK 5
344  // multiblock API to the current composite data infrastructure
345  static vtkDataSet* GetDataSetFromBlock
346  (
347  vtkMultiBlockDataSet* output,
348  const arrayRange&,
349  const label datasetNo
350  );
351 
352  // Convenience method use to convert the readers from VTK 5
353  // multiblock API to the current composite data infrastructure
354  static label GetNumberOfDataSets
355  (
356  vtkMultiBlockDataSet* output,
357  const arrayRange&
358  );
359 
360 
361  // Update information helper functions
362 
363  //- Update the mesh parts selected in the GUI
364  void topoChangePartsStatus();
365 
366  //- Internal mesh info
367  void updateInfoInternalMesh(vtkDataArraySelection*);
368 
369  //- Lagrangian info
370  void updateInfolagrangian(vtkDataArraySelection*);
371 
372  //- Lagrangian info
373  void updateInfoLagrangian(vtkDataArraySelection*);
374 
375  //- Patch info
376  void updateInfoPatches
377  (
378  vtkDataArraySelection*,
379  stringList&,
380  const bool
381  );
382 
383  //- Set info
384  void updateInfoSets(vtkDataArraySelection*);
385 
386  //- Zone info
387  void updateInfoZones(vtkDataArraySelection*);
388 
389  //- Get non-empty zone names for zoneType from file
390  template<class ZonesType>
391  wordList getZoneNames(const word& zonesName) const;
392 
393  //- Get non-empty zone names from mesh info
394  template<class ZonesType>
395  wordList getZoneNames(const ZonesType&) const;
396 
397  //- Add objects of Type to paraview array selection
398  template<class Type>
399  label addToSelection
400  (
401  vtkDataArraySelection*,
402  const IOobjectList&,
403  const string& suffix=string::null
404  );
405 
406  //- Add objects of Type to paraview array selection
407  template<class meshType>
408  void addFieldsToSelection
409  (
410  vtkDataArraySelection *select,
411  const IOobjectList& objects,
412  const string& suffix=string::null
413  );
414 
415  //- Add objects of Type to paraview array selection
416  template<class meshType>
417  void addInternalFieldsToSelection
418  (
419  vtkDataArraySelection *select,
420  const IOobjectList& objects,
421  const string& suffix=string::null
422  );
423 
424  //- Field info
425  void updateInfoFields();
426 
427  //- Lagrangian field info
428  void updateInfolagrangianFields();
429 
430  //- Lagrangian field info
431  void updateInfoLagrangianFields();
432 
433 
434  // Update helper functions
435 
436  //- Clear the reconstructor objects
437  void clearReconstructors();
438 
439  //- Clear the OpenFOAM mesh if "Cache Mesh" is false and/or if we
440  // have switched from reading between the reconstructed and the
441  // decomposed case.
442  void clearFoamMesh();
443 
444  //- OpenFOAM mesh
445  void updateFoamMesh();
446 
447  //- Reset data counters
448  void resetCounters();
449 
450  //- Reduce memory footprint after conversion
451  void reduceMemory();
452 
453  //- Volume fields
454  void updateVolFields(vtkMultiBlockDataSet*);
455 
456  //- Point fields
457  void updatePointFields(vtkMultiBlockDataSet*);
458 
459  //- Lagrangian fields
460  void updatelagrangianFields(vtkMultiBlockDataSet*);
461 
462  //- Lagrangian fields
463  void updateLagrangianFields(vtkMultiBlockDataSet*);
464 
465 
466  // Mesh conversion functions
467 
468  //- Volume mesh
469  void convertMeshVolume(vtkMultiBlockDataSet*, int& blockNo);
470 
471  //- Lagrangian mesh
472  void convertMeshlagrangian(vtkMultiBlockDataSet*, int& blockNo);
473 
474  //- Lagrangian mesh
475  void convertMeshLagrangian(vtkMultiBlockDataSet*, int& blockNo);
476 
477  //- Patches
478  void convertMeshPatches(vtkMultiBlockDataSet*, int& blockNo);
479 
480  //- Cell zones
481  void convertMeshCellZones(vtkMultiBlockDataSet*, int& blockNo);
482 
483  //- Face zones
484  void convertMeshFaceZones(vtkMultiBlockDataSet*, int& blockNo);
485 
486  //- Point zones
487  void convertMeshPointZones(vtkMultiBlockDataSet*, int& blockNo);
488 
489  //- Cell sets
490  void convertMeshCellSets(vtkMultiBlockDataSet*, int& blockNo);
491 
492  //- Face sets
493  void convertMeshFaceSets(vtkMultiBlockDataSet*, int& blockNo);
494 
495  //- Point sets
496  void convertMeshPointSets(vtkMultiBlockDataSet*, int& blockNo);
497 
498 
499  // Add mesh functions
500 
501  //- Add internal mesh/cell set
502  vtkUnstructuredGrid* volumeVTKMesh(const fvMesh&, polyDecomp&);
503 
504  //- Add Lagrangian mesh
505  vtkPolyData* lagrangianVTKMesh
506  (
507  const word&,
509  );
510 
511  //- Add Lagrangian mesh
512  vtkPolyData* LagrangianVTKMesh
513  (
514  const word&,
517  );
518 
519  //- Add patch mesh
520  template<class PatchType>
521  vtkPolyData* patchVTKMesh(const PatchType&);
522 
523  //- Add point zone
524  vtkPolyData* pointZoneVTKMesh(const fvMesh&, const labelList&);
525 
526  //- Add face set
527  vtkPolyData* faceSetVTKMesh(const fvMesh&, const faceSet&);
528 
529  //- Add point mesh
530  vtkPolyData* pointSetVTKMesh(const fvMesh&, const pointSet&);
531 
532 
533  // Field conversion functions
534 
535  //- Convert fields
536  void convertFields(vtkMultiBlockDataSet*);
537 
538  //- Convert Lagrangian fields
539  void convertlagrangianFields(vtkMultiBlockDataSet*);
540 
541  //- Convert Lagrangian fields
542  void convertLagrangianFields(vtkMultiBlockDataSet*);
543 
544 
545  //- Add the fields in the selected time directory to the selection
546  // lists
547  template<class GeoField>
548  label addObjectsToSelection
549  (
550  vtkDataArraySelection*,
551  const IOobjectList&,
552  const string& suffix=string::null
553  );
554 
555 
556  // Convert OpenFOAM fields
557 
558  //- Volume fields - all types
559  template<class Type>
560  void convertVolFields
561  (
563  const IOobjectList&,
564  const bool interpFields,
565  vtkMultiBlockDataSet* output
566  );
567 
568  //- Volume internal fields - all types
569  template<class Type>
570  void convertVolInternalFields
571  (
572  const IOobjectList&,
573  vtkMultiBlockDataSet* output
574  );
575 
576  //- Volume field - all selected parts
577  template<class Type>
578  void convertVolFieldBlock
579  (
580  const VolField<Type>&,
582  vtkMultiBlockDataSet* output,
583  const arrayRange&,
584  const List<polyDecomp>& decompLst
585  );
586 
587  //- Volume internal field - all selected parts
588  template<class Type>
589  void convertVolInternalFieldBlock
590  (
591  const typename VolField<Type>::Internal&,
592  vtkMultiBlockDataSet* output,
593  const arrayRange&,
594  const List<polyDecomp>& decompLst
595  );
596 
597  //- Volume field
598  template<class Type>
599  void convertVolInternalField
600  (
601  const typename VolField<Type>::Internal&,
602  vtkMultiBlockDataSet* output,
603  const arrayRange&,
604  const label datasetNo,
605  const polyDecomp&
606  );
607 
608  //- Patch field
609  template<class Type>
610  void convertPatchField
611  (
612  const word& name,
613  const Field<Type>&,
614  vtkMultiBlockDataSet* output,
615  const arrayRange&,
616  const label datasetNo
617  );
618 
619  //- Face set/zone field from volField
620  template<class Type>
621  void convertSurfaceField
622  (
623  const VolField<Type>&,
624  vtkMultiBlockDataSet* output,
625  const arrayRange&,
626  const label datasetNo,
627  const fvMesh&,
628  const labelList& faceLabels
629  );
630 
631  //- Face set/zone field from surfaceField
632  template<class Type>
633  void convertSurfaceField
634  (
635  const SurfaceField<Type>& tf,
636  vtkMultiBlockDataSet* output,
637  const arrayRange& range,
638  const label datasetNo,
639  const fvMesh& mesh,
640  const labelList& faceLabels
641  );
642 
643  //- Surface fields - all types
644  template<class Type>
645  void convertSurfaceFields
646  (
647  const IOobjectList& objects,
648  vtkMultiBlockDataSet* output
649  );
650 
651  //- Lagrangian fields - all types
652  template<class Type>
653  void convertlagrangianFields
654  (
655  const IOobjectList&,
656  vtkMultiBlockDataSet* output,
657  const label datasetNo
658  );
659 
660  //- Lagrangian fields - all types
661  template<class Type, template<class> class GeoField>
662  void convertLagrangianFields
663  (
664  const IOobjectList&,
665  vtkMultiBlockDataSet* output,
666  const label datasetNo
667  );
668 
669  //- Lagrangian field
670  template<class Type>
671  void convertlagrangianField
672  (
673  const IOField<Type>&,
674  vtkMultiBlockDataSet* output,
675  const arrayRange&,
676  const label datasetNo
677  );
678 
679  //- Lagrangian field
680  template<class Type, template<class> class GeoField>
681  void convertLagrangianField
682  (
683  const GeoField<Type>&,
684  vtkMultiBlockDataSet* output,
685  const arrayRange&,
686  const label datasetNo
687  );
688 
689  //- Point fields - all types
690  template<class Type>
691  void convertPointFields
692  (
693  const IOobjectList&,
694  vtkMultiBlockDataSet* output
695  );
696 
697  //- Point field - all selected parts
698  template<class Type>
699  void convertPointFieldBlock
700  (
701  const PointField<Type>&,
702  vtkMultiBlockDataSet* output,
703  const arrayRange&,
704  const List<polyDecomp>&
705  );
706 
707  //- Point fields
708  template<class Type>
709  void convertPointField
710  (
711  const PointField<Type>&,
712  const VolField<Type>&,
713  vtkMultiBlockDataSet* output,
714  const arrayRange&,
715  const label datasetNo,
716  const polyDecomp&
717  );
718 
719  //- Patch point field
720  template<class Type>
721  void convertPatchPointField
722  (
723  const word& name,
724  const Field<Type>&,
725  vtkMultiBlockDataSet* output,
726  const arrayRange&,
727  const label datasetNo
728  );
729 
730 
731  // GUI selection helper functions
732 
733  //- Only keep what is listed in hashSet
734  static void pruneObjectList
735  (
736  IOobjectList&,
737  const wordHashSet&
738  );
739 
740  //- Get the list of selected objects
741  IOobjectList getObjects
742  (
743  const wordHashSet& selected,
744  const fvMesh& mesh,
745  const fileName& instance,
746  const fileName& local = ""
747  );
748 
749  //- Retrieve the current selections
750  static wordHashSet getSelected(vtkDataArraySelection*);
751 
752  //- Retrieve a sub-list of the current selections
753  static wordHashSet getSelected
754  (
755  vtkDataArraySelection*,
756  const arrayRange&
757  );
758 
759  //- Retrieve the current selections
760  static stringList getSelectedArrayEntries
761  (
762  vtkDataArraySelection*,
763  const bool debug = vtkPVFoam::debug
764  );
765 
766  //- Retrieve a sub-list of the current selections
767  static stringList getSelectedArrayEntries
768  (
769  vtkDataArraySelection*,
770  const arrayRange&,
771  const bool debug = vtkPVFoam::debug
772  );
773 
774  //- Set selection(s)
775  static void setSelectedArrayEntries
776  (
777  vtkDataArraySelection*,
778  const stringList&
779  );
780 
781  //- Get the first word from the mesh parts selection
782  word getPartName(const int);
783 
784 
785 public:
786 
787  //- Static data members
788 
789  ClassName("vtkPVFoam");
790 
791 
792  // Constructors
793 
794  //- Construct from components
795  vtkPVFoam
796  (
797  const char* const FileName,
798  vtkPVFoamReader* reader
799  );
800 
801  //- Disallow default bitwise copy construction
802  vtkPVFoam(const vtkPVFoam&) = delete;
803 
804 
805  //- Destructor
806  ~vtkPVFoam();
807 
808 
809  // Member Functions
810 
811  //- Update information for selection dialogs
812  void updateInfo();
813 
814  //- Update
815  void Update
816  (
817  vtkMultiBlockDataSet* output,
818  vtkMultiBlockDataSet* lagrangianOutput,
819  vtkMultiBlockDataSet* LagrangianOutput
820  );
821 
822  //- Clean any storage
823  void CleanUp();
824 
825  //- Allocate and return a list of selected times
826  // returns the count via the parameter
827  double* findTimes(const bool first, int& nTimeSteps);
828 
829  //- Add/remove patch names to/from the view
830  void renderPatchNames(vtkRenderer*, const bool show);
831 
832  //- Set the runTime to the first plausible request time,
833  // returns the timeIndex
834  // sets to "constant" on error
835  int setTime(int count, const double requestTimes[]);
836 
837  //- The current time index
838  int timeIndex() const
839  {
840  return timeIndex_;
841  }
842 
843 
844  // Access
845 
846  //- Debug information
847  void PrintSelf(ostream&, vtkIndent) const;
848 
849 
850  // Member Operators
851 
852  //- Disallow default bitwise assignment
853  void operator=(const vtkPVFoam&) = delete;
854 };
855 
856 
857 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
858 
859 } // End namespace Foam
860 
861 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
862 
863 #ifdef NoRepository
864  #include "vtkPVFoamTemplates.C"
865 #endif
866 
867 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
868 
869 #endif
870 
871 // ************************************************************************* //
scalar range
label n
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Pre-declare SubField and related Field type.
Definition: Field.H:83
Generic GeometricField class.
A HashTable with keys but without contents.
Definition: HashSet.H:62
A primitive field of type <Type> with automated input and output.
Definition: IOField.H:53
List of IOobjects with searching and retrieving facilities.
Definition: IOobjectList.H:53
void clear()
Clear the list, i.e. set size to zero.
Definition: ListI.H:125
Interpolation class within a primitive patch. Allows interpolation from points to faces and vice vers...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Creates a single block of cells from point coordinates, numbers of cells in each direction and an exp...
Definition: block.H:66
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
A list of face labels.
Definition: faceSet.H:51
A class for handling file names.
Definition: fileName.H:82
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:98
A set of point labels.
Definition: pointSet.H:51
static const string null
An empty string.
Definition: string.H:88
Provides a reader interface for OpenFOAM to VTK interaction.
Definition: vtkPVFoam.H:114
ClassName("vtkPVFoam")
Static data members.
double * findTimes(const bool first, int &nTimeSteps)
Allocate and return a list of selected times.
int setTime(int count, const double requestTimes[])
Set the runTime to the first plausible request time,.
void operator=(const vtkPVFoam &)=delete
Disallow default bitwise assignment.
void PrintSelf(ostream &, vtkIndent) const
Debug information.
int timeIndex() const
The current time index.
Definition: vtkPVFoam.H:837
void Update(vtkMultiBlockDataSet *output, vtkMultiBlockDataSet *lagrangianOutput, vtkMultiBlockDataSet *LagrangianOutput)
Update.
void renderPatchNames(vtkRenderer *, const bool show)
Add/remove patch names to/from the view.
vtkPVFoam(const char *const FileName, vtkPVFoamReader *reader)
Construct from components.
void CleanUp()
Clean any storage.
~vtkPVFoam()
Destructor.
void updateInfo()
Update information for selection dialogs.
A class for handling words, derived from string.
Definition: word.H:63
Macro definitions for declaring ClassName(), NamespaceName(), etc.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
const tensorField & tf
tUEqn clear()
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
labelList first(const UList< labelPair > &p)
Definition: patchToPatch.C:39
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
label count(const ListType &l, typename ListType::const_reference x)
Count the number of occurrences of a value in a list.
void operator+=(fvMatrix< Type > &fvEqn, const CarrierEqn< Type > &cEqn)
Add to a finite-volume equation.
Definition: CarrierEqn.C:271
objects