Commit ff079101 authored by Joachim Pouderoux's avatar Joachim Pouderoux Committed by Code Review

Merge topic 'bug_quads_evaluate_location' into master

b6235a77 BUG: Fix the quads evaluate location
parents 5a8f26e3 b6235a77
......@@ -157,16 +157,17 @@ void vtkBiQuadraticQuad::EvaluateLocation (int& vtkNotUsed(subId),
double x[3], double *weights)
{
int i, j;
double *p = static_cast<vtkDoubleArray *>(this->Points->GetData())->GetPointer(0);
double pt[3];
this->InterpolationFunctions(pcoords,weights);
for (j=0; j<3; j++)
x[0] = x[1] = x[2] = 0.0;
for (i=0; i<9; i++)
{
x[j] = 0.0;
for (i = 0; i < 9; i++)
this->Points->GetPoint(i, pt);
for (j=0; j<3; j++)
{
x[j] += p[3*i+j] * weights[i];
x[j] += pt[j] * weights[i];
}
}
}
......
......@@ -168,17 +168,17 @@ void vtkQuadraticLinearQuad::EvaluateLocation(int& vtkNotUsed(subId),
double x[3], double *weights)
{
int i, j;
double *p =
static_cast<vtkDoubleArray *>(this->Points->GetData())->GetPointer(0);
double pt[3];
this->InterpolationFunctions(pcoords,weights);
for (j=0; j<3; j++)
x[0] = x[1] = x[2] = 0.0;
for (i=0; i<6; i++)
{
x[j] = 0.0;
for (i = 0; i < 6; i++)
this->Points->GetPoint(i, pt);
for (j=0; j<3; j++)
{
x[j] += p[3*i+j] * weights[i];
x[j] += pt[j] * weights[i];
}
}
}
......
......@@ -189,17 +189,17 @@ void vtkQuadraticQuad::EvaluateLocation(int& vtkNotUsed(subId),
double x[3], double *weights)
{
int i, j;
double *p =
static_cast<vtkDoubleArray *>(this->Points->GetData())->GetPointer(0);
double pt[3];
this->InterpolationFunctions(pcoords,weights);
for (j=0; j<3; j++)
x[0] = x[1] = x[2] = 0.0;
for (i=0; i<8; i++)
{
x[j] = 0.0;
for (i=0; i<8; i++)
this->Points->GetPoint(i, pt);
for (j=0; j<3; j++)
{
x[j] += p[3*i+j] * weights[i];
x[j] += pt[j] * weights[i];
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment