21 #ifndef vtkXdmfReaderInternal_h
22 #define vtkXdmfReaderInternal_h
36 #include "XdmfArray.h"
37 #include "XdmfAttribute.h"
40 #include "XdmfDataDesc.h"
42 #include "XdmfDataItem.h"
45 #include "XdmfTopology.h"
47 #include "XdmfGeometry.h"
57 #include <vtksys/SystemTools.hxx>
61 #include <vtksys/ios/sstream>
72 bool Parse(
const char*xmffilename);
73 bool ParseString(
const char* xmfdata,
size_t length);
80 {
return this->Domains; }
87 bool SetActiveDomain(
const char* domainname);
88 bool SetActiveDomain(
int index);
95 {
return this->ActiveDomain; }
107 void UpdateDomains();
110 int ActiveDomainIndex;
111 xdmf2::XdmfDOM XMLDOM;
113 std::vector<std::string> Domains;
115 char* LastReadContents;
116 size_t LastReadContentsLength;
127 vtkXdmfArraySelection::const_iterator iter = other.begin();
128 for (; iter != other.end(); ++iter)
130 (*this)[iter->first] = iter->second;
136 (*this)[
name] = status;
141 vtkXdmfArraySelection::iterator iter = this->find(name);
142 if (iter != this->end())
153 vtkXdmfArraySelection::iterator iter = this->find(name);
154 return (iter != this->end());
170 for (vtkXdmfArraySelection::iterator iter = this->begin();
171 iter != this->end(); ++iter)
176 return iter->first.c_str();
185 return static_cast<int>(this->
size());
193 XdmfInt64 NumberOfGrids;
194 xdmf2::XdmfGrid* XMFGrids;
196 XdmfXmlNode XMLDomain;
197 xdmf2::XdmfDOM* XMLDOM;
199 unsigned int GridsOverflowCounter;
202 std::map<std::string, vtkIdType> GridCenteredAttrbuteRoots;
204 std::map<XdmfInt64, vtkIdType> > GridCenteredAttrbuteValues;
212 std::map<XdmfFloat64, int> TimeSteps;
214 std::map<int, XdmfFloat64> TimeStepsRev;
227 {
return (this->XMLDomain != 0); }
232 {
return this->SIL; }
240 xdmf2::XdmfGrid* GetGrid(XdmfInt64 cc);
246 int GetVTKDataType();
252 {
return this->TimeSteps; }
254 {
return this->TimeStepsRev; }
259 int GetIndexForTime(
double time);
266 std::map<int, XdmfFloat64>::iterator iter = this->TimeStepsRev.find(index);
267 return (iter != this->TimeStepsRev.end()) ? iter->second : 0.0;
274 xdmf2::XdmfGrid* GetGrid(xdmf2::XdmfGrid* xmfGrid,
double time);
278 bool IsStructured(xdmf2::XdmfGrid*);
285 bool GetWholeExtent(xdmf2::XdmfGrid*,
int extents[6]);
291 bool GetOriginAndSpacing(xdmf2::XdmfGrid*,
double origin[3],
double spacing[3]);
298 int GetVTKDataType(xdmf2::XdmfGrid* xmfGrid);
302 static int GetDataDimensionality(xdmf2::XdmfGrid* xmfGrid);
305 {
return this->PointArrays; }
307 {
return this->CellArrays; }
309 {
return this->Grids; }
311 {
return this->Sets; }
322 void CollectMetaData();
325 void CollectMetaData(xdmf2::XdmfGrid* xmfGrid, vtkIdType silParent);
328 void CollectNonLeafMetaData(xdmf2::XdmfGrid* xmfGrid, vtkIdType silParent);
331 void CollectLeafMetaData(xdmf2::XdmfGrid* xmfGrid, vtkIdType silParent);
337 bool UpdateGridAttributeInSIL(
338 xdmf2::XdmfAttribute* xmfAttribute, vtkIdType gridSILId);
void AddArray(const char *name, bool status=true)
bool ArrayIsEnabled(const char *name)
vtkXdmfArraySelection * GetPointArraySelection()
void SetArrayStatus(const char *name, bool status)
const std::map< int, XdmfFloat64 > & GetTimeStepsRev()
vtkXdmfArraySelection * GetSetsSelection()
const std::map< XdmfFloat64, int > & GetTimeSteps()
bool HasArray(const char *name)
vtkXdmfDomain * GetActiveDomain()
Base class for graph data types.
vtkXdmfArraySelection * GetCellArraySelection()
const std::vector< std::string > & GetDomains()
void Merge(const vtkXdmfArraySelection &other)
An editable directed graph.
vtkXdmfArraySelection * GetGridSelection()
XdmfFloat64 GetTimeForIndex(int index)
XdmfInt64 GetNumberOfGrids()
const char * GetArrayName(int index)
helper class to build a SIL i.e. a directed graph used by reader producing composite datasets to desc...
int GetArraySetting(const char *name)