A vtk file reader using tinyxml2 as xml backend.  
#include <dumux/io/vtk/vtkreader.hh>
|  | 
| enum class | DataType { cellData
, pointData
 } | 
|  | The data array types.  More... 
 | 
|  | 
| using | Data = std::unordered_map<std::string, std::vector<double>> | 
|  | the cell / point data type for point data read from a grid file 
 | 
|  | 
|  | 
|  | VTKReader (const std::string &fileName) | 
|  | The constructor creates a tinyxml2::XMLDocument from file. 
 | 
|  | 
| bool | hasData (const std::string &name, const DataType &type) const | 
|  | Reviews data from the vtk file to check if there is a data array with a specified name. 
 | 
|  | 
| template<class Container> | 
| Container | readData (const std::string &name, const DataType &type) const | 
|  | read data from the vtk file to a container, e.g. std::vector<double> 
 | 
|  | 
| template<class Grid> | 
| std::unique_ptr< Grid > | readGrid (bool verbose=false) const | 
|  | Read a grid from a vtk/vtu/vtp file, ignoring cell and point data. 
 | 
|  | 
| template<class Grid> | 
| std::unique_ptr< Grid > | readGrid (Dune::GridFactory< Grid > &factory, bool verbose=false) const | 
|  | Read a grid from a vtk/vtu/vtp file, ignoring cell and point data. 
 | 
|  | 
| template<class Grid> | 
| std::unique_ptr< Grid > | readGrid (Dune::GridFactory< Grid > &factory, Data &cellData, Data &pointData, bool verbose=false) const | 
|  | Read a grid from a vtk/vtu/vtp file, reading all cell and point data. 
 | 
|  | 
◆ Data
◆ DataType
| Enumerator | 
|---|
| cellData |  | 
| pointData |  | 
 
 
◆ VTKReader()
  
  | 
        
          | Dumux::VTKReader::VTKReader | ( | const std::string & | fileName | ) |  |  | inlineexplicit | 
 
 
◆ hasData()
  
  | 
        
          | bool Dumux::VTKReader::hasData | ( | const std::string & | name, |  
          |  |  | const DataType & | type ) const |  | inline | 
 
- Parameters
- 
  
    | name | the name attribute of the data array to read |  | type | the data array type |  
 
 
 
◆ readData()
template<class Container> 
  
  | 
        
          | Container Dumux::VTKReader::readData | ( | const std::string & | name, |  
          |  |  | const DataType & | type ) const |  | inline | 
 
- Template Parameters
- 
  
    | Container | a container type that has begin(), end(), push_back(), e.g. std::vector<> |  
 
- Parameters
- 
  
    | name | the name attribute of the data array to read |  | type | the data array type |  
 
 
 
◆ readGrid() [1/3]
template<class Grid> 
  
  | 
        
          | std::unique_ptr< Grid > Dumux::VTKReader::readGrid | ( | bool | verbose = false | ) | const |  | inline | 
 
- Parameters
- 
  
    | verbose | if the output should be verbose |  
 
 
 
◆ readGrid() [2/3]
template<class Grid> 
  
  | 
        
          | std::unique_ptr< Grid > Dumux::VTKReader::readGrid | ( | Dune::GridFactory< Grid > & | factory, |  
          |  |  | bool | verbose = false ) const |  | inline | 
 
- Note
- use this signature if the factory might be needed outside to interpret the data via the factory's insertion indices 
- Parameters
- 
  
    | verbose | if the output should be verbose |  | factory | the (empty) grid factory |  
 
 
 
◆ readGrid() [3/3]
template<class Grid> 
  
  | 
        
          | std::unique_ptr< Grid > Dumux::VTKReader::readGrid | ( | Dune::GridFactory< Grid > & | factory, |  
          |  |  | Data & | cellData, |  
          |  |  | Data & | pointData, |  
          |  |  | bool | verbose = false ) const |  | inline | 
 
- Note
- the factory will be needed outside to interpret the data via the factory's insertion indices 
- Parameters
- 
  
    | factory | the (empty) grid factory |  | cellData | the cell data arrays to be filled |  | pointData | the point data arrays to be filled |  | verbose | if the output should be verbose |  
 
 
 
The documentation for this class was generated from the following file: