surface.h
Go to the documentation of this file.00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2012 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 00043 // ------------------------------------------------------------ 00044 // Surface class definition 00045 class Surface 00046 { 00047 public: 00048 00052 Surface () {} 00053 00057 Surface (const Surface&) {} 00058 00062 virtual ~Surface () {} 00063 00068 virtual bool above_surface (const Point& p) const = 0; 00069 00074 virtual bool below_surface (const Point& p) const = 0; 00075 00082 virtual bool on_surface (const Point& p) const = 0; 00083 00087 virtual Point closest_point (const Point& p) const = 0; 00088 00093 virtual Point unit_normal (const Point& p) const = 0; 00094 00103 virtual Point surface_coords (const Point& world_coords) const; 00104 00112 virtual Point world_coords (const Point& surf_coords) const; 00113 00114 protected: 00115 00116 }; 00117 00118 // ------------------------------------------------------------ 00119 // Surface class member functions 00120 inline 00121 Point Surface::surface_coords (const Point& from_world_coords) const 00122 { 00123 Point p (from_world_coords); 00124 return p; 00125 } 00126 00127 00128 00129 inline 00130 Point Surface::world_coords (const Point& surf_coords) const 00131 { 00132 Point p (surf_coords); 00133 return p; 00134 } 00135 00136 00137 00138 00139 } // namespace libMesh 00140 00141 00142 #endif // LIBMESH_SURFACE_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:48 UTC
Hosted By: