GhostTriangle Class Reference

A class to keep a copy of a BezierTriangle without all the CellComplex baggage. More...

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

Inheritance diagram for GhostTriangle:

[legend]
Collaboration diagram for GhostTriangle:
[legend]
List of all members.

Public Member Functions

 GhostTriangle (const BezierTriangle &bt)
 Create a GhostTriangle as a copy of a BezierTriangle.
 GhostTriangle ()
 Create an empty GhostTriangle.
virtual ~GhostTriangle ()
void set_cp (int i, Point2D p)
 Set the value at a ControlPoint.
Point2D get_cp (int i) const
 Get the value at a ControlPoint.
void jacobian_matrix (double u, double v, Point2D &pdu, Point2D &pdv) const
 Calculate the jacobian at a point.
double jacobian (double alpha, double beta) const
 Get the Jacobian determinate at a point.
LinearData dataeval (double u, double v) const
 Interpolate data at point (u,v).
Point2D eval (double u, double v) const
 Interpolate geometry at point (u,v).
void print () const
 Print info.
void print_mathematica () const
 Print info in mathematica format.

Public Attributes

Point2D cp [6]
LinearData dp [6]

Private Member Functions

 GhostTriangle (const GhostTriangle &)
GhostTriangleoperator= (const GhostTriangle &)

Friends

std::ostream & operator<< (std::ostream &stream, const GhostTriangle &t)

Detailed Description

A class to keep a copy of a BezierTriangle without all the CellComplex baggage.

When doing reinterpolation there is a point where we would like to have a pair of triangles as they looked before a modification and a pair of triangles as they look after the modification. The problem is that BezierTriangles are strongly tied in with the CellComplex. They have no real control over thier data points, they only have pointers. Thus, it is impossible to have the two sets of triangles described above because once the modification takes place, all the old data is gone.

Hence the need for a GhostTriangle. It acts as a snapshot copy of a BezierTriangle. Hence it is like a 'ghost' image of a dead triangle. The main difference between a GhostTriangle and BezierTriangle is that a GhostTriangle holds all the actual data, not just pointers to it.

Thus when it comes time for reinterpolation, we can save the images of the triangles before the modification in GhostTriangles, and then destroy them later, without having to mess with the complexity of the CellComplex.

Both GhostTiangles and BezierTriangles inherit from a CurvedTriangle which provides the NewtonFind method, as, both types of triangles rely on this important method.

Definition at line 827 of file cell.h.


Constructor & Destructor Documentation

GhostTriangle::GhostTriangle ( const BezierTriangle bt  ) 

Create a GhostTriangle as a copy of a BezierTriangle.

Definition at line 2209 of file cell.C.

References cp, dp, BezierTriangle::get_cp(), and BezierTriangle::get_dp().

Here is the call graph for this function:

GhostTriangle::GhostTriangle (  ) 

Create an empty GhostTriangle.

Definition at line 2218 of file cell.C.

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

Destrouctor

Definition at line 838 of file cell.h.

GhostTriangle::GhostTriangle ( const GhostTriangle  )  [private]


Member Function Documentation

void GhostTriangle::set_cp ( int  i,
Point2D  p 
)

Set the value at a ControlPoint.

Definition at line 2223 of file cell.C.

References cp.

Point2D GhostTriangle::get_cp ( int  i  )  const

Get the value at a ControlPoint.

Definition at line 2229 of file cell.C.

References cp.

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

Calculate the jacobian at a point.

This is the same a BezierTriangle::jacobian_matrix(double, double, Point2D&, Point2D &)

Parameters:
u The first param
v The second param
[out] pdu A vector representing the partial derivative with respect to u
[out] pdv A vector representing the partial derivative with respect to v

Implements CurvedTriangle.

Definition at line 2258 of file cell.C.

References cp.

Referenced by jacobian().

double GhostTriangle::jacobian ( double  u,
double  v 
) const

Get the Jacobian determinate at a point.

This is the same as BezierTriangle::jacobian(double, double)

Parameters:
u The first param
v The second param
Returns:
The Jacobian determinate at the given location

Definition at line 2242 of file cell.C.

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

Here is the call graph for this function:

LinearData GhostTriangle::dataeval ( double  u,
double  v 
) const

Interpolate data at point (u,v).

This is the same as BezierTriangle::dataeval(double,double)

Parameters:
u The first param
v The second param
Returns:
The interpolated data at the given point

Definition at line 2301 of file cell.C.

References dp.

Referenced by BezierMesh::interpolant_error().

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

Interpolate geometry at point (u,v).

This is the same as BezierTriangle::eval(double,double)

Parameters:
u The first param
v The second param
Returns:
The interpolated geometry at the given point

Implements CurvedTriangle.

Definition at line 2280 of file cell.C.

References cp.

void GhostTriangle::print (  )  const

Print info.

Definition at line 2315 of file cell.C.

void GhostTriangle::print_mathematica (  )  const

Print info in mathematica format.

Definition at line 2321 of file cell.C.

References cp, Point2D::x(), and Point2D::y().

Here is the call graph for this function:

GhostTriangle& GhostTriangle::operator= ( const GhostTriangle  )  [private]


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const GhostTriangle t 
) [friend]


Member Data Documentation

Point2D GhostTriangle::cp[6]

Array of actual geometric data, not pointers

Definition at line 830 of file cell.h.

Referenced by eval(), get_cp(), GhostTriangle(), jacobian_matrix(), operator<<(), print_mathematica(), and set_cp().

LinearData GhostTriangle::dp[6]

Array of actual functional data, not pointers

Definition at line 831 of file cell.h.

Referenced by dataeval(), GhostTriangle(), and operator<<().


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