Main VTK writer class. Writes a domain or a segment to a file. More...
#include <vtk_writer.hpp>
Public Member Functions | |
int | operator() (DomainType const &domain, std::string const &filename) |
Triggers the write process to a XML file. Make sure that all data to be written to the file is already passed to the writer. | |
template<typename T > | |
void | add_scalar_data_on_vertices (T const &accessor, std::string name) |
Specify scalar-valued data for vertices to the writer. Prefer the free function add_scalar_data_on_vertices(). | |
template<typename T > | |
void | add_vector_data_on_vertices (T const &accessor, std::string name) |
Specify vector-valued data for vertices to the writer. Prefer the free function add_vector_data_on_vertices(). | |
template<typename T > | |
void | add_normal_data_on_vertices (T const &accessor, std::string name) |
Specify vector-valued data (normals) for vertices to the writer. Prefer the free function add_normal_data_on_vertices(). | |
template<typename T > | |
void | add_scalar_data_on_cells (T const &accessor, std::string name) |
Specify scalar-valued data for cells to the writer. Prefer the free function add_scalar_data_on_cells(). | |
template<typename T > | |
void | add_vector_data_on_cells (T const &accessor, std::string name) |
Specify vector-valued data for cells to the writer. Prefer the free function add_vector_data_on_cells(). | |
template<typename T > | |
void | add_normal_data_on_cells (T const &accessor, std::string name) |
Specify vector-valued data (normals) for cells to the writer. Prefer the free function add_normal_data_on_cells(). | |
Protected Types | |
typedef DomainType::config_type | DomainConfiguration |
typedef DomainConfiguration::numeric_type | CoordType |
typedef DomainConfiguration::coordinate_system_tag | CoordinateSystemTag |
typedef DomainConfiguration::cell_tag | CellTag |
typedef result_of::point < DomainConfiguration >::type | PointType |
typedef result_of::ncell < DomainConfiguration, 0 > ::type | VertexType |
typedef result_of::ncell < DomainConfiguration, CellTag::dim >::type | CellType |
Protected Member Functions | |
void | writeHeader (std::ofstream &writer) |
Writes the XML file header. | |
template<typename SegmentType > | |
void | writePoints (SegmentType const &segment, std::ofstream &writer) |
Writes the vertices in the domain. | |
template<typename DomainSegmentType > | |
void | writeCells (DomainSegmentType const &domseg, std::ofstream &writer) |
Writes the cells to the domain. | |
template<typename SegmentType > | |
void | writePointDataScalar (SegmentType const &segment, std::ofstream &writer, std::size_t seg_id=0) |
Writes scalar-valued data defined on vertices (points) to file. | |
template<typename SegmentType > | |
void | writePointDataVector (SegmentType const &segment, std::ofstream &writer, std::size_t seg_id=0) |
Writes vector-valued data defined on vertices (points) to file. | |
template<typename SegmentType > | |
void | writePointDataNormal (SegmentType const &segment, std::ofstream &writer, std::size_t seg_id=0) |
Writes vector-valued data (normals) defined on vertices (points) to file. | |
template<typename SegmentType > | |
void | writeCellDataScalar (SegmentType const &segment, std::ofstream &writer, std::size_t seg_id=0) |
Writes scalar-valued data defined on cells to file. | |
template<typename SegmentType > | |
void | writeCellDataVector (SegmentType const &segment, std::ofstream &writer, std::size_t seg_id=0) |
Writes vector-valued data defined on cells to file. | |
template<typename SegmentType > | |
void | writeCellDataNormals (SegmentType const &segment, std::ofstream &writer, std::size_t seg_id=0) |
Writes vector-valued data (normals) defined on cells to file. | |
void | writeFooter (std::ofstream &writer) |
Writes the XML footer. |
Main VTK writer class. Writes a domain or a segment to a file.
DomainType | Type of the ViennaGrid domain. Must not be a segment! |
typedef DomainConfiguration::cell_tag CellTag [protected] |
typedef result_of::ncell<DomainConfiguration, CellTag::dim>::type CellType [protected] |
typedef DomainConfiguration::coordinate_system_tag CoordinateSystemTag [protected] |
typedef DomainConfiguration::numeric_type CoordType [protected] |
typedef DomainType::config_type DomainConfiguration [protected] |
typedef result_of::point<DomainConfiguration>::type PointType [protected] |
typedef result_of::ncell<DomainConfiguration, 0>::type VertexType [protected] |
void add_normal_data_on_cells | ( | T const & | accessor, | |
std::string | name | |||
) | [inline] |
Specify vector-valued data (normals) for cells to the writer. Prefer the free function add_normal_data_on_cells().
T | Anything that can be wrapped by a data_accessor_wrapper |
accessor | The quantity accessor | |
name | The quantity name that should appear in the VTK file |
void add_normal_data_on_vertices | ( | T const & | accessor, | |
std::string | name | |||
) | [inline] |
Specify vector-valued data (normals) for vertices to the writer. Prefer the free function add_normal_data_on_vertices().
T | Anything that can be wrapped by a data_accessor_wrapper |
accessor | The quantity accessor | |
name | The quantity name that should appear in the VTK file |
void add_scalar_data_on_cells | ( | T const & | accessor, | |
std::string | name | |||
) | [inline] |
Specify scalar-valued data for cells to the writer. Prefer the free function add_scalar_data_on_cells().
T | Anything that can be wrapped by a data_accessor_wrapper |
accessor | The quantity accessor | |
name | The quantity name that should appear in the VTK file |
void add_scalar_data_on_vertices | ( | T const & | accessor, | |
std::string | name | |||
) | [inline] |
Specify scalar-valued data for vertices to the writer. Prefer the free function add_scalar_data_on_vertices().
T | Anything that can be wrapped by a data_accessor_wrapper |
accessor | The quantity accessor | |
name | The quantity name that should appear in the VTK file |
void add_vector_data_on_cells | ( | T const & | accessor, | |
std::string | name | |||
) | [inline] |
Specify vector-valued data for cells to the writer. Prefer the free function add_vector_data_on_cells().
T | Anything that can be wrapped by a data_accessor_wrapper |
accessor | The quantity accessor | |
name | The quantity name that should appear in the VTK file |
void add_vector_data_on_vertices | ( | T const & | accessor, | |
std::string | name | |||
) | [inline] |
Specify vector-valued data for vertices to the writer. Prefer the free function add_vector_data_on_vertices().
T | Anything that can be wrapped by a data_accessor_wrapper |
accessor | The quantity accessor | |
name | The quantity name that should appear in the VTK file |
int operator() | ( | DomainType const & | domain, | |
std::string const & | filename | |||
) | [inline] |
Triggers the write process to a XML file. Make sure that all data to be written to the file is already passed to the writer.
domain | The ViennaGrid domain. Must not be a segment! | |
filename | The file to write to |
void writeCellDataNormals | ( | SegmentType const & | segment, | |
std::ofstream & | writer, | |||
std::size_t | seg_id = 0 | |||
) | [inline, protected] |
Writes vector-valued data (normals) defined on cells to file.
void writeCellDataScalar | ( | SegmentType const & | segment, | |
std::ofstream & | writer, | |||
std::size_t | seg_id = 0 | |||
) | [inline, protected] |
Writes scalar-valued data defined on cells to file.
void writeCellDataVector | ( | SegmentType const & | segment, | |
std::ofstream & | writer, | |||
std::size_t | seg_id = 0 | |||
) | [inline, protected] |
Writes vector-valued data defined on cells to file.
void writeCells | ( | DomainSegmentType const & | domseg, | |
std::ofstream & | writer | |||
) | [inline, protected] |
Writes the cells to the domain.
void writeFooter | ( | std::ofstream & | writer | ) | [inline, protected] |
Writes the XML footer.
void writeHeader | ( | std::ofstream & | writer | ) | [inline, protected] |
Writes the XML file header.
void writePointDataNormal | ( | SegmentType const & | segment, | |
std::ofstream & | writer, | |||
std::size_t | seg_id = 0 | |||
) | [inline, protected] |
Writes vector-valued data (normals) defined on vertices (points) to file.
void writePointDataScalar | ( | SegmentType const & | segment, | |
std::ofstream & | writer, | |||
std::size_t | seg_id = 0 | |||
) | [inline, protected] |
Writes scalar-valued data defined on vertices (points) to file.
void writePointDataVector | ( | SegmentType const & | segment, | |
std::ofstream & | writer, | |||
std::size_t | seg_id = 0 | |||
) | [inline, protected] |
Writes vector-valued data defined on vertices (points) to file.
void writePoints | ( | SegmentType const & | segment, | |
std::ofstream & | writer | |||
) | [inline, protected] |
Writes the vertices in the domain.