CrvFace.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 MESHADAPT_CURVEFACE_H
11 #define MESHADAPT_CURVEFACE_H
12 
13 #include "CMAFwd.h"
14 #include <iostream>
15 #include "CrvEnt.h"
16 #include "HausdorffDistance.h"
17 #include "pumi_mesh.h"
18 
19 class EdgeCtrlPt {
20  public:
21  int edge_id;
22  Point3d ctrl_pt1;
23  Point3d ctrl_pt2;
24 };
25 
32 class CrvFace : public CrvEnt {
33  public:
36  CrvFace(pMeshEnt in_face);
37 
40  CrvFace(VtxPtrVec in_vert_vec);
41 
44  virtual ~CrvFace();
45 
46  /* common interface functions */
47 
50  int display(std::ostream& file, int in_sample_pts);
51 
54  int v_ent_type() const;
55 
58  double interp_error();
59 
62  void dxi_deta(const Point2d in_eta, Mat2x2 & out_dxi_deta);
63 
64 
67  void eval_deriv1_by_eta(const Point2d in_eta,
68  Point3d & out_dxyz_deta1,
69  Point3d & out_dxyz_deta2);
70 
71  /* pure virtual members */
72 
75  virtual int eval(double in_u, double in_v, double * xyz) = 0;
76 
77  virtual int eval_deriv1(double in_xi_1,
78  double in_xi_2,
79  Point3d & dxyz_dxi1,
80  Point3d & dxyz_dxi2) = 0;
81  protected:
82  virtual void v_eval_by_xi (Point3d in, Point3d & out);
83 
86  virtual void v_eval_by_eta(Point3d in, Point3d & out);
87 
90  virtual void v_eval_by_coll_eta(Point3d in, Point3d & out);
91 
92  virtual void v_diff_by_xi(Point3d in, Mat3x3 & out);
93  virtual void v_diff_by_xi(Point3d in, int j, Point3d & out);
94  virtual void v_diff_by_eta(Point3d in, Mat3x3 & out);
95  virtual void v_diff_by_eta(Point3d in, int j, Point3d & out);
97  virtual int v_get_exp_dim() {
98  return 2;
99  }
100 
106  CrvEdgePtrVec m_crvedges;
107 
110  pTriGeom m_geom;
111 };
112 #endif//MESHADAPT_CURVEFACE_H
virtual void v_eval_by_eta(Point3d in, Point3d &out)
evaluate mapping given input in Standard Cartesian Coords
Definition: CrvFace.cc:140
void eval_deriv1_by_eta(const Point2d in_eta, Point3d &out_dxyz_deta1, Point3d &out_dxyz_deta2)
evaluate Jacobian of the mapping with respect to
Definition: CrvFace.cc:219
virtual void v_eval_by_coll_eta(Point3d in, Point3d &out)
evaluate mapping given input in Local tensor/collapsed Coords
Definition: CrvFace.cc:152
CrvFace(pMeshEnt in_face)
Definition: CrvFace.cc:20
CrvEdgePtrVec m_crvedges
a vector of edges bounding this face, ordered by the vertices order defined as: edge 0 -> v0...
Definition: CrvFace.h:106
virtual int v_get_exp_dim()
expansion dimension for face is set to be 2
Definition: CrvFace.h:97
virtual int eval(double in_u, double in_v, double *xyz)=0
evaluate w.r.t. the barycentric/area coordinates
int display(std::ostream &file, int in_sample_pts)
Function to display the curve edge by sampling edge points.
Definition: CrvFace.cc:43
double interp_error()
measuring the approximation error of the mesh face to the actual geometric model face ...
Definition: CrvFace.cc:93
abstract class representing curved mesh face
Definition: CrvFace.h:32
Definition: CrvFace.h:19
int v_ent_type() const
returns entity type representing a mesh face
Definition: CrvFace.cc:88
pTriGeom m_geom
pointer to geometry shape object
Definition: CrvFace.h:110
virtual ~CrvFace()
dtor
Definition: CrvFace.cc:39
base class for curved mesh entity
Definition: CrvEnt.h:21
void dxi_deta(const Point2d in_eta, Mat2x2 &out_dxi_deta)
evaluate first derivative of coord transformation
Definition: CrvFace.cc:119