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

◆ Surface() [1/2]

libMesh::Surface::Surface ( )
default

Constructor.

Does nothing at the moment.

◆ Surface() [2/2]

libMesh::Surface::Surface ( const Surface )
default

Copy-constructor.

◆ ~Surface()

virtual libMesh::Surface::~Surface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ above_surface()

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.

◆ below_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.

◆ closest_point()

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.

◆ on_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.

◆ surface_coords()

virtual 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 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

◆ unit_normal()

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.

◆ world_coords()

virtual 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 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: