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);
287 void SkipNSidedSection(
int& numElements);
288 void SkipNFacedSection(
int& numElements);
291 void ReadVariableNodes(
EnSightFile& file,
const std::string& arrayName,
int numComponents,
293 bool isComplex =
false,
bool isReal =
true);
294 void ReadVariableMeasuredNodes(
EnSightFile& file,
const std::string& arrayName,
int numComponents,
296 void ReadVariableElements(
EnSightFile& file,
const std::string& arrayName,
int numComponents,
298 bool isComplex =
false,
bool isReal =
true);
303 void ProcessNodeIds(
int numPts,
vtkDataSet* output);
304 void ProcessElementIds(
int numCells,
vtkDataSet* output);
306 void ProcessGhostCells(
int numCells,
vtkDataSet* output);
308 bool CurrentGeometryFileContainsConnectivity();
316 bool ReadRigidBodyEulerParameterFile(
const std::string& path);
321 bool ReadRigidBodyMatrixLines(
322 std::string& line,
const std::string& transType,
vtkTransform* transform,
bool& applyToVectors);
327 bool ApplyRigidBodyTransforms(
int partId, std::string partName,
vtkDataSet* output);
331 std::string GeometryFileName;
334 bool IsStaticGeometry =
false;
336 bool GeometryChangeCoordsOnly =
false;
340 int GeometryCStep = -1;
344 std::string MeasuredFileName;
346 int MeasuredPartitionId = -1;
347 std::string MeasuredPartName =
"measured particles";
349 std::vector<std::string> FilePath;
351 bool NodeIdsListed =
false;
352 bool ElementIdsListed =
false;
357 std::vector<double> AllTimeSteps;
359 std::vector<VariableOptions> Variables;
360 double ActualTimeValue = 0.0;
362 std::string RigidBodyFileName;
370 struct PartTransforms
375 std::vector<vtkSmartPointer<vtkTransform>> PreTransforms;
376 std::vector<bool> PreTransformsApplyToVectors;
377 std::vector<vtkSmartPointer<vtkTransform>> PostTransforms;
378 std::vector<bool> PostTransformsApplyToVectors;
382 std::string EETFilename;
387 std::string EETTransTitle;
392 bool UsePartNamesRB =
true;
397 std::map<std::string, PartTransforms> RigidBodyTransforms;
400 using TimeToEulerTransMapType = std::map<double, vtkSmartPointer<vtkTransform>>;
403 using TitleToTimeStepMapType = std::map<std::string, TimeToEulerTransMapType>;
405 TitleToTimeStepMapType EulerTransformsMap;
410 bool UseEulerTimeSteps =
false;
411 std::vector<double> EulerTimeSteps;
413 int NumberOfLoadedParts = 0;
415 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