Go to the documentation of this file.
20 #ifndef vtkXdmfReaderInternal_h
21 #define vtkXdmfReaderInternal_h
23 #ifndef VTK_WRAPPING_CXX
37 #include "XdmfArray.h"
38 #include "XdmfAttribute.h"
41 #include "XdmfDataDesc.h"
43 #include "XdmfDataItem.h"
46 #include "XdmfTopology.h"
48 #include "XdmfGeometry.h"
58 #include <vtksys/SystemTools.hxx>
75 bool Parse(
const char*xmffilename);
84 {
return this->Domains; }
101 {
return this->ActiveDomain; }
114 void UpdateDomains();
117 int ActiveDomainIndex;
118 xdmf2::XdmfDOM XMLDOM;
120 std::vector<std::string> Domains;
122 char* LastReadContents;
123 size_t LastReadContentsLength;
134 vtkXdmfArraySelection::const_iterator iter = other.begin();
135 for (; iter != other.end(); ++iter)
137 (*this)[iter->first] = iter->second;
143 (*this)[
name] = status;
148 vtkXdmfArraySelection::iterator iter = this->find(
name);
149 if (iter != this->end())
160 vtkXdmfArraySelection::iterator iter = this->find(
name);
161 return (iter != this->end());
177 for (vtkXdmfArraySelection::iterator iter = this->begin();
178 iter != this->end(); ++iter)
183 return iter->first.c_str();
192 return static_cast<int>(this->
size());
200 XdmfInt64 NumberOfGrids;
201 xdmf2::XdmfGrid* XMFGrids;
203 XdmfXmlNode XMLDomain;
204 xdmf2::XdmfDOM* XMLDOM;
206 unsigned int GridsOverflowCounter;
209 std::map<std::string, vtkIdType> GridCenteredAttrbuteRoots;
211 std::map<XdmfInt64, vtkIdType> > GridCenteredAttrbuteValues;
219 std::map<XdmfFloat64, int> TimeSteps;
221 std::map<int, XdmfFloat64> TimeStepsRev;
235 {
return (this->XMLDomain != 0); }
239 {
return this->SIL; }
267 {
return this->TimeSteps; }
269 {
return this->TimeStepsRev; }
284 std::map<int, XdmfFloat64>::iterator iter = this->TimeStepsRev.find(
index);
285 return (iter != this->TimeStepsRev.end()) ? iter->second : 0.0;
330 {
return this->PointArrays; }
332 {
return this->CellArrays; }
334 {
return this->Grids; }
336 {
return this->Sets; }
349 void CollectMetaData();
352 void CollectMetaData(xdmf2::XdmfGrid* xmfGrid,
vtkIdType silParent);
355 void CollectNonLeafMetaData(xdmf2::XdmfGrid* xmfGrid,
vtkIdType silParent);
358 void CollectLeafMetaData(xdmf2::XdmfGrid* xmfGrid,
vtkIdType silParent);
365 bool UpdateGridAttributeInSIL(
366 xdmf2::XdmfAttribute* xmfAttribute,
vtkIdType gridSILId);
void Merge(const vtkXdmfArraySelection &other)
const std::map< int, XdmfFloat64 > & GetTimeStepsRev()
An editable directed graph.
void AddArray(const char *name, bool status=true)
xdmf2::XdmfGrid * GetGrid(xdmf2::XdmfGrid *xmfGrid, double time)
If xmfGrid is a temporal collection, returns the child-grid matching the requested time.
bool IsStructured(xdmf2::XdmfGrid *)
Returns true if the grids is a structured dataset.
vtkXdmfArraySelection * GetSetsSelection()
static int GetDataDimensionality(xdmf2::XdmfGrid *xmfGrid)
int GetVTKDataType()
Returns the VTK data type need for this domain.
vtkXdmfDocument()
Constructor/Destructor.
xdmf2::XdmfGrid * GetGrid(XdmfInt64 cc)
Provides access to a top-level grid from this domain.
XdmfFloat64 GetTimeForIndex(int index)
Returns the time value at the given index.
vtkXdmfArraySelection * GetPointArraySelection()
bool ArrayIsEnabled(const char *name)
bool HasArray(const char *name)
bool IsValid()
After instantiating, check that the domain is valid.
bool GetWholeExtent(xdmf2::XdmfGrid *, int extents[6])
Returns the whole extents for the dataset if the grid if IsStructured() returns true for the given gr...
XdmfInt64 GetNumberOfGrids()
Returns the number of top-level grids present in this domain.
bool ParseString(const char *xmfdata, size_t length)
const std::map< XdmfFloat64, int > & GetTimeSteps()
Returns the timesteps.
bool SetActiveDomain(int index)
vtkXdmfDomain * GetActiveDomain()
Returns the active domain.
vtkXdmfDomain(xdmf2::XdmfDOM *xmlDom, int domain_index)
bool SetActiveDomain(const char *domainname)
Set the active domain.
helper class to build a SIL i.e. a directed graph used by reader producing composite datasets to desc...
int GetArraySetting(const char *name)
const std::vector< std::string > & GetDomains()
Returns the names for available domains.
bool GetOriginAndSpacing(xdmf2::XdmfGrid *, double origin[3], double spacing[3])
Returns the spacing and origin for the grid if the grid topology == XDMF_2DCORECTMESH or XDMF_3DCOREC...
bool Parse(const char *xmffilename)
Parse an xmf file (or string).
const char * GetArrayName(int index)
vtkXdmfArraySelection * GetGridSelection()
Base class for graph data types.
int GetIndexForTime(double time)
Given a time value, returns the index.
vtkXdmfArraySelection * GetCellArraySelection()
int GetVTKDataType(xdmf2::XdmfGrid *xmfGrid)
void SetArrayStatus(const char *name, bool status)