14 #ifndef ESYS_LSMSTRESSTENSORCACLULATOR_H
15 #define ESYS_LSMSTRESSTENSORCACLULATOR_H
36 template <
typename TmplContactReference>
39 const Vec3 r = contact.getCentrePos2() - tensorPos;
40 for (
int i = 0; i < 3; i++) {
41 for (
int j = 0; j < 3; j++) {
42 tensor(i,j) += contact.getForce()[i] * r[j];
47 template <
typename TmplContactIterator>
54 tensorData = it.next().getParticle1();
74 template <
typename TmplContactReference>
77 const Vec3 r = contact.getForcePos() - tensorPos;
78 for (
int i = 0; i < 3; i++) {
79 for (
int j = 0; j < 3; j++) {
80 tensor(i,j) += r[i] * contact.getForce()[j];
85 template <
typename TmplContactIterator>
93 tensorData = it.next().getParticle1();
94 volume = it.current().getVolume1();
IntercentreStressTensorCalculator()
Definition: StressTensorCalculator.h:32
StressTensor calculate(TmplContactIterator &it)
Definition: StressTensorCalculator.h:48
3x3 Matrix
Definition: Matrix3.h:47
Definition: CheckPointable.cpp:16
const Vec3 & getPos() const
Definition: Contact.h:41
Definition: StressTensor.h:71
Definition: StressTensorCalculator.h:28
void updateTensor(Matrix3 &tensor, const Vec3 &tensorPos, TmplContactReference &contact)
Definition: StressTensorCalculator.h:37