mechanics_stress.hh

Go to the documentation of this file.
1 
7 #ifndef MECHANICS_STRESS_HH
8 #define MECHANICS_STRESS_HH
9 
10 #include "space/function.hh"
11 
12 namespace mechanics {
13 
14  using concepts::Real;
15  using concepts::Real2d;
16  using concepts::Real3d;
17 
18  // ************************************************************** Stress3D **
19 
25  template<class F, class G = Real>
26  class Stress3D : public concepts::ElementFunction<F,G>
27  {
28  public:
29  Stress3D(const F lambda, const F mu);
30 
31  virtual ~Stress3D(){}
32 
33  virtual Stress3D<F,G>* clone() const
34  {
35  return new Stress3D(lambda_, mu_);
36  }
37 
38  virtual uint n() const {
39  return 9;
40  }
41 
42  virtual void operator()(const concepts::Element<G>& elm,
43  const concepts::Array<F>& coeff, concepts::Array<F>& val,
44  const uint *i) const;
45 
46  virtual void operator()(const concepts::Element<G>& elm, const uint* j,
47  concepts::Array<F>& val, const uint* i) const;
48 
49  virtual void operator()(const concepts::Element<G>& elm,
50  const concepts::Array<F>& coeff, concepts::Array<F>& val,
51  const Real p, const Real t = 0.0) const;
52 
53  virtual void operator()(const concepts::Element<G>& elm,
54  const concepts::Array<F>& coeff, concepts::Array<F>& val,
55  const Real2d& p, const Real t = 0.0) const;
56 
57  virtual void operator()(const concepts::Element<G>& elm,
58  const concepts::Array<F>& coeff, concepts::Array<F>& val,
59  const Real3d& p, const Real t = 0.0) const;
60 
61  protected:
62  std::ostream& info(std::ostream &os) const
63  {
64  return os << concepts::typeOf(*this);
65  }
66 
67  private:
68  const F lambda_;
69  const F mu_;
70 
71  void process_(concepts::Array<F> &stressVal,
72  const concepts::Array<F> &strainVal) const;
73 
74  };
75 
76 } // namespace mechanics
77 
78 #endif // MECHANICS_STRESS_HH
Element function for the stress in 3D.
An abstract class for a function in a FE space.
Stress3D(const F lambda, const F mu)
Point< Real, 2 > Real2d
std::ostream & info(std::ostream &os) const
void process_(concepts::Array< F > &stressVal, const concepts::Array< F > &strainVal) const
virtual void operator()(const concepts::Element< G > &elm, const concepts::Array< F > &coeff, concepts::Array< F > &val, const Real2d &p, const Real t=0.0) const
Point< Real, 3 > Real3d
virtual void operator()(const concepts::Element< G > &elm, const concepts::Array< F > &coeff, concepts::Array< F > &val, const uint *i) const
An array of objects.
Definition: bilinearForm.hh:23
virtual Stress3D< F, G > * clone() const
virtual void operator()(const concepts::Element< G > &elm, const concepts::Array< F > &coeff, concepts::Array< F > &val, const Real3d &p, const Real t=0.0) const
virtual uint n() const
virtual void operator()(const concepts::Element< G > &elm, const uint *j, concepts::Array< F > &val, const uint *i) const
std::string typeOf(const T &t)
Return the typeid name of a class object.
Definition: output.hh:43
virtual void operator()(const concepts::Element< G > &elm, const concepts::Array< F > &coeff, concepts::Array< F > &val, const Real p, const Real t=0.0) const
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich