dune-vtk 2.12
Loading...
Searching...
No Matches
Dune::VtkReader< Grid, GC, FieldType > Class Template Reference

#include <dune/vtk/vtkreader.hh>

Inheritance diagram for Dune::VtkReader< Grid, GC, FieldType >:
Inheritance graph

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

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 &&...)
 

Member Typedef Documentation

◆ FieldType

template<class G , class GC = Vtk::ContinuousGridCreator<G>, class FT = double>
using Dune::Vtk::VtkReader< G, GC, FT >::FieldType = FT
inherited

Type of the components of the data to extract from the file.

◆ GlobalCoordinate

template<class G , class GC = Vtk::ContinuousGridCreator<G>, class FT = double>
using Dune::Vtk::VtkReader< G, GC, FT >::GlobalCoordinate = typename GridCreator::GlobalCoordinate
inherited

Type of global world coordinates.

◆ Grid

template<class G , class GC = Vtk::ContinuousGridCreator<G>, class FT = double>
using Dune::Vtk::VtkReader< G, GC, FT >::Grid = G
inherited

Type of the grid to construct.

◆ GridCreator

template<class G , class GC = Vtk::ContinuousGridCreator<G>, class FT = double>
using Dune::Vtk::VtkReader< G, GC, FT >::GridCreator = GC
inherited

Type of the associated grid creator.

◆ GridFunction

template<class G , class GC = Vtk::ContinuousGridCreator<G>, class FT = double>
template<class Context , class Range >
using Dune::Vtk::VtkReader< G, GC, FT >::GridFunction = typename Vtk::AssociatedGridFunction<GridCreator, Range, Context>::type
inherited

Member Function Documentation

◆ createGrid()

template<class G , class GC = Vtk::ContinuousGridCreator<G>, class FT = double>
std::unique_ptr< Grid > Dune::Vtk::VtkReader< G, GC, FT >::createGrid ( ) const
inlineinherited

Construct the actual grid using the GridCreator [[expects: read_ == true]]

◆ createGridFromFile()

template<class Grid , class FilerReaderImp >
template<class... Args>
static std::unique_ptr< Grid > Dune::Vtk::FileReader< Grid, FilerReaderImp >::createGridFromFile ( std::string const &  filename,
Args &&...  args 
)
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()

template<class Grid , class FilerReaderImp >
template<class... Args>
static std::unique_ptr< Grid > Dune::Vtk::FileReader< Grid, FilerReaderImp >::createGridFromFileImpl ( std::string const &  filename,
Args &&...  args 
)
inlinestaticprotectedinherited

◆ fillFactory()

template<class Grid , class FilerReaderImp >
template<class... Args>
static void Dune::Vtk::FileReader< Grid, FilerReaderImp >::fillFactory ( GridFactory< Grid > &  factory,
std::string const &  filename,
Args &&...  args 
)
inlinestaticinherited

Reads the grid from a file with filename into a grid-factory. Redirects to concrete implementation of derived class.

◆ fillFactoryImpl()

template<class Grid , class FilerReaderImp >
template<class... Args>
static void Dune::Vtk::FileReader< Grid, FilerReaderImp >::fillFactoryImpl ( GridFactory< Grid > &  ,
std::string const &  ,
Args &&  ... 
)
inlinestaticprotectedinherited

◆ fillGridCreator()

template<class Grid , class Creator , class Field >
void Dune::Vtk::VtkReader< Grid, Creator, Field >::fillGridCreator ( bool  insertPieces = true)
inherited

Insert all internal data to the GridCreator NOTE: requires an aforegoing call to read()

◆ getCellData()

template<class G , class GC = Vtk::ContinuousGridCreator<G>, class FT = double>
template<class Range = DynamicVector<FieldType>>
GridFunction< Vtk::CellContext, Range > Dune::Vtk::VtkReader< G, GC, FT >::getCellData ( std::string const &  name) const
inlineinherited

Construct a grid-function representing the cell-data with the given name [[expects: read_ == true]]

◆ getCellDataAttributes()

template<class G , class GC = Vtk::ContinuousGridCreator<G>, class FT = double>
std::vector< DataArrayAttributes > Dune::Vtk::VtkReader< G, GC, FT >::getCellDataAttributes ( ) const
inlineinherited

Return a vector of DataArrayAttributes for all CELL_DATA blocks [[expects: read_ == true]]

◆ getPointData()

template<class G , class GC = Vtk::ContinuousGridCreator<G>, class FT = double>
template<class Range = DynamicVector<FieldType>>
GridFunction< Vtk::PointContext, Range > Dune::Vtk::VtkReader< G, GC, FT >::getPointData ( std::string const &  name) const
inlineinherited

Construct a grid-function representing the point-data with the given name [[expects: read_ == true]]

◆ getPointDataAttributes()

template<class G , class GC = Vtk::ContinuousGridCreator<G>, class FT = double>
std::vector< DataArrayAttributes > Dune::Vtk::VtkReader< G, GC, FT >::getPointDataAttributes ( ) const
inlineinherited

Return a vector of DataArrayAttributes for all POINT_DATA blocks [[expects: read_ == true]]

◆ gridCreator()

template<class G , class GC = Vtk::ContinuousGridCreator<G>, class FT = double>
GridCreator & Dune::Vtk::VtkReader< G, GC, FT >::gridCreator ( )
inlineinherited

Obtains the creator of the reader.

◆ pieces()

template<class G , class GC = Vtk::ContinuousGridCreator<G>, class FT = double>
std::vector< std::string > const & Dune::Vtk::VtkReader< G, GC, FT >::pieces ( ) const
inlineinherited

Return the filenames of parallel pieces.

◆ read()

template<class Grid , class Creator , class Field >
void Dune::Vtk::VtkReader< Grid, Creator, Field >::read ( std::string const &  filename,
bool  fillCreator = true 
)
inherited

Read the grid from file with filename into the GridCreator.

This function fills internal data containers representing the information from the passed file.

Parameters
filenameThe name of the input file
fillCreatorIf false, only fill internal data structures, if true, pass the internal data to the GridCreator. [true]

◆ readCellDataAppended()

template<class G , class GC = Vtk::ContinuousGridCreator<G>, class FT = double>
template<class FloatType , class HeaderType >
void Dune::Vtk::VtkReader< G, GC, FT >::readCellDataAppended ( MetaType< FloatType >  ,
MetaType< HeaderType >  ,
std::ifstream &  input,
std::string  id 
)
inherited

◆ readCellsAppended()

template<class G , class GC = Vtk::ContinuousGridCreator<G>, class FT = double>
template<class HeaderType >
void Dune::Vtk::VtkReader< G, GC, FT >::readCellsAppended ( MetaType< HeaderType >  ,
std::ifstream &  input 
)
inherited

◆ readParallelFileFromStream()

template<class Grid , class Creator , class Field >
void Dune::Vtk::VtkReader< Grid, Creator, Field >::readParallelFileFromStream ( std::ifstream &  input,
int  rank,
int  size,
bool  create = true 
)
inherited

Read the grid from and input stream, referring to a .pvtu file, into the GridFactory factory_.

Parameters
inputA STL input stream to read the VTK file from.
createIf false, only fill internal data structures, if true, also create the grid. [true]

◆ readPointDataAppended()

template<class G , class GC = Vtk::ContinuousGridCreator<G>, class FT = double>
template<class FloatType , class HeaderType >
void Dune::Vtk::VtkReader< G, GC, FT >::readPointDataAppended ( MetaType< FloatType >  ,
MetaType< HeaderType >  ,
std::ifstream &  input,
std::string  id 
)
inherited

◆ readPointsAppended()

template<class G , class GC = Vtk::ContinuousGridCreator<G>, class FT = double>
template<class FloatType , class HeaderType >
void Dune::Vtk::VtkReader< G, GC, FT >::readPointsAppended ( MetaType< FloatType >  ,
MetaType< HeaderType >  ,
std::ifstream &  input 
)
inherited

◆ readSerialFileFromStream()

template<class Grid , class Creator , class Field >
void Dune::Vtk::VtkReader< Grid, Creator, Field >::readSerialFileFromStream ( std::ifstream &  input,
bool  create = true 
)
inherited

Read the grid from an input stream, referring to a .vtu file, into the GridFactory factory_.

Advanced read methods

Parameters
inputA STL input stream to read the VTK file from.
createIf false, only fill internal data structures, if true, also create the grid. [true]

The documentation for this class was generated from the following file: