VTK
dox/Filters/AMR/vtkAMRUtilities.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003  Program:   Visualization Toolkit
00004  Module:    vtkAMRUtilities.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  =========================================================================*/
00031 #ifndef VTKAMRUTILITIES_H_
00032 #define VTKAMRUTILITIES_H_
00033 
00034 #include "vtkFiltersAMRModule.h" // For export macro
00035 #include "vtkObject.h"
00036 #include <vector> // For C++ vector
00037 
00038 // Forward declarations
00039 class vtkAMRBox;
00040 class vtkFieldData;
00041 class vtkMultiProcessController;
00042 class vtkOverlappingAMR;
00043 class vtkUniformGridAMR;
00044 class vtkUniformGrid;
00045 class vtkAMRInformation;
00046 
00047 class VTKFILTERSAMR_EXPORT vtkAMRUtilities : public vtkObject
00048 {
00049 public:
00050   // Standard Routines
00051   vtkTypeMacro(vtkAMRUtilities,vtkObject);
00052   void PrintSelf(ostream& os, vtkIndent indent );
00053 
00055 
00060   static void StripGhostLayers(
00061       vtkOverlappingAMR *ghostedAMRData,
00062       vtkOverlappingAMR *strippedAMRData,
00063       vtkMultiProcessController *myController=NULL);
00065 
00071   static bool HasPartiallyOverlappingGhostCells(vtkOverlappingAMR *amr);
00072 
00074   static void DistributeProcessInformation(vtkOverlappingAMR* amr, vtkMultiProcessController *myController, std::vector<int>& ProcessMap);
00075 
00077   static void BlankCells(vtkOverlappingAMR* amr,  vtkMultiProcessController *myController);
00078 
00079 protected:
00080   vtkAMRUtilities() {}
00081   ~vtkAMRUtilities() {}
00082 
00084 
00086   static void CopyFieldsWithinRealExtent(
00087       int realExtent[6],
00088       vtkUniformGrid *ghostedGrid,
00089       vtkUniformGrid *strippedGrid);
00091 
00093 
00094   static void CopyFieldData(
00095       vtkFieldData *target, vtkIdType targetIdx,
00096       vtkFieldData *source, vtkIdType sourceIdx );
00098 
00100 
00105   static vtkUniformGrid* StripGhostLayersFromGrid(
00106       vtkUniformGrid* grid, int ghost[6]);
00108 
00109 private:
00110   vtkAMRUtilities(const vtkAMRUtilities&); // Not implemented
00111   void operator=(const vtkAMRUtilities&); // Not implemented
00112 };
00113 
00114 #endif /* VTKAMRUTILITIES_H_ */