您的位置:首页 > 其它

VTK学习笔记:数据集之非结构化网格集

2014-04-25 23:12 316 查看
和结构化数据集类型对应,存在一种非结构化的网格集。

1、结构化网格数据集    vtkStructuredGrid      结构化网格具有规则的拓扑结构和不规则的几何结构,但是单元没有重叠或交叉,结构化网格的单元是由四边形或六面体组成,结构化网格通常用于有限差分析,貌似这个我暂时还用不到,所以不说了。

2.非结构化网格集

非结构化网格集是最常见的数据集类型,它的拓扑结构的几何结构都是非结构化的,在此数据集中所有单元类型都可以组成任意组合(dataset represents arbitrary combinations of allpossible cell types),所以单元的拓扑结构从零维延伸至三维,在VTK中任一类型的数据集都可用非结构化网格来表达,非结构化网格被用于有限元分析、计算几何和图形表示等领域,数据集构成如图所示:






一些常用的方法:
00075 public:
00076   static vtkUnstructuredGrid *New();

00079   void PrintSelf(ostream& os, vtkIndent indent);

00083   int GetDataObjectType() {return VTK_UNSTRUCTURED_GRID;};
00084   virtual void Allocate(vtkIdType numCells=1000, int extSize=1000);

00090   vtkIdType InsertNextCell(int type, vtkIdType npts, vtkIdType *pts);
00091   vtkIdType InsertNextCell(int type, vtkIdList *ptIds);

00095   virtual void CopyStructure(vtkDataSet *ds);
00096   vtkIdType GetNumberOfCells();
00097   virtual vtkCell *GetCell(vtkIdType cellId);
00098   virtual void GetCell(vtkIdType cellId, vtkGenericCell *cell);
00099   virtual void GetCellBounds(vtkIdType cellId, double bounds[6]);
00100   virtual void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds);
00101   void GetPointCells(vtkIdType ptId, vtkIdList *cellIds);

00103   int GetCellType(vtkIdType cellId);
00104   vtkUnsignedCharArray* GetCellTypesArray() { return this->Types; }
00105   vtkIdTypeArray* GetCellLocationsArray() { return this->Locations; }
00106   void Squeeze();
00107   void Initialize();
00108   int GetMaxCellSize();
00109   void BuildLinks();
00110   vtkCellLinks *GetCellLinks() {return this->Links;};
00111   virtual void GetCellPoints(vtkIdType cellId, vtkIdType& npts,
00112                              vtkIdType* &pts);

00117   void SetCells(int type, vtkCellArray *cells);
00118   void SetCells(int *types, vtkCellArray *cells);
00119   void SetCells(vtkUnsignedCharArray *cellTypes, vtkIdTypeArray *cellLocations,
00120                 vtkCellArray *cells);
00121   vtkCellArray *GetCells() {return this->Connectivity;};
00122   void ReplaceCell(vtkIdType cellId, int npts, vtkIdType *pts);
00123   int InsertNextLinkedCell(int type, int npts, vtkIdType *pts);
00124   void RemoveReferenceToCell(vtkIdType ptId, vtkIdType cellId);
00125   void AddReferenceToCell(vtkIdType ptId, vtkIdType cellId);
00126   void ResizeCellList(vtkIdType ptId, int size);

00133   virtual void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds,
00134                                 vtkIdList *cellIds);
00140   void GetUpdateExtent(int &piece, int &numPieces, int &ghostLevel);

00144   virtual int* GetUpdateExtent();
00145   virtual void GetUpdateExtent(int& x0, int& x1, int& y0, int& y1,
00146                                int& z0, int& z1);
00147   virtual void GetUpdateExtent(int extent[6]);

00153   virtual int GetPiece();
00154   virtual int GetNumberOfPieces();

00158   virtual int GetGhostLevel();
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: