VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Filters/Geometry/vtkStructuredAMRNeighbor.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003  Program:   Visualization Toolkit
00004  Module:    vtkStructuredAMRNeighbor.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  =========================================================================*/
00028 #ifndef VTKSTRUCTUREDAMRNEIGHBOR_H_
00029 #define VTKSTRUCTUREDAMRNEIGHBOR_H_
00030 
00031 #include "vtkFiltersGeometryModule.h" // For export macro
00032 #include "vtkStructuredNeighbor.h"
00033 
00034 class VTKFILTERSGEOMETRY_EXPORT vtkStructuredAMRNeighbor :
00035   public vtkStructuredNeighbor
00036 {
00037 public:
00038 
00039   // An enum that defines the neighbor relationship between the 2 grids.
00040   enum NeighborRelationship
00041     {
00042     PARENT,                       // Neighbor fully contains this grid
00043     PARTIALLY_OVERLAPPING_PARENT, // Neighbor partially contains this grid
00044     CHILD,                        // This grid fully contains the neighbor
00045     PARTIALLY_OVERLAPPING_CHILD,  // This grid partially contains the neighbor
00046     SAME_LEVEL_SIBLING,           // Grids are adjacent at the same level
00047     COARSE_TO_FINE_SIBLING,       // Grid is adjacent with a finer neighbor
00048     FINE_TO_COARSE_SIBLING,       // Grid is adjacent with a coarser neighbor
00049     UNDEFINED
00050     };
00051 
00052   // NOTE: The OverlapExtent stores the overlap w.r.t. the neighboring grid
00053   // Consequently, GridOverlapExtent stores the overlap extent w.r.t. this grid.
00054   int GridOverlapExtent[6]; // The overlap extent w.r.t. this grid
00055   int GridLevel;      // The level of the grid that has this neighbor
00056   int NeighborLevel;  // The level of the neighboring grid
00057   int RelationShip;   // The relationship of the grid with this neighbor
00058 
00060   vtkStructuredAMRNeighbor();
00061 
00063 
00067   vtkStructuredAMRNeighbor(
00068      const int gridLevel,
00069      const int neiID, const int neighborLevel,
00070      int gridOverlap[6], int neiOverlap[6],
00071      int orient[3],
00072      const int relationShip);
00074 
00076 
00077   vtkStructuredAMRNeighbor(const vtkStructuredAMRNeighbor &N) :
00078     vtkStructuredNeighbor(N) { *this = N; }
00080 
00082   ~vtkStructuredAMRNeighbor() {}
00083 
00085   vtkStructuredAMRNeighbor& operator=(const vtkStructuredAMRNeighbor &N);
00086 
00089   void GetReceiveExtentOnGrid(const int ng,int gridExtent[6],int ext[6]);
00090 
00093   std::string GetRelationShipString();
00094 
00096 
00100   virtual void ComputeSendAndReceiveExtent(
00101       int gridRealExtent[6], int gridGhostedExtent[6], int neiRealExtent[6],
00102       int WholeExtent[6], const int N);
00103 };
00105 
00106 #endif /* VTKSTRUCTUREDAMRNEIGHBOR_H_ */
00107 // VTK-HeaderTest-Exclude: vtkStructuredAMRNeighbor.h