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);
76 bool ParseString(
const char* xmfdata,
size_t length);
84 {
return this->Domains; }
92 bool SetActiveDomain(
const char* domainname);
93 bool SetActiveDomain(
int index);
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());
166 return this->ArrayIsEnabled(name)? 1 : 0;
171 this->AddArray(name, status);
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; }
251 xdmf2::XdmfGrid* GetGrid(XdmfInt64 cc);
260 int GetVTKDataType();
267 {
return this->TimeSteps; }
269 {
return this->TimeStepsRev; }
275 int GetIndexForTime(
double time);
284 std::map<int, XdmfFloat64>::iterator iter = this->TimeStepsRev.find(index);
285 return (iter != this->TimeStepsRev.end()) ? iter->second : 0.0;
294 xdmf2::XdmfGrid* GetGrid(xdmf2::XdmfGrid* xmfGrid,
double time);
300 bool IsStructured(xdmf2::XdmfGrid*);
308 bool GetWholeExtent(xdmf2::XdmfGrid*,
int extents[6]);
316 bool GetOriginAndSpacing(xdmf2::XdmfGrid*,
double origin[3],
double spacing[3]);
323 int GetVTKDataType(xdmf2::XdmfGrid* xmfGrid);
327 static int GetDataDimensionality(xdmf2::XdmfGrid* xmfGrid);
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 AddArray(const char *name, bool status=true)
bool ArrayIsEnabled(const char *name)
bool IsValid()
After instantiating, check that the domain is valid.
vtkXdmfArraySelection * GetPointArraySelection()
void SetArrayStatus(const char *name, bool status)
const std::map< int, XdmfFloat64 > & GetTimeStepsRev()
vtkXdmfArraySelection * GetSetsSelection()
const std::map< XdmfFloat64, int > & GetTimeSteps()
Returns the timesteps.
bool HasArray(const char *name)
vtkXdmfDomain * GetActiveDomain()
Returns the active domain.
Base class for graph data types.
vtkXdmfArraySelection * GetCellArraySelection()
const std::vector< std::string > & GetDomains()
Returns the names for available domains.
void Merge(const vtkXdmfArraySelection &other)
An editable directed graph.
vtkXdmfArraySelection * GetGridSelection()
XdmfFloat64 GetTimeForIndex(int index)
Returns the time value at the given index.
XdmfInt64 GetNumberOfGrids()
Returns the number of top-level grids present in this domain.
const char * GetArrayName(int index)
helper class to build a SIL i.e.
int GetArraySetting(const char *name)