4#ifndef EnSightDataSet_h
5#define EnSightDataSet_h
15VTK_ABI_NAMESPACE_BEGIN
31VTK_ABI_NAMESPACE_BEGIN
167 bool outputStructureOnly);
249 bool ParseFormatSection();
250 void ParseGeometrySection();
251 void ParseVariableSection();
252 void ParseTimeSection();
253 void ParseFileSection();
255 std::string GetFullPath(
const std::string& fname);
256 void SetVariableFileFormat();
257 bool IsSectionHeader(std::string line);
264 void PassThroughUniformGrid(
const GridOptions& opts,
int partId);
265 void PassThroughRectilinearGrid(
const GridOptions& opts,
int partId);
266 void PassThroughStructuredGrid(
const GridOptions& opts,
int partId);
267 void PassThroughUnstructuredGrid(
const GridOptions& opts,
int partId);
268 void PassThroughOptionalSections(
const GridOptions& opts,
int numPts,
int numCells);
271 void ReadDimensions(
bool hasRange,
int dimensions[3],
int& numPts,
int& numCells);
272 void ReadRange(
int range[6]);
273 void ReadOptionalValues(
int numVals,
int* data, std::string sectionName =
"");
274 void CheckForOptionalHeader(
const std::string& sectionName);
278 void ReadCell(
int cellType,
int numNodes,
vtkUnstructuredGrid* output,
bool padBegin =
false,
279 bool padEnd =
false);
283 void ReadVariableNodes(
EnSightFile& file,
const std::string& arrayName,
int numComponents,
285 bool isComplex =
false,
bool isReal =
true);
286 void ReadVariableMeasuredNodes(
EnSightFile& file,
const std::string& arrayName,
int numComponents,
288 void ReadVariableElements(
EnSightFile& file,
const std::string& arrayName,
int numComponents,
290 bool isComplex =
false,
bool isReal =
true);
295 void ProcessNodeIds(
int numPts,
vtkDataSet* output);
296 void ProcessElementIds(
int numCells,
vtkDataSet* output);
298 void ProcessGhostCells(
int numCells,
vtkDataSet* output);
300 bool CurrentGeometryFileContainsConnectivity();
308 bool ReadRigidBodyEulerParameterFile(
const std::string& path);
313 bool ReadRigidBodyMatrixLines(
314 std::string& line,
const std::string& transType,
vtkTransform* transform,
bool& applyToVectors);
319 bool ApplyRigidBodyTransforms(
int partId, std::string partName,
vtkDataSet* output);
323 std::string GeometryFileName;
326 bool IsStaticGeometry =
false;
328 bool GeometryChangeCoordsOnly =
false;
332 int GeometryCStep = -1;
336 std::string MeasuredFileName;
338 int MeasuredPartitionId = -1;
339 std::string MeasuredPartName =
"measured particles";
341 std::vector<std::string> FilePath;
343 bool NodeIdsListed =
false;
344 bool ElementIdsListed =
false;
349 std::vector<double> AllTimeSteps;
351 std::vector<VariableOptions> Variables;
352 double ActualTimeValue = 0.0;
354 std::string RigidBodyFileName;
362 struct PartTransforms
367 std::vector<vtkSmartPointer<vtkTransform>> PreTransforms;
368 std::vector<bool> PreTransformsApplyToVectors;
369 std::vector<vtkSmartPointer<vtkTransform>> PostTransforms;
370 std::vector<bool> PostTransformsApplyToVectors;
374 std::string EETFilename;
379 std::string EETTransTitle;
384 bool UsePartNamesRB =
true;
389 std::map<std::string, PartTransforms> RigidBodyTransforms;
392 using TimeToEulerTransMapType = std::map<double, vtkSmartPointer<vtkTransform>>;
395 using TitleToTimeStepMapType = std::map<std::string, TimeToEulerTransMapType>;
397 TitleToTimeStepMapType EulerTransformsMap;
402 bool UseEulerTimeSteps =
false;
403 std::vector<double> EulerTimeSteps;
405 int NumberOfLoadedParts = 0;
407 bool PartOfSOSFile =
true;
Handles reading a full EnSight Gold dataset.
void SetPartOfSOSFile(bool partOfSOS)
bool ReadRigidBodyGeometryFile()
Read the rigid body file.
bool UseRigidBodyTimeSteps()
Returns true if the time steps specified in the rigid body files should be used.
std::vector< double > GetTimeSteps()
returns a vector containing all time steps in the dataset
vtkDataObjectMeshCache * GetMeshCache()
bool UseStaticMeshCache() const
Returns true if the static mesh cache will be used.
bool ReadMeasuredGeometry(vtkPartitionedDataSetCollection *output, vtkDataArraySelection *selection, bool outputStructureOnly)
Reads Measured Geometry file.
bool CheckVersion(const char *casefilename)
Parses through case file until version information is found.
bool GetPartInfo(vtkDataArraySelection *partSelection, vtkDataArraySelection *pointArraySelection, vtkDataArraySelection *cellArraySelection, vtkDataArraySelection *fieldArraySelection, vtkStringArray *partNames)
Only grabs Part (block) information from the Geometry file to be used in a vtkDataArraySelection to e...
void SetActualTimeValue(double time)
Set the time value to be used in the next read.
bool HasRigidBodyFile()
Returns true if a rigid body file is specified in the case file.
bool ParseCaseFile(const char *casefilename)
Parses all sections of a case file to get information such as filenames.
void SetPDCInfoForLoadedParts(vtkSmartPointer< vtkIdTypeArray > indices, vtkSmartPointer< vtkStringArray > names)
Sets information about parts to be loaded.
bool ReadVariables(vtkPartitionedDataSetCollection *output, vtkDataArraySelection *partSelection, vtkDataArraySelection *pointArraySelection, vtkDataArraySelection *cellArraySelection, vtkDataArraySelection *fieldArraySelection)
Reads Variable file(s)
std::vector< double > GetEulerTimeSteps()
Get the array of time steps from the rigid body files.
bool ReadGeometry(vtkPartitionedDataSetCollection *output, vtkDataArraySelection *selection, bool outputStructureOnly)
Reads Geometry file, caching the data if not transient.
Store on/off settings for data arrays, etc.
vtkDataObjectMeshCache is a class to store and reuse the mesh of a vtkDataSet, while forwarding data ...
abstract class to specify dataset behavior
dynamic, self-adjusting array of float
dynamic, self-adjusting array of vtkIdType
Composite dataset that groups datasets as a collection.
a dataset that is topologically regular with variable spacing in the three coordinate directions
Hold a reference to a vtkObjectBase instance.
a vtkAbstractArray subclass for strings
topologically regular array of data
dataset represents arbitrary combinations of all possible cell types
@ ComplexVectorPerElement
@ ComplexScalarPerElement
std::map< int, std::shared_ptr< TimeSetInfo > > TimeSetInfoMapType
std::map< int, PartInfo > PartInfoMapType
std::map< int, std::shared_ptr< FileSetInfo > > FileSetInfoMapType
EnSightFile performs processing on a single file, whether it's a case file, geometry,...
std::vector< int > NumElementsPerType
std::vector< float > Constants
EnSightFile ImaginaryFile