Class documentation of Concepts

Loading...
Searching...
No Matches
meshGnuplot.hh
Go to the documentation of this file.
1
6#ifndef graphMeshGnuplot_hh
7#define graphMeshGnuplot_hh
8
9#include <string>
10#include <fstream>
11#include <memory>
12#include "basics/typedefs.hh"
14#include "basics/exceptions.hh"
15#include "space/postProcess.hh"
16
17namespace graphics {
18 using concepts::Real;
19
20 // ******************************************************* MeshGnuplotCell **
21
25 template<typename F>
27 public:
28 MeshGnuplotCell(std::ofstream* ofs) : ofs_(ofs) {}
29 virtual ~MeshGnuplotCell();
30 virtual void operator() (const concepts::Element<F>& elm);
31 virtual void operator() (const concepts::Cell& cell);
32 std::ofstream* write() { return ofs_; }
33 private:
34 std::ofstream* ofs_;
35 };
36
37 // *********************************************************** MeshGnuplot **
38
43 template<typename T>
44 void drawMeshGnuplot(T& msh_spc, std::string filename) {
45 std::ofstream ofs(filename.c_str());
46 concepts::GlobalPostprocess<Real> postProcess(msh_spc);
47 MeshGnuplotCell<Real> gnu(&ofs);
48 postProcess(gnu);
49 }
50
51} // namespace graphics
52
53#endif // graphMeshGnuplot_hh
virtual void operator()(const concepts::Element< F > &elm)
double Real
Definition typedefs.hh:39
void drawMeshGnuplot(T &msh_spc, std::string filename)