12 double matrix[3][3] = {{0.,0.,0.},{0.,0.,0.},{0.,0.,0.}};
27 for(
int i = 0; i < 3; ++i){
28 for(
int j = 0; j < 3; ++j){
42 inline double get(
int i,
int j)
const {
return matrix[i][j]; }
54 for(
int i = 0; i < 3; ++i){
55 for(
int j = 0; j <3; ++j){
70 for(
int i = 0; i < 3; ++i){
71 for(
int j = 0; j <3; ++j){
86 for(
int i = 0; i < 3; ++i){
87 for(
int j = 0; j <3; ++j){
88 str <<
matrix[i][j] <<
", ";
general purpose 3D vector/point class.
std::array< double, 3 > coords
Represents a 3x3 tensor for stress calculations.
double get(int i, int j) const
Gets the value at the specified position in the tensor.
Tensor()
Default constructor.
Tensor & operator+=(Tensor t)
Adds another tensor to this tensor.
Tensor(const MecaCell::Vec &f, const MecaCell::Vec &r)
Constructor with force and position vectors.
string to_string()
Converts the tensor to a string representation.
Tensor & operator/=(double div)
Divides the tensor by a scalar value.