tree_base.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef LIBMESH_TREE_BASE_H
21 #define LIBMESH_TREE_BASE_H
22 
23 // Local includes
25 
26 // C++ includes
27 
28 namespace libMesh
29 {
30 
31 
32 // Forward Declarations
33 class TreeBase;
34 class MeshBase;
35 class Point;
36 class Elem;
37 
38 
39 namespace Trees
40 {
47  enum BuildType {NODES=0,
50 }
51 
57 // ------------------------------------------------------------
58 // TreeBase class definition
59 class TreeBase : public ReferenceCountedObject<TreeBase>
60 {
61 protected:
62 
66  explicit
67  TreeBase (const MeshBase& m);
68 
69 
70 public:
71 
75  virtual ~TreeBase() {}
76 
80  virtual void print_nodes(std::ostream& out=libMesh::out) const = 0;
81 
85  virtual void print_elements(std::ostream& out=libMesh::out) const = 0;
86 
90  virtual unsigned int n_active_bins() const = 0;
91 
95  virtual const Elem* find_element(const Point& p) const = 0;
96 
97 protected:
98 
103  const MeshBase& mesh;
104 
105 };
106 
107 
108 // ------------------------------------------------------------
109 // TreeBase class inline methods
110 
111 // constructor
112 inline
114  mesh(m)
115 {
116 }
117 
118 } // namespace libMesh
119 
120 
121 #endif // LIBMESH_TREE_BASE_H

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:07 UTC

Hosted By:
SourceForge.net Logo