surface.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_SURFACE_H
21 #define LIBMESH_SURFACE_H
22 
23 // Local includes
24 #include "libmesh/point.h"
25 
26 // C++ includes
27 
28 namespace libMesh
29 {
30 
31 
43 // ------------------------------------------------------------
44 // Surface class definition
45 class Surface
46 {
47 public:
48 
52  Surface () {}
53 
57  Surface (const Surface&) {}
58 
62  virtual ~Surface () {}
63 
68  virtual bool above_surface (const Point& p) const = 0;
69 
74  virtual bool below_surface (const Point& p) const = 0;
75 
82  virtual bool on_surface (const Point& p) const = 0;
83 
87  virtual Point closest_point (const Point& p) const = 0;
88 
93  virtual Point unit_normal (const Point& p) const = 0;
94 
103  virtual Point surface_coords (const Point& world_coords) const;
104 
112  virtual Point world_coords (const Point& surf_coords) const;
113 
114 protected:
115 
116 };
117 
118 // ------------------------------------------------------------
119 // Surface class member functions
120 inline
121 Point Surface::surface_coords (const Point& from_world_coords) const
122 {
123  Point p (from_world_coords);
124  return p;
125 }
126 
127 
128 
129 inline
130 Point Surface::world_coords (const Point& surf_coords) const
131 {
132  Point p (surf_coords);
133  return p;
134 }
135 
136 
137 
138 
139 } // namespace libMesh
140 
141 
142 #endif // LIBMESH_SURFACE_H

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

Hosted By:
SourceForge.net Logo