33 #ifndef vtkAMRInformation_h
34 #define vtkAMRInformation_h
48 class vtkAMRIndexIterator;
62 void Initialize(
int numLevels,
const int* blocksPerLevel);
66 vtkGetMacro( GridDescription,
int );
73 void GetOrigin(
double origin[3] );
75 void SetOrigin(
const double* origin);
81 {
return static_cast<unsigned int>(this->NumBlocks.size()-1);}
85 unsigned int GetNumberOfDataSets(
unsigned int level)
const;
90 {
return this->NumBlocks.back();}
96 {
return this->NumBlocks[
level] + id;}
100 void ComputeIndexPair(
unsigned int index,
unsigned int&
level,
unsigned int&
id);
103 const double* GetBounds();
106 void GetBounds(
unsigned int level,
unsigned int id,
double* bb);
109 bool GetOrigin(
unsigned int level,
unsigned int id,
double* origin);
114 bool HasSpacing(
unsigned int level);
118 void SetAMRBox(
unsigned int level,
unsigned int id,
const vtkAMRBox& box);
119 const vtkAMRBox& GetAMRBox(
unsigned int level,
unsigned int id)
const;
123 bool GetCoarsenedAMRBox(
unsigned int level,
unsigned int id,
vtkAMRBox& box)
const;
129 int GetAMRBlockSourceIndex(
int index);
130 void SetAMRBlockSourceIndex(
int index,
int sourceId);
139 void GenerateRefinementRatio();
143 bool HasRefinementRatio();
147 void SetRefinementRatio(
unsigned int level,
int ratio);
150 int GetRefinementRatio(
unsigned int level)
const;
153 void SetSpacing(
unsigned int level,
const double* h);
156 bool HasChildrenInformation();
161 unsigned int *GetParents(
unsigned int level,
unsigned int index,
unsigned int& numParents);
166 unsigned int *GetChildren(
unsigned int level,
unsigned int index,
unsigned int& numChildren);
169 void PrintParentChildInfo(
unsigned int level,
unsigned int index);
173 void GenerateParentChildInformation();
181 bool FindCell(
double q[3],
unsigned int level,
unsigned int index,
int &cellIdx);
184 bool FindGrid(
double q[3],
int level,
unsigned int& gridId);
187 bool FindGrid(
double q[3],
unsigned int&
level,
unsigned int& gridId);
192 {
return this->NumBlocks;}
196 {
return this->AllChildren[i];}
206 bool HasValidOrigin();
207 bool HasValidBounds();
208 void UpdateBounds(
const int level,
const int id);
209 void AllocateBoxes(
unsigned int n);
210 void GenerateBlockLevel();
211 void CalculateParentChildRelationShip(
unsigned int level,
213 std::vector<std::vector<unsigned int> >& parents );
221 std::vector<int> NumBlocks;
234 std::vector<std::vector<std::vector<unsigned int> > > AllChildren;
235 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