Commits (1)
......@@ -592,6 +592,15 @@ void Plot::vtk_vertexdata(const char *name, int k, bool deformed) {
vtk_scalar(out, k);
}
void Plot::vtk_vertexdata(const string& name, int k, bool deformed) {
if (!PPM->master()) return;
string filename = DataPathName + string("/vtk/") + name + string(".vtk");
M_ofstream out(filename.c_str());
vtk_mesh(out, deformed);
vtk_point_data(out);
vtk_scalar(out, k);
}
void Plot::vtk_2d_graph(const char *name, int k) {
if (!PPM->master()) return;
string filename = DataPathName + string("/vtk/") + name + string(".vtk");
......@@ -620,6 +629,13 @@ void Plot::vtk_celldata(const char *name, int k, bool deformed, const char *plot
vtk_celldata(out, k, deformed, plotname);
}
void Plot::vtk_celldata(const string& name, int k, bool deformed, const char *plotname) {
if (!PPM->master()) return;
string filename = DataPathName + string("/vtk/") + name + string(".vtk");
M_ofstream out(filename.c_str());
vtk_celldata(out, k, deformed, plotname);
}
void Plot::vtk_stokes(const char *name, int deform) {
if (!PPM->master()) return;
string filename = DataPathName + string("/vtk/") + name + string(".vtk");
......@@ -657,6 +673,15 @@ void Plot::vtk_cellvector(const char *name, int k, bool deformed) {
vtk_cellvector(out, k);
}
void Plot::vtk_cellvector(const string& name, int k, bool deformed) {
if (!PPM->master()) return;
string filename = DataPathName + string("/vtk/") + name + string(".vtk");
M_ofstream out(filename.c_str());
vtk_mesh(out, deformed);
vtk_cell_data(out);
vtk_cellvector(out, k);
}
void Plot::vtk_special(const char *name, int deform, int k) {
if (!PPM->master()) return;
string filename = DataPathName + string("/vtk/") + name + string(".vtk");
......
......@@ -8,6 +8,7 @@
#include "Mesh.h"
#include "IO.h"
class PlotData : public vector<double> {
int i;
int c;
......@@ -82,7 +83,6 @@ public:
void data(const Mesh &M, const D &d, int shift = 0);
PlotVertexDatas(const Mesh &M, int N);
};
class PlotCell : public vector<int> {
......@@ -207,15 +207,28 @@ public:
void vtk_vertexdata(const char *name, int k = 0, bool deformed = false);
void vtk_vertexdata(const string &name, int k = 0, bool deformed = false);
void vtk_stokes(const char *name, int deform = 0);
void vtk_cosserat(const char *name, int shift = 0, int deform = 0);
void vtk_special(const char *name, int deform, int k);
void vtk_celldata(const char *name, int k = 0, bool deformed = false, const char *plotname = "scalar_value");
void vtk_celldata(const char *name,
int k = 0,
bool deformed = false,
const char *plotname = "scalar_value");
void vtk_celldata(ostream &out, int k = 0, bool deformed = false, const char *plotname = "scalar_value");
void vtk_celldata(const string &name,
int k = 0,
bool deformed = false,
const char *plotname = "scalar_value");
void vtk_celldata(ostream &out,
int k = 0,
bool deformed = false,
const char *plotname = "scalar_value");
template<class D>
void vtk_celldata(const char *name, const D &d, int k = 0);
......@@ -226,6 +239,8 @@ public:
void vtk_cellvector(const char *name, int k = 0, bool deformed = false);
void vtk_cellvector(const string &name, int k = 0, bool deformed = false);
void vtk_2d_graph(const char *name, int k = 0);
void dx_mesh(const char *name, bool deformed = false);
......@@ -292,7 +307,6 @@ public:
void data(const SpaceTimeMesh &M, const D &d, int shift = 0);
TPlotVertexDatas(const SpaceTimeMesh &M, int N);
};
class TPlotCells : public vector<PlotCell> {
......@@ -378,7 +392,10 @@ public:
void vtk_vertexdata(const char *name, int k = 0, bool deformed = false);
void vtk_vertexdata(ostream &out, int k = 0, bool deformed = false, const char *name = "scalar_value");
void vtk_vertexdata(ostream &out,
int k = 0,
bool deformed = false,
const char *name = "scalar_value");
};
// string TDataPathName("data");
......