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

Detailed Description

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

It write a VTK format file in case for a graph

Template Parameters
Typeof graph

Definition at line 909 of file VTKWriter_dist_graph.hpp.

#include <VTKWriter_dist_graph.hpp>

Public Member Functions

 VTKWriter (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_point_info ()
 Get the VTK point info string.
 
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

Graph & g
 Graph to output.
 

Constructor & Destructor Documentation

◆ VTKWriter()

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

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

Parameters
gGraph to write

Definition at line 1134 of file VTKWriter_dist_graph.hpp.

Member Function Documentation

◆ get_cell_data_header()

template<typename Graph >
std::string VTKWriter< Graph, DIST_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 1089 of file VTKWriter_dist_graph.hpp.

◆ get_edge_list()

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

Return the edge list.

Returns
the edge list

edge node output string

Get an edge iterator

Definition at line 1104 of file VTKWriter_dist_graph.hpp.

◆ get_edge_properties_list()

template<typename Graph >
std::string VTKWriter< Graph, DIST_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 992 of file VTKWriter_dist_graph.hpp.

◆ get_point_data_header()

template<typename Graph >
std::string VTKWriter< Graph, DIST_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 1074 of file VTKWriter_dist_graph.hpp.

◆ get_point_info()

template<typename Graph >
std::string VTKWriter< Graph, DIST_GRAPH >::get_point_info ( )
inlineprivate

Get the VTK point info string.

Returns
the point info string

vertex property output string

Definition at line 959 of file VTKWriter_dist_graph.hpp.

◆ get_point_list()

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

Create the VTK point definition.

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

VTK spatial information

vertex node output string

Get a vertex iterator

Definition at line 1012 of file VTKWriter_dist_graph.hpp.

◆ get_point_properties_list()

template<typename Graph >
std::string VTKWriter< Graph, DIST_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 942 of file VTKWriter_dist_graph.hpp.

◆ get_vertex_list()

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

Create the VTK vertex definition.

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

vertex node output string

For each point create a vertex

Definition at line 1053 of file VTKWriter_dist_graph.hpp.

◆ get_vertex_properties_list()

template<typename Graph >
std::string VTKWriter< Graph, DIST_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 922 of file VTKWriter_dist_graph.hpp.

◆ write()

template<typename Graph >
template<int prp = -1>
bool VTKWriter< Graph, DIST_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 succeed

Definition at line 1150 of file VTKWriter_dist_graph.hpp.

Field Documentation

◆ g

template<typename Graph >
Graph& VTKWriter< Graph, DIST_GRAPH >::g
private

Graph to output.

Definition at line 912 of file VTKWriter_dist_graph.hpp.


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