frmE_normalVector.hh

Go to the documentation of this file.
1 
6 #ifndef elemFormulaNormalTangentialVector_hh
7 #define elemFormulaNormalTangentialVector_hh
8 
9 #include "basics/typedefs.hh"
11 
12 namespace concepts {
13 
14 
15  // ****************************************************** FrmE_NormalVector **
16 
26  class FrmE_NormalVector : public ElementFormula<Real2d> {
27  public:
29  const Real p, const Real t = 0.0) const;
31  const Real2d& p,
32  const Real t = 0.0) const {
33  return (*this)(elm, p[0], t);
34  }
36  const Real3d& p,
37  const Real t = 0.0) const {
38  return (*this)(elm, p[0], t);
39  }
40 
42  virtual FrmE_NormalVector* clone() const {
43  return new FrmE_NormalVector();
44  }
45  protected:
46  virtual std::ostream& info(std::ostream& os) const;
47  };
48 
49  // ************************************************** FrmE_TangentialVector **
50 
60  class FrmE_TangentialVector : public ElementFormula<Real2d> {
61  public:
63  const Real p, const Real t = 0.0) const;
65  const Real2d& p,
66  const Real t = 0.0) const {
67  return (*this)(elm, p[0], t);
68  }
70  const Real3d& p,
71  const Real t = 0.0) const {
72  return (*this)(elm, p[0], t);
73  }
74 
76  virtual FrmE_TangentialVector* clone() const {
77  return new FrmE_TangentialVector();
78  }
79  protected:
80  virtual std::ostream& info(std::ostream& os) const;
81  };
82 
83  // **************************************************** FrmE_NormalVector3d **
84 
91  class FrmE_NormalVector3d : public ElementFormula<Real3d> {
92  public:
94  const Real2d &p, const Real t = 0.0) const;
96  const Real3d &p, const Real t = 0.0) const
97  {
98  return (*this)(elm, Real2d(p[0],p[1]),t);
99  }
101  const Real p, const Real t = 0.0) const;
102 
103  virtual FrmE_NormalVector3d* clone() const {
104  return new FrmE_NormalVector3d();
105  }
106  protected:
107  virtual std::ostream& info(std::ostream& os) const;
108  };
109 
110 } // namespace concepts
111 
112 #endif // elemFormulaNormalTangentialVector_hh
113 
virtual Real2d operator()(const ElementWithCell< Real > &elm, const Real p, const Real t=0.0) const
virtual FrmE_TangentialVector * clone() const
Virtual copy constructor.
virtual FrmE_NormalVector3d * clone() const
Virtual constructor.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Point< Real, 2 > Real2d
Element formula on 2D elements based on Quad3d returning the normal vector.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Element formula on 1D elements based on Edge2d returning the tangential vector (left of normal vector...
virtual Real3d operator()(const ElementWithCell< Real > &elm, const Real2d &p, const Real t=0.0) const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Interface for a formula defined element by element.
virtual Real2d operator()(const ElementWithCell< Real > &elm, const Real p, const Real t=0.0) const
virtual FrmE_NormalVector * clone() const
Virtual copy constructor.
Element formula on 1D elements based on Edge2d returning the normal vector.
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