OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
VTKWriter< Graph, VTK_GRAPH > Class Template Reference

Detailed Description

template<typename Graph>
class VTKWriter< Graph, VTK_GRAPH >

It write a VTK format file in case for a graph

Template Parameters
Typeof graph

Definition at line 919 of file VTKWriter_graph.hpp.

#include <VTKWriter_graph.hpp>

Public Member Functions

 VTKWriter (const Graph &g)
 
template<int prp = -1>
bool write (std::string file, std::string graph_name="Graph", file_type ft=file_type::ASCII)
 It write a VTK file from a graph.
 

Private Member Functions

std::string get_vertex_properties_list ()
 It get the vertex properties list.
 
std::string get_point_properties_list ()
 It get the vertex properties list.
 
std::string get_edge_properties_list ()
 It get the edge properties list.
 
template<bool attr>
std::string get_point_list ()
 Create the VTK point definition.
 
std::string get_vertex_list ()
 Create the VTK vertex definition.
 
std::string get_point_data_header ()
 Get the point data header.
 
std::string get_cell_data_header ()
 Get the point data header.
 
std::string get_edge_list ()
 Return the edge list.
 

Private Attributes

const Graph & g
 graph we are writing
 

Constructor & Destructor Documentation

◆ VTKWriter()

template<typename Graph >
VTKWriter< Graph, VTK_GRAPH >::VTKWriter ( const Graph &  g)
inline

VTKWriter constructor, it take a graph and write a GraphML format

Parameters
gGraph to write

Definition at line 1114 of file VTKWriter_graph.hpp.

Member Function Documentation

◆ get_cell_data_header()

template<typename Graph >
std::string VTKWriter< Graph, VTK_GRAPH >::get_cell_data_header ( )
inlineprivate

Get the point data header.

Returns
a string with the point data header for VTK format

Definition at line 1066 of file VTKWriter_graph.hpp.

◆ get_edge_list()

template<typename Graph >
std::string VTKWriter< Graph, VTK_GRAPH >::get_edge_list ( )
inlineprivate

Return the edge list.

Returns
the edge list

edge node output string

Get an edge iterator

Definition at line 1081 of file VTKWriter_graph.hpp.

◆ get_edge_properties_list()

template<typename Graph >
std::string VTKWriter< Graph, VTK_GRAPH >::get_edge_properties_list ( )
inlineprivate

It get the edge properties list.

It get the edge properties list of the edge defined as a GraphML header

Returns
a string that define the edge properties in graphML format

vertex property output string

Definition at line 972 of file VTKWriter_graph.hpp.

◆ get_point_data_header()

template<typename Graph >
std::string VTKWriter< Graph, VTK_GRAPH >::get_point_data_header ( )
inlineprivate

Get the point data header.

Returns
a string with the point data header for VTK format

Definition at line 1051 of file VTKWriter_graph.hpp.

◆ get_point_list()

template<typename Graph >
template<bool attr>
std::string VTKWriter< Graph, VTK_GRAPH >::get_point_list ( )
inlineprivate

Create the VTK point definition.

Template Parameters
attrfalse x,y,z are set to 0 for each vertex
Returns
a string with the point list

VTK spatial information

vertex node output string

Get a vertex iterator

Definition at line 991 of file VTKWriter_graph.hpp.

◆ get_point_properties_list()

template<typename Graph >
std::string VTKWriter< Graph, VTK_GRAPH >::get_point_properties_list ( )
inlineprivate

It get the vertex properties list.

It get the vertex properties list of the vertex defined as a VTK header

Returns
a string that define the vertex properties in graphML format

vertex property output string

Definition at line 952 of file VTKWriter_graph.hpp.

◆ get_vertex_list()

template<typename Graph >
std::string VTKWriter< Graph, VTK_GRAPH >::get_vertex_list ( )
inlineprivate

Create the VTK vertex definition.

Returns
a string with the vertex definition

vertex node output string

For each point create a vertex

Definition at line 1030 of file VTKWriter_graph.hpp.

◆ get_vertex_properties_list()

template<typename Graph >
std::string VTKWriter< Graph, VTK_GRAPH >::get_vertex_properties_list ( )
inlineprivate

It get the vertex properties list.

It get the vertex properties list of the vertex defined as VTK header

Returns
a string that define the vertex properties in graphML format

vertex property output string

Definition at line 932 of file VTKWriter_graph.hpp.

◆ write()

template<typename Graph >
template<int prp = -1>
bool VTKWriter< Graph, VTK_GRAPH >::write ( std::string  file,
std::string  graph_name = "Graph",
file_type  ft = file_type::ASCII 
)
inline

It write a VTK file from a graph.

Template Parameters
prp_outwhich properties to output [default = -1 (all)]
Parameters
filepath where to write
graph_nameof the graph
ftspecify if it is a VTK BINARY or ASCII file [default = ASCII]
Returns
true if it write correctly

Definition at line 1130 of file VTKWriter_graph.hpp.

Field Documentation

◆ g

template<typename Graph >
const Graph& VTKWriter< Graph, VTK_GRAPH >::g
private

graph we are writing

Definition at line 922 of file VTKWriter_graph.hpp.


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