CellModules
|
Represents a 3x3 tensor for stress calculations. More...
#include <Tensor.hpp>
Public Member Functions | |
Tensor () | |
Default constructor. More... | |
Tensor (const MecaCell::Vec &f, const MecaCell::Vec &r) | |
Constructor with force and position vectors. More... | |
double | get (int i, int j) const |
Gets the value at the specified position in the tensor. More... | |
Tensor & | operator/= (double div) |
Divides the tensor by a scalar value. More... | |
Tensor & | operator+= (Tensor t) |
Adds another tensor to this tensor. More... | |
string | to_string () |
Converts the tensor to a string representation. More... | |
Private Attributes | |
double | matrix [3][3] = {{0.,0.,0.},{0.,0.,0.},{0.,0.,0.}} |
Represents a 3x3 tensor for stress calculations.
Definition at line 10 of file Tensor.hpp.
|
inline |
Default constructor.
Definition at line 18 of file Tensor.hpp.
|
inline |
Constructor with force and position vectors.
f | Force vector. |
r | Position vector. |
Definition at line 26 of file Tensor.hpp.
|
inline |
Gets the value at the specified position in the tensor.
i | Row index. |
j | Column index. |
Definition at line 42 of file Tensor.hpp.
Adds another tensor to this tensor.
t | Tensor to add. |
Definition at line 69 of file Tensor.hpp.
|
inline |
Divides the tensor by a scalar value.
div | Scalar value to divide by. |
Definition at line 53 of file Tensor.hpp.
|
inline |
Converts the tensor to a string representation.
Definition at line 84 of file Tensor.hpp.
|
private |
3x3 matrix representing the tensor
Definition at line 12 of file Tensor.hpp.