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

Detailed Description

template<typename vector>
class VTKWriter< vector, VECTOR_BOX >

From a basic structure it write a VTK format file in case of a vector of Boxes

Template Parameters
vectortype

Definition at line 46 of file VTKWriter_vector_box.hpp.

#include <VTKWriter_vector_box.hpp>

Public Member Functions

 VTKWriter ()
 
void add (const vector &vc)
 Add box vector dataset.
 
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_point_properties_list ()
 It get the vertex properties list.
 
std::string get_cell_properties_list ()
 It get the edge properties list.
 
std::string get_point_list ()
 Create the VTK point definition.
 
std::string get_cell_list ()
 Create the VTK vertex definition.
 
std::string get_point_data_header ()
 Get the point data header.
 
std::string get_cell_types_header ()
 
std::string get_cell_types_list ()
 
std::string get_cell_data_header ()
 
std::string get_cell_data_list ()
 

Private Attributes

openfpm::vector< v_box< vector > > v
 data to write
 

Constructor & Destructor Documentation

◆ VTKWriter()

template<typename vector >
VTKWriter< vector, VECTOR_BOX >::VTKWriter ( )
inline

VTKWriter constructor

Definition at line 352 of file VTKWriter_vector_box.hpp.

Member Function Documentation

◆ add()

template<typename vector >
void VTKWriter< vector, VECTOR_BOX >::add ( const vector &  vc)
inline

Add box vector dataset.

Parameters
vvector to add

Definition at line 360 of file VTKWriter_vector_box.hpp.

◆ get_cell_data_header()

template<typename vector >
std::string VTKWriter< vector, VECTOR_BOX >::get_cell_data_header ( )
inlineprivate

vertex property output string

number of cells and box

Definition at line 292 of file VTKWriter_vector_box.hpp.

◆ get_cell_data_list()

template<typename vector >
std::string VTKWriter< vector, VECTOR_BOX >::get_cell_data_list ( )
inlineprivate

vertex node output string

for each vector in the dataset

Definition at line 314 of file VTKWriter_vector_box.hpp.

◆ get_cell_list()

template<typename vector >
std::string VTKWriter< vector, VECTOR_BOX >::get_cell_list ( )
inlineprivate

Create the VTK vertex definition.

Returns
the string with the vertex definition

vertex node output string

for each vector in the dataset

Definition at line 179 of file VTKWriter_vector_box.hpp.

◆ get_cell_properties_list()

template<typename vector >
std::string VTKWriter< vector, VECTOR_BOX >::get_cell_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

number of cells and box

Definition at line 88 of file VTKWriter_vector_box.hpp.

◆ get_cell_types_header()

template<typename vector >
std::string VTKWriter< vector, VECTOR_BOX >::get_cell_types_header ( )
inlineprivate

vertex property output string

number of cells and box

Definition at line 239 of file VTKWriter_vector_box.hpp.

◆ get_cell_types_list()

template<typename vector >
std::string VTKWriter< vector, VECTOR_BOX >::get_cell_types_list ( )
inlineprivate

vertex node output string

for each vector in the dataset

Definition at line 260 of file VTKWriter_vector_box.hpp.

◆ get_point_data_header()

template<typename vector >
std::string VTKWriter< vector, VECTOR_BOX >::get_point_data_header ( )
inlineprivate

Get the point data header.

Returns
a string with the point data header for VTK format

Definition at line 220 of file VTKWriter_vector_box.hpp.

◆ get_point_list()

template<typename vector >
std::string VTKWriter< vector, VECTOR_BOX >::get_point_list ( )
inlineprivate

Create the VTK point definition.

Template Parameters
s_typespatial type of the data
attrfalse x,y,z are set to 0 for each vertex

vertex node output string

for each vertex dataset

Definition at line 119 of file VTKWriter_vector_box.hpp.

◆ get_point_properties_list()

template<typename vector >
std::string VTKWriter< vector, VECTOR_BOX >::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 59 of file VTKWriter_vector_box.hpp.

◆ write()

template<typename vector >
template<int prp = -1>
bool VTKWriter< vector, VECTOR_BOX >::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
nameof the graph
ftspecify if it is a VTK BINARY or ASCII file [default = ASCII]

Definition at line 377 of file VTKWriter_vector_box.hpp.

Field Documentation

◆ v

template<typename vector >
openfpm::vector<v_box<vector> > VTKWriter< vector, VECTOR_BOX >::v
private

data to write

Definition at line 49 of file VTKWriter_vector_box.hpp.


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