28#ifndef vtkboneTensor_h
29#define vtkboneTensor_h
49 void SetComponent(
int i,
int j,
double v) {
if (i > 2 || j > 2) {vtkErrorMacro(
"trying to set tensor component i or j > 2: i = " << i <<
", j = " << j);
return;}; this->T[i+3*j] = v;};
54 void AddComponent(
int i,
int j,
double v) {
if (i > 2 || j > 2) {vtkErrorMacro(
"trying to add tensor component i or j > 2: i = " << i <<
", j = " << j);
return;}; this->T[i+3*j] += v;};
60 double *
GetColumn(
int j) {
if (j > 2) {vtkErrorMacro(
"trying to get tensor column j > 2: j = " << j);
return NULL;};
return this->T + 3*j;};
67 operator double*() {
return this->T;};
85 for (
int j=0; j<3; j++)
87 for (
int i=0; i<3; i++)
97 for (
int j=0; j < 3; j++)
99 for (
int i=0; i < 3; i++)
101 this->
T[i+3*j] = t->
T[i+3*j];
void operator=(const vtkObjectBase &)
supporting class to enable assignment and referencing of tensors
double * GetColumn(int j)
void AddComponent(int i, int j, double v)
void DeepCopy(vtkboneTensor *t)
void PrintSelf(ostream &os, vtkIndent indent) override
static vtkboneTensor * New()
double GetComponent(int i, int j)
void SetComponent(int i, int j, double v)
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)