topologyDotty.hh

Go to the documentation of this file.
1 
6 #ifndef topologyDotty_hh
7 #define topologyDotty_hh
8 
9 #include <string>
10 #include <fstream>
11 #include "space/postProcess.hh"
12 #include "basics/typedefs.hh"
13 
14 namespace concepts {
15  // forward declarations
16  template<class F>
17  class Element;
18 
19  template<class F>
20  class Space;
21 
22  class Cell;
23  class Connector1;
24  class Mesh;
25 }
26 
27 namespace graphics {
28 
29  using concepts::Real;
30 
31  // ********************************************************* TopologyDotty **
32 
44  template<class F>
45  class TopologyDotty {
46  public:
50  TopologyDotty(concepts::Mesh& msh, std::string filename);
51 
55  TopologyDotty(concepts::Space<F>& spc, std::string filename);
56  private:
59 
62 
64  std::string filename_;
65  };
66 
67  // ***************************************************** TopologyDottyCell **
68 
76  template<class F>
78  public:
82  TopologyDottyCell(const std::string file);
84  virtual void operator() (const concepts::Element<F>& elm);
85  virtual void operator() (const concepts::Cell& cell);
86  private:
87  void edge_(const concepts::Connector1& cntr);
88 
90  std::ofstream os_;
91  };
92 
93 } // namespace graphics
94 
95 #endif // topologyDotty_hh
TopologyDottyCell(const std::string file)
Constructor.
An abstract class for an element of a space.
Definition: exceptions.hh:15
TopologyDotty(concepts::Space< F > &spc, std::string filename)
Constructor.
std::string filename_
Filename.
std::ofstream os_
Stream to the file.
Abstract class for a space.
A cell in a mesh consist of topological information (neighbours, connectivity, orientation) and geome...
Definition: cell.hh:39
GenericElement< KarniadakisMixin< F > > Element
template aliases for backwards compatibility
Definition: element.hh:270
concepts::Mesh * msh_
The mesh.
Graphics.
Definition: basis.hh:33
virtual void operator()(const concepts::Element< F > &elm)
Application operator.
TopologyDotty(concepts::Mesh &msh, std::string filename)
Constructor.
Executor class for TopologyDottyCell.
concepts::Space< F > * spc_
The space.
void edge_(const concepts::Connector1 &cntr)
Produces an input file for dot / dotty to display the topology as a directed graph.
A 1D element of the topology.
Definition: connector.hh:182
An abstract class for meshes.
Definition: mesh.hh:76
Abstract class for per cell postprocessing.
Definition: postProcess.hh:38
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich