30 #ifndef vtkAMRInformation_h
31 #define vtkAMRInformation_h
45 class vtkAMRIndexIterator;
59 void Initialize(
int numLevels,
const int* blocksPerLevel);
63 vtkGetMacro( GridDescription,
int );
70 void GetOrigin(
double origin[3] );
72 void SetOrigin(
const double* origin);
78 {
return static_cast<unsigned int>(this->NumBlocks.size()-1);}
82 unsigned int GetNumberOfDataSets(
unsigned int level)
const;
87 {
return this->NumBlocks.back();}
93 {
return this->NumBlocks[
level] + id;}
97 void ComputeIndexPair(
unsigned int index,
unsigned int&
level,
unsigned int&
id);
100 const double* GetBounds();
103 void GetBounds(
unsigned int level,
unsigned int id,
double* bb);
106 bool GetOrigin(
unsigned int level,
unsigned int id,
double* origin);
111 bool HasSpacing(
unsigned int level);
115 void SetAMRBox(
unsigned int level,
unsigned int id,
const vtkAMRBox& box);
116 const vtkAMRBox& GetAMRBox(
unsigned int level,
unsigned int id)
const;
120 bool GetCoarsenedAMRBox(
unsigned int level,
unsigned int id,
vtkAMRBox& box)
const;
126 int GetAMRBlockSourceIndex(
int index);
127 void SetAMRBlockSourceIndex(
int index,
int sourceId);
136 void GenerateRefinementRatio();
140 bool HasRefinementRatio();
144 void SetRefinementRatio(
unsigned int level,
int ratio);
147 int GetRefinementRatio(
unsigned int level)
const;
150 void SetSpacing(
unsigned int level,
const double* h);
153 bool HasChildrenInformation();
158 unsigned int *GetParents(
unsigned int level,
unsigned int index,
unsigned int& numParents);
163 unsigned int *GetChildren(
unsigned int level,
unsigned int index,
unsigned int& numChildren);
166 void PrintParentChildInfo(
unsigned int level,
unsigned int index);
170 void GenerateParentChildInformation();
178 bool FindCell(
double q[3],
unsigned int level,
unsigned int index,
int &cellIdx);
181 bool FindGrid(
double q[3],
int level,
unsigned int& gridId);
184 bool FindGrid(
double q[3],
unsigned int&
level,
unsigned int& gridId);
189 {
return this->NumBlocks;}
193 {
return this->AllChildren[i];}
203 bool HasValidOrigin();
204 bool HasValidBounds();
205 void UpdateBounds(
const int level,
const int id);
206 void AllocateBoxes(
unsigned int n);
207 void GenerateBlockLevel();
208 void CalculateParentChildRelationShip(
unsigned int level,
210 std::vector<std::vector<unsigned int> >& parents );
218 std::vector<int> NumBlocks;
231 std::vector<std::vector<std::vector<unsigned int> > > AllChildren;
232 std::vector<std::vector<std::vector<unsigned int> > > AllParents;
dynamic, self-adjusting array of unsigned int
abstract base class for most VTK objects
Encloses a rectangular region of voxel like cells.
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
dynamic, self-adjusting array of double
dynamic, self-adjusting array of int
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
VTKCOMMONCORE_EXPORT bool operator==(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
VTKWRAPPINGJAVA_EXPORT jlong q(JNIEnv *env, jobject obj)
#define VTKCOMMONDATAMODEL_EXPORT