diameter.hh

Go to the documentation of this file.
1 
6 #ifndef diameter_hh
7 #define diameter_hh
8 
9 #include "basics/exceptions.hh"
10 
11 #include "space/space.hh"
12 #include "cell1D.hh"
13 #include "cell2D.hh"
14 #include "cell3D.hh"
15 #include "elementMaps.hh"
16 #include "toolbox/hashMap.hh"
17 
18 namespace concepts
19 {
20 
21  // ********************************************************** CellDiameter **
22 
44 {
45 
46 public:
47  //Line, Plane and Figure displaying 1D, 2D and 3D Manifold
48  enum type
49  {
51  };
52 
66  template<class F>
67  CellDiameter(const concepts::SpaceOnCells<F>& spc, const enum type typ,
68  bool square = false);
79  CellDiameter(const Cell& cell, const enum type typ, bool square = false);
80 
81  //returns the diameter of given key
82  const Real
83  operator()(uint key) const;
84 
85 protected:
86  virtual std::ostream&
87  info(std::ostream& os) const;
88 
89 private:
90 
91  //enum to string converter
92  const std::string
93  typeStr_() const;
94 
95  //type of the manifold kind to compute diameter
96  const enum type type_;
97  //true if all Quadliterals (Hexaedrals) are squares (cubes). this increases speed
98  bool square_;
99 
100  //Map of the Element keys to its diameters
102 
107  bool compute_(const Cell1* cell1, enum type typ);
108 
113  bool compute_(const Cell2* cell2, enum type typ);
114 
119  bool compute_(const Cell3* cell3, enum type typ);
120 };
121 } // namespace concepts
122 
123 #endif // diameter_hh
const std::string typeStr_() const
bool compute_(const Cell2 *cell2, enum type typ)
Computes the diameter out of given cell cell2 for requested type typ.
Class representing a map of diameters of elements of a given Space.
Definition: diameter.hh:44
const Real operator()(uint key) const
bool compute_(const Cell3 *cell3, enum type typ)
Computes the diameter out of given cell cell3 for requested type typ.
A cell in a mesh consist of topological information (neighbours, connectivity, orientation) and geome...
Definition: cell.hh:39
Three dimensional cell.
Definition: cell.hh:112
One dimensional cell.
Definition: cell.hh:75
Two dimensional cell.
Definition: cell.hh:89
Abstract class for a space.
Definition: space.hh:81
CellDiameter(const concepts::SpaceOnCells< F > &spc, const enum type typ, bool square=false)
Constructor getting a Space of Elements, i.e.
CellDiameter(const Cell &cell, const enum type typ, bool square=false)
Constructor to compute diameter of type typ out of a Cell \cell.
bool compute_(const Cell1 *cell1, enum type typ)
Computes the diameter out of given cell cell1 for requested type typ.
Class providing an output operator.
concepts::HashMap< Real > diam_
Definition: diameter.hh:101
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
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