|
dune-vtk 2.12
|
File-Reader for Vtk unstructured .vtu files. More...
#include <dune/vtk/vtkreader.hh>

Classes | |
| struct | DataArrayAttributes |
Public Types | |
| using | Grid = G |
| Type of the grid to construct. | |
| using | GridCreator = GC |
| Type of the associated grid creator. | |
| using | FieldType = FT |
| Type of the components of the data to extract from the file. | |
| using | GlobalCoordinate = typename GridCreator::GlobalCoordinate |
| Type of global world coordinates. | |
| template<class Context , class Range > | |
| using | GridFunction = typename Vtk::AssociatedGridFunction< GridCreator, Range, Context >::type |
Public Member Functions | |
| template<class... Args, std::enable_if_t< std::is_constructible< GridCreator, Args... >::value, int > = 0> | |
| VtkReader (Args &&... args) | |
| Constructor. Creates a new GridCreator with the passed factory. | |
| VtkReader (GridCreator &creator) | |
| Constructor. Stores the references in a non-destroying shared_ptr. | |
| VtkReader (GridCreator &&creator) | |
| Constructor. Stores the references in a non-destroying shared_ptr. | |
| VtkReader (std::shared_ptr< GridCreator > creator) | |
| Constructor. Stores the shared_ptr. | |
| void | read (std::string const &filename, bool fillCreator=true) |
Read the grid from file with filename into the GridCreator. | |
| GridCreator & | gridCreator () |
| Obtains the creator of the reader. | |
| std::unique_ptr< Grid > | createGrid () const |
| template<class Range = DynamicVector<FieldType>> | |
| GridFunction< Vtk::PointContext, Range > | getPointData (std::string const &name) const |
| std::vector< DataArrayAttributes > | getPointDataAttributes () const |
| template<class Range = DynamicVector<FieldType>> | |
| GridFunction< Vtk::CellContext, Range > | getCellData (std::string const &name) const |
| std::vector< DataArrayAttributes > | getCellDataAttributes () const |
| std::vector< std::string > const & | pieces () const |
| Return the filenames of parallel pieces. | |
| template<class FloatType , class HeaderType > | |
| void | readCellDataAppended (MetaType< FloatType >, MetaType< HeaderType >, std::ifstream &input, std::string id) |
| template<class FloatType , class HeaderType > | |
| void | readPointDataAppended (MetaType< FloatType >, MetaType< HeaderType >, std::ifstream &input, std::string id) |
| template<class FloatType , class HeaderType > | |
| void | readPointsAppended (MetaType< FloatType >, MetaType< HeaderType >, std::ifstream &input) |
| template<class HeaderType > | |
| void | readCellsAppended (MetaType< HeaderType >, std::ifstream &input) |
| void | readSerialFileFromStream (std::ifstream &input, bool create=true) |
| Read the grid from an input stream, referring to a .vtu file, into the GridFactory factory_. | |
| void | readParallelFileFromStream (std::ifstream &input, int rank, int size, bool create=true) |
| Read the grid from and input stream, referring to a .pvtu file, into the GridFactory factory_. | |
| void | fillGridCreator (bool insertPieces=true) |
Static Public Member Functions | |
| template<class... Args> | |
| static std::unique_ptr< Grid > | createGridFromFile (std::string const &filename, Args &&... args) |
| template<class... Args> | |
| static void | fillFactory (GridFactory< Grid > &factory, std::string const &filename, Args &&... args) |
Static Protected Member Functions | |
| template<class... Args> | |
| static std::unique_ptr< Grid > | createGridFromFileImpl (std::string const &filename, Args &&... args) |
| template<class... Args> | |
| static void | fillFactoryImpl (GridFactory< Grid > &, std::string const &, Args &&...) |
Detailed Description
class Dune::Vtk::VtkReader< G, GC, FT >
File-Reader for Vtk unstructured .vtu files.
Reads .vtu files and constructs a grid from the cells stored in the file Additionally, stored data can be read.
NOTE: Assumption on the file structure: Each XML tag must be on a separate line.
- Template Parameters
-
G The type of the grid to construct. GC GridCreator policy type to control what to pass to a grid factory with data given from the file. [ContinuousGridCreator] FT Type of the components of the data to extract from the file [default: double]
Member Typedef Documentation
◆ FieldType
| using Dune::Vtk::VtkReader< G, GC, FT >::FieldType = FT |
Type of the components of the data to extract from the file.
◆ GlobalCoordinate
| using Dune::Vtk::VtkReader< G, GC, FT >::GlobalCoordinate = typename GridCreator::GlobalCoordinate |
Type of global world coordinates.
◆ Grid
| using Dune::Vtk::VtkReader< G, GC, FT >::Grid = G |
Type of the grid to construct.
◆ GridCreator
| using Dune::Vtk::VtkReader< G, GC, FT >::GridCreator = GC |
Type of the associated grid creator.
◆ GridFunction
| using Dune::Vtk::VtkReader< G, GC, FT >::GridFunction = typename Vtk::AssociatedGridFunction<GridCreator, Range, Context>::type |
Constructor & Destructor Documentation
◆ VtkReader() [1/4]
|
inlineexplicit |
Constructor. Creates a new GridCreator with the passed factory.
- Parameters
-
args... Either pass a GridFactory by reference or shared_ptr, or a list of arguments passed to the constructor of a Dune::GridFactory (typically and empty parameter list). See the constructor of GridCreatorInterface and the GridCreator passed to this reader.
◆ VtkReader() [2/4]
|
inlineexplicit |
Constructor. Stores the references in a non-destroying shared_ptr.
◆ VtkReader() [3/4]
|
inlineexplicit |
Constructor. Stores the references in a non-destroying shared_ptr.
◆ VtkReader() [4/4]
|
inlineexplicit |
Constructor. Stores the shared_ptr.
Member Function Documentation
◆ createGrid()
|
inline |
Construct the actual grid using the GridCreator [[expects: read_ == true]]
◆ createGridFromFile()
|
inlinestaticinherited |
Reads the grid from a file with filename and returns a unique_ptr to the created grid. Redirects to concrete implementation of derived class.
◆ createGridFromFileImpl()
|
inlinestaticprotectedinherited |
◆ fillFactory()
|
inlinestaticinherited |
Reads the grid from a file with filename into a grid-factory. Redirects to concrete implementation of derived class.
◆ fillFactoryImpl()
|
inlinestaticprotectedinherited |
◆ fillGridCreator()
| void Dune::Vtk::VtkReader< Grid, Creator, Field >::fillGridCreator | ( | bool | insertPieces = true | ) |
Insert all internal data to the GridCreator NOTE: requires an aforegoing call to read()
◆ getCellData()
|
inline |
Construct a grid-function representing the cell-data with the given name [[expects: read_ == true]]
◆ getCellDataAttributes()
|
inline |
Return a vector of DataArrayAttributes for all CELL_DATA blocks [[expects: read_ == true]]
◆ getPointData()
|
inline |
Construct a grid-function representing the point-data with the given name [[expects: read_ == true]]
◆ getPointDataAttributes()
|
inline |
Return a vector of DataArrayAttributes for all POINT_DATA blocks [[expects: read_ == true]]
◆ gridCreator()
|
inline |
Obtains the creator of the reader.
◆ pieces()
|
inline |
Return the filenames of parallel pieces.
◆ read()
| void Dune::Vtk::VtkReader< Grid, Creator, Field >::read | ( | std::string const & | filename, |
| bool | fillCreator = true |
||
| ) |
Read the grid from file with filename into the GridCreator.
This function fills internal data containers representing the information from the passed file.
- Parameters
-
filename The name of the input file fillCreator If false, only fill internal data structures, iftrue, pass the internal data to the GridCreator. [true]
◆ readCellDataAppended()
| void Dune::Vtk::VtkReader< G, GC, FT >::readCellDataAppended | ( | MetaType< FloatType > | , |
| MetaType< HeaderType > | , | ||
| std::ifstream & | input, | ||
| std::string | id | ||
| ) |
◆ readCellsAppended()
| void Dune::Vtk::VtkReader< G, GC, FT >::readCellsAppended | ( | MetaType< HeaderType > | , |
| std::ifstream & | input | ||
| ) |
◆ readParallelFileFromStream()
| void Dune::Vtk::VtkReader< Grid, Creator, Field >::readParallelFileFromStream | ( | std::ifstream & | input, |
| int | rank, | ||
| int | size, | ||
| bool | create = true |
||
| ) |
Read the grid from and input stream, referring to a .pvtu file, into the GridFactory factory_.
- Parameters
-
input A STL input stream to read the VTK file from. create If false, only fill internal data structures, iftrue, also create the grid. [true]
◆ readPointDataAppended()
| void Dune::Vtk::VtkReader< G, GC, FT >::readPointDataAppended | ( | MetaType< FloatType > | , |
| MetaType< HeaderType > | , | ||
| std::ifstream & | input, | ||
| std::string | id | ||
| ) |
◆ readPointsAppended()
| void Dune::Vtk::VtkReader< G, GC, FT >::readPointsAppended | ( | MetaType< FloatType > | , |
| MetaType< HeaderType > | , | ||
| std::ifstream & | input | ||
| ) |
◆ readSerialFileFromStream()
| void Dune::Vtk::VtkReader< Grid, Creator, Field >::readSerialFileFromStream | ( | std::ifstream & | input, |
| bool | create = true |
||
| ) |
Read the grid from an input stream, referring to a .vtu file, into the GridFactory factory_.
Advanced read methods
- Parameters
-
input A STL input stream to read the VTK file from. create If false, only fill internal data structures, iftrue, also create the grid. [true]
The documentation for this class was generated from the following files:
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8