VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Common/DataModel/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 "vtkCommonDataModelModule.h" // For export macro
00035 #include "vtkObject.h"
00036 #include <vector> // For C++ vector
00037 
00038 // Forward declarations
00039 class vtkFieldData;
00040 class vtkOverlappingAMR;
00041 class vtkUniformGrid;
00042 
00043 class VTKCOMMONDATAMODEL_EXPORT vtkAMRUtilities : public vtkObject
00044 {
00045 public:
00046   // Standard Routines
00047   vtkTypeMacro(vtkAMRUtilities,vtkObject);
00048   void PrintSelf(ostream& os, vtkIndent indent );
00049 
00051 
00056   static void StripGhostLayers(
00057       vtkOverlappingAMR *ghostedAMRData,
00058       vtkOverlappingAMR *strippedAMRData);
00060 
00066   static bool HasPartiallyOverlappingGhostCells(vtkOverlappingAMR *amr);
00067 
00069   static void BlankCells(vtkOverlappingAMR* amr);
00070 
00071 protected:
00072   vtkAMRUtilities() {}
00073   ~vtkAMRUtilities() {}
00074 
00076 
00078   static void CopyFieldsWithinRealExtent(
00079       int realExtent[6],
00080       vtkUniformGrid *ghostedGrid,
00081       vtkUniformGrid *strippedGrid);
00083 
00085 
00086   static void CopyFieldData(
00087       vtkFieldData *target, vtkIdType targetIdx,
00088       vtkFieldData *source, vtkIdType sourceIdx );
00090 
00092 
00097   static vtkUniformGrid* StripGhostLayersFromGrid(
00098       vtkUniformGrid* grid, int ghost[6]);
00100 
00101   static void BlankGridsAtLevel(vtkOverlappingAMR* amr, int levelIdx,
00102                           std::vector<std::vector<unsigned int> >& children,
00103                           const std::vector<int>& processMap);
00104 private:
00105   vtkAMRUtilities(const vtkAMRUtilities&); // Not implemented
00106   void operator=(const vtkAMRUtilities&); // Not implemented
00107 };
00108 
00109 #endif /* VTKAMRUTILITIES_H_ */