libMesh::Surface Class Referenceabstract

#include <surface.h>

Inheritance diagram for libMesh::Surface:

Public Member Functions

 Surface ()
 
 Surface (const Surface &)
 
virtual ~Surface ()
 
virtual bool above_surface (const Point &p) const =0
 
virtual bool below_surface (const Point &p) const =0
 
virtual bool on_surface (const Point &p) const =0
 
virtual Point closest_point (const Point &p) const =0
 
virtual Point unit_normal (const Point &p) const =0
 
virtual Point surface_coords (const Point &world_coords) const
 
virtual Point world_coords (const Point &surf_coords) const
 

Detailed Description

This class defines a surface. A surface is a two-dimensional object living in three-dimensional space. Examples of surfaces are planes, hollow spheres, hollow cylinders, etc... This is a generic base class that describes the useful functionality a surface will provide. Specific derived classes actually implement the functionality, so this class has pure virtual members.

Author
Benjamin S. Kirk, 2002

Definition at line 45 of file surface.h.

Constructor & Destructor Documentation

libMesh::Surface::Surface ( )
inline

Constructor. Does nothing at the moment.

Definition at line 52 of file surface.h.

52 {}
libMesh::Surface::Surface ( const Surface )
inline

Copy-constructor.

Definition at line 57 of file surface.h.

57 {}
virtual libMesh::Surface::~Surface ( )
inlinevirtual

Destructor.

Definition at line 62 of file surface.h.

62 {}

Member Function Documentation

virtual bool libMesh::Surface::above_surface ( const Point p) const
pure virtual
Returns
true if the point p is above the surface, false otherwise.

Implemented in libMesh::Sphere, and libMesh::Plane.

virtual bool libMesh::Surface::below_surface ( const Point p) const
pure virtual
Returns
true if the point p is below the surface, false otherwise.

Implemented in libMesh::Sphere, and libMesh::Plane.

virtual Point libMesh::Surface::closest_point ( const Point p) const
pure virtual
Returns
the closest point on the surface to point p.

Implemented in libMesh::Sphere, and libMesh::Plane.

virtual bool libMesh::Surface::on_surface ( const Point p) const
pure virtual
Returns
true if the point p is on the surface, false otherwise. Note that the definition of on the surface really means "very close" to account for roundoff error.

Implemented in libMesh::Sphere, and libMesh::Plane.

Point libMesh::Surface::surface_coords ( const Point world_coords) const
inlinevirtual
Returns
the Point world_coords in the surface's coordinate system. world_coords is in the world coordinate system. This method is not purely virtual, because there may be surfaces that do not have an own coordinate system. These simply do not have to overload this method.

Reimplemented in libMesh::Sphere.

Definition at line 121 of file surface.h.

122 {
123  Point p (from_world_coords);
124  return p;
125 }
virtual Point libMesh::Surface::unit_normal ( const Point p) const
pure virtual
Returns
a unit vector normal to the surface at point p.

Implemented in libMesh::Sphere, and libMesh::Plane.

Point libMesh::Surface::world_coords ( const Point surf_coords) const
inlinevirtual
Returns
the world (cartesian) coordinates for the surface coordinates surf_coords. This method is not purely virtual, because there may be surfaces that do not have an own coordinate system. These simply do not have to overload this method.

Reimplemented in libMesh::Sphere.

Definition at line 130 of file surface.h.

131 {
132  Point p (surf_coords);
133  return p;
134 }

The documentation for this class was generated from the following file:

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

Hosted By:
SourceForge.net Logo