Data Structures | Namespaces | Functions

/export/development/ViennaGrid/release/ViennaGrid-1.0.0/viennagrid/io/vtk_reader.hpp File Reference

This is a simple vtk-reader implementation. Refer to the vtk-standard (cf. http://www.vtk.org/pdf/file-formats.pdf) and make sure the same order of XML tags is preserved. More...

#include <fstream>
#include <iostream>
#include <sstream>
#include <vector>
#include <deque>
#include <string>
#include <algorithm>
#include "viennagrid/forwards.h"
#include "viennagrid/point.hpp"
#include "viennagrid/io/vtk_common.hpp"
#include "viennagrid/io/data_accessor.hpp"
#include "viennagrid/io/helper.hpp"
#include "viennagrid/io/xml_tag.hpp"

Go to the source code of this file.

Data Structures

class  vtk_reader< DomainType >
 A VTK reader class that allows to read meshes from XML-based VTK files as defined in http://www.vtk.org/pdf/file-formats.pdf. More...

Namespaces

namespace  viennagrid
 

The main ViennaGrid namespace. Most functionality resides in this namespace.


namespace  viennagrid::io
 

A namespace with all the input/output functionality, in particular file readers and writers.


Functions

template<typename DomainType >
int import_vtk (DomainType &domain, std::string const &filename)
 Convenience function for importing a mesh using a single line of code.
template<typename KeyType , typename DataType , typename DomainType >
vtk_reader< DomainType > & add_scalar_data_on_vertices (vtk_reader< DomainType > &reader, KeyType const &key, std::string quantity_name)
 Registers scalar-valued data on vertices for special treatment by the VTK reader.
template<typename KeyType , typename DataType , typename DomainType >
vtk_reader< DomainType > & add_scalar_data_on_vertices_per_segment (vtk_reader< DomainType > &reader, KeyType const &key, std::string quantity_name)
 Registers scalar-valued data on vertices for special treatment by the VTK reader. Operates on a per-segment basis.
template<typename KeyType , typename DataType , typename DomainType >
vtk_reader< DomainType > & add_vector_data_on_vertices (vtk_reader< DomainType > &reader, KeyType const &key, std::string quantity_name)
 Registers vector-valued data on vertices for special treatment by the VTK reader.
template<typename KeyType , typename DataType , typename DomainType >
vtk_reader< DomainType > & add_vector_data_on_vertices_per_segment (vtk_reader< DomainType > &reader, KeyType const &key, std::string quantity_name)
 Registers vector-valued data on vertices for special treatment by the VTK reader. Operates on a per-segment basis.
template<typename KeyType , typename DataType , typename DomainType >
vtk_reader< DomainType > & add_normal_data_on_vertices (vtk_reader< DomainType > &reader, KeyType const &key, std::string quantity_name)
 Registers vector-valued data (normals) on vertices for special treatment by the VTK reader. Equivalent to add_vector_data_on_vertices().
template<typename KeyType , typename DataType , typename DomainType >
vtk_reader< DomainType > & add_normal_data_on_vertices_per_segment (vtk_reader< DomainType > &reader, KeyType const &key, std::string quantity_name)
 Registers vector-valued data (normals) on vertices for special treatment by the VTK reader. Operates on a per-segment basis and is equivalent to add_vector_data_on_vertices_per_segment().
template<typename KeyType , typename DataType , typename DomainType >
vtk_reader< DomainType > & add_scalar_data_on_cells (vtk_reader< DomainType > &reader, KeyType const &key, std::string quantity_name)
 Registers scalar-valued data on cells for special treatment by the VTK reader.
template<typename KeyType , typename DataType , typename DomainType >
vtk_reader< DomainType > & add_scalar_data_on_cells_per_segment (vtk_reader< DomainType > &reader, KeyType const &key, std::string quantity_name)
 Registers scalar-valued data on cells for special treatment by the VTK reader. Operates on a per-segment basis.
template<typename KeyType , typename DataType , typename DomainType >
vtk_reader< DomainType > & add_vector_data_on_cells (vtk_reader< DomainType > &reader, KeyType const &key, std::string quantity_name)
 Registers vector-valued data on cells for special treatment by the VTK reader.
template<typename KeyType , typename DataType , typename DomainType >
vtk_reader< DomainType > & add_vector_data_on_cells_per_segment (vtk_reader< DomainType > &reader, KeyType const &key, std::string quantity_name)
 Registers vector-valued data on cells for special treatment by the VTK reader. Operates on a per-segment basis.
template<typename KeyType , typename DataType , typename DomainType >
vtk_reader< DomainType > & add_normal_data_on_cells (vtk_reader< DomainType > &reader, KeyType const &key, std::string quantity_name)
 Registers vector-valued data (normals) on cells for special treatment by the VTK reader.
template<typename KeyType , typename DataType , typename DomainType >
vtk_reader< DomainType > & add_normal_data_on_cells_per_segment (vtk_reader< DomainType > &reader, KeyType const &key, std::string quantity_name)
 Registers vector-valued data (normals) on cells for special treatment by the VTK reader. Operates on a per-segment basis.
template<typename ReaderType >
std::vector< std::pair
< std::size_t, std::string >
> const & 
get_scalar_data_on_vertices (ReaderType const &reader)
 Returns the names of all scalar-valued data read for vertices.
template<typename ReaderType >
std::vector< std::pair
< std::size_t, std::string >
> const & 
get_vector_data_on_vertices (ReaderType const &reader)
 Returns the names of all vector-valued data read for vertices.
template<typename ReaderType >
std::vector< std::pair
< std::size_t, std::string >
> const & 
get_scalar_data_on_cells (ReaderType const &reader)
 Returns the names of all scalar-valued data read for cells.
template<typename ReaderType >
std::vector< std::pair
< std::size_t, std::string >
> const & 
get_vector_data_on_cells (ReaderType const &reader)
 Returns the names of all vector-valued data read for cells.

Detailed Description

This is a simple vtk-reader implementation. Refer to the vtk-standard (cf. http://www.vtk.org/pdf/file-formats.pdf) and make sure the same order of XML tags is preserved.