### BUG:Finally fixed probing of vtkQuatraticTetra by fixing EvaluatePosition()....

`BUG:Finally fixed probing of vtkQuatraticTetra by fixing EvaluatePosition(). The parametric center is 0.5,0.5,0.5 not 0.33,0.33,0.33. Now we get a better initial guess for the Newton-Raphson method and more important, some of the partial derivatives equations were just wrong in InterpolationDerivs()`
parent 7ea3cb48
 ... ... @@ -22,7 +22,7 @@ #include "vtkDoubleArray.h" #include "vtkObjectFactory.h" vtkCxxRevisionMacro(vtkQuadraticTetra, "1.3"); vtkCxxRevisionMacro(vtkQuadraticTetra, "1.4"); vtkStandardNewMacro(vtkQuadraticTetra); //---------------------------------------------------------------------------- ... ... @@ -121,8 +121,7 @@ int vtkQuadraticTetra::EvaluatePosition(double* x, // set initial position for Newton's method subId = 0; pcoords = pcoords = pcoords = params = params = params=0.333; pcoords = pcoords = pcoords = params = params = params=0.25; // enter iteration loop for (iteration=converged=0; !converged && (iteration < VTK_TETRA_MAX_ITERATION); iteration++) ... ... @@ -490,8 +489,8 @@ void vtkQuadraticTetra::InterpolationDerivs(double pcoords, double derivs double s = pcoords; double t = pcoords; // r-derivatives derivs = 4.0*r + 4.0*s + 4.0*t - 3.0; // r-derivatives: dW0/dr to dW9/dr derivs = 4.0*(r + s + t) - 3.0; derivs = 4.0*r - 1.0; derivs = 0.0; derivs = 0.0; ... ... @@ -499,11 +498,11 @@ void vtkQuadraticTetra::InterpolationDerivs(double pcoords, double derivs derivs = 4.0*s; derivs = -4.0*s; derivs = -4.0*t; derivs = 0.0; derivs = 4.0*t; derivs = 4.0*t; derivs = 0.0; // s-derivatives derivs = 4.0*r + 4.0*s + 4.0*t - 3.0; // s-derivatives: dW0/ds to dW9/ds derivs = 4.0*(r + s + t) - 3.0; derivs = 0.0; derivs = 4.0*s - 1.0; derivs = 0.0; ... ... @@ -511,21 +510,20 @@ void vtkQuadraticTetra::InterpolationDerivs(double pcoords, double derivs derivs = 4.0*r; derivs = 4.0 - 4.0*r - 8.0*s - 4.0*t; derivs = -4.0*t; derivs = 4.0*t; derivs = 0.0; derivs = 0.0; derivs = 4.0*t; // t-derivatives derivs = 4.0*r + 4.0*s + 4.0*t - 3.0; // t-derivatives: dW0/dt to dW9/dt derivs = 4.0*(r + s + t) - 3.0; derivs = 0.0; derivs = 0.0; derivs = 4.0*t - 1.0; derivs = -4.0*r; derivs = 0.0; derivs = -4.0*t; derivs = 4.0 - 4.0*r - 8.0*s - 4.0*t; derivs = 4.0*s; derivs = 4.0*t; derivs = -4.0*s; derivs = 4.0 - 4.0*r - 4.0*s - 8.0*t; derivs = 4.0*r; derivs = 4.0*s; } //---------------------------------------------------------------------------- ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!