ESyS-Particle  2.2
StressTensor.h
Go to the documentation of this file.
1 
2 // //
3 // Copyright (c) 2003-2013 by The University of Queensland //
4 // Earth Systems Science Computational Centre (ESSCC) //
5 // http://www.uq.edu.au/esscc //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.opensource.org/licenses/osl-3.0.php //
10 // //
12 
13 
14 #ifndef ESYS_LSMSTRESSTENSOR_H
15 #define ESYS_LSMSTRESSTENSOR_H
16 
17 #include "Foundation/vec3.h"
18 #include "Foundation/Matrix3.h"
21 
22 #include <vector>
23 #include <map>
24 
25 namespace esys
26 {
27  namespace lsm
28  {
29  class Tensor
30  {
31  public:
34 
36  : m_pos(),
37  m_tensor()
38  {
39  }
40 
41  Tensor(const Vec3 &pos, const Matrix3 &tensor)
42  : m_pos(pos),
43  m_tensor(tensor)
44  {
45  }
46 
47  virtual ~Tensor()
48  {
49  }
50 
51  const Vec3 &getPos() const
52  {
53  return m_pos;
54  }
55 
56  const Matrix3 &getTensor() const
57  {
58  return m_tensor;
59  }
60 
62  {
64  }
65 
66  private:
69  };
70 
71  class StressTensor : public Tensor
72  {
73  public:
76 
77  StressTensor(const Vec3 &pos, const Matrix3 &tensor, double radius)
78  : Tensor(pos, tensor),
79  m_radius(radius)
80  {
81  }
82 
83  StressTensor(const ParticleData &particleData, const Matrix3 &tensor)
84  : Tensor(particleData.getPos(), tensor),
85  m_radius(particleData.getRad())
86  {
87  }
88 
89  virtual ~StressTensor()
90  {
91  }
92 
93  double getRad() const
94  {
95  return m_radius;
96  }
97 
98  private:
99  double m_radius;
100  };
101  }
102 }
103 
104 #endif