23 #ifndef _AMRTreeBranch_h_ 
   24 #define _AMRTreeBranch_h_ 
   27 #include <vapor/common.h> 
   28 #include <vapor/MyBase.h> 
   29 #include <vapor/EasyThreads.h> 
   30 #include <vapor/XmlNode.h> 
  105     const size_t location[3]
 
  138  cid_t  
FindCell(
const double ucoord[3], 
int ref_level = -1) 
const;
 
  141     return(cellid < _octree->get_num_cells(_octree->get_max_level())); 
 
  159     cid_t cellid, 
double minu[3], 
double maxu[3]
 
  273     return ((
int) (_octree->get_max_level()));
 
  337     cid_t refine_cell(cid_t cellid);
 
  338     void end_refinement();
 
  339     cid_t get_parent(cid_t cellid) 
const;
 
  345     cid_t get_children(cid_t cellid) 
const;
 
  347     bool has_children(cid_t cellid) 
const;
 
  355     cid_t get_next(
bool restart);
 
  357     long get_offset(cid_t cellid) 
const;
 
  363     int get_octant(cid_t cellid) 
const;
 
  364     int get_max_level()
 const {
return(_max_level); };
 
  373     cid_t get_cellid(
const size_t xyz[3], 
int level) 
const;
 
  375     int get_location(cid_t cellid, 
size_t xyz[3], 
int *level) 
const;
 
  377     int get_level(cid_t cellid) 
const;
 
  379     cid_t get_num_cells(
int ref_level) 
const;
 
  383     vector <cid_t> _bft_next;
 
  384     vector <cid_t>::iterator _bft_itr;
 
  385     vector <cid_t> _bft_children;
 
  386     vector <cid_t> _num_cells;
 
  389     vector <long> _offsets; 
 
  397     vector <_node_t> _tree; 
 
  408  double _minBounds[3];  
 
  409  double _maxBounds[3];  
 
  418 #endif  //  _AMRTreeBranch_h_ 
This class manages an octree data structure. 
 
AMRTreeBranch::cid_t GetNextCell(bool restart)
 
cid_t GetCellNeighbor(cid_t cellid, int face) const 
 
cid_t GetCellParent(cid_t cellid) const 
 
static const string _maxExtentsAttr
 
cid_t FindCell(const double ucoord[3], int ref_level=-1) const 
 
static const string _locationAttr
 
AMRTreeBranch::cid_t GetCellID(const size_t xyz[3], int reflevel) const 
 
int DeleteCell(cid_t cellid)
 
AMRTreeBranch(XmlNode *parent, const double min[3], const double max[3], const size_t location[3])
 
long GetCellOffset(cid_t cellid) const 
 
int GetRefinementLevel() const 
Returns the maximum refinement level of any cell in this branch. 
 
static const string _rootTag
 
int GetCellLocation(cid_t cellid, size_t xyz[3], int *reflevel) const 
 
int SetParentTable(const vector< long > &table)
 
static const string _parentTableTag
 
bool ValidCell(cid_t cellid) const 
 
cid_t GetNumCells() const 
 
static const string _minExtentsAttr
 
static const string _refinementLevelTag
 
int GetCellBounds(cid_t cellid, double minu[3], double maxu[3]) const 
 
cid_t GetRoot() const 
Returns the cellid root node. 
 
AMRTreeBranch::cid_t RefineCell(cid_t cellid)
 
cid_t GetCellChildren(cid_t cellid) const 
 
int GetCellLevel(cid_t cellid) const 
 
int HasChildren(cid_t cellid) const