38 #ifndef vtkOpenFOAMReader_h
39 #define vtkOpenFOAMReader_h
41 #include "vtkIOGeometryModule.h"
46 VTK_ABI_NAMESPACE_BEGIN
55 class vtkOpenFOAMReaderPrivate;
57 #define VTK_OPENFOAM_TIME_PROFILING 0
63 friend class vtkOpenFOAMReaderPrivate;
78 vtkSetFilePathMacro(FileName);
79 vtkGetFilePathMacro(FileName);
90 vtkSetMacro(SequentialProcessing,
bool);
91 vtkGetMacro(SequentialProcessing,
bool);
92 vtkBooleanMacro(SequentialProcessing,
bool);
105 return this->GetNumberOfSelectionArrays(this->CellDataArraySelection);
114 return this->GetSelectionArrayStatus(this->CellDataArraySelection, name);
118 this->SetSelectionArrayStatus(this->CellDataArraySelection, name, status);
127 return this->GetSelectionArrayName(this->CellDataArraySelection, index);
146 return this->GetNumberOfSelectionArrays(this->PointDataArraySelection);
155 return this->GetSelectionArrayStatus(this->PointDataArraySelection, name);
159 this->SetSelectionArrayStatus(this->PointDataArraySelection, name, status);
168 return this->GetSelectionArrayName(this->PointDataArraySelection, index);
187 return this->GetNumberOfSelectionArrays(this->LagrangianDataArraySelection);
196 return this->GetSelectionArrayStatus(this->LagrangianDataArraySelection, name);
200 this->SetSelectionArrayStatus(this->LagrangianDataArraySelection, name, status);
209 return this->GetSelectionArrayName(this->LagrangianDataArraySelection, index);
217 this->DisableAllSelectionArrays(this->LagrangianDataArraySelection);
221 this->EnableAllSelectionArrays(this->LagrangianDataArraySelection);
234 return this->GetNumberOfSelectionArrays(this->PatchDataArraySelection);
243 return this->GetSelectionArrayStatus(this->PatchDataArraySelection, name);
247 this->SetSelectionArrayStatus(this->PatchDataArraySelection, name, status);
256 return this->GetSelectionArrayName(this->PatchDataArraySelection, index);
284 vtkBooleanMacro(SizeAverageCellToPoint,
vtkTypeBool);
306 vtkBooleanMacro(PositionsIsIn13Format,
vtkTypeBool);
314 vtkSetMacro(SkipZeroTime,
bool);
315 vtkGetMacro(SkipZeroTime,
bool);
316 vtkBooleanMacro(SkipZeroTime,
bool);
323 vtkSetMacro(ListTimeStepsByControlDict,
vtkTypeBool);
324 vtkGetMacro(ListTimeStepsByControlDict,
vtkTypeBool);
325 vtkBooleanMacro(ListTimeStepsByControlDict,
vtkTypeBool);
332 vtkSetMacro(AddDimensionsToArrayNames,
vtkTypeBool);
333 vtkGetMacro(AddDimensionsToArrayNames,
vtkTypeBool);
334 vtkBooleanMacro(AddDimensionsToArrayNames,
vtkTypeBool);
350 virtual void SetUse64BitLabels(
bool val);
351 vtkGetMacro(Use64BitLabels,
bool);
352 vtkBooleanMacro(Use64BitLabels,
bool);
360 vtkGetMacro(CopyDataToCellZones,
bool);
361 vtkSetMacro(CopyDataToCellZones,
bool);
362 vtkBooleanMacro(CopyDataToCellZones,
bool);
371 virtual void SetUse64BitFloats(
bool val);
372 vtkGetMacro(Use64BitFloats,
bool);
373 vtkBooleanMacro(Use64BitFloats,
bool);
382 vtkGetMacro(IgnoreRestartFiles,
bool);
383 vtkSetMacro(IgnoreRestartFiles,
bool);
384 vtkBooleanMacro(IgnoreRestartFiles,
bool);
389 this->Refresh =
true;
399 populateMeshIndicesFileChecksPerPrivateReader = {});
402 double GetTimeValue()
const;
403 bool SetTimeValue(
double);
408 std::vector<vtkSmartPointer<vtkUnsignedCharArray>> GetPopulateMeshIndicesFileChecksPerReader();
409 std::vector<vtkSmartPointer<vtkTable>> GetMarshalledMetadataPerReader();
413 int MakeMetaDataAtTimeStep(
bool listNextTimeStep,
bool skipComputingMetaData =
false);
418 virtual double ComputeProgress();
420 #if VTK_OPENFOAM_TIME_PROFILING
421 long long GetRequestInformationTimeInMicroseconds()
const;
422 long long GetRequestDataTimeInMicroseconds()
const;
423 size_t GetRequestInformationBytes()
const;
424 size_t GetRequestDataBytes()
const;
425 virtual void InitializeRequestInformation();
426 virtual void InitializeRequestData();
427 virtual void PrintRequestInformation();
428 virtual void PrintRequestData();
478 std::vector<vtkSmartPointer<vtkObject>>
Readers;
500 vtkGetMacro(SkipZeroTimeOld,
bool);
502 vtkGetMacro(ListTimeStepsByControlDictOld,
int);
504 vtkGetMacro(CreateCellToPointOld,
int);
506 vtkGetMacro(DecomposePolyhedraOld,
int);
508 vtkGetMacro(PositionsIsIn13FormatOld,
int);
510 vtkGetMacro(AddDimensionsToArrayNamesOld,
int);
512 vtkGetMacro(ReadZonesOld,
int);
514 vtkGetMacro(Use64BitLabelsOld,
bool);
516 vtkGetMacro(Use64BitFloatsOld,
bool);
545 void PrintTimes(std::ostream& os,
vtkIndent indent =
vtkIndent(),
bool full =
false)
const;
547 std::mutex ArraySelectionMutex;
548 std::mutex ProgressMutex;
551 bool IgnoreRestartFiles =
true;
553 #if VTK_OPENFOAM_TIME_PROFILING
554 long long RequestInformationTimeInMicroseconds = 0;
555 size_t RequestDataBytes = 0;
556 long long RequestDataTimeInMicroseconds = 0;
557 size_t RequestInformationBytes = 0;
561 VTK_ABI_NAMESPACE_END
int GetCellArrayStatus(const char *name)
Get/Set whether the cell array with the given name is to be read.
Wrapper around std::string to keep symbols short.
void EnableAllPatchArrays()
void SetParent(vtkOpenFOAMReader *parent)
void SetLagrangianArrayStatus(const char *name, int status)
int GetPatchArrayStatus(const char *name)
Get/Set whether the Patch with the given name is to be read.
void SetPointArrayStatus(const char *name, int status)
vtkMTimeType LagrangianSelectionMTimeOld
vtkTypeUInt32 vtkMTimeType
vtkDataArraySelection * LagrangianDataArraySelection
int GetPointArrayStatus(const char *name)
Get/Set whether the point array with the given name is to be read.
vtkMTimeType CellSelectionMTimeOld
const char * GetCellArrayName(int index)
Get the name of the cell array with the given index in the input.
vtkDataArraySelection * CellDataArraySelection
a vtkAbstractArray subclass for strings
vtkTypeBool ListTimeStepsByControlDict
const char * GetPatchArrayName(int index)
Get the name of the Patch with the given index in the input.
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
const char * GetLagrangianArrayName(int index)
Get the name of the Lagrangian array with the given index in the input.
dynamic, self-adjusting array of double
vtkTypeBool CreateCellToPoint
static vtkMultiBlockDataSetAlgorithm * New()
void DisableAllCellArrays()
Turn on/off all cell arrays.
void EnableAllLagrangianArrays()
dynamic, self-adjusting array of char
vtkTypeBool AddDimensionsToArrayNames
a simple class to control print indentation
int ListTimeStepsByControlDictOld
int GetNumberOfCellArrays()
Get the number of cell arrays available in the input.
Store on/off settings for data arrays, etc.
int GetNumberOfPatchArrays()
Get the number of Patches (including Internal Mesh) available in the input.
void EnableAllPointArrays()
vtkDataArraySelection * PointDataArraySelection
reads a dataset in OpenFOAM format
virtual void Modified()
Update the modification time for this object.
int GetNumberOfLagrangianArrays()
Get the number of Lagrangian arrays available in the input.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
dynamic, self-adjusting array of unsigned char
vtkMTimeType PatchSelectionMTimeOld
int AddDimensionsToArrayNamesOld
void DisableAllPatchArrays()
Turn on/off all Patches including the Internal Mesh.
int DecomposePolyhedraOld
int GetNumberOfPointArrays()
Get the number of point arrays available in the input.
void DisableAllLagrangianArrays()
Turn on/off all Lagrangian arrays.
A table, which contains similar-typed columns of data.
void EnableAllCellArrays()
const char * GetPointArrayName(int index)
Get the name of the point array with the given index in the input.
void UpdateProgress(double amount)
Update the progress of the process object.
create and manipulate ordered lists of objects
int PositionsIsIn13FormatOld
vtkTypeBool PositionsIsIn13Format
void SetPatchArrayStatus(const char *name, int status)
void DisableAllPointArrays()
Turn on/off all point arrays.
int GetLagrangianArrayStatus(const char *name)
Get/Set whether the Lagrangian array with the given name is to be read.
bool SequentialProcessing
vtkMTimeType PointSelectionMTimeOld
std::vector< vtkSmartPointer< vtkObject > > Readers
void SetCellArrayStatus(const char *name, int status)
vtkTypeBool DecomposePolyhedra
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkDataArraySelection * PatchDataArraySelection