Data Structures | Functions

viennagrid::io Namespace Reference

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

Data Structures

class  data_accessor_interface
 The interface for all data accessor wrappers. Uses type erasure to wrap the templated wrappers into a single container. More...
class  global_scalar_data_accessor
 Wrapper: Access scalar-valued data for all elements in the domain. More...
class  global_vector_data_accessor
 Wrapper: Access vector-valued data for all elements in the domain. More...
class  segment_scalar_data_accessor
 Wrapper: Access scalar-valued data for elements per segment. More...
class  segment_vector_data_accessor
 Wrapper: Access vector-valued data for elements per segment. More...
class  data_accessor_wrapper
 The final wrapper class for IO implementations. Provides a uniform type for all quantity types on a n-cell. More...
struct  PointWriter
 Helper class for writing points to file. Aids as a generic layer for point types that don't have operator<< overloaded in a suitable way. More...
struct  PointWriter< 1 >
struct  PointWriter< 2 >
struct  PointWriter< 3 >
struct  strChecker
 Checks for a string being a number. More...
class  cannot_open_file_exception
 Provides an exception for the case a file cannot be opened. More...
class  bad_file_format_exception
 Provides an exception for the case a parser problem occurs. More...
struct  netgen_reader
 Reader for Netgen files obtained from the 'Export mesh...' menu item. Tested with Netgen version 4.9.12. More...
struct  DXHelper
 A helper class returning dimension-dependent attribute strings. More...
struct  DXHelper< 1 >
struct  DXHelper< 2 >
struct  DXHelper< 3 >
class  opendx_writer
 The OpenDX writer object. Does not support segments - always the full domain is written. More...
struct  ELEMENT_TAG_TO_VTK_TYPE
 Translates element tags to VTK type identifiers. More...
struct  ELEMENT_TAG_TO_VTK_TYPE< hexahedron_tag >
 Specialization for a hexahedron. More...
struct  ELEMENT_TAG_TO_VTK_TYPE< tetrahedron_tag >
 Specialization for a tetrahedron. More...
struct  ELEMENT_TAG_TO_VTK_TYPE< quadrilateral_tag >
 Specialization for a quadrilateral. More...
struct  ELEMENT_TAG_TO_VTK_TYPE< triangle_tag >
 Specialization for a triangle. More...
struct  ELEMENT_TAG_TO_VTK_TYPE< hypercube_tag< 1 > >
 Specialization for a line (one-dimensional hypercube). More...
struct  ELEMENT_TAG_TO_VTK_TYPE< simplex_tag< 1 > >
 Specialization for a line (one-dimensional simplex). More...
struct  vtk_to_viennagrid_orientations
 Tranformations of reference orientations from VTK to ViennaGrid. More...
struct  viennagrid_to_vtk_orientations
 Tranformations of reference orientations from ViennaGrid to VTK. More...
struct  vtk_to_viennagrid_orientations< quadrilateral_tag >
 Specialization for quadrilaterals: Switch vertices 2 and 3. More...
struct  viennagrid_to_vtk_orientations< quadrilateral_tag >
 Specialization for quadrilaterals: Switch vertices 2 and 3. More...
struct  vtk_to_viennagrid_orientations< hexahedron_tag >
 Specialization for hexahedra: Switch vertices (2, 3) and (6, 7). More...
struct  viennagrid_to_vtk_orientations< hexahedron_tag >
 Specialization for hexahedra: Switch vertices (2, 3) and (6, 7). More...
class  vtk_vertex_id_repository
 A utility class managing the vertex ID in the domain. This is trivial if the vertices provide an ID, but a little tricky if vertex objects don't provide integral IDs. More...
class  vtk_vertex_id_repository< viennagrid::domain_t< ConfigType >, viennagrid::integral_id >
 Specialization for a domain. The simple case: Vertices know their global IDs. More...
class  vtk_vertex_id_repository< viennagrid::domain_t< ConfigType >, viennagrid::pointer_id >
 Specialization for a domain. The tough case: Vertices don't know their global IDs. Set up a map first. More...
class  vtk_reader
 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...
class  vtk_writer
 Main VTK writer class. Writes a domain or a segment to a file. More...
struct  char_to_lower
 Functor for conversion to lowercase (avoids tolower()). More...
class  xml_tag
 Helper class that parses a XML tag. More...

Functions

template<typename FloatingPointType >
FloatingPointType DXfixer (FloatingPointType value)
 Fix for a OpenDX bug: if floating-values occur, no integers (i.e. only zeros after decimal point) are allowed.
template<typename KeyType , typename DataType , typename DomainType >
opendx_writer< DomainType > & add_scalar_data_on_vertices (opendx_writer< DomainType > &writer, KeyType const &key, std::string quantity_name)
 Registers scalar-valued data on vertices at the OpenDX writer. At most one data set is allowed.
template<typename KeyType , typename DataType , typename DomainType >
opendx_writer< DomainType > & add_scalar_data_on_cells (opendx_writer< DomainType > &writer, KeyType const &key, std::string quantity_name)
 Registers scalar-valued data on cells at the OpenDX writer. Note that vertex data has precedence. At most one data set is allowed.
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.
template<typename DomainType >
int export_vtk (DomainType const &domain, std::string const &filename)
 Convenience function that exports a domain to file directly. Does not export quantities.
template<typename KeyType , typename DataType , typename DomainType >
vtk_writer< DomainType > & add_scalar_data_on_vertices (vtk_writer< DomainType > &writer, KeyType const &key, std::string quantity_name)
 Registers scalar-valued data on vertices at the XML writer.
template<typename KeyType , typename DataType , typename DomainType >
vtk_writer< DomainType > & add_scalar_data_on_vertices_per_segment (vtk_writer< DomainType > &writer, KeyType const &key, std::string quantity_name)
 Registers scalar-valued data on vertices at the XML writer. Data is segment based and might be discontinuous at segment boundaries.
template<typename KeyType , typename DataType , typename DomainType >
vtk_writer< DomainType > & add_vector_data_on_vertices (vtk_writer< DomainType > &writer, KeyType const &key, std::string quantity_name)
 Registers vector-valued data on vertices at the XML writer.
template<typename KeyType , typename DataType , typename DomainType >
vtk_writer< DomainType > & add_vector_data_on_vertices_per_segment (vtk_writer< DomainType > &writer, KeyType const &key, std::string quantity_name)
 Registers vector-valued data on vertices at the XML writer. Data is segment based and might be discontinuous at segment boundaries.
template<typename KeyType , typename DataType , typename DomainType >
vtk_writer< DomainType > & add_normal_data_on_vertices (vtk_writer< DomainType > &writer, KeyType const &key, std::string quantity_name)
 Registers vector-valued data (normals) on vertices at the XML writer.
template<typename KeyType , typename DataType , typename DomainType >
vtk_writer< DomainType > & add_normal_data_on_vertices_per_segment (vtk_writer< DomainType > &writer, KeyType const &key, std::string quantity_name)
 Registers vector-valued data (normals) on vertices at the XML writer. Data is segment based and might be discontinuous at segment boundaries.
template<typename KeyType , typename DataType , typename DomainType >
vtk_writer< DomainType > & add_scalar_data_on_cells (vtk_writer< DomainType > &writer, KeyType const &key, std::string quantity_name)
 Registers scalar-valued data on cells at the XML writer.
template<typename KeyType , typename DataType , typename DomainType >
vtk_writer< DomainType > & add_scalar_data_on_cells_per_segment (vtk_writer< DomainType > &writer, KeyType const &key, std::string quantity_name)
 Registers scalar-valued data on cells at the XML writer. Data is segment based and might be discontinuous at segment boundaries.
template<typename KeyType , typename DataType , typename DomainType >
vtk_writer< DomainType > & add_vector_data_on_cells (vtk_writer< DomainType > &writer, KeyType const &key, std::string quantity_name)
 Registers vector-valued data on cells at the XML writer.
template<typename KeyType , typename DataType , typename DomainType >
vtk_writer< DomainType > & add_vector_data_on_cells_per_segment (vtk_writer< DomainType > &writer, KeyType const &key, std::string quantity_name)
 Registers vector-valued data on cells at the XML writer. Data is segment based and might be discontinuous at segment boundaries.
template<typename KeyType , typename DataType , typename DomainType >
vtk_writer< DomainType > & add_normal_data_on_cells (vtk_writer< DomainType > &writer, KeyType const &key, std::string quantity_name)
 Registers vector-valued data (normals) on cells at the XML writer.
template<typename KeyType , typename DataType , typename DomainType >
vtk_writer< DomainType > & add_normal_data_on_cells_per_segment (vtk_writer< DomainType > &writer, KeyType const &key, std::string quantity_name)
 Registers vector-valued data (normals) on cells at the XML writer. Data is segment based and might be discontinuous at segment boundaries.
template<typename StringType >
StringType string_to_lower (StringType const &s)
 Helper function for converting a string to lowercase.

Detailed Description

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


Function Documentation

vtk_reader<DomainType>& viennagrid::io::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 Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
reader The XML reader object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name given in the VTK file
vtk_writer<DomainType>& viennagrid::io::add_normal_data_on_cells ( vtk_writer< DomainType > &  writer,
KeyType const &  key,
std::string  quantity_name 
)

Registers vector-valued data (normals) on cells at the XML writer.

Template Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
writer The XML writer object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name that should appear in the VTK file
vtk_reader<DomainType>& viennagrid::io::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 Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
reader The XML reader object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name given in the VTK file
vtk_writer<DomainType>& viennagrid::io::add_normal_data_on_cells_per_segment ( vtk_writer< DomainType > &  writer,
KeyType const &  key,
std::string  quantity_name 
)

Registers vector-valued data (normals) on cells at the XML writer. Data is segment based and might be discontinuous at segment boundaries.

Template Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
writer The XML writer object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name that should appear in the VTK file
vtk_reader<DomainType>& viennagrid::io::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 Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
reader The XML reader object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name given in the VTK file
vtk_writer<DomainType>& viennagrid::io::add_normal_data_on_vertices ( vtk_writer< DomainType > &  writer,
KeyType const &  key,
std::string  quantity_name 
)

Registers vector-valued data (normals) on vertices at the XML writer.

Template Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
writer The XML writer object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name that should appear in the VTK file
vtk_reader<DomainType>& viennagrid::io::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 Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
reader The XML reader object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name given in the VTK file
vtk_writer<DomainType>& viennagrid::io::add_normal_data_on_vertices_per_segment ( vtk_writer< DomainType > &  writer,
KeyType const &  key,
std::string  quantity_name 
)

Registers vector-valued data (normals) on vertices at the XML writer. Data is segment based and might be discontinuous at segment boundaries.

Template Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
writer The XML writer object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name that should appear in the VTK file
opendx_writer<DomainType>& viennagrid::io::add_scalar_data_on_cells ( opendx_writer< DomainType > &  writer,
KeyType const &  key,
std::string  quantity_name 
)

Registers scalar-valued data on cells at the OpenDX writer. Note that vertex data has precedence. At most one data set is allowed.

Template Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
writer The OpenDX writer object for which the data should be registered
key The key object for ViennaData
quantity_name Ignored. Only used for a homogeneous interface with VTK reader/writer.
vtk_reader<DomainType>& viennagrid::io::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 Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
reader The XML reader object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name given in the VTK file
vtk_writer<DomainType>& viennagrid::io::add_scalar_data_on_cells ( vtk_writer< DomainType > &  writer,
KeyType const &  key,
std::string  quantity_name 
)

Registers scalar-valued data on cells at the XML writer.

Template Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
writer The XML writer object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name that should appear in the VTK file
vtk_writer<DomainType>& viennagrid::io::add_scalar_data_on_cells_per_segment ( vtk_writer< DomainType > &  writer,
KeyType const &  key,
std::string  quantity_name 
)

Registers scalar-valued data on cells at the XML writer. Data is segment based and might be discontinuous at segment boundaries.

Template Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
writer The XML writer object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name that should appear in the VTK file
vtk_reader<DomainType>& viennagrid::io::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 Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
reader The XML reader object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name given in the VTK file
vtk_reader<DomainType>& viennagrid::io::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 Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
reader The XML reader object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name given in the VTK file
vtk_writer<DomainType>& viennagrid::io::add_scalar_data_on_vertices ( vtk_writer< DomainType > &  writer,
KeyType const &  key,
std::string  quantity_name 
)

Registers scalar-valued data on vertices at the XML writer.

Template Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
writer The XML writer object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name that should appear in the VTK file
opendx_writer<DomainType>& viennagrid::io::add_scalar_data_on_vertices ( opendx_writer< DomainType > &  writer,
KeyType const &  key,
std::string  quantity_name 
)

Registers scalar-valued data on vertices at the OpenDX writer. At most one data set is allowed.

Template Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
writer The OpenDX writer object for which the data should be registered
key The key object for ViennaData
quantity_name Ignored. Only used for a homogeneous interface with VTK reader/writer.
vtk_writer<DomainType>& viennagrid::io::add_scalar_data_on_vertices_per_segment ( vtk_writer< DomainType > &  writer,
KeyType const &  key,
std::string  quantity_name 
)

Registers scalar-valued data on vertices at the XML writer. Data is segment based and might be discontinuous at segment boundaries.

Template Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
writer The XML writer object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name that should appear in the VTK file
vtk_reader<DomainType>& viennagrid::io::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 Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
reader The XML reader object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name given in the VTK file
vtk_reader<DomainType>& viennagrid::io::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 Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
reader The XML reader object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name given in the VTK file
vtk_writer<DomainType>& viennagrid::io::add_vector_data_on_cells ( vtk_writer< DomainType > &  writer,
KeyType const &  key,
std::string  quantity_name 
)

Registers vector-valued data on cells at the XML writer.

Template Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
writer The XML writer object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name that should appear in the VTK file
vtk_writer<DomainType>& viennagrid::io::add_vector_data_on_cells_per_segment ( vtk_writer< DomainType > &  writer,
KeyType const &  key,
std::string  quantity_name 
)

Registers vector-valued data on cells at the XML writer. Data is segment based and might be discontinuous at segment boundaries.

Template Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
writer The XML writer object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name that should appear in the VTK file
vtk_reader<DomainType>& viennagrid::io::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 Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
reader The XML reader object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name given in the VTK file
vtk_writer<DomainType>& viennagrid::io::add_vector_data_on_vertices ( vtk_writer< DomainType > &  writer,
KeyType const &  key,
std::string  quantity_name 
)

Registers vector-valued data on vertices at the XML writer.

Template Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
writer The XML writer object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name that should appear in the VTK file
vtk_reader<DomainType>& viennagrid::io::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 Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
reader The XML reader object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name given in the VTK file
vtk_writer<DomainType>& viennagrid::io::add_vector_data_on_vertices_per_segment ( vtk_writer< DomainType > &  writer,
KeyType const &  key,
std::string  quantity_name 
)

Registers vector-valued data on vertices at the XML writer. Data is segment based and might be discontinuous at segment boundaries.

Template Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
writer The XML writer object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name that should appear in the VTK file
vtk_reader<DomainType>& viennagrid::io::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 Parameters:
KeyType Type of the key used with ViennaData
DataType Type of the data as used with ViennaData
DomainType The ViennaGrid domain type
Parameters:
reader The XML reader object for which the data should be registered
key The key object for ViennaData
quantity_name The quantity name given in the VTK file
FloatingPointType viennagrid::io::DXfixer ( FloatingPointType  value  ) 

Fix for a OpenDX bug: if floating-values occur, no integers (i.e. only zeros after decimal point) are allowed.

As a remedy, we add a value of 1e-5. Better to have a small error in the visualization instead of a crashed OpenDX...

Template Parameters:
FloatingPointType Dummy template argument to disable external linkage. Almost always float or double.
int viennagrid::io::export_vtk ( DomainType const &  domain,
std::string const &  filename 
)

Convenience function that exports a domain to file directly. Does not export quantities.

std::vector<std::pair<std::size_t, std::string> > const& viennagrid::io::get_scalar_data_on_cells ( ReaderType const &  reader  ) 

Returns the names of all scalar-valued data read for cells.

std::vector<std::pair<std::size_t, std::string> > const& viennagrid::io::get_scalar_data_on_vertices ( ReaderType const &  reader  ) 

Returns the names of all scalar-valued data read for vertices.

std::vector<std::pair<std::size_t, std::string> > const& viennagrid::io::get_vector_data_on_cells ( ReaderType const &  reader  ) 

Returns the names of all vector-valued data read for cells.

std::vector<std::pair<std::size_t, std::string> > const& viennagrid::io::get_vector_data_on_vertices ( ReaderType const &  reader  ) 

Returns the names of all vector-valued data read for vertices.

int viennagrid::io::import_vtk ( DomainType &  domain,
std::string const &  filename 
)

Convenience function for importing a mesh using a single line of code.

StringType viennagrid::io::string_to_lower ( StringType const &  s  ) 

Helper function for converting a string to lowercase.

Template Parameters:
String More a dummy template argument to disable external linkage of the function (for 'header-only' reasons)