libMesh
Public Member Functions | List of all members
libMesh::Surface Class Referenceabstract

The base class for all "surface" related geometric objects. More...

#include <surface.h>

Inheritance diagram for libMesh::Surface:
[legend]

Public Member Functions

 Surface ()
 Constructor. More...
 
 Surface (const Surface &)
 Copy-constructor. More...
 
virtual ~Surface ()
 Destructor. More...
 
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

The base class for all "surface" related geometric objects.

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
Date
2002 Base class for Plane and Sphere classes.

Definition at line 42 of file surface.h.

Constructor & Destructor Documentation

libMesh::Surface::Surface ( )

Constructor.

Does nothing at the moment.

Definition at line 49 of file surface.h.

49 {}
libMesh::Surface::Surface ( const Surface )

Copy-constructor.

Definition at line 54 of file surface.h.

54 {}
virtual libMesh::Surface::~Surface ( )
virtual

Destructor.

Definition at line 59 of file surface.h.

References above_surface(), below_surface(), closest_point(), on_surface(), and unit_normal().

59 {}

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.

Referenced by ~Surface().

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.

Referenced by ~Surface().

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.

Referenced by ~Surface().

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
The definition of "on the surface" really means "very close" to account for roundoff error.

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

Referenced by ~Surface().

virtual Point libMesh::Surface::surface_coords ( const Point world_coords) const
virtual
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 their own coordinate system. These simply do not have to override this method.

Reimplemented in libMesh::Sphere.

Definition at line 101 of file surface.h.

References world_coords().

101 { return world_coords; }
virtual Point world_coords(const Point &surf_coords) const
Definition: surface.h:110
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.

Referenced by ~Surface().

virtual Point libMesh::Surface::world_coords ( const Point surf_coords) const
virtual
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 override this method.

Reimplemented in libMesh::Sphere.

Definition at line 110 of file surface.h.

Referenced by surface_coords().

110 { return surf_coords; }

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