CurvedTriangle Class Reference

An abstract class that models a BezierTriangle without data. More...

#include </usr1/tp517/Tumble/trunk/src/tumble/cell.h>

Inheritance diagram for CurvedTriangle:

[legend]
List of all members.

Public Member Functions

bool newton_find (const Point2D &p, double &u, double &v, int &niter, int &edge_num) const
 Given a point find this triangle's barycentric coordinates for it.
bool newton_find (const Point2D &p, double &u, double &v) const
virtual void jacobian_matrix (double u, double v, Point2D &pdu, Point2D &pdv) const=0
virtual Point2D eval (double u, double v) const=0
 CurvedTriangle ()
virtual ~CurvedTriangle ()

Detailed Description

An abstract class that models a BezierTriangle without data.

As we would like both BeizerTriangles and GhostTriangles to have the ability to run the newton_find() algorithm we inherit from this common super class.

Definition at line 671 of file cell.h.


Constructor & Destructor Documentation

CurvedTriangle::CurvedTriangle (  )  [inline]

Constructor

Definition at line 677 of file cell.h.

virtual CurvedTriangle::~CurvedTriangle (  )  [inline, virtual]

Virtual Destructor

Definition at line 678 of file cell.h.


Member Function Documentation

bool CurvedTriangle::newton_find ( const Point2D p,
double &  u,
double &  v,
int &  niter,
int &  edge_num 
) const

Given a point find this triangle's barycentric coordinates for it.

This function is used to do a reverse lookup. If you have a geometric point and want to know if that point is inside this triangle, and if so what it's parametrization is, then use this function.

This function uses newtons method to find the find the point. Its tolerance is controlled by several static variables in Cell.C.

This function will consider the location a failure if either u,v, or u+v is not in [0,1], as this indicates the point is outside the triangle.

Parameters:
p The point to search for
[out] u The first parameter on a successful location
[out] v The second parameter on a successfull location
[out] niter The number of iterations to converge
[out] edge_num If the convergence is outside of the triangle, the edge number accross which the point is located
Returns:
false on failure, true on success

Definition at line 2383 of file cell.C.

References Point2D::cross(), eval(), jacobian_matrix(), and Point2D::magsq().

Referenced by newton_find(), and BezierTriangle::newton_find().

Here is the call graph for this function:

bool CurvedTriangle::newton_find ( const Point2D p,
double &  u,
double &  v 
) const

Definition at line 2451 of file cell.C.

References newton_find().

Here is the call graph for this function:

virtual void CurvedTriangle::jacobian_matrix ( double  u,
double  v,
Point2D pdu,
Point2D pdv 
) const [pure virtual]

Implemented in BezierTriangle, and GhostTriangle.

Referenced by newton_find().

virtual Point2D CurvedTriangle::eval ( double  u,
double  v 
) const [pure virtual]

Implemented in BezierTriangle, and GhostTriangle.

Referenced by newton_find().


The documentation for this class was generated from the following files:
Generated on Mon May 24 09:53:33 2010 for TUMBLE by  doxygen 1.5.2