vtkPV3Foam.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 | Copyright (C) 2011-2015 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::vtkPV3Foam
26 
27 Description
28  Provides a reader interface for OpenFOAM to VTK interaction.
29 
30 SourceFiles
31  vtkPV3Foam.C
32  vtkPV3Foam.H
33  vtkPV3FoamFields.C
34  vtkPV3FoamMesh.C
35  vtkPV3FoamMeshLagrangian.C
36  vtkPV3FoamTemplates.C
37  vtkPV3FoamMeshSet.C
38  vtkPV3FoamMeshVolume.C
39  vtkPV3FoamMeshZone.C
40  vtkPV3FoamFaceField.H
41  vtkPV3FoamLagrangianFields.H
42  vtkPV3FoamPatchField.H
43  vtkPV3FoamPointFields.H
44  vtkPV3FoamPoints.H
45  vtkPV3FoamUpdateInfo.C
46  vtkPV3FoamUpdateInfoFields.H
47  vtkPV3FoamUtils.C
48  vtkPV3FoamVolFields.H
49  vtkPV3FoamAddToSelection.H
50 
51  // Needed by VTK:
52  vtkDataArrayTemplateImplicit.txx
53 
54 \*---------------------------------------------------------------------------*/
55 
56 #ifndef vtkPV3Foam_H
57 #define vtkPV3Foam_H
58 
59 // do not include legacy strstream headers
60 #ifndef VTK_EXCLUDE_STRSTREAM_HEADERS
61 # define VTK_EXCLUDE_STRSTREAM_HEADERS
62 #endif
63 
64 #include "className.H"
65 #include "fileName.H"
66 #include "stringList.H"
67 #include "wordList.H"
68 #include "primitivePatch.H"
70 #include "volPointInterpolation.H"
71 
72 #undef VTKPV3FOAM_DUALPORT
73 
74 // * * * * * * * * * * * * * Forward Declarations * * * * * * * * * * * * * //
75 
76 class vtkDataArraySelection;
77 class vtkDataSet;
78 class vtkPoints;
79 class vtkPV3FoamReader;
80 class vtkRenderer;
81 class vtkTextActor;
82 class vtkMultiBlockDataSet;
83 class vtkPolyData;
84 class vtkUnstructuredGrid;
85 class vtkIndent;
86 
87 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
88 
89 namespace Foam
90 {
91 
92 // OpenFOAM class forward declarations
93 class argList;
94 class Time;
95 class fvMesh;
96 class IOobjectList;
97 class polyPatch;
98 class faceSet;
99 class pointSet;
100 
101 template<class Type> class IOField;
102 template<class Type> class List;
103 
104 /*---------------------------------------------------------------------------*\
105  Class vtkPV3Foam Declaration
106 \*---------------------------------------------------------------------------*/
107 
108 class vtkPV3Foam
109 {
110  // Private classes
111 
112  //- Bookkeeping for GUI checklists and the multi-block organization
113  class arrayRange
114  {
115  const char *name_;
116  int block_;
117  int start_;
118  int size_;
119 
120  public:
121 
122  arrayRange(const char *name, const int blockNo=0)
123  :
124  name_(name),
125  block_(blockNo),
126  start_(0),
127  size_(0)
128  {}
129 
130  //- Return the block holding these datasets
131  int block() const
132  {
133  return block_;
134  }
135 
136  //- Assign block number, return previous value
137  int block(int blockNo)
138  {
139  int prev = block_;
140  block_ = blockNo;
141  return prev;
142  }
143 
144  //- Return block name
145  const char* name() const
146  {
147  return name_;
148  }
149 
150  //- Return array start index
151  int start() const
152  {
153  return start_;
154  }
155 
156  //- Return array end index
157  int end() const
158  {
159  return start_ + size_;
160  }
161 
162  //- Return sublist size
163  int size() const
164  {
165  return size_;
166  }
167 
168  bool empty() const
169  {
170  return !size_;
171  }
172 
173  //- Reset the size to zero and optionally assign a new start
174  void reset(const int startAt = 0)
175  {
176  start_ = startAt;
177  size_ = 0;
178  }
179 
180  //- Increment the size
181  void operator+=(const int n)
182  {
183  size_ += n;
184  }
185  };
186 
187  //- Bookkeeping for polyhedral cell decomposition
188  // hide in extra pointMap (cellSet/cellZone) for now
189  class polyDecomp
190  {
194 
195  public:
196 
197  polyDecomp()
198  {}
199 
200  //- Label of original cell for decomposed cells
202  {
203  return superCells_;
204  }
205 
206  //- Label of original cell for decomposed cells
207  const labelList& superCells() const
208  {
209  return superCells_;
210  }
211 
212  //- Cell-centre labels for additional points of decomposed cells
214  {
215  return addPointCellLabels_;
216  }
217 
218  //- Cell-centre labels for additional points of decomposed cells
219  const labelList& addPointCellLabels() const
220  {
221  return addPointCellLabels_;
222  }
223 
224  //- Point labels for subsetted meshes
226  {
227  return pointMap_;
228  }
229 
230  //- Point labels for subsetted meshes
231  const labelList& pointMap() const
232  {
233  return pointMap_;
234  }
235 
236 
237  //- Clear
238  void clear()
239  {
240  superCells_.clear();
242  pointMap_.clear();
243  }
244  };
245 
246 
247  // Private Data
248 
249  //- Access to the controlling vtkPV3FoamReader
250  vtkPV3FoamReader* reader_;
251 
252  //- OpenFOAM time control
254 
255  //- OpenFOAM mesh
256  fvMesh* meshPtr_;
257 
258  //- The mesh region
260 
261  //- The mesh directory for the region
263 
264  //- The time index
265  int timeIndex_;
266 
267  //- Track changes in mesh geometry
268  bool meshChanged_;
269 
270  //- Track changes in fields
271  bool fieldsChanged_;
272 
273  //- Selected geometrical parts (internalMesh, patches, ...)
275 
276  //- Datasets corresponding to selected geometrical pieces
277  // a negative number indicates that no vtkmesh exists for this piece
279 
280  //- First instance and size of various mesh parts
281  // used to index into partStatus_ and partDataset_
291 
292  //- Decomposed cells information (mesh regions)
293  // TODO: regions
295 
296  //- Decomposed cells information (cellZone meshes)
298 
299  //- Decomposed cells information (cellSet meshes)
301 
302  //- List of patch names for rendering to window
304 
305  // Private Member Functions
306 
307  // Convenience method use to convert the readers from VTK 5
308  // multiblock API to the current composite data infrastructure
309  static void AddToBlock
310  (
311  vtkMultiBlockDataSet* output,
312  vtkDataSet* dataset,
313  const arrayRange&,
314  const label datasetNo,
315  const std::string& datasetName
316  );
317 
318  // Convenience method use to convert the readers from VTK 5
319  // multiblock API to the current composite data infrastructure
320  static vtkDataSet* GetDataSetFromBlock
321  (
322  vtkMultiBlockDataSet* output,
323  const arrayRange&,
324  const label datasetNo
325  );
326 
327  // Convenience method use to convert the readers from VTK 5
328  // multiblock API to the current composite data infrastructure
330  (
331  vtkMultiBlockDataSet* output,
332  const arrayRange&
333  );
334 
335  //- Reset data counters
336  void resetCounters();
337 
338  // Update information helper functions
339 
340  //- Update the mesh parts selected in the GUI
341  void updateMeshPartsStatus();
342 
343  //- Internal mesh info
344  void updateInfoInternalMesh(vtkDataArraySelection*);
345 
346  //- Lagrangian info
347  void updateInfoLagrangian(vtkDataArraySelection*);
348 
349  //- Patch info
350  void updateInfoPatches(vtkDataArraySelection*, stringList&);
351 
352  //- Set info
353  void updateInfoSets(vtkDataArraySelection*);
354 
355  //- Zone info
356  void updateInfoZones(vtkDataArraySelection*);
357 
358  //- Get non-empty zone names for zoneType from file
359  wordList getZoneNames(const word& zoneType) const;
360 
361  //- Get non-empty zone names from mesh info
362  template<class ZoneType>
364  (
366  ) const;
367 
368  //- Add objects of Type to paraview array selection
369  template<class Type>
371  (
372  vtkDataArraySelection*,
373  const IOobjectList&,
374  const string& suffix=string::null
375  );
376 
377  //- Field info
378  template<template<class> class patchType, class meshType>
379  void updateInfoFields(vtkDataArraySelection*);
380 
381  //- Lagrangian field info
383 
384 
385  // Update helper functions
386 
387  //- OpenFOAM mesh
388  void updateFoamMesh();
389 
390  //- Reduce memory footprint after conversion
391  void reduceMemory();
392 
393  //- Volume fields
394  void updateVolFields(vtkMultiBlockDataSet*);
395 
396  //- Point fields
397  void updatePointFields(vtkMultiBlockDataSet*);
398 
399  //- Lagrangian fields
400  void updateLagrangianFields(vtkMultiBlockDataSet*);
401 
402 
403  // Mesh conversion functions
404 
405  //- Volume mesh
406  void convertMeshVolume(vtkMultiBlockDataSet*, int& blockNo);
407 
408  //- Lagrangian mesh
409  void convertMeshLagrangian(vtkMultiBlockDataSet*, int& blockNo);
410 
411  //- Patch meshes
412  void convertMeshPatches(vtkMultiBlockDataSet*, int& blockNo);
413 
414  //- Cell zone meshes
415  void convertMeshCellZones(vtkMultiBlockDataSet*, int& blockNo);
416 
417  //- Face zone meshes
418  void convertMeshFaceZones(vtkMultiBlockDataSet*, int& blockNo);
419 
420  //- Point zone meshes
421  void convertMeshPointZones(vtkMultiBlockDataSet*, int& blockNo);
422 
423  //- Cell set meshes
424  void convertMeshCellSets(vtkMultiBlockDataSet*, int& blockNo);
425 
426  //- Face set meshes
427  void convertMeshFaceSets(vtkMultiBlockDataSet*, int& blockNo);
428 
429  //- Point set meshes
430  void convertMeshPointSets(vtkMultiBlockDataSet*, int& blockNo);
431 
432 
433  // Add mesh functions
434 
435  //- Add internal mesh/cell set meshes
436  vtkUnstructuredGrid* volumeVTKMesh(const fvMesh&, polyDecomp&);
437 
438  //- Add Lagrangian mesh
439  vtkPolyData* lagrangianVTKMesh
440  (
441  const fvMesh&,
442  const word& cloudName
443  );
444 
445  //- Add patch mesh
446  template<class PatchType>
447  vtkPolyData* patchVTKMesh(const word& name, const PatchType&);
448 
449  //- Add point zone
450  vtkPolyData* pointZoneVTKMesh
451  (
452  const fvMesh&,
453  const labelList& pointLabels
454  );
455 
456  //- Add face set mesh
457  vtkPolyData* faceSetVTKMesh
458  (
459  const fvMesh&,
460  const faceSet&
461  );
462 
463  //- Add point mesh
464  vtkPolyData* pointSetVTKMesh
465  (
466  const fvMesh&,
467  const pointSet&
468  );
469 
470  // Field conversion functions
471 
472  //- Convert volume fields
473  void convertVolFields(vtkMultiBlockDataSet*);
474 
475  //- Convert point fields
476  void convertPointFields(vtkMultiBlockDataSet*);
477 
478  //- Convert Lagrangian fields
479  void convertLagrangianFields(vtkMultiBlockDataSet*);
480 
481 
482  //- Add the fields in the selected time directory to the selection
483  // lists
484  template<class GeoField>
486  (
487  vtkDataArraySelection*,
488  const IOobjectList&,
489  const string& suffix=string::null
490  );
491 
492 
493  // Convert OpenFOAM fields
494 
495  //- Volume fields - all types
496  template<class Type>
497  void convertVolFields
498  (
499  const fvMesh&,
501  const IOobjectList&,
502  const bool interpFields,
503  vtkMultiBlockDataSet* output
504  );
505 
506  //- Volume field - all selected parts
507  template<class Type>
509  (
512  vtkMultiBlockDataSet* output,
513  const arrayRange&,
514  const List<polyDecomp>& decompLst
515  );
516 
517  //- Volume field
518  template<class Type>
519  void convertVolField
520  (
522  vtkMultiBlockDataSet* output,
523  const arrayRange&,
524  const label datasetNo,
525  const polyDecomp&
526  );
527 
528  //- Patch field
529  template<class Type>
530  void convertPatchField
531  (
532  const word& name,
533  const Field<Type>&,
534  vtkMultiBlockDataSet* output,
535  const arrayRange&,
536  const label datasetNo
537  );
538 
539  //- Face set/zone field
540  template<class Type>
541  void convertFaceField
542  (
544  vtkMultiBlockDataSet* output,
545  const arrayRange&,
546  const label datasetNo,
547  const fvMesh&,
548  const labelList& faceLabels
549  );
550 
551  //- Lagrangian fields - all types
552  template<class Type>
554  (
555  const IOobjectList&,
556  vtkMultiBlockDataSet* output,
557  const label datasetNo
558  );
559 
560  //- Lagrangian field
561  template<class Type>
563  (
564  const IOField<Type>&,
565  vtkMultiBlockDataSet* output,
566  const arrayRange&,
567  const label datasetNo
568  );
569 
570  //- Point fields - all types
571  template<class Type>
572  void convertPointFields
573  (
574  const fvMesh&,
575  const pointMesh&,
576  const IOobjectList&,
577  vtkMultiBlockDataSet* output
578  );
579 
580  //- Point field - all selected parts
581  template<class Type>
583  (
585  vtkMultiBlockDataSet* output,
586  const arrayRange&,
587  const List<polyDecomp>&
588  );
589 
590  //- Point fields
591  template<class Type>
592  void convertPointField
593  (
596  vtkMultiBlockDataSet* output,
597  const arrayRange&,
598  const label datasetNo,
599  const polyDecomp&
600  );
601 
602  //- Patch point field
603  template<class Type>
605  (
606  const word& name,
607  const Field<Type>&,
608  vtkMultiBlockDataSet* output,
609  const arrayRange&,
610  const label datasetNo
611  );
612 
613 
614  // GUI selection helper functions
615 
616  //- Only keep what is listed in hashSet
617  static void pruneObjectList
618  (
619  IOobjectList&,
620  const wordHashSet&
621  );
622 
623  //- Retrieve the current selections
624  static wordHashSet getSelected(vtkDataArraySelection*);
625 
626  //- Retrieve a sub-list of the current selections
627  static wordHashSet getSelected
628  (
629  vtkDataArraySelection*,
630  const arrayRange&
631  );
632 
633  //- Retrieve the current selections
634  static stringList getSelectedArrayEntries(vtkDataArraySelection*);
635 
636  //- Retrieve a sub-list of the current selections
638  (
639  vtkDataArraySelection*,
640  const arrayRange&
641  );
642 
643  //- Set selection(s)
644  static void setSelectedArrayEntries
645  (
646  vtkDataArraySelection*,
647  const stringList&
648  );
649 
650  //- Get the first word from the mesh parts selection
651  word getPartName(const int);
652 
653 
654  //- Disallow default bitwise copy construct
655  vtkPV3Foam(const vtkPV3Foam&);
656 
657  //- Disallow default bitwise assignment
658  void operator=(const vtkPV3Foam&);
659 
660 
661 public:
662 
663  //- Static data members
664 
665  ClassName("vtkPV3Foam");
666 
667 
668  // Constructors
669 
670  //- Construct from components
671  vtkPV3Foam
672  (
673  const char* const FileName,
674  vtkPV3FoamReader* reader
675  );
676 
677 
678  //- Destructor
679  ~vtkPV3Foam();
680 
681 
682  // Member Functions
683 
684  //- Update
685  void updateInfo();
686 
687  void Update
688  (
689  vtkMultiBlockDataSet* output,
690  vtkMultiBlockDataSet* lagrangianOutput
691  );
692 
693  //- Clean any storage
694  void CleanUp();
695 
696  //- Allocate and return a list of selected times
697  // returns the count via the parameter
698  double* findTimes(int& nTimeSteps);
699 
700  //- Add/remove patch names to/from the view
701  void renderPatchNames(vtkRenderer*, const bool show);
702 
703  //- Set the runTime to the first plausible request time,
704  // returns the timeIndex
705  // sets to "constant" on error
706  int setTime(int count, const double requestTimes[]);
707 
708 
709  //- The current time index
710  int timeIndex() const
711  {
712  return timeIndex_;
713  }
714 
715 
716  // Access
717 
718  //- Debug information
719  void PrintSelf(ostream&, vtkIndent) const;
720 
721  //- Simple memory used debugging information
722  static void printMemory();
723 
724 };
725 
726 
727 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
728 
729 } // End namespace Foam
730 
731 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
732 
733 #ifdef NoRepository
734  #include "vtkPV3FoamTemplates.C"
735 #endif
736 
737 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
738 
739 #endif
740 
741 // ************************************************************************* //
Foam::vtkPV3Foam::reduceMemory
void reduceMemory()
Reduce memory footprint after conversion.
Foam::vtkPV3Foam::updateInfoFields
void updateInfoFields(vtkDataArraySelection *)
Field info.
Definition: vtkPV3FoamUpdateInfoFields.H:36
Foam::vtkPV3Foam::updateInfoPatches
void updateInfoPatches(vtkDataArraySelection *, stringList &)
Patch info.
Foam::vtkPV3Foam::arrayRange::name
const char * name() const
Return block name.
Definition: vtkPV3Foam.H:144
Foam::vtkPV3Foam::faceSetVTKMesh
vtkPolyData * faceSetVTKMesh(const fvMesh &, const faceSet &)
Add face set mesh.
Foam::vtkPV3Foam::arrayRange::name_
const char * name_
Definition: vtkPV3Foam.H:114
Foam::vtkPV3Foam::timeIndex
int timeIndex() const
The current time index.
Definition: vtkPV3Foam.H:709
Foam::vtkPV3Foam::arrayRangeLagrangian_
arrayRange arrayRangeLagrangian_
Definition: vtkPV3Foam.H:283
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::vtkPV3Foam::setSelectedArrayEntries
static void setSelectedArrayEntries(vtkDataArraySelection *, const stringList &)
Set selection(s)
Definition: vtkPV3FoamUtils.C:303
Foam::vtkPV3Foam::convertLagrangianField
void convertLagrangianField(const IOField< Type > &, vtkMultiBlockDataSet *output, const arrayRange &, const label datasetNo)
Lagrangian field.
Definition: vtkPV3FoamLagrangianFields.H:62
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::IOField
A primitive field of type <T> with automated input and output.
Definition: IOField.H:50
PrimitivePatchInterpolation.H
Foam::vtkPV3Foam::partDataset_
labelList partDataset_
Datasets corresponding to selected geometrical pieces.
Definition: vtkPV3Foam.H:277
Foam::vtkPV3Foam::convertMeshFaceZones
void convertMeshFaceZones(vtkMultiBlockDataSet *, int &blockNo)
Face zone meshes.
Foam::vtkPV3Foam::arrayRangeFaceSets_
arrayRange arrayRangeFaceSets_
Definition: vtkPV3Foam.H:288
Foam::vtkPV3Foam::arrayRangePointZones_
arrayRange arrayRangePointZones_
Definition: vtkPV3Foam.H:286
Foam::vtkPV3Foam::arrayRange::block
int block(int blockNo)
Assign block number, return previous value.
Definition: vtkPV3Foam.H:136
Foam::vtkPV3Foam::convertVolFieldBlock
void convertVolFieldBlock(const GeometricField< Type, fvPatchField, volMesh > &, autoPtr< GeometricField< Type, pointPatchField, pointMesh > > &, vtkMultiBlockDataSet *output, const arrayRange &, const List< polyDecomp > &decompLst)
Volume field - all selected parts.
Definition: vtkPV3FoamVolFields.H:285
Foam::vtkPV3Foam::findTimes
double * findTimes(int &nTimeSteps)
Allocate and return a list of selected times.
Foam::vtkPV3Foam::arrayRange::end
int end() const
Return array end index.
Definition: vtkPV3Foam.H:156
Foam::vtkPV3Foam::convertMeshVolume
void convertMeshVolume(vtkMultiBlockDataSet *, int &blockNo)
Volume mesh.
Foam::vtkPV3Foam::getZoneNames
wordList getZoneNames(const word &zoneType) const
Get non-empty zone names for zoneType from file.
Foam::vtkPV3Foam::patchVTKMesh
vtkPolyData * patchVTKMesh(const word &name, const PatchType &)
Add patch mesh.
Foam::vtkPV3Foam::renderPatchNames
void renderPatchNames(vtkRenderer *, const bool show)
Add/remove patch names to/from the view.
Foam::vtkPV3Foam::convertMeshPointSets
void convertMeshPointSets(vtkMultiBlockDataSet *, int &blockNo)
Point set meshes.
Foam::vtkPV3Foam::updateInfoInternalMesh
void updateInfoInternalMesh(vtkDataArraySelection *)
Internal mesh info.
Foam::vtkPV3Foam::updateMeshPartsStatus
void updateMeshPartsStatus()
Update the mesh parts selected in the GUI.
Foam::vtkPV3Foam::resetCounters
void resetCounters()
Reset data counters.
Foam::vtkPV3Foam::arrayRange::empty
bool empty() const
Definition: vtkPV3Foam.H:167
Foam::faceSet
A list of face labels.
Definition: faceSet.H:48
Foam::vtkPV3Foam::fieldsChanged_
bool fieldsChanged_
Track changes in fields.
Definition: vtkPV3Foam.H:270
Foam::vtkPV3Foam::partStatus_
boolList partStatus_
Selected geometrical parts (internalMesh, patches, ...)
Definition: vtkPV3Foam.H:273
Foam::vtkPV3Foam::convertPointField
void convertPointField(const GeometricField< Type, pointPatchField, pointMesh > &, const GeometricField< Type, fvPatchField, volMesh > &, vtkMultiBlockDataSet *output, const arrayRange &, const label datasetNo, const polyDecomp &)
Point fields.
Definition: vtkPV3FoamPointFields.H:203
Foam::vtkPV3Foam::convertFaceField
void convertFaceField(const GeometricField< Type, fvPatchField, volMesh > &, vtkMultiBlockDataSet *output, const arrayRange &, const label datasetNo, const fvMesh &, const labelList &faceLabels)
Face set/zone field.
Definition: vtkPV3FoamFaceField.H:44
Foam::vtkPV3Foam::polyDecomp
Bookkeeping for polyhedral cell decomposition.
Definition: vtkPV3Foam.H:188
Foam::vtkPV3Foam::zonePolyDecomp_
List< polyDecomp > zonePolyDecomp_
Decomposed cells information (cellZone meshes)
Definition: vtkPV3Foam.H:296
Foam::vtkPV3Foam::convertMeshCellSets
void convertMeshCellSets(vtkMultiBlockDataSet *, int &blockNo)
Cell set meshes.
Foam::vtkPV3Foam::updateInfoLagrangian
void updateInfoLagrangian(vtkDataArraySelection *)
Lagrangian info.
Foam::HashSet
A HashTable with keys but without contents.
Definition: HashSet.H:59
Foam::vtkPV3Foam::PrintSelf
void PrintSelf(ostream &, vtkIndent) const
Debug information.
wordList.H
Foam::vtkPV3Foam::arrayRange::block_
int block_
Definition: vtkPV3Foam.H:115
Foam::vtkPV3Foam::arrayRangeVolume_
arrayRange arrayRangeVolume_
First instance and size of various mesh parts.
Definition: vtkPV3Foam.H:281
Foam::vtkPV3Foam::updateFoamMesh
void updateFoamMesh()
OpenFOAM mesh.
Foam::vtkPV3Foam::polyDecomp::addPointCellLabels
const labelList & addPointCellLabels() const
Cell-centre labels for additional points of decomposed cells.
Definition: vtkPV3Foam.H:218
Foam::vtkPV3Foam::polyDecomp::polyDecomp
polyDecomp()
Definition: vtkPV3Foam.H:196
n
label n
Definition: TABSMDCalcMethod2.H:31
Foam::vtkPV3Foam::arrayRange::arrayRange
arrayRange(const char *name, const int blockNo=0)
Definition: vtkPV3Foam.H:121
Foam::vtkPV3Foam::arrayRangeCellZones_
arrayRange arrayRangeCellZones_
Definition: vtkPV3Foam.H:284
Foam::vtkPV3Foam::polyDecomp::pointMap
labelList & pointMap()
Point labels for subsetted meshes.
Definition: vtkPV3Foam.H:224
Foam::vtkPV3Foam::convertMeshCellZones
void convertMeshCellZones(vtkMultiBlockDataSet *, int &blockNo)
Cell zone meshes.
Foam::vtkPV3Foam::pointZoneVTKMesh
vtkPolyData * pointZoneVTKMesh(const fvMesh &, const labelList &pointLabels)
Add point zone.
Foam::vtkPV3Foam::updateVolFields
void updateVolFields(vtkMultiBlockDataSet *)
Volume fields.
Foam::vtkPV3Foam::pointSetVTKMesh
vtkPolyData * pointSetVTKMesh(const fvMesh &, const pointSet &)
Add point mesh.
Foam::vtkPV3Foam::polyDecomp::pointMap
const labelList & pointMap() const
Point labels for subsetted meshes.
Definition: vtkPV3Foam.H:230
Foam::label
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
Foam::vtkPV3Foam::lagrangianVTKMesh
vtkPolyData * lagrangianVTKMesh(const fvMesh &, const word &cloudName)
Add Lagrangian mesh.
Foam::Field< Type >
Foam::vtkPV3Foam::updatePointFields
void updatePointFields(vtkMultiBlockDataSet *)
Point fields.
Foam::vtkPV3Foam::csetPolyDecomp_
List< polyDecomp > csetPolyDecomp_
Decomposed cells information (cellSet meshes)
Definition: vtkPV3Foam.H:299
Foam::vtkPV3Foam::convertVolField
void convertVolField(const GeometricField< Type, fvPatchField, volMesh > &, vtkMultiBlockDataSet *output, const arrayRange &, const label datasetNo, const polyDecomp &)
Volume field.
Definition: vtkPV3FoamVolFields.H:327
Foam::vtkPV3Foam::reader_
vtkPV3FoamReader * reader_
Access to the controlling vtkPV3FoamReader.
Definition: vtkPV3Foam.H:249
Foam::vtkPV3Foam::convertLagrangianFields
void convertLagrangianFields(vtkMultiBlockDataSet *)
Convert Lagrangian fields.
Foam::vtkPV3Foam::convertMeshPointZones
void convertMeshPointZones(vtkMultiBlockDataSet *, int &blockNo)
Point zone meshes.
Foam::vtkPV3Foam::volumeVTKMesh
vtkUnstructuredGrid * volumeVTKMesh(const fvMesh &, polyDecomp &)
Add internal mesh/cell set meshes.
className.H
Macro definitions for declaring ClassName(), NamespaceName(), etc.
Foam::vtkPV3Foam::operator=
void operator=(const vtkPV3Foam &)
Disallow default bitwise assignment.
Foam::vtkPV3Foam::convertMeshFaceSets
void convertMeshFaceSets(vtkMultiBlockDataSet *, int &blockNo)
Face set meshes.
Foam::vtkPV3Foam::addToSelection
label addToSelection(vtkDataArraySelection *, const IOobjectList &, const string &suffix=string::null)
Add objects of Type to paraview array selection.
fileName.H
Foam::ZoneMesh
A list of mesh zones.
Definition: cellZoneMeshFwd.H:39
Foam::vtkPV3Foam::meshDir_
fileName meshDir_
The mesh directory for the region.
Definition: vtkPV3Foam.H:261
Foam::PtrList
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:61
Foam::vtkPV3Foam::ClassName
ClassName("vtkPV3Foam")
Static data members.
Foam::vtkPV3Foam::arrayRange::size
int size() const
Return sublist size.
Definition: vtkPV3Foam.H:162
Foam::vtkPV3Foam::printMemory
static void printMemory()
Simple memory used debugging information.
Definition: vtkPV3FoamUtils.C:330
Foam::vtkPV3Foam::Update
void Update(vtkMultiBlockDataSet *output, vtkMultiBlockDataSet *lagrangianOutput)
Foam::string::null
static const string null
An empty string.
Definition: string.H:86
Foam::vtkPV3Foam::updateLagrangianFields
void updateLagrangianFields(vtkMultiBlockDataSet *)
Lagrangian fields.
Foam::vtkPV3Foam::addObjectsToSelection
label addObjectsToSelection(vtkDataArraySelection *, const IOobjectList &, const string &suffix=string::null)
Add the fields in the selected time directory to the selection.
Foam::vtkPV3Foam::convertPatchField
void convertPatchField(const word &name, const Field< Type > &, vtkMultiBlockDataSet *output, const arrayRange &, const label datasetNo)
Patch field.
Definition: vtkPV3FoamPatchField.H:45
Foam::vtkPV3Foam::dbPtr_
autoPtr< Time > dbPtr_
OpenFOAM time control.
Definition: vtkPV3Foam.H:252
Foam::vtkPV3Foam::meshChanged_
bool meshChanged_
Track changes in mesh geometry.
Definition: vtkPV3Foam.H:267
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::pointMesh
Mesh representing a set of points created from polyMesh.
Definition: pointMesh.H:48
Foam::IOobjectList
List of IOobjects with searching and retrieving facilities.
Definition: IOobjectList.H:50
Foam::vtkPV3Foam::updateInfo
void updateInfo()
Update.
Foam::vtkPV3Foam::convertPointFieldBlock
void convertPointFieldBlock(const GeometricField< Type, pointPatchField, pointMesh > &, vtkMultiBlockDataSet *output, const arrayRange &, const List< polyDecomp > &)
Point field - all selected parts.
Definition: vtkPV3FoamPointFields.H:174
Foam::vtkPV3Foam::meshPtr_
fvMesh * meshPtr_
OpenFOAM mesh.
Definition: vtkPV3Foam.H:255
Foam::vtkPV3Foam::setTime
int setTime(int count, const double requestTimes[])
Set the runTime to the first plausible request time,.
Foam::vtkPV3Foam::arrayRange::size_
int size_
Definition: vtkPV3Foam.H:117
volPointInterpolation.H
vtkPV3FoamTemplates.C
Foam::vtkPV3Foam::arrayRange::start_
int start_
Definition: vtkPV3Foam.H:116
Foam::vtkPV3Foam::arrayRange::start
int start() const
Return array start index.
Definition: vtkPV3Foam.H:150
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::vtkPV3Foam::updateInfoLagrangianFields
void updateInfoLagrangianFields()
Lagrangian field info.
Foam::vtkPV3Foam::polyDecomp::addPointCellLabels_
labelList addPointCellLabels_
Definition: vtkPV3Foam.H:191
Foam::vtkPV3Foam::arrayRange
Bookkeeping for GUI checklists and the multi-block organization.
Definition: vtkPV3Foam.H:112
Foam::vtkPV3Foam::GetNumberOfDataSets
static label GetNumberOfDataSets(vtkMultiBlockDataSet *output, const arrayRange &)
Definition: vtkPV3FoamUtils.C:159
Foam::vtkPV3Foam::polyDecomp::superCells
labelList & superCells()
Label of original cell for decomposed cells.
Definition: vtkPV3Foam.H:200
Foam::PrimitivePatchInterpolation
Interpolation class within a primitive patch. Allows interpolation from points to faces and vice vers...
Definition: PrimitivePatchInterpolation.H:51
Foam::vtkPV3Foam::meshRegion_
word meshRegion_
The mesh region.
Definition: vtkPV3Foam.H:258
Foam::vtkPV3Foam::polyDecomp::pointMap_
labelList pointMap_
Definition: vtkPV3Foam.H:192
Foam::pointSet
A set of point labels.
Definition: pointSet.H:48
Foam::vtkPV3Foam::arrayRange::operator+=
void operator+=(const int n)
Increment the size.
Definition: vtkPV3Foam.H:180
Foam::vtkPV3Foam::updateInfoZones
void updateInfoZones(vtkDataArraySelection *)
Zone info.
Foam::vtkPV3Foam::CleanUp
void CleanUp()
Clean any storage.
Foam::vtkPV3Foam::getPartName
word getPartName(const int)
Get the first word from the mesh parts selection.
Definition: vtkPV3FoamUtils.C:177
Foam::vtkPV3Foam::polyDecomp::superCells_
labelList superCells_
Definition: vtkPV3Foam.H:190
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::vtkPV3Foam::convertPatchPointField
void convertPatchPointField(const word &name, const Field< Type > &, vtkMultiBlockDataSet *output, const arrayRange &, const label datasetNo)
Patch point field.
Definition: vtkPV3FoamPatchField.H:87
Foam::List::clear
void clear()
Clear the list, i.e. set size to zero.
Definition: List.C:379
Foam::vtkPV3Foam::polyDecomp::superCells
const labelList & superCells() const
Label of original cell for decomposed cells.
Definition: vtkPV3Foam.H:206
Foam::vtkPV3Foam::patchTextActorsPtrs_
List< vtkTextActor * > patchTextActorsPtrs_
List of patch names for rendering to window.
Definition: vtkPV3Foam.H:302
Foam::vtkPV3Foam::convertMeshPatches
void convertMeshPatches(vtkMultiBlockDataSet *, int &blockNo)
Patch meshes.
cloudName
const word cloudName(propsDict.lookup("cloudName"))
Foam::vtkPV3Foam::GetDataSetFromBlock
static vtkDataSet * GetDataSetFromBlock(vtkMultiBlockDataSet *output, const arrayRange &, const label datasetNo)
Definition: vtkPV3FoamUtils.C:137
Foam::vtkPV3Foam::arrayRangePatches_
arrayRange arrayRangePatches_
Definition: vtkPV3Foam.H:282
Foam::vtkPV3Foam::arrayRangePointSets_
arrayRange arrayRangePointSets_
Definition: vtkPV3Foam.H:289
List
Definition: Test.C:19
Foam::vtkPV3Foam::polyDecomp::addPointCellLabels
labelList & addPointCellLabels()
Cell-centre labels for additional points of decomposed cells.
Definition: vtkPV3Foam.H:212
Foam::vtkPV3Foam
Provides a reader interface for OpenFOAM to VTK interaction.
Definition: vtkPV3Foam.H:107
Foam::vtkPV3Foam::arrayRange::reset
void reset(const int startAt=0)
Reset the size to zero and optionally assign a new start.
Definition: vtkPV3Foam.H:173
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::vtkPV3Foam::pruneObjectList
static void pruneObjectList(IOobjectList &, const wordHashSet &)
Only keep what is listed in hashSet.
Foam::vtkPV3Foam::regionPolyDecomp_
List< polyDecomp > regionPolyDecomp_
Decomposed cells information (mesh regions)
Definition: vtkPV3Foam.H:293
Foam::vtkPV3Foam::AddToBlock
static void AddToBlock(vtkMultiBlockDataSet *output, vtkDataSet *dataset, const arrayRange &, const label datasetNo, const std::string &datasetName)
Definition: vtkPV3FoamUtils.C:77
Foam::vtkPV3Foam::convertPointFields
void convertPointFields(vtkMultiBlockDataSet *)
Convert point fields.
Foam::vtkPV3Foam::getSelectedArrayEntries
static stringList getSelectedArrayEntries(vtkDataArraySelection *)
Retrieve the current selections.
Definition: vtkPV3FoamUtils.C:225
Foam::vtkPV3Foam::arrayRangeFaceZones_
arrayRange arrayRangeFaceZones_
Definition: vtkPV3Foam.H:285
stringList.H
Foam::vtkPV3Foam::updateInfoSets
void updateInfoSets(vtkDataArraySelection *)
Set info.
Foam::vtkPV3Foam::~vtkPV3Foam
~vtkPV3Foam()
Destructor.
Foam::vtkPV3Foam::polyDecomp::clear
void clear()
Clear.
Definition: vtkPV3Foam.H:237
pointLabels
labelList pointLabels(nPoints, -1)
Foam::vtkPV3Foam::convertMeshLagrangian
void convertMeshLagrangian(vtkMultiBlockDataSet *, int &blockNo)
Lagrangian mesh.
Foam::name
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
Foam::vtkPV3Foam::getSelected
static wordHashSet getSelected(vtkDataArraySelection *)
Retrieve the current selections.
Definition: vtkPV3FoamUtils.C:184
Foam::vtkPV3Foam::arrayRangeCellSets_
arrayRange arrayRangeCellSets_
Definition: vtkPV3Foam.H:287
Foam::vtkPV3Foam::arrayRange::block
int block() const
Return the block holding these datasets.
Definition: vtkPV3Foam.H:130
Foam::vtkPV3Foam::convertVolFields
void convertVolFields(vtkMultiBlockDataSet *)
Convert volume fields.
Foam::vtkPV3Foam::timeIndex_
int timeIndex_
The time index.
Definition: vtkPV3Foam.H:264
Foam::vtkPV3Foam::vtkPV3Foam
vtkPV3Foam(const vtkPV3Foam &)
Disallow default bitwise copy construct.