base class for curved edge curve edge provides basic evaluation based on barycentric coordinate system. It also supports specialized coordinate systems at the solver level such as the 'Standard Cartesian' and 'Tensor/Collapsed Cartesian' coord sys used in Nektar++ More...
#include <CrvEdge.h>
Public Member Functions | |
CrvEdge (pMeshEdge pin_edge) | |
CrvEdge (VtxPtrVec in_vert_vec) | |
virtual | ~CrvEdge () |
int | display (std::ostream &file, int in_sample_pts) |
Function to display the curve edge by sampling edge points. | |
virtual int | v_ent_type () const |
returns entity type representing an edge | |
void | eval_deriv1_fd (const Point1d in_param, Point3d &dxyz_dxi, double step=1.0e-3) |
Evaluate first derivative numerically by finite difference. More... | |
double | arc_length_between (double a, double b) |
Evaluate arc length between parameter range [a, b]. More... | |
double | arc_length () |
Evaluate total arc length. More... | |
void | get_interp_point_xyz (int index, Point3d &out, int mode=0) |
Evaluate interpolation point position by B-C points in the physical space. | |
double | interp_error () |
Evaluate geometric interpolation error. | |
void | get_edge_ctrl_pt (int index, Point3d &out_pt) |
Get the i'th control point of the curved edge. | |
int | get_edge_node_coords (int in_node_index, double *xyz) |
Get high order nodal coordinates associated with the curved edge. | |
virtual int | v_data_size () const =0 |
Get the size of the data attached to the edge entity. | |
virtual std::string | v_tag_name () const =0 |
Get the tag name of the attached data. | |
double | dxi_deta (double eta) |
derivative of with respect to | |
int | get_vertex_coords (double *vxyz0, double *vxyz1) |
get coordinates of the end vertices | |
int | get_orient () |
edge orientation with respect to the input ordered vertices 0 – in the same direction 1 – opposite direction | |
int | get_geom_order () |
return the polynomial order of the geometric shape functions | |
int | LinearMidPt (double *dout_coords) |
get the mid-point coordinates w.r.t a straight edge | |
int | GetNumNode () |
get the total number of high-order nodes | |
int | DelNode (int n) |
delete the n'th edge node | |
pumi::pNode | GetNode (int n) |
get the n'th edge node | |
void | get_mid_edge_ctrl_pt (double *out_xyz) |
get the mid-edge Bezier control point More... | |
void | eval_on_mesh_geom (double in_t, Point3d &out_xyz) |
evaluate based on mesh geometry More... | |
int | update_or_create_node (double *xyz, double *param) |
update or create an edge node based on input coords/params | |
void | save_ctrl_pt_data () |
save edge ctrl points data to mesh database | |
![]() | |
CrvEnt (pMeshEnt in_mesh_ent) | |
ctor More... | |
CrvEnt (VtxPtrVec in_vert_vec) | |
ctor More... | |
virtual | ~CrvEnt () |
dtor | |
void | get_xi_by_eta (Point3d in_eta, Point3d &out_xi) |
evaluate barycentric coordinates given the standard coordinates More... | |
void | get_eta_by_ceta (Point3d in_ceta, Point3d &out_eta) |
evaluate standard coordinates given the collapsed/tensor coordinates More... | |
void | get_xi_by_ceta (Point3d in_ceta, Point3d &out_xi) |
evaluate barycentric coordinates given the collapsed/tensor coordinates More... | |
void | eval_by_xi (Point3d in, Point3d &out) |
evaluate xyz by barycentric coordinates More... | |
void | eval_by_eta (Point3d in, Point3d &out) |
evaluate xyz by standard cartesian coordinates More... | |
void | eval_by_coll_eta (Point3d in, Point3d &out) |
evaluate xyz by collapsed/tensor coordinates More... | |
void | diff_by_xi (Point3d in, Mat3x3 &out) |
evaluate dxyz/dxi, return all derivs in a matrix form More... | |
void | diff_by_xi (Point3d in, int j, Point3d &out) |
evaluate dxyz/dxi_j, return derivs in one direction More... | |
void | diff_by_eta (Point3d in, Mat3x3 &out) |
evaluate derivatives w.r.t. standard cartesian coordinates More... | |
void | diff_by_eta (Point3d in, int j, Point3d &out) |
evaluate derivatives w.r.t. standard cartesian coordinates in one direction More... | |
void | set_id (int i) |
sets entity id | |
int | get_id () |
gets entity id | |
int | get_exp_dim () |
return dimension in xi or eta | |
int | get_coord_dim () |
return coordinate dimension in xyz | |
pMeshEnt | get_vertex (int i) |
return the ith bounding vertex of the mesh entity More... | |
int | ent_type () |
return the topological entity type. 0 – vertex, 1 – edge, 2 – face, 3 – region | |
int | data_size () |
return the number of doubles associated with the current mesh entity | |
std::string | tag_name () |
return the name string of the data | |
int | save_nodal_data_to_mesh (double *in_data) |
save the data to the underlying mesh database | |
int | load_nodal_data_from_mesh (double **out_data) |
fetch data from mesh database | |
bool | has_data () |
return whether the entity has high-order shape data | |
bool | edge_on_model_bdry (pMeshEnt vtx0, pMeshEnt vtx1) |
return whether the mesh edge is classified on model edge or face | |
bool | face_on_model_bdry (pMeshEnt vtx0, pMeshEnt vtx1, pMeshEnt vtx2) |
return whether the mesh face is classified on model face | |
Protected Member Functions | |
virtual void | v_eval_by_xi (Point3d in, Point3d &out) |
common implementation for all crv edge classes | |
virtual void | v_eval_by_eta (Point3d in, Point3d &out) |
common implementation for all crv edges w.r.t. standard cartesian coords | |
virtual void | v_eval_by_coll_eta (Point3d in, Point3d &out) |
common implementation for all crv edges w.r.t. standard cartesian coords | |
virtual void | v_diff_by_xi (Point3d in, Mat3x3 &out) |
derivatives w.r.t. barycentric coords | |
virtual void | v_diff_by_xi (Point3d in, int j, Point3d &out) |
derivatives w.r.t. barycentric coords in given direction | |
virtual void | v_diff_by_eta (Point3d in, Mat3x3 &out) |
derivatives w.r.t. standard cartesian coords | |
virtual void | v_diff_by_eta (Point3d in, int j, Point3d &out) |
common impl. w.r.t. standard cartesian coords in given direction | |
virtual int | v_get_exp_dim () |
expansion dim for edge is set to be 1 | |
pCurveGeom | get_geom_shape () |
return the geom curve object | |
void | set_geom_shape (pCurveGeom &in_geom) |
set the geom curve object | |
![]() | |
virtual int | v_get_coord_dim () |
all curved entities are assumed to be embeded in 3D space | |
pMeshEnt | get_mesh_ent () |
get the mesh entity | |
void | set_mesh_ent (pMeshEnt in_ent) |
set the mesh entity | |
Protected Attributes | |
pCurveGeom | m_geom_shape |
geom shape pointer | |
int | m_orient |
![]() | |
VtxPtrVec | m_vert_vec |
ordered set of mesh vertices | |
pMeshEnt | m_mesh_ent |
topological mesh entity | |
std::vector< Point3d > | m_ctrl_pt_vec |
container used to store the control point values | |
Private Member Functions | |
void | get_interp_point_bisect (int index, Point3d &out) |
Evaluate interpolation point position by Babuska-Chen nodal set through recursive bisection. | |
void | get_interp_point_newton_iter (int index, Point3d &out) |
Evaluate interpolation point position by Babuska-Chen nodal set through Newton root finding method. | |
base class for curved edge curve edge provides basic evaluation based on barycentric coordinate system. It also supports specialized coordinate systems at the solver level such as the 'Standard Cartesian' and 'Tensor/Collapsed Cartesian' coord sys used in Nektar++
CrvEdge::CrvEdge | ( | pMeshEdge | pin_edge | ) |
ctor 1 – create curved edge object based on input mesh edge. The direction of the curved edge is set according to the direction of the native mesh edge
CrvEdge::CrvEdge | ( | VtxPtrVec | in_vert_vec | ) |
ctor 2 – create curved edge object based on the bounding vertices of the native mesh edge
|
virtual |
dtor
double CrvEdge::arc_length | ( | ) |
Evaluate total arc length.
double CrvEdge::arc_length_between | ( | double | a, |
double | b | ||
) |
Evaluate arc length between parameter range [a, b].
a | starting parametric value |
b | ending parametric value |
void CrvEdge::eval_deriv1_fd | ( | const Point1d | in_param, |
Point3d & | dxyz_dxi, | ||
double | step = 1.0e-3 |
||
) |
Evaluate first derivative numerically by finite difference.
void CrvEdge::eval_on_mesh_geom | ( | double | in_t, |
Point3d & | out | ||
) |
evaluate based on mesh geometry
makes use of the underlying mesh geometry and the second order Bezier curve form to evaluate parameter mapping. Note that in the input parameter goes from 0.0 to 1.0, the same as Bezier curve, the opposite as CrvEdge::eval functions
void CrvEdge::get_mid_edge_ctrl_pt | ( | double * | bxyz | ) |
get the mid-edge Bezier control point
The output mid-edge control point is calculated only based on whether the edge one has pre-existing mid-edge interpolation node. If it has one, the interpolation node gets converted to a bezier control point. If it has none, the edge is treated as straight, and the bezier control point is the linear mid-edge point.
|
protected |
indicate edge orientation w.r.t. its two end vertices if E_vertex(edge, 0) == vert_vec[0]; then m_orient = 0; else m_orient = 1;