Go to the documentation of this file.
20 #ifndef vtkXdmfReaderInternal_h
21 #define vtkXdmfReaderInternal_h
35 #include "XdmfArray.h"
36 #include "XdmfAttribute.h"
39 #include "XdmfDataDesc.h"
41 #include "XdmfDataItem.h"
44 #include "XdmfTopology.h"
46 #include "XdmfGeometry.h"
56 #include <vtksys/SystemTools.hxx>
73 bool Parse(
const char*xmffilename);
82 {
return this->Domains; }
99 {
return this->ActiveDomain; }
112 void UpdateDomains();
115 int ActiveDomainIndex;
116 xdmf2::XdmfDOM XMLDOM;
118 std::vector<std::string> Domains;
120 char* LastReadContents;
121 size_t LastReadContentsLength;
132 vtkXdmfArraySelection::const_iterator iter = other.begin();
133 for (; iter != other.end(); ++iter)
135 (*this)[iter->first] = iter->second;
141 (*this)[
name] = status;
146 vtkXdmfArraySelection::iterator iter = this->find(
name);
147 if (iter != this->end())
158 vtkXdmfArraySelection::iterator iter = this->find(
name);
159 return (iter != this->end());
175 for (vtkXdmfArraySelection::iterator iter = this->begin();
176 iter != this->end(); ++iter)
181 return iter->first.c_str();
190 return static_cast<int>(this->
size());
198 XdmfInt64 NumberOfGrids;
199 xdmf2::XdmfGrid* XMFGrids;
201 XdmfXmlNode XMLDomain;
202 xdmf2::XdmfDOM* XMLDOM;
204 unsigned int GridsOverflowCounter;
207 std::map<std::string, vtkIdType> GridCenteredAttrbuteRoots;
209 std::map<XdmfInt64, vtkIdType> > GridCenteredAttrbuteValues;
217 std::map<XdmfFloat64, int> TimeSteps;
219 std::map<int, XdmfFloat64> TimeStepsRev;
233 {
return (this->XMLDomain != 0); }
237 {
return this->SIL; }
265 {
return this->TimeSteps; }
267 {
return this->TimeStepsRev; }
282 std::map<int, XdmfFloat64>::iterator iter = this->TimeStepsRev.find(
index);
283 return (iter != this->TimeStepsRev.end()) ? iter->second : 0.0;
328 {
return this->PointArrays; }
330 {
return this->CellArrays; }
332 {
return this->Grids; }
334 {
return this->Sets; }
347 void CollectMetaData();
350 void CollectMetaData(xdmf2::XdmfGrid* xmfGrid,
vtkIdType silParent);
353 void CollectNonLeafMetaData(xdmf2::XdmfGrid* xmfGrid,
vtkIdType silParent);
356 void CollectLeafMetaData(xdmf2::XdmfGrid* xmfGrid,
vtkIdType silParent);
363 bool UpdateGridAttributeInSIL(
364 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.
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)