\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. */
| 959 | * object so that the point ids and scalar ids can match. |
| 960 | */ |
| 961 | void vtkHigherOrderWedge::PrepareApproxData( |
| 962 | vtkPointData* pd, vtkCellData* cd, vtkIdType cellId, vtkDataArray* cellScalars) |
| 963 | { |
| 964 | this->GetApprox(); // Ensure this->Approx{PD,CD} are non-NULL. |
| 965 | // this->GetOrder(); // Ensure the order has been updated to match this element. |
| 966 | this->SetOrderFromCellData(cd, this->Points->GetNumberOfPoints(), cellId); |
| 967 | vtkIdType npts = this->Order[3]; |
| 968 | vtkIdType nele = this->Order[0] * this->Order[1] * this->Order[2]; |
| 969 | this->ApproxPD->Initialize(); |
| 970 | this->ApproxCD->Initialize(); |
| 971 | this->ApproxPD->CopyAllOn(); |
| 972 | this->ApproxCD->CopyAllOn(); |
| 973 | this->ApproxPD->CopyAllocate(pd, npts); |
| 974 | this->ApproxCD->CopyAllocate(cd, nele); |
| 975 | |
| 976 | this->CellScalars->SetNumberOfTuples(npts); |
| 977 | for (int pp = 0; pp < npts; ++pp) |
| 978 | { |
| 979 | this->ApproxPD->CopyData(pd, this->PointIds->GetId(pp), pp); |
| 980 | this->CellScalars->SetValue(pp, cellScalars->GetTuple1(pp)); |
| 981 | } |
| 982 | for (int ee = 0; ee < nele; ++ee) |
| 983 | { |
| 984 | this->ApproxCD->CopyData(cd, cellId, ee); |
| 985 | } |
| 986 | } |
| 987 | |
| 988 | /**\brief Populate the linear wedge returned by GetApprox() with point-data from one wedge-like |
| 989 | * interval of this cell. |
no test coverage detected