xmsinterp
1.0
|
Computes the Clough Tocher interpolation to a location. More...
Public Types | |
enum | RegionEnum { T1, T2, T3 } |
Triangle region enumeration. | |
Public Member Functions | |
InterpCt (const std::vector< Pt3d > &a_pts, BSHP< NodalFunc > a_n) | |
Constructor. More... | |
bool | ComputeCtCoeff (int *a_ptIdxs) |
Calculates the coefficients used by ct interpolation. More... | |
double | InterpToPt (const Pt3d &a_pt) |
Performs Clough Tocher interpolation to a point. More... | |
RegionEnum | DetermineRegion (double e, double n) |
Finds the region of the triangle. More... | |
void | RecalcNodalFunc () |
Recalculated the nodal function. This happens when the scalars change. | |
std::string | ToString () const |
serialize the class to a string. More... | |
Public Attributes | |
const std::vector< Pt3d > & | m_pts |
input points interpolated from | |
BSHP< NodalFunc > | m_nodalFunc |
nodal function used in ct calculations | |
Computes the Clough Tocher interpolation to a location.
Definition at line 25 of file InterpCt.h.
Constructor.
[in] | a_pts | The point locations that are interpolated from |
[in] | a_n | Nodal function used in the setup of ct interpolation |
Definition at line 55 of file InterpCt.cpp.
bool xms::InterpCt::ComputeCtCoeff | ( | int * | a_ptIdxs | ) |
Calculates the coefficients used by ct interpolation.
[in] | a_ptIdxs | Point indices for a triangle |
Definition at line 217 of file InterpCt.cpp.
References m_nodalFunc, m_pts, SQRT3, xms::Pt3< T >::x, and xms::Pt3< T >::y.
InterpCt::RegionEnum xms::InterpCt::DetermineRegion | ( | double | e, |
double | n | ||
) |
Finds the region of the triangle.
[in] | e | factor determined by the x,y location of interpolation point |
[in] | n | factor determined by the x,y location of interpolation point |
Definition at line 66 of file InterpCt.cpp.
References SQRT3.
Referenced by InterpToPt().
double xms::InterpCt::InterpToPt | ( | const Pt3d & | a_pt | ) |
Performs Clough Tocher interpolation to a point.
[in] | a_pt | The location being interpolated to. |
Definition at line 118 of file InterpCt.cpp.
References DetermineRegion(), SQRT3, xms::Pt3< T >::x, and xms::Pt3< T >::y.
std::string xms::InterpCt::ToString | ( | ) | const |
serialize the class to a string.
Definition at line 91 of file InterpCt.cpp.
References m_pts, and VecToStream().