xmsinterp  1.0
InterpCt.h
Go to the documentation of this file.
1 #pragma once
2 //------------------------------------------------------------------------------
7 //------------------------------------------------------------------------------
8 
9 //----- Included files ---------------------------------------------------------
10 #include <vector>
11 #include <xmscore/points/ptsfwd.h>
14 
15 //----- Forward declarations ---------------------------------------------------
16 
17 //----- Namespace declaration --------------------------------------------------
18 namespace xms
19 {
20 class NodalFunc;
21 
22 //----- Constants / Enumerations -----------------------------------------------
23 
24 //----- Structs / Classes ------------------------------------------------------
25 class InterpCt
26 {
27 public:
29  enum RegionEnum { T1, T2, T3 };
30 
31  InterpCt(const std::vector<Pt3d>& a_pts, BSHP<NodalFunc> a_n);
32 
33  bool ComputeCtCoeff(int* a_ptIdxs);
34  double InterpToPt(const Pt3d& a_pt);
35  RegionEnum DetermineRegion(double e, double n);
36  void RecalcNodalFunc();
37  std::string ToString() const;
38 
40  const std::vector<Pt3d>& m_pts;
42  BSHP<NodalFunc> m_nodalFunc;
44  // variables used in ct interpolation refactored out of GMS into this class
45  double x1, p1, f1, x2, y2, f2, x3, y3, f3, d11, d12, d21, d22, fx1, fy1, fx2, fy2, fx3, fy3;
46  double ue1, un1, ue2, un2, ue3, un3, ue4, un4, ue5, un5, ue6, un6;
47  double dudz1, dudz2, dudz3, dudw1, dudw2, dudw3, dudn4, dudn5, dudn6;
48  double delta, a11, a12, a21, a22, d1, d2;
49 
50 private:
53 };
54 //----- Function prototypes ----------------------------------------------------
55 }
RegionEnum
Triangle region enumeration.
Definition: InterpCt.h:29
const std::vector< Pt3d > & m_pts
input points interpolated from
Definition: InterpCt.h:40
Computes the Clough Tocher interpolation to a location.
Definition: InterpCt.h:25
BSHP< NodalFunc > m_nodalFunc
nodal function used in ct calculations
Definition: InterpCt.h:42
double InterpToPt(const Pt3d &a_pt)
Performs Clough Tocher interpolation to a point.
Definition: InterpCt.cpp:118
RegionEnum DetermineRegion(double e, double n)
Finds the region of the triangle.
Definition: InterpCt.cpp:66
#define XM_DISALLOW_COPY_AND_ASSIGN(TypeName)
InterpCt(const std::vector< Pt3d > &a_pts, BSHP< NodalFunc > a_n)
Constructor.
Definition: InterpCt.cpp:55
std::string ToString() const
serialize the class to a string.
Definition: InterpCt.cpp:91
void RecalcNodalFunc()
Recalculated the nodal function. This happens when the scalars change.
Definition: InterpCt.cpp:82
bool ComputeCtCoeff(int *a_ptIdxs)
Calculates the coefficients used by ct interpolation.
Definition: InterpCt.cpp:217