normalVector.hh

Go to the documentation of this file.
1 
8 #ifndef normalVector_hh
9 #define normalVector_hh
10 
11 #include "basics/typedefs.hh"
12 #include "basics/Zm.hh"
13 #include "connectorSet.hh"
14 #include "connector.hh"
15 
16 namespace concepts {
17 
18  // forward declaration
19  class Cell2;
20  class Cell3;
21 
22  // **************************************************** EdgeNormalVectorRule **
23 
32  public:
33  virtual EdgeNormalVectorRule* clone() const {
34  return new EdgeNormalVectorRule();
35  }
36 
37  virtual Z2 operator()(const Cell2& cell, uint k) const;
38  protected:
39  virtual std::ostream& info(std::ostream& os) const;
40  };
41 
42  // ********************************************** EdgeNormalVectorRuleAttrib **
43 
53  public:
60  EdgeNormalVectorRuleAttrib(const Set<Attribute> attrib, bool outer = true)
61  : attrib_(attrib), outer_(outer) {}
62 
63 // EdgeNormalVectorRuleAttrib(const EdgeNormalVectorRuleAttrib& e)
64 // : attrib_(e.attrib_), outer_(e.outer_) {}
65 
66  virtual EdgeNormalVectorRuleAttrib* clone() const {
67  return new EdgeNormalVectorRuleAttrib(*this);
68  }
69 
70  virtual Z2 operator()(const Cell2& cell, uint k) const;
71  protected:
72  virtual std::ostream& info(std::ostream& os) const;
73  private:
79  bool outer_;
80  };
81 
82  // ******************************************** EdgeNormalVectorRuleMidPoint **
83 
94  public:
101  EdgeNormalVectorRuleMidPoint(const Real2d midpoint, bool outer = true)
102  : midpoint_(midpoint), outer_(outer) {}
103 
105  return new EdgeNormalVectorRuleMidPoint(*this);
106  }
107 
108  virtual Z2 operator()(const Cell2& cell, uint k) const;
109  protected:
110  virtual std::ostream& info(std::ostream& os) const;
111  private:
117  bool outer_;
118  };
119 
120  // **************************************************** FaceNormalVectorRule **
121 
130  public:
131  virtual FaceNormalVectorRule* clone() const {
132  return new FaceNormalVectorRule();
133  }
134 
135  virtual Z2 operator()(const Cell3& cell, uint k) const;
136  protected:
137  virtual std::ostream& info(std::ostream& os) const;
138 
139  };
140 
141 } // namespace concepts
142 
143 #endif // normalVector_hh
virtual Z2 operator()(const Cell3 &cell, uint k) const
virtual EdgeNormalVectorRule * clone() const
Definition: normalVector.hh:33
bool outer_
Flag indicating, if the normal vector should be outwards or inwards directed when looking from the mi...
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual Z2 operator()(const Cell2 &cell, uint k) const
Three dimensional cell.
Definition: cell.hh:112
EdgeNormalVectorRuleMidPoint(const Real2d midpoint, bool outer=true)
Constructor.
const Real2d midpoint_
Point in the domain.
Class defining the rule that the normal vector is outwards or inwards when looking from a given point...
Definition: normalVector.hh:93
EdgeNormalVectorRuleAttrib(const Set< Attribute > attrib, bool outer=true)
Constructor.
Definition: normalVector.hh:60
virtual Z2 operator()(const Cell2 &cell, uint k) const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Base class for defining rules in which direction the normal vector should point for created edges fro...
Definition: normalVector.hh:31
Two dimensional cell.
Definition: cell.hh:89
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual FaceNormalVectorRule * clone() const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual EdgeNormalVectorRuleAttrib * clone() const
Definition: normalVector.hh:66
bool outer_
Flag indicating, if for cells with given attributes the normal vector should points outwards or inwar...
Definition: normalVector.hh:79
Class defining the rule that the normal vector is outwards or inwards cells with giving attribute.
Definition: normalVector.hh:52
virtual Z2 operator()(const Cell2 &cell, uint k) const
Binary group (algebraic): only the values 0 and 1 are represented.
Definition: Zm.hh:16
Class providing an output operator.
const Set< Attribute > attrib_
Attributes of inner or outer domain.
Definition: normalVector.hh:75
virtual EdgeNormalVectorRuleMidPoint * clone() const
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Class for defining rules in which direction the normal vector should point for created faces from hex...
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich