48 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;};
53 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;};
59 double *
GetColumn(
int j) {
if (j > 2) {vtkErrorMacro(
"trying to get tensor column j > 2: j = " << j);
return NULL;};
return this->T + 3*j;};
66 operator double*() {
return this->T;};
84 for (
int j=0; j<3; j++)
86 for (
int i=0; i<3; i++)
96 for (
int j=0; j < 3; j++)
98 for (
int i=0; i < 3; i++)
100 this->
T[i+3*j] = t->
T[i+3*j];
abstract base class for most VTK objects
double * GetColumn(int j)
void DeepCopy(vtkTensor *t)
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
void AddComponent(int i, int j, double v)
supporting class to enable assignment and referencing of tensors
void SetComponent(int i, int j, double v)
double GetComponent(int i, int j)