patch.h
Go to the documentation of this file.
1 
2 // The libMesh Finite Element Library.
3 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
4 
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
14 
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 
19 
20 
21 #ifndef LIBMESH_PATCH_H
22 #define LIBMESH_PATCH_H
23 
24 // Local includes
25 #include "libmesh/id_types.h"
26 
27 // C++ includes
28 #include <vector>
29 #include <string>
30 #include <set>
31 
32 namespace libMesh
33 {
34 
35 // Forward Declarations
36 class Elem;
37 
38 
39 
47 class Patch : public std::set<const Elem *>
48 {
49 public:
50 
54  Patch(const processor_id_type my_procid = static_cast<processor_id_type>(-1)) :
55  _my_procid(my_procid)
56  {}
57 
61  ~Patch() {}
62 
67  void add_face_neighbors();
68 
74 
81 
86  void add_point_neighbors();
87 
93 
100 
104  typedef void (Patch::*PMF)();
105 
113  void build_around_element(const Elem* elem,
114  const unsigned int target_patch_size = 10,
115  PMF patchtype = &Patch::add_local_face_neighbors);
116 
117 protected:
118 
123  void find_face_neighbors(std::set<const Elem *> &neighbor_set);
124 
129  void find_point_neighbors(std::set<const Elem *> &neighbor_set);
130 
132 };
133 
134 } // namespace libMesh
135 
136 
137 #endif // LIBMESH_PATCH_H

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

Hosted By:
SourceForge.net Logo