\brief Prepare point data for use by linear approximating-elements. * * This copies the point data for the current cell into a new point-data * object so that the point ids and scalar ids can match. */
| 439 | * object so that the point ids and scalar ids can match. |
| 440 | */ |
| 441 | void vtkHigherOrderQuadrilateral::PrepareApproxData( |
| 442 | vtkPointData* pd, vtkCellData* cd, vtkIdType cellId, vtkDataArray* cellScalars) |
| 443 | { |
| 444 | this->GetApprox(); // Ensure this->Approx{PD,CD} are non-NULL. |
| 445 | // this->GetOrder(); // Ensure the order has been updated to match this element. |
| 446 | this->SetOrderFromCellData(cd, this->Points->GetNumberOfPoints(), cellId); |
| 447 | vtkIdType npts = this->Order[2]; |
| 448 | vtkIdType nele = this->Order[0] * this->Order[1]; |
| 449 | this->ApproxPD->Initialize(); |
| 450 | this->ApproxCD->Initialize(); |
| 451 | this->ApproxPD->CopyAllOn(); |
| 452 | this->ApproxCD->CopyAllOn(); |
| 453 | this->ApproxPD->CopyAllocate(pd, npts); |
| 454 | this->ApproxCD->CopyAllocate(cd, nele); |
| 455 | this->CellScalars->SetNumberOfTuples(npts); |
| 456 | for (int pp = 0; pp < npts; ++pp) |
| 457 | { |
| 458 | this->ApproxPD->CopyData(pd, this->PointIds->GetId(pp), pp); |
| 459 | this->CellScalars->SetValue(pp, cellScalars->GetTuple1(pp)); |
| 460 | } |
| 461 | for (int ee = 0; ee < nele; ++ee) |
| 462 | { |
| 463 | this->ApproxCD->CopyData(cd, cellId, ee); |
| 464 | } |
| 465 | } |
| 466 | |
| 467 | /// A convenience method; see the overloaded variant for more information. |
| 468 | bool vtkHigherOrderQuadrilateral::SubCellCoordinatesFromId(vtkVector3i& ijk, int subId) |
no test coverage detected