[vtkusers] vtkQuadHex test fails
Budd Hirons
bhiron at lsuhsc.edu
Wed Apr 20 14:19:26 EDT 2005
Thanks John,
I brought my vtk4.4 version of vtkQuadraticHexahedron.cxx up to 1.23
(just before the class was moved to Filtering) and everything works
beautifully.
Budd.
John Platt wrote:
> Hi Budd,
>
> You need at least version 1.23 of vtkQuadraticHexahedron.cxx
>
> John.
>
> -----Original Message-----
> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On
> Behalf Of Budd Hirons
> Sent: 20 April 2005 16:11
> To: vtk-users
> Subject: [vtkusers] vtkQuadHex test fails
>
> Hello,
>
> We are trying to exercise EvaluatePosition in vtkQuadraticHexahedron,
> and we find that the test included in the code only works of the point
> you are evaluating is at the parametric center of the cell points.
>
> Is there a fix for this or is there something done wrong? The code
> below is directly out of /Common/Testing/Cxx/quadraticEvaluation.cxx
>
> rval is always -1 unless you set the point you are evaluating to
> .5,.5,.5 ...
>
> Cheers,
> Budd.
>
>
> <code>
>
> vtkQuadraticHexahedron *hex = vtkQuadraticHexahedron::New();
>
> // vtkQuadraticHexahedron
> double hexPCoords[3], hexWeights[20], hexPosition[3];
> //double hexPoint[1][3] = {{0.25, 0.33333, 0.666667}};
> double hexPoint[1][3] = {{0.5, 0.51, 0.5}};
>
> double hexClosest[3];
>
> hex->GetPointIds()->SetId(0,0);
> hex->GetPointIds()->SetId(1,1);
> hex->GetPointIds()->SetId(2,2);
> hex->GetPointIds()->SetId(3,3);
> hex->GetPointIds()->SetId(4,4);
> hex->GetPointIds()->SetId(5,5);
> hex->GetPointIds()->SetId(6,6);
> hex->GetPointIds()->SetId(7,7);
> hex->GetPointIds()->SetId(8,8);
> hex->GetPointIds()->SetId(9,9);
> hex->GetPointIds()->SetId(10,10);
> hex->GetPointIds()->SetId(11,11);
> hex->GetPointIds()->SetId(12,12);
> hex->GetPointIds()->SetId(13,13);
> hex->GetPointIds()->SetId(14,14);
> hex->GetPointIds()->SetId(15,15);
> hex->GetPointIds()->SetId(16,16);
> hex->GetPointIds()->SetId(17,17);
> hex->GetPointIds()->SetId(18,18);
> hex->GetPointIds()->SetId(19,19);
>
> hex->GetPoints()->SetPoint( 0, 0, 0, 0 );
> hex->GetPoints()->SetPoint( 1, 1, 0, 0 );
> hex->GetPoints()->SetPoint( 2, 1, 1, 0 );
> hex->GetPoints()->SetPoint( 3, 0, 1, 0 );
> hex->GetPoints()->SetPoint( 4, 0, 0, 1 );
> hex->GetPoints()->SetPoint( 5, 1, 0, 1 );
> hex->GetPoints()->SetPoint( 6, 1, 1, 1 );
> hex->GetPoints()->SetPoint( 7, 0, 1, 1 );
> hex->GetPoints()->SetPoint( 8, 0.5, 0, 0);
> hex->GetPoints()->SetPoint( 9, 1, 0.5, 0);
> hex->GetPoints()->SetPoint(10, 0.5, 1, 0);
> hex->GetPoints()->SetPoint(11, 0, 0.5, 0);
> hex->GetPoints()->SetPoint(12, 0.5, 0, 1);
> hex->GetPoints()->SetPoint(13, 1, 0.5, 1);
> hex->GetPoints()->SetPoint(14, 0.5, 1, 1);
> hex->GetPoints()->SetPoint(15, 0, 0.5, 1);
> hex->GetPoints()->SetPoint(16, 0, 0, 0.5);
> hex->GetPoints()->SetPoint(17, 1, 0, 0.5);
> hex->GetPoints()->SetPoint(18, 1, 1, 0.5);
> hex->GetPoints()->SetPoint(19, 0, 1, 0.5);
>
> int subId = 0;
> double dist2 = 0.0;
> int rval = hex->EvaluatePosition(hexPoint[0], hexClosest, subId,
> hexPCoords, dist2, hexWeights);
>
> cout << rval << endl;
>
> </code>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
More information about the vtkusers
mailing list