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 "vtkFiltersParallelModule.h" // For export macro 00027 #include "vtkUnstructuredGridAlgorithm.h" 00028 00029 class vtkIdList; 00030 class vtkIntArray; 00031 00032 class VTKFILTERSPARALLEL_EXPORT vtkExtractUnstructuredGridPiece : public vtkUnstructuredGridAlgorithm 00033 { 00034 public: 00035 static vtkExtractUnstructuredGridPiece *New(); 00036 vtkTypeMacro(vtkExtractUnstructuredGridPiece, vtkUnstructuredGridAlgorithm); 00037 void PrintSelf(ostream& os, vtkIndent indent); 00038 00040 00041 vtkSetMacro(CreateGhostCells, int); 00042 vtkGetMacro(CreateGhostCells, int); 00043 vtkBooleanMacro(CreateGhostCells, int); 00045 00046 protected: 00047 vtkExtractUnstructuredGridPiece(); 00048 ~vtkExtractUnstructuredGridPiece() {} 00049 00050 // Usual data generation method 00051 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00052 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00053 virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00054 00055 // A method for labeling which piece the cells belong to. 00056 void ComputeCellTags(vtkIntArray *cellTags, vtkIdList *pointOwnership, 00057 int piece, int numPieces, vtkUnstructuredGrid *input); 00058 00059 void AddGhostLevel(vtkUnstructuredGrid *input, vtkIntArray *cellTags,int ghostLevel); 00060 00061 int CreateGhostCells; 00062 private: 00063 void AddFirstGhostLevel(vtkUnstructuredGrid *input, vtkIntArray *cellTags, 00064 int piece, int numPieces); 00065 00066 vtkExtractUnstructuredGridPiece(const vtkExtractUnstructuredGridPiece&); // Not implemented. 00067 void operator=(const vtkExtractUnstructuredGridPiece&); // Not implemented. 00068 }; 00069 00070 #endif