------------------------------------------------------------------------------
| 772 | |
| 773 | //------------------------------------------------------------------------------ |
| 774 | vtkIdType vtkLagrangianBasicIntegrationModel::FindInLocator(vtkDataSet* dataSet, |
| 775 | vtkAbstractCellLocator* loc, double* x, vtkGenericCell* cell, double* weights) |
| 776 | { |
| 777 | double pcoords[3]; |
| 778 | vtkIdType cellId; |
| 779 | if (loc) |
| 780 | { |
| 781 | // Use locator to find the cell containing x |
| 782 | cellId = loc->FindCell(x, this->Tolerance, cell, pcoords, weights); |
| 783 | } |
| 784 | else |
| 785 | { |
| 786 | // No locator, dataSet is vtkImageData or vtkRectilinearGrid, |
| 787 | // which does not require any cellToUse when calling FindCell. |
| 788 | int subId; |
| 789 | cellId = dataSet->FindCell(x, nullptr, cell, 0, this->Tolerance, subId, pcoords, weights); |
| 790 | } |
| 791 | |
| 792 | // Ignore Ghost cells |
| 793 | if (cellId != -1 && dataSet->GetCellGhostArray() && |
| 794 | dataSet->GetCellGhostArray()->GetValue(cellId) & vtkDataSetAttributes::DUPLICATECELL) |
| 795 | { |
| 796 | return -1; |
| 797 | } |
| 798 | return cellId; |
| 799 | } |
| 800 | |
| 801 | //------------------------------------------------------------------------------ |
| 802 | vtkAbstractArray* vtkLagrangianBasicIntegrationModel::GetSeedArray( |
no test coverage detected