libMesh::TreeNode< N > Class Template Reference

#include <tree_node.h>

List of all members.

Public Member Functions

 TreeNode (const MeshBase &m, const unsigned int tbs, const TreeNode< N > *p=NULL)
 ~TreeNode ()
bool is_root () const
bool active () const
void insert (const Node *nd)
void insert (const Elem *nd)
void refine ()
void set_bounding_box (const std::pair< Point, Point > &bbox)
bool bounds_node (const Node *nd) const
bool bounds_point (const Point &p) const
unsigned int level () const
void print_nodes (std::ostream &out=libMesh::out) const
void print_elements (std::ostream &out=libMesh::out) const
void transform_nodes_to_elements (std::vector< std::vector< const Elem * > > &nodes_to_elem)
unsigned int n_active_bins () const
const Elemfind_element (const Point &p) const

Private Member Functions

const Elemfind_element_in_children (const Point &p) const
std::pair< Point, Pointcreate_bounding_box (const unsigned int c) const

Private Attributes

const MeshBasemesh
const unsigned int tgt_bin_size
const TreeNode< N > * parent
std::vector< TreeNode< N > * > children
std::pair< Point, Pointbounding_box
std::vector< const Elem * > elements
std::vector< const Node * > nodes
bool contains_ifems

Detailed Description

template<unsigned int N>
class libMesh::TreeNode< N >

This class defines a node on a tree. A tree node contains a pointer to its parent (NULL if the node is the root) and pointers to its children (NULL if the node is active.

Definition at line 46 of file tree_node.h.


Constructor & Destructor Documentation

template<unsigned int N>
libMesh::TreeNode< N >::TreeNode ( const MeshBase m,
const unsigned int  tbs,
const TreeNode< N > *  p = NULL 
) [inline]

Constructor. Takes a pointer to this node's parent. The pointer should only be NULL for the top-level (root) node.

Definition at line 215 of file tree_node.h.

References libMesh::TreeNode< N >::active(), libMesh::TreeNode< N >::children, libMesh::TreeNode< N >::elements, libMesh::TreeNode< N >::nodes, and libMesh::TreeNode< N >::tgt_bin_size.

00217                                              :
00218   mesh           (m),
00219   tgt_bin_size   (tbs),
00220   parent         (p),
00221   contains_ifems (false)
00222 {
00223   // libmesh_assert our children are empty, thus we are active.
00224   libmesh_assert (children.empty());
00225   libmesh_assert (this->active());
00226 
00227   // Reserve space for the nodes & elements
00228   nodes.reserve    (tgt_bin_size);
00229   elements.reserve (tgt_bin_size);
00230 }

template<unsigned int N>
libMesh::TreeNode< N >::~TreeNode (  )  [inline]

Destructor. Deletes all children, if any. Thus to delete a tree it is sufficient to explicitly delete the root node.

Definition at line 236 of file tree_node.h.

References libMesh::TreeNode< N >::children.

00237 {
00238   // When we are destructed we must delete all of our
00239   // children.  They will this delete their children,
00240   // All the way down the line...
00241   for (unsigned int c=0; c<children.size(); c++)
00242     delete children[c];
00243 }


Member Function Documentation

template<unsigned int N>
bool libMesh::TreeNode< N >::bounds_node ( const Node nd  )  const [inline]
Returns:
true if this TreeNode (or its children) contain node n, false otherwise.

Definition at line 104 of file tree_node.h.

References libMesh::TreeNode< N >::bounds_point().

Referenced by libMesh::TreeNode< N >::insert().

00105   { libmesh_assert(nd); return bounds_point(*nd); }

template<unsigned int N>
bool libMesh::TreeNode< N >::bounds_point ( const Point p  )  const [inline]
Returns:
true if this TreeNode (or its children) contain point p, false otherwise.

Definition at line 185 of file tree_node.C.

References libMesh::TreeNode< N >::bounding_box, std::max(), and std::min().

Referenced by libMesh::TreeNode< N >::bounds_node(), libMesh::TreeNode< N >::find_element(), and libMesh::TreeNode< N >::find_element_in_children().

00186 {
00187   const Point& min = bounding_box.first;
00188   const Point& max = bounding_box.second;
00189 
00190 
00191   if ((p(0) >= min(0))
00192       && (p(0) <= max(0))
00193 #if LIBMESH_DIM > 1
00194       && (p(1) >= min(1))
00195       && (p(1) <= max(1))
00196 #endif
00197 #if LIBMESH_DIM > 2
00198       && (p(2) >= min(2))
00199       && (p(2) <= max(2))
00200 #endif
00201      )
00202     return true;
00203 
00204   return false;
00205 }

template<unsigned int N>
std::pair< Point, Point > libMesh::TreeNode< N >::create_bounding_box ( const unsigned int  c  )  const [inline, private]

Constructs the bounding box for child c.

Definition at line 211 of file tree_node.C.

References libMesh::TreeNode< N >::bounding_box, libMesh::err, std::max(), std::min(), and libMesh::Real.

Referenced by libMesh::TreeNode< N >::refine().

00212 {
00213   switch (N)
00214     {
00215 
00216       // How to refine an OctTree Node
00217     case 8:
00218       {
00219         const Real xmin = bounding_box.first(0);
00220         const Real ymin = bounding_box.first(1);
00221         const Real zmin = bounding_box.first(2);
00222 
00223         const Real xmax = bounding_box.second(0);
00224         const Real ymax = bounding_box.second(1);
00225         const Real zmax = bounding_box.second(2);
00226 
00227         const Real xc = xmin + .5*(xmax - xmin);
00228         const Real yc = ymin + .5*(ymax - ymin);
00229         const Real zc = zmin + .5*(zmax - zmin);
00230 
00231 
00232         switch (c)
00233           {
00234 
00235           case 0:
00236             {
00237               const Point min(xmin, ymin, zmin);
00238               const Point max(xc,   yc,   zc);
00239               return std::make_pair (min, max);
00240               break;
00241             }
00242 
00243           case 1:
00244             {
00245               const Point min(xc,   ymin, zmin);
00246               const Point max(xmax, yc,   zc);
00247               return std::make_pair (min, max);
00248               break;
00249             }
00250 
00251           case 2:
00252             {
00253               const Point min(xmin, yc,   zmin);
00254               const Point max(xc,   ymax, zc);
00255               return std::make_pair (min, max);
00256               break;
00257             }
00258 
00259           case 3:
00260             {
00261               const Point min(xc,   yc,   zmin);
00262               const Point max(xmax, ymax, zc);
00263               return std::make_pair (min, max);
00264               break;
00265             }
00266 
00267           case 4:
00268             {
00269               const Point min(xmin, ymin, zc);
00270               const Point max(xc,   yc,   zmax);
00271               return std::make_pair (min, max);
00272               break;
00273             }
00274 
00275           case 5:
00276             {
00277               const Point min(xc,   ymin, zc);
00278               const Point max(xmax, yc,   zmax);
00279               return std::make_pair (min, max);
00280               break;
00281             }
00282 
00283           case 6:
00284             {
00285               const Point min(xmin, yc,   zc);
00286               const Point max(xc,   ymax, zmax);
00287               return std::make_pair (min, max);
00288               break;
00289             }
00290 
00291           case 7:
00292             {
00293               const Point min(xc,   yc,   zc);
00294               const Point max(xmax, ymax, zmax);
00295               return std::make_pair (min, max);
00296               break;
00297             }
00298 
00299           default:
00300             libMesh::err << "c >= N! : " << c
00301                           << std::endl;
00302             libmesh_error();
00303           }
00304 
00305 
00306 
00307         break;
00308       } // case 8
00309 
00310       // How to refine an QuadTree Node
00311     case 4:
00312       {
00313         const Real xmin = bounding_box.first(0);
00314         const Real ymin = bounding_box.first(1);
00315 
00316         const Real xmax = bounding_box.second(0);
00317         const Real ymax = bounding_box.second(1);
00318 
00319         const Real xc = xmin + .5*(xmax - xmin);
00320         const Real yc = ymin + .5*(ymax - ymin);
00321 
00322         switch (c)
00323           {
00324           case 0:
00325             {
00326               const Point min(xmin, ymin);
00327               const Point max(xc,   yc);
00328               return std::make_pair (min, max);
00329               break;
00330             }
00331 
00332           case 1:
00333             {
00334               const Point min(xc,   ymin);
00335               const Point max(xmax, yc);
00336               return std::make_pair (min, max);
00337               break;
00338             }
00339 
00340           case 2:
00341             {
00342               const Point min(xmin, yc);
00343               const Point max(xc,   ymax);
00344               return std::make_pair (min, max);
00345               break;
00346             }
00347 
00348           case 3:
00349             {
00350               const Point min(xc,   yc);
00351               const Point max(xmax, ymax);
00352               return std::make_pair (min, max);
00353               break;
00354             }
00355 
00356           default:
00357             libMesh::err << "c >= N!" << std::endl;
00358             libmesh_error();
00359 
00360           }
00361 
00362         break;
00363       } // case 4
00364 
00365       // How to refine a BinaryTree Node
00366     case 2:
00367       {
00368         const Real xmin = bounding_box.first(0);
00369 
00370         const Real xmax = bounding_box.second(0);
00371 
00372         const Real xc = xmin + .5*(xmax - xmin);
00373 
00374         switch (c)
00375           {
00376           case 0:
00377             {
00378               return std::make_pair (Point(xmin), Point(xc));
00379               break;
00380             }
00381 
00382           case 1:
00383             {
00384               return std::make_pair (Point(xc), Point(xmax));
00385               break;
00386             }
00387 
00388           default:
00389             libMesh::err << "c >= N!" << std::endl;
00390             libmesh_error();
00391           }
00392 
00393         break;
00394       } // case 2
00395 
00396 
00397     default:
00398       libMesh::err << "Only implemented for Octrees, QuadTrees, and Binary Trees!" << std::endl;
00399       libmesh_error();
00400 
00401     }
00402 
00403   // How did we get here?
00404   libmesh_error();
00405 
00406   Point min, max;
00407   return std::make_pair (min, max);
00408 }

template<unsigned int N>
const Elem * libMesh::TreeNode< N >::find_element ( const Point p  )  const [inline]
Returns:
an element containing point p.

Definition at line 535 of file tree_node.C.

References libMesh::TreeNode< N >::active(), libMesh::TreeNode< N >::bounds_point(), libMesh::TreeNode< N >::contains_ifems, libMesh::TreeNode< N >::elements, and libMesh::TreeNode< N >::find_element_in_children().

00536 {
00537   if (this->active())
00538     {
00539       // Only check our children if the point is in our bounding box
00540       // or if the node contains infinite elements
00541       if (this->bounds_point(p) || this->contains_ifems)
00542         // Search the active elements in the active TreeNode.
00543         for (std::vector<const Elem*>::const_iterator pos=elements.begin();
00544              pos != elements.end(); ++pos)
00545           if ((*pos)->active())
00546             if ((*pos)->contains_point(p))
00547               return *pos;
00548 
00549       // The point was not found in any element
00550       return NULL;
00551     }
00552   else
00553     return this->find_element_in_children(p);
00554 
00555 
00556 
00557   // Should never get here.  See if-else structure
00558   // above with return statements that must get executed.
00559   libmesh_error();
00560 
00561   return NULL;
00562 }

template<unsigned int N>
const Elem * libMesh::TreeNode< N >::find_element_in_children ( const Point p  )  const [inline, private]

Look for point p in our children.

Definition at line 568 of file tree_node.C.

References libMesh::TreeNode< N >::active(), libMesh::TreeNode< N >::bounds_point(), libMesh::TreeNode< N >::children, and libMesh::invalid_uint.

Referenced by libMesh::TreeNode< N >::find_element().

00569 {
00570   libmesh_assert (!this->active());
00571 
00572   unsigned int excluded_child = libMesh::invalid_uint;
00573 
00574   // First only look in the children whose bounding box
00575   // contain the point p.  Note that only one child will
00576   // bound the point since the bounding boxes are not
00577   // overlapping
00578   for (unsigned int c=0; c<children.size(); c++)
00579     if (children[c]->bounds_point(p))
00580       {
00581         if (children[c]->active())
00582           {
00583             const Elem* e = children[c]->find_element(p);
00584 
00585             if (e != NULL)
00586               return e;
00587           }
00588         else
00589           {
00590             const Elem* e = children[c]->find_element_in_children(p);
00591 
00592             if (e != NULL)
00593               return e;
00594           }
00595 
00596         // If we get here than the child that bounds the
00597         // point does not have any elements that contain
00598         // the point.  So, we will search all our children.
00599         // However, we have already searched child c so there
00600         // is no use searching her again.
00601         excluded_child = c;
00602       }
00603 
00604 
00605   // If we get here then our child whose bounding box
00606   // was searched and did not find any elements containing
00607   // the point p.  So, let's look at the other children
00608   // but exclude the one we have already searched.
00609   for (unsigned int c=0; c<children.size(); c++)
00610     if (c != excluded_child)
00611       {
00612         if (children[c]->active())
00613           {
00614             const Elem* e = children[c]->find_element(p);
00615 
00616             if (e != NULL)
00617               return e;
00618           }
00619         else
00620           {
00621             const Elem* e = children[c]->find_element_in_children(p);
00622 
00623             if (e != NULL)
00624               return e;
00625           }
00626       }
00627 
00628   // If we get here we have searched all our children.
00629   // Since this process was started at the root node then
00630   // we have searched all the elements in the tree without
00631   // success.  So, we should return NULL since at this point
00632   // _no_ elements in the tree claim to contain point p.
00633 
00634   return NULL;
00635 }

template<unsigned int N>
void libMesh::TreeNode< N >::insert ( const Elem nd  )  [inline]

Inserts Elem el into the TreeNode.

Definition at line 68 of file tree_node.C.

References libMesh::TreeNode< N >::active(), libMesh::TreeNode< N >::bounding_box, libMesh::TreeNode< N >::children, libMesh::TreeNode< N >::contains_ifems, libMesh::Elem::dim(), libMesh::TreeNode< N >::elements, libMesh::Elem::infinite(), libMesh::TreeNode< N >::insert(), libMesh::Elem::n_nodes(), libMesh::Elem::point(), libMesh::TreeNode< N >::refine(), and libMesh::TreeNode< N >::tgt_bin_size.

00069 {
00070   libmesh_assert(elem);
00071 
00072   /* We first want to find the corners of the cuboid surrounding the
00073      cell.  */
00074   Point minCoord = elem->point(0);
00075   Point maxCoord = minCoord;
00076   unsigned int dim = elem->dim();
00077   for(unsigned int i=elem->n_nodes()-1; i>0; i--)
00078     {
00079       Point p = elem->point(i);
00080       for(unsigned int d=0; d<dim; d++)
00081         {
00082           if(minCoord(d)>p(d)) minCoord(d) = p(d);
00083           if(maxCoord(d)<p(d)) maxCoord(d) = p(d);
00084         }
00085     }
00086 
00087   /* Next, find out whether this cuboid has got non-empty intersection
00088      with the bounding box of the current tree node.  */
00089   bool intersects = true;
00090   for(unsigned int d=0; d<dim; d++)
00091     {
00092       if(maxCoord(d)<this->bounding_box.first(d) ||
00093          minCoord(d)>this->bounding_box.second(d))
00094         {
00095           intersects = false;
00096         }
00097     }
00098 
00099   /* If not, we should not care about this element.  */
00100   if(!intersects)
00101     {
00102       return;
00103     }
00104 
00105   // Only add the element if we are active
00106   if (this->active())
00107     {
00108       elements.push_back (elem);
00109 
00110 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
00111 
00112       // flag indicating this node contains
00113       // infinite elements
00114       if (elem->infinite())
00115         this->contains_ifems = true;
00116 
00117 #endif
00118 
00119       // Refine ourself if we reach the target bin size for a TreeNode.
00120       if (elements.size() == tgt_bin_size)
00121         this->refine();
00122     }
00123 
00124   // If we are not active simply pass the element along to
00125   // our children
00126   else
00127     {
00128       libmesh_assert_equal_to (children.size(), N);
00129 
00130       for (unsigned int c=0; c<N; c++)
00131         children[c]->insert (elem);
00132     }
00133 }

template<unsigned int N>
void libMesh::TreeNode< N >::insert ( const Node nd  )  [inline]

Inserts Node nd into the TreeNode.

Definition at line 35 of file tree_node.C.

References libMesh::TreeNode< N >::active(), libMesh::TreeNode< N >::bounds_node(), libMesh::TreeNode< N >::children, libMesh::DofObject::id(), libMesh::TreeNode< N >::mesh, libMesh::MeshBase::n_nodes(), libMesh::TreeNode< N >::nodes, libMesh::TreeNode< N >::refine(), and libMesh::TreeNode< N >::tgt_bin_size.

Referenced by libMesh::TreeNode< N >::insert(), and libMesh::TreeNode< N >::refine().

00036 {
00037   libmesh_assert(nd);
00038   libmesh_assert_less (nd->id(), mesh.n_nodes());
00039 
00040   // Return if we don't bound the node
00041   if (!this->bounds_node(nd))
00042     return;
00043 
00044   // Only add the node if we are active
00045   if (this->active())
00046     {
00047       nodes.push_back (nd);
00048 
00049       // Refine ourself if we reach the target bin size for a TreeNode.
00050       if (nodes.size() == tgt_bin_size)
00051         this->refine();
00052     }
00053 
00054   // If we are not active simply pass the node along to
00055   // our children
00056   else
00057     {
00058       libmesh_assert_equal_to (children.size(), N);
00059 
00060       for (unsigned int c=0; c<N; c++)
00061         children[c]->insert (nd);
00062     }
00063 }

template<unsigned int N>
bool libMesh::TreeNode< N >::is_root (  )  const [inline]
Returns:
true if this node is the root node, false otherwise.

Definition at line 71 of file tree_node.h.

References libMesh::TreeNode< N >::parent.

00071 { return (parent == NULL); }

template<unsigned int N>
unsigned int libMesh::TreeNode< N >::level (  )  const [inline]
Returns:
the level of the node.

Definition at line 249 of file tree_node.h.

References libMesh::TreeNode< N >::parent.

Referenced by libMesh::TreeNode< N >::print_elements(), and libMesh::TreeNode< N >::print_nodes().

00250 {
00251   if (parent != NULL)
00252     return parent->level()+1;
00253 
00254   // if we have no parent, we are a level-0 box
00255   return 0;
00256 }

template<unsigned int N>
unsigned int libMesh::TreeNode< N >::n_active_bins (  )  const [inline]
Returns:
the number of active bins below (including) this element.

Definition at line 516 of file tree_node.C.

References libMesh::TreeNode< N >::active(), libMesh::TreeNode< N >::children, and libMesh::Parallel::sum().

00517 {
00518   if (this->active())
00519     return 1;
00520 
00521   else
00522     {
00523       unsigned int sum=0;
00524 
00525       for (unsigned int c=0; c<children.size(); c++)
00526         sum += children[c]->n_active_bins();
00527 
00528       return sum;
00529     }
00530 }

template<unsigned int N>
void libMesh::TreeNode< N >::print_elements ( std::ostream &  out = libMesh::out  )  const [inline]

Prints the contents of the elements set if we are active.

Definition at line 435 of file tree_node.C.

References libMesh::TreeNode< N >::active(), libMesh::TreeNode< N >::children, libMesh::TreeNode< N >::elements, and libMesh::TreeNode< N >::level().

00436 {
00437   if (this->active())
00438     {
00439       out_stream << "TreeNode Level: " << this->level() << std::endl;
00440 
00441       for (std::vector<const Elem*>::const_iterator pos=elements.begin();
00442            pos != elements.end(); ++pos)
00443         out_stream << " " << *pos;
00444 
00445       out_stream << std::endl << std::endl;
00446     }
00447   else
00448     {
00449       for (unsigned int child=0; child<children.size(); child++)
00450         children[child]->print_elements();
00451     }
00452 }

template<unsigned int N>
void libMesh::TreeNode< N >::print_nodes ( std::ostream &  out = libMesh::out  )  const [inline]

Prints the contents of the node_numbers vector if we are active.

Definition at line 413 of file tree_node.C.

References libMesh::TreeNode< N >::active(), libMesh::TreeNode< N >::children, libMesh::TreeNode< N >::level(), and libMesh::TreeNode< N >::nodes.

00414 {
00415   if (this->active())
00416     {
00417       out_stream << "TreeNode Level: " << this->level() << std::endl;
00418 
00419       for (unsigned int n=0; n<nodes.size(); n++)
00420         out_stream << " " << nodes[n]->id();
00421 
00422       out_stream << std::endl << std::endl;
00423 
00424     }
00425   else
00426     {
00427       for (unsigned int child=0; child<children.size(); child++)
00428         children[child]->print_nodes();
00429     }
00430 }

template<unsigned int N>
void libMesh::TreeNode< N >::refine (  )  [inline]

Refine the tree node into N children if it contains more than tol nodes.

Definition at line 138 of file tree_node.C.

References libMesh::TreeNode< N >::active(), libMesh::TreeNode< N >::children, libMesh::TreeNode< N >::create_bounding_box(), libMesh::TreeNode< N >::elements, libMesh::TreeNode< N >::insert(), libMesh::TreeNode< N >::mesh, libMesh::TreeNode< N >::nodes, swap(), and libMesh::TreeNode< N >::tgt_bin_size.

Referenced by libMesh::TreeNode< N >::insert().

00139 {
00140   // Huh?  better be active...
00141   libmesh_assert (this->active());
00142   libmesh_assert (children.empty());
00143 
00144   // A TreeNode<N> has by definition N children
00145   children.resize(N);
00146 
00147   for (unsigned int c=0; c<N; c++)
00148     {
00149       // Create the child and set its bounding box.
00150       children[c] = new TreeNode<N> (mesh, tgt_bin_size, this);
00151       children[c]->set_bounding_box(this->create_bounding_box(c));
00152 
00153       // Pass off our nodes to our children
00154       for (unsigned int n=0; n<nodes.size(); n++)
00155         children[c]->insert(nodes[n]);
00156 
00157       // Pass off our elements to our children
00158       for (unsigned int e=0; e<elements.size(); e++)
00159         children[c]->insert(elements[e]);
00160     }
00161 
00162   // We don't need to store nodes or elements any more,
00163   // they have been added to the children.
00164   // Note that we cannot use std::vector<>::clear() here
00165   // since that in general does not reduce capacity!!
00166   // That would be a bad, bad thing.
00167   std::vector<const Node*>().swap(nodes);
00168   std::vector<const Elem*>().swap(elements);
00169 
00170   libmesh_assert_equal_to (nodes.capacity(), 0);
00171   libmesh_assert_equal_to (elements.capacity(), 0);
00172 }

template<unsigned int N>
void libMesh::TreeNode< N >::set_bounding_box ( const std::pair< Point, Point > &  bbox  )  [inline]

Sets the bounding box;

Definition at line 177 of file tree_node.C.

References libMesh::TreeNode< N >::bounding_box.

00178 {
00179   bounding_box = bbox;
00180 }

template<unsigned int N>
void libMesh::TreeNode< N >::transform_nodes_to_elements ( std::vector< std::vector< const Elem * > > &  nodes_to_elem  )  [inline]

Transforms node numbers to element pointers.

Definition at line 457 of file tree_node.C.

References libMesh::TreeNode< N >::active(), libMesh::TreeNode< N >::children, libMesh::TreeNode< N >::contains_ifems, libMesh::TreeNode< N >::elements, libMesh::TreeNode< N >::mesh, libMesh::MeshBase::n_nodes(), libMesh::TreeNode< N >::nodes, and swap().

00458 {
00459    if (this->active())
00460     {
00461       elements.clear();
00462 
00463       // Temporarily use a set. Since multiple nodes
00464       // will likely map to the same element we use a
00465       // set to eliminate the duplication.
00466       std::set<const Elem*> elements_set;
00467 
00468       for (unsigned int n=0; n<nodes.size(); n++)
00469         {
00470           // the actual global node number we are replacing
00471           // with the connected elements
00472           const dof_id_type node_number = nodes[n]->id();
00473 
00474           libmesh_assert_less (node_number, mesh.n_nodes());
00475           libmesh_assert_less (node_number, nodes_to_elem.size());
00476 
00477           for (unsigned int e=0; e<nodes_to_elem[node_number].size(); e++)
00478             elements_set.insert(nodes_to_elem[node_number][e]);
00479         }
00480 
00481       // Done with the nodes.
00482       std::vector<const Node*>().swap(nodes);
00483 
00484       // Now the set is built.  We can copy this to the
00485       // vector.  Note that the resulting vector will
00486       // already be sorted, and will require less memory
00487       // than the set.
00488       elements.reserve(elements_set.size());
00489 
00490       for (std::set<const Elem*>::iterator pos=elements_set.begin();
00491            pos != elements_set.end(); ++pos)
00492         {
00493           elements.push_back(*pos);
00494 
00495 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
00496 
00497           // flag indicating this node contains
00498           // infinite elements
00499           if ((*pos)->infinite())
00500             this->contains_ifems = true;
00501 
00502 #endif
00503         }
00504     }
00505   else
00506     {
00507       for (unsigned int child=0; child<children.size(); child++)
00508         children[child]->transform_nodes_to_elements (nodes_to_elem);
00509     }
00510 
00511 }


Member Data Documentation

template<unsigned int N>
std::pair<Point, Point> libMesh::TreeNode< N >::bounding_box [private]

The Cartesian bounding box for the node. The minimum point is stored as bounding_box.first, the maximum point is stored as bounding_box.second.

Definition at line 188 of file tree_node.h.

Referenced by libMesh::TreeNode< N >::bounds_point(), libMesh::TreeNode< N >::create_bounding_box(), libMesh::TreeNode< N >::insert(), and libMesh::TreeNode< N >::set_bounding_box().

template<unsigned int N>
bool libMesh::TreeNode< N >::contains_ifems [private]

Does this node contain any infinite elements.

Definition at line 203 of file tree_node.h.

Referenced by libMesh::TreeNode< N >::find_element(), libMesh::TreeNode< N >::insert(), and libMesh::TreeNode< N >::transform_nodes_to_elements().

template<unsigned int N>
const MeshBase& libMesh::TreeNode< N >::mesh [private]
template<unsigned int N>
std::vector<const Node*> libMesh::TreeNode< N >::nodes [private]
template<unsigned int N>
const TreeNode<N>* libMesh::TreeNode< N >::parent [private]

Pointer to this node's parent.

Definition at line 175 of file tree_node.h.

Referenced by libMesh::TreeNode< N >::is_root(), and libMesh::TreeNode< N >::level().

template<unsigned int N>
const unsigned int libMesh::TreeNode< N >::tgt_bin_size [private]

The maximum number of things we should store before refining ourself.

Definition at line 170 of file tree_node.h.

Referenced by libMesh::TreeNode< N >::insert(), libMesh::TreeNode< N >::refine(), and libMesh::TreeNode< N >::TreeNode().


The documentation for this class was generated from the following files:

Site Created By: libMesh Developers
Last modified: February 05 2013 19:55:41 UTC

Hosted By:
SourceForge.net Logo