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];
abstract base class for most VTK objects
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
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
#define VTKCOMMONDATAMODEL_EXPORT
void SetComponent(int i, int j, double v)
double GetComponent(int i, int j)