$extrastylesheet
00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00003 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public 00006 // License as published by the Free Software Foundation; either 00007 // version 2.1 of the License, or (at your option) any later version. 00008 00009 // This library is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // Lesser General Public License for more details. 00013 00014 // You should have received a copy of the GNU Lesser General Public 00015 // License along with this library; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 00019 00020 #ifndef LIBMESH_SURFACE_H 00021 #define LIBMESH_SURFACE_H 00022 00023 // Local includes 00024 #include "libmesh/point.h" 00025 00026 // C++ includes 00027 00028 namespace libMesh 00029 { 00030 00031 00042 class Surface 00043 { 00044 public: 00045 00049 Surface () {} 00050 00054 Surface (const Surface&) {} 00055 00059 virtual ~Surface () {} 00060 00065 virtual bool above_surface (const Point& p) const = 0; 00066 00071 virtual bool below_surface (const Point& p) const = 0; 00072 00079 virtual bool on_surface (const Point& p) const = 0; 00080 00084 virtual Point closest_point (const Point& p) const = 0; 00085 00090 virtual Point unit_normal (const Point& p) const = 0; 00091 00100 virtual Point surface_coords (const Point& world_coords) const; 00101 00109 virtual Point world_coords (const Point& surf_coords) const; 00110 00111 protected: 00112 00113 }; 00114 00115 // ------------------------------------------------------------ 00116 // Surface class member functions 00117 inline 00118 Point Surface::surface_coords (const Point& from_world_coords) const 00119 { 00120 Point p (from_world_coords); 00121 return p; 00122 } 00123 00124 00125 00126 inline 00127 Point Surface::world_coords (const Point& surf_coords) const 00128 { 00129 Point p (surf_coords); 00130 return p; 00131 } 00132 00133 00134 00135 00136 } // namespace libMesh 00137 00138 00139 #endif // LIBMESH_SURFACE_H