[vtkusers] problems with GetCellNeighbors
John Biddiscombe
biddisco at cscs.ch
Mon Jun 26 11:17:21 EDT 2006
Do you have to call BuildLinks first?
Can't remember...
JB
Dominik Szczerba wrote:
> Hi,
>
> The following code retrieves cell points, but not cell neighbours, what
> is wrong?
>
> vtkUnstructuredGrid* grid;
> //...
> for(int id=0; id<NCELLS; id++){
> vtkIdList* points = vtkIdList::New();
> vtkIdList* cells = vtkIdList::New();
> grid->GetCellPoints(id,points);
> grid->GetCellNeighbors(id,points,cells);
> int np = points->GetNumberOfIds();
> int nc = cells->GetNumberOfIds();
> cerr << nc << endl;// always 0
> points->Delete();
> cells->Delete();
> }
>
> thanks,
> Dominik
>
--
John Biddiscombe, email:biddisco @ cscs.ch
http://www.cscs.ch/about/BJohn.php
CSCS, Swiss National Supercomputing Centre | Tel: +41 (91) 610.82.07
Via Cantonale, 6928 Manno, Switzerland | Fax: +41 (91) 610.82.82
More information about the vtkusers
mailing list