MCPcopy Create free account
hub / github.com/Kitware/VTK / FindInLocator

Method FindInLocator

Filters/FlowPaths/vtkLagrangianBasicIntegrationModel.cxx:774–799  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

772
773//------------------------------------------------------------------------------
774vtkIdType 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//------------------------------------------------------------------------------
802vtkAbstractArray* vtkLagrangianBasicIntegrationModel::GetSeedArray(

Callers 1

FindInLocatorsMethod · 0.95

Calls 3

GetCellGhostArrayMethod · 0.80
FindCellMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected