Commit bd1e4bfd authored by Will Schroeder's avatar Will Schroeder
Browse files

ENH: Code around singularity.

parent 0bdaaa2f
...@@ -144,6 +144,22 @@ void vtkPointLoad::Execute() ...@@ -144,6 +144,22 @@ void vtkPointLoad::Execute()
x = this->Origin[0] + k*this->AspectRatio[0]; x = this->Origin[0] + k*this->AspectRatio[0];
rho = sqrt((x-xP[0])*(x-xP[0]) + (y-xP[1])*(y-xP[1]) + rho = sqrt((x-xP[0])*(x-xP[0]) + (y-xP[1])*(y-xP[1]) +
(z-xP[2])*(z-xP[2])); (z-xP[2])*(z-xP[2]));
if ( rho < 1.0e-10 )
{
vtkWarningMacro(<<"Attempting to set singularity, resetting");
tensor.SetComponent(0,0,LARGE_FLOAT);
tensor.SetComponent(1,1,LARGE_FLOAT);
tensor.SetComponent(2,2,LARGE_FLOAT);
tensor.SetComponent(0,1,0.0);
tensor.SetComponent(0,2,0.0);
tensor.SetComponent(1,0,0.0);
tensor.SetComponent(1,2,0.0);
tensor.SetComponent(2,0,0.0);
tensor.SetComponent(2,1,0.0);
newTensors->InsertNextTensor(tensor);
continue;
}
rho2 = rho*rho; rho2 = rho*rho;
rho3 = rho2*rho; rho3 = rho2*rho;
rho5 = rho2*rho3; rho5 = rho2*rho3;
......
Supports Markdown
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