GregorySurface.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 CURVEMESHADAPT_GREGORY_H
11 #define CURVEMESHADAPT_GREGORY_H
12 
13 #include <map>
14 
15 #include "CMAFwd.h"
16 
17 class EdgeCtrlPt;
18 
21  public:
24 
26  GregorySurface(std::vector<Point3d> in_ordered_nodes,
27  std::vector<Point3d> in_ordered_normals);
28 
31 
33  int eval(double u, double v, double *retval);
34 
36  void deriv1(Point2d in_xi,
37  Point3d & out_dxyz_dxi1,
38  Point3d & out_dxyz_dxi2);
39 
40  void InputPos(double *q0, double *q1, double *q2);
41  void InputNormal(double *n0, double *n1, double *n2);
42 
43  void SetEdgeCtrlPoints(int i, Point3d *ctrl_pts);
44 
46  void Setup();
47 
49  void SetupBdryCrv(int i);
50 
52  void print_var();
53 
55  Point3d m_G01_, m_G02_, m_G11_, m_G12_, m_G21_, m_G22_;
56 
57  protected:
59  int snap_to_model();
60 
62  int m_order_;
63  int m_dim_;
64 
66  Point3d m_q0_;
67  Point3d m_q1_;
68  Point3d m_q2_;
69 
70  Point3d m_n0_;
71  Point3d m_n1_;
72  Point3d m_n2_;
73 
74  // P -- edge control points
75  Point3d P004;
76  Point3d P013, P103;
77  Point3d P022, P202;
78  Point3d P031, P301;
79  Point3d P040, P130, P220, P310, P400;
80 
81  // W, A -- aux matrices
82  Point3d W[3][3];
83  Point3d A[3][3];
84 
85  std::vector<EdgeCtrlPt*> edge_ctrl_points;
86 
87 };
88 #endif//CURVEMESHADAPT_GREGORY_H
int eval(double u, double v, double *retval)
Evaluate at parametric location.
Definition: GregorySurface.cc:268
Point3d m_q0_
input data: position and normal vectors of corner control points
Definition: GregorySurface.h:66
Define the class that implements triangular Gregory patch of order n.
Definition: GregorySurface.h:20
void print_var()
helper
Definition: GregorySurface.cc:14
~GregorySurface()
dtor
Definition: GregorySurface.cc:60
int snap_to_model()
snap the mid-edge control points for the three edges to the closest point on model ...
void Setup()
setup
Definition: GregorySurface.cc:68
void SetupBdryCrv(int i)
setup boundary curves, i=0,1,2
Definition: GregorySurface.cc:125
GregorySurface()
default ctor
Definition: GregorySurface.cc:26
Definition: CrvFace.h:19
int m_order_
stores the order of the Gregory patch
Definition: GregorySurface.h:62
void deriv1(Point2d in_xi, Point3d &out_dxyz_dxi1, Point3d &out_dxyz_dxi2)
Evaluate first derivatives.
Definition: GregorySurface.cc:319
Point3d m_G01_
surface control point pairs
Definition: GregorySurface.h:55