44 virtual Array<int> get_connectivity() = 0;
45 virtual Array<double> get_points() = 0;
46 virtual int num_elems() = 0;
47 virtual int np_elem() = 0;
48 virtual int num_points() = 0;
49 virtual void read_file(
const std::string& file_name) = 0;
51 virtual void set_element_data(
const std::string& data_name,
const Array<double>& data) = 0;
52 virtual void set_element_data(
const std::string& data_name,
const Array<int>& data) = 0;
54 virtual void set_point_data(
const std::string& data_name,
const Array<double>& data) = 0;
55 virtual void set_point_data(
const std::string& data_name,
const Array<int>& data) = 0;
56 virtual void set_point_data(
const std::string& data_name,
const Vector<int>& data) = 0;
58 virtual void set_points(
const Array<double>& points) = 0;
59 virtual void set_connectivity(
const int nsd,
const Array<int>& conn,
const int pid = 0) = 0;
61 virtual bool has_point_data(
const std::string& data_name) = 0;
63 virtual void copy_points(Array<double>& points) = 0;
64 virtual void copy_point_data(
const std::string& data_name, Array<double>& mesh_data) = 0;
65 virtual void copy_point_data(
const std::string& data_name,
Vector<double>& mesh_data) = 0;
66 virtual void write() = 0;
68 static VtkData* create_reader(
const std::string& file_name);
69 static VtkData* create_writer(
const std::string& file_name);
71 std::string file_name;
77 VtkVtpData(
const std::string& file_name,
bool reader=
true);
80 virtual Array<int> get_connectivity();
82 virtual int num_elems();
83 virtual int np_elem();
84 virtual int num_points();
85 virtual void read_file(
const std::string& file_name);
88 void copy_point_data(
const std::string& data_name, Array<double>& mesh_data);
93 bool has_point_data(
const std::string& data_name);
94 virtual void set_connectivity(
const int nsd,
const Array<int>& conn,
const int pid = 0);
96 virtual void set_element_data(
const std::string& data_name,
const Array<double>& data);
97 virtual void set_element_data(
const std::string& data_name,
const Array<int>& data);
99 virtual void set_point_data(
const std::string& data_name,
const Array<double>& data);
100 virtual void set_point_data(
const std::string& data_name,
const Array<int>& data);
101 virtual void set_point_data(
const std::string& data_name,
const Vector<int>& data);
103 virtual void set_points(
const Array<double>& points);
104 virtual void write();
114 VtkVtuData(
const std::string& file_name,
bool reader=
true);
117 virtual Array<int> get_connectivity();
118 virtual int num_elems();
119 virtual int np_elem();
120 virtual int num_points();
121 virtual void read_file(
const std::string& file_name);
124 void copy_point_data(
const std::string& data_name, Array<double>& mesh_data);
130 virtual Array<double> get_points();
131 bool has_point_data(
const std::string& data_name);
132 virtual void set_connectivity(
const int nsd,
const Array<int>& conn,
const int pid = 0);
134 virtual void set_element_data(
const std::string& data_name,
const Array<double>& data);
135 virtual void set_element_data(
const std::string& data_name,
const Array<int>& data);
137 virtual void set_point_data(
const std::string& data_name,
const Array<double>& data);
138 virtual void set_point_data(
const std::string& data_name,
const Array<int>& data);
139 virtual void set_point_data(
const std::string& data_name,
const Vector<int>& data);
141 virtual void set_points(
const Array<double>& points);
142 virtual void write();
Definition: VtkData.cpp:59
std::vector< std::string > get_point_data_names()
Get a list of point data names.
Definition: VtkData.cpp:700
virtual Array< double > get_points()
Get an array of point data from an unstructured grid.
Definition: VtkData.cpp:715
void copy_point_data(const std::string &data_name, Array< double > &mesh_data)
Copy an array of point data from an polydata mesh into the given Array.
Definition: VtkData.cpp:589
Array< double > get_point_data(const std::string &data_name)
Get an array of point data from an unstructured grid.
Definition: VtkData.cpp:673
void copy_points(Array< double > &points)
Copy points into the given array.
Definition: VtkData.cpp:654
Definition: VtkData.cpp:241
Definition: VtkData.h:111
void copy_point_data(const std::string &data_name, Array< double > &mesh_data)
Copy an array of point data from an unstructured grid into the given Array.
Definition: VtkData.cpp:866
void copy_points(Array< double > &points)
Copy points into the given array.
Definition: VtkData.cpp:932
Array< double > get_point_data(const std::string &data_name)
Get an array of point data from an unstructured grid.
Definition: VtkData.cpp:964
std::vector< std::string > get_point_data_names()
Get a list of point data names.
Definition: VtkData.cpp:851