VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkExtractUnstructuredGridPiece.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00023 #ifndef __vtkExtractUnstructuredGridPiece_h 00024 #define __vtkExtractUnstructuredGridPiece_h 00025 00026 #include "vtkUnstructuredGridAlgorithm.h" 00027 00028 class vtkIdList; 00029 class vtkIntArray; 00030 00031 class VTK_PARALLEL_EXPORT vtkExtractUnstructuredGridPiece : public vtkUnstructuredGridAlgorithm 00032 { 00033 public: 00034 static vtkExtractUnstructuredGridPiece *New(); 00035 vtkTypeMacro(vtkExtractUnstructuredGridPiece, vtkUnstructuredGridAlgorithm); 00036 void PrintSelf(ostream& os, vtkIndent indent); 00037 00039 00040 vtkSetMacro(CreateGhostCells, int); 00041 vtkGetMacro(CreateGhostCells, int); 00042 vtkBooleanMacro(CreateGhostCells, int); 00044 00045 protected: 00046 vtkExtractUnstructuredGridPiece(); 00047 ~vtkExtractUnstructuredGridPiece() {}; 00048 00049 // Usual data generation method 00050 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00051 virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00052 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00053 00054 // A method for labeling which piece the cells belong to. 00055 void ComputeCellTags(vtkIntArray *cellTags, vtkIdList *pointOwnership, 00056 int piece, int numPieces, vtkUnstructuredGrid *input); 00057 00058 void AddGhostLevel(vtkUnstructuredGrid *input, vtkIntArray *cellTags, int ghostLevel); 00059 00060 int CreateGhostCells; 00061 private: 00062 vtkExtractUnstructuredGridPiece(const vtkExtractUnstructuredGridPiece&); // Not implemented. 00063 void operator=(const vtkExtractUnstructuredGridPiece&); // Not implemented. 00064 }; 00065 00066 #endif