LagrangeCurve.h
1 /******************************************************************************
2 
3  (c) 2004-2014 Scientific Computation Research Center,
4  Rensselaer Polytechnic Institute. All rights reserved.
5 
6  The LICENSE-SCOREC file included with this distribution describes the terms
7  of the SCOREC Non-Commercial License this program is distributed under.
8 
9 *******************************************************************************/
10 #ifndef LAGRANGECURVE_H
11 #define LAGRANGECURVE_H
12 
13 #include <iostream>
14 #include <vector>
15 #include <string>
16 #include "ParametricCurve.h"
17 
19  public:
22  LagrangeCurve1(pMeshEnt in_vtx1, pMeshEnt in_vtx2);
23 
24  virtual ~LagrangeCurve1() {
25  }
26 
27  protected:
28  int v_eval(Point1d in_xi, Point3d & out_xyz);
29  int v_order();
30  int v_deriv1(Point1d in_xi, Point3d & out_xyz);
31  private:
32  pMeshEnt m_vtx_start;
33  pMeshEnt m_vtx_end;
34  Point3d m_coords[2];
35  int m_model_type;
36 };
37 
39 
40  public:
41 
42  LagrangeCurve2(Point3d P0,
43  Point3d P1,
44  Point3d P2);
45 
46  ~LagrangeCurve2();
47 
48  void get_bezier_edge_ctrl_pt(Point3d & out_bxyz);
49 
50  private:
51 
52  // default constructors
53  LagrangeCurve2() {}
55 
56  //
57  virtual int v_order() {
58  return 2;
59  }
60 
61  virtual int v_eval(Point1d in_param, Point3d & out_xyz);
62  virtual int v_deriv1(Point1d in_param, Point3d & out_xyz);
63 
64  // data member
65  Point3d * m_interp_pts_;
66 
67 };
68 
72  public:
73  LagrangeCurve4(Point3d P0,
74  Point3d P1,
75  Point3d P2,
76  Point3d P3,
77  Point3d P4);
78 
79  ~LagrangeCurve4();
80 
81  private:
82  // default constructors
83  LagrangeCurve4() {}
85 
86  //
87  virtual int v_order() {
88  return 4;
89  }
90 
91  virtual int v_eval(Point1d in_param, Point3d & out_xyz);
92  virtual int v_deriv1(Point1d in_param, Point3d & out_xyz);
93 
94  // data member
95  Point3d * m_interp_pts_;
96 };
97 
98 #endif// LAGRANGECURVE_H
Definition: LagrangeCurve.h:18
interface class for all parametric curves The parametric curves use the same coordinate system as the...
Definition: ParametricCurve.h:18
LagrangeCurve1(pMeshEnt in_vtx1, pMeshEnt in_vtx2)
Definition: LagrangeCurve.cc:87
Parametric curve geometry using Lagrange interpolation polynomials of degree 4.
Definition: LagrangeCurve.h:71
int v_eval(Point1d in_xi, Point3d &out_xyz)
Definition: LagrangeCurve.cc:100
Definition: LagrangeCurve.h:38