The Edge, Face and Cell modules may be used to perform useful computations concerning finite element edges and faces. Edge tangents and face normals may be computed for lighting and other uses. Intersections and closest point locations with points and straight lines segments may be computed as an aid to interactive picking and probing. The natural coordinates of the point of intersection or closest point location is returned as part of the intersection process. Field data, input at the edge, face or cell nodes, may be interpolated to any point specified as natural coordinates.
*vis_EdgeBegin - create an instance of a Edge object vis_EdgeEnd - destroy an instance of a Edge object vis_EdgeError - return Edge object error flag
vis_EdgeComputeDist - compute equivalent nodal loads vis_EdgeConvertDist - compute distributed tractions vis_EdgeComputeTang - compute tangents to edge vis_EdgeCurv - draw curvilinear polyline vis_EdgeCurvColor - draw curvilinear, color interpolated polyline vis_EdgeInterpolate - interpolate field data vis_EdgeIntersectLine - compute closet point to input line vis_EdgeIntersectPoint - compute closet point to input point vis_EdgeRST - compute natural coordinates of center and nodes vis_EdgeSetObject - set pointers to attribute objects. vis_EdgeSetTopology - set input edge topology vis_EdgeTangRST - compute material tangents at a point. vis_EdgeTrav - traverse and draw a group of element edges.
The Edge module supports a number of functions to support useful computations performed upon edge geometry and data. Use vis_EdgeComputeTang to compute tangent vectors at edge nodes. The vis_EdgeIntersectLine and vis_EdgeIntersectPoint functions are designed to help applications interactively pick and probe edge geometry and data. They return, among other information, the world coordinate and natural coordinate points of intersection. Use vis_EdgeInterpolate to compute field data at nodes to a specified edge natural coordinate location. This function is designed to be used in conjunction with the edge intersection functions.
Use the functions vis_EdgeComputeDist and vis_EdgeConvertDist to compute equivalent nodal loads from distibuted loads and vice versa. The element edges are assumed to be isoparametric. The function vis_EdgeConvertDist is particularly useful for visualizing the distributed reactions from the nodal reactions for higher order element edges.
Figure 6-1 illustrates edges drawn in a finite element model in which internal edges have been clipped to a spherical isosurface. The isosurface in this case has been rendered with fringes and contours of displacement.
*vis_EdgeBegin - create an instance of an Edge object
vis_Edge *vis_EdgeBegin ()
None
Destroy an instance of a Edge object using
void vis_EdgeEnd (vis_Edge *edge)
Return the current value of a Edge object error flag using
Vint vis_EdgeError (vis_Edge *edge)
vis_EdgeComputeDist - compute equivalent nodal loads
void vis_EdgeComputeDist (vis_Edge *edge, Vfloat x[][3], Vint nrws, Vfloat v[], Vfloat f[]) void vis_EdgeComputeDistdv (vis_Edge *edge, Vdouble x[][3], Vint nrws, Vdouble v[], Vdouble f[])
edge Pointer to Edge object. x Array of point locations along polyline defining edge. nrws Number of distributed components per point v Array of distributed loads.
f Array of equivalent nodal loads.
vis_EdgeConvertDist - compute distributed tractions
void vis_EdgeConvertDist (vis_Edge *edge, Vfloat x[][3], Vint nrws, Vfloat f[], Vfloat v[]) void vis_EdgeConvertDistdv (vis_Edge *edge, Vdouble x[][3], Vint nrws, Vdouble f[], Vdouble v[])
edge Pointer to Edge object. x Array of point locations along polyline defining edge. nrws Number of distributed components per point f Array of equivalent nodal loads.
v Array of distributed loads.
vis_EdgeComputeTang - compute tangents to edge
void vis_EdgeComputeTang (vis_Edge *edge, Vfloat x[][3], Vfloat v[][3])
edge Pointer to Edge object. x Array of point locations along polyline defining edge.
v Array of tangent vectors at each point.
vis_EdgeCurv,vis_EdgeCurvColor - draw curvilinear edge
void vis_EdgeCurv (vis_Edge *edge, Vfloat x[][3]) void vis_EdgeCurvColor (vis_Edge *edge, Vfloat x[][3], Vfloat c[][3])
edge Pointer to Edge object. x Array of point locations along polyline defining edge. c Array of RGB color triples at point locations
None
Note that in the interest of efficiency, vis_EdgeCurv does not issue a Color, LineWidth or LineStyle drawing function each time it is called to ensure that the edge to be drawn is rendered in the color, line width and line style in the current VisContext attribute object. Instead, Color, LineWidth and LineStyle drawing functions are issued only if the VisContext attribute object has been changed in any way since a previous call to vis_EdgeCurv. Therefore it is recommended to call vis_VisContextTouch with the VisContext attribute object before drawing a series of edges with vis_EdgeCurv.
vis_EdgeInterpolate - interpolate field data
void vis_EdgeInterpolate (vis_Edge *edge, Vfloat r, Vint nrws, Vfloat d[], Vfloat dr[])
edge Pointer to Edge object. r Natural coordinate to interpolate field data to nrws Row dimension of the field data array d. d Array of field data at node point locations.
dr Vector of interpolated field data at natural coordinate r.
vis_EdgeIntersectLine,vis_EdgeIntersectPoint - compute point of intersection
void vis_EdgeIntersectLine (vis_Edge *edge, Vfloat x[][3], Vfloat xl[2][3], Vfloat *r, Vfloat xr[3], Vfloat xd[3], Vint *status) void vis_EdgeIntersectPoint (vis_Edge *edge, Vfloat x[][3], Vfloat xp[3], Vfloat *r, Vfloat xr[3], Vfloat xd[3], Vint *status)
edge Pointer to Edge object. x Array of point locations along edge. xl End points of intersecting line xp Intersecting point
r Natural coordinate of closest point on edge. xr Coordinates at natural coordinate r. xd Vector from xr to point or closest point on line status Intersection status
The case that the magnitude of xd is zero implies that the intersecting point or line actually intersected the edge.
The status variable is returned as unity if the length of vector xd is less than the DistTol element of the visualization context and zero otherwise. Use vis_EdgeInterpolate to interpolate field data at nodes to the intersection point represented by natural coordinate r.
vis_EdgeRST - compute natural coordinates of center and nodes
void vis_EdgeRST (vis_Edge *edge, Vfloat *rc, Vint *nix, Vfloat r[])
edge Pointer to Edge object.
rc Natural coordinate of center nix Number of nodes r Natural coordinates at nodes.
vis_EdgeSetObject - set pointers to attribute objects
void vis_EdgeSetObject (vis_Edge *edge, Vint objecttype, Vobject *object)
edge Pointer to Edge object. objecttype The name of the object type to be set. =VIS_COLORMAP ColorMap object =VIS_DATAINT DataInt object =VGL_DRAWFUN DrawFun object =VIS_GRIDFUN GridFun object =VIS_IDTRAN_COLOR IdTran color map index object =VIS_IDTRAN_DATAINDEX IdTran data index object =VIS_ISOCLIP IsoClip object =VIS_VISCONTEXT VisContext object object Pointer to the object to be set.
None
vis_EdgeSetTopology - set edge topology
void vis_EdgeSetTopology (vis_Edge *edge, Vint shape, Vint maxi)
edge Pointer to Edge object. shape Edge shape parameter =VIS_SHAPELINE Line maxi Topology parameter
None
vis_EdgeTangRST - compute material tangents at a point.
void vis_EdgeTangRST (vis_Edge *edge, Vfloat x[][3], Vfloat r, Vfloat g[3])
edge Pointer to Edge object. x Array of point locations along edge. r Natural r coordinate of point
g Material tangent.
vis_EdgeTrav - traverse and draw a group of element edges.
void vis_EdgeTrav (vis_Edge *edge, vis_Group *group)
edge Pointer to Edge object. group Pointer to Group object of element edges.
None
The underlying model information is accessed using the GridFun attribute object. Set the GridFun and IdTran objects using vis_EdgeSetObject. The visualization contexts Shrink and ShrinkType can be used to control shrink.
*vis_FaceBegin - create an instance of a Face object vis_FaceEnd - destroy an instance of a Face object vis_FaceError - return Face object error flag
vis_FaceComputeDist - compute equivalent nodal loads vis_FaceConvertDist - compute distributed tractions vis_FaceComputeNorm - compute normals to face vis_FaceCurv - draw curvilinear face vis_FaceCurvColor - draw curvilinear, color interpolated face vis_FaceInterpolate - interpolate field data vis_FaceIntersectLine - compute closet point to input line vis_FaceIntersectPoint - compute closet point to input point vis_FaceRST - compute natural coordinates of center and nodes vis_FaceSetObject - set pointers to attribute objects. vis_FaceSetTopology - set input face topology vis_FaceTangRST - compute material tangents at a point. vis_FaceTrav - traverse and draw a group of element faces.
The Face module supports a number of functions to support useful computations performed upon face geometry and data. Use vis_FaceComputeNorm to compute normal vectors at face nodes. These normals are useful for specialized light source shading effects, etc. The vis_FaceIntersectLine and vis_FaceIntersectPoint functions are designed to help applications interactively pick and probe face geometry and data. They return, among other information, the world coordinate and natural coordinate points of intersection. Use vis_FaceInterpolate to compute field data at nodes to a specified face natural coordinate location. This function is designed to be used in conjunction with the face intersection functions.
Use the functions vis_FaceComputeDist and vis_FaceConvertDist to compute equivalent nodal loads from distibuted loads and vice versa. The element faces are assumed to be isoparametric. The function vis_FaceConvertDist is particularly useful for visualizing the distributed reactions from the nodal reactions for higher order element faces.
Figure 6-2 illustrates both faces and edges drawn in a finite element model. The faces are clipped to one side of an isosurface, the edges to the other. The isosurface is an isosurface of displacement rendered with fringes and contours of stress.
*vis_FaceBegin - create an instance of a Face object
vis_Face *vis_FaceBegin ()
None
Destroy an instance of a Face object using
void vis_FaceEnd (vis_Face *face)
Return the current value of a Face object error flag using
Vint vis_FaceError (vis_Face *face)
vis_FaceComputeDist - compute equivalent nodal loads
void vis_FaceComputeDist (vis_Face *face, Vfloat x[][3], Vint nrws, Vfloat v[], Vfloat f[]) void vis_FaceComputeDistdv (vis_Face *face, Vdouble x[][3], Vint nrws, Vdouble v[], Vdouble f[])
face Pointer to Face object. x Array of point locations along polyline defining face. nrws Number of distributed components per point v Array of distributed loads.
f Array of equivalent nodal loads.
vis_FaceConvertDist - compute distributed tractions
void vis_FaceConvertDist (vis_Face *face, Vfloat x[][3], Vint nrws, Vfloat f[], Vfloat v[]) void vis_FaceConvertDistdv (vis_Face *face, Vdouble x[][3], Vint nrws, Vdouble f[], Vdouble v[])
face Pointer to Face object. x Array of point locations along polyline defining face. nrws Number of distributed components per point f Array of equivalent nodal loads.
v Array of distributed loads.
vis_FaceComputeNorm - compute normals to face
void vis_FaceComputeNorm (vis_Face *face, Vfloat x[][3], Vfloat v[][3])
face Pointer to Face object. x Array of point locations defining face.
v Array of normal vectors at each point.
vis_FaceCurv,vis_FaceCurvColor - draw curvilinear face
void vis_FaceCurv (vis_Face *face, Vfloat x[][3], Vint vflag, Vfloat v[][3]) void vis_FaceCurvColor (vis_Face *face, Vfloat x[][3], Vfloat c[][3], Vint vflag, Vfloat v[][3])
face Pointer to Face object. x Array of point locations defining face. c Array of RGB color triples at point locations. vflag User supplied face normal flag =VIS_NODATA No normals provided =VIS_VERTEXDATA Vertex normals are provided v Array of user supplied normals
None
Note that in the interest of efficiency, vis_FaceCurv does not issue a Color or Trans drawing function each time it is called to ensure that the face to be drawn is rendered in the color and transparency in the current VisContext attribute object. Instead, Color and Trans drawing functions are issued only if the VisContext attribute object has been changed in any way since a previous call to vis_FaceCurv. Therefore it is recommended to call vis_VisContextTouch with the VisContext attribute object before drawing a series of faces with vis_FaceCurv.
vis_FaceInterpolate - interpolate field data
void vis_FaceInterpolate (vis_Face *face, Vfloat r[2], Vint nrws, Vfloat d[], Vfloat dr[])
face Pointer to Face object. r Natural coordinates to interpolate field data to nrws Row dimension of the field data array d. d Array of field data at node point locations.
dr Vector of interpolated field data at natural coordinate r.
vis_FaceIntersectLine,vis_FaceIntersectPoint - compute point of intersection
void vis_FaceIntersectLine (vis_Face *face, Vfloat x[][3], Vfloat xl[2][3], Vfloat r[2], Vfloat xr[3], Vfloat xd[3], Vint *status) void vis_FaceIntersectPoint (vis_Face *face, Vfloat x[][3], Vfloat xp[3], Vfloat r[2], Vfloat xr[3], Vfloat xd[3], Vint *status)
face Pointer to Face object. x Array of point locations along face. xl End points of intersecting line xp Intersecting point
r Natural coordinates of closest point on face. xr Coordinates at natural coordinates r. xd Vector from xr to point or closest point on line status Intersection status
The case that the magnitude of xd is zero implies that the intersecting point or line actually intersected the face.
The status variable is returned as unity if the length of vector xd is less than the DistTol element of the visualization context and zero otherwise. Use vis_FaceInterpolate to interpolate field data at nodes to the intersection point represented by natural coordinates r.
vis_FaceRST - compute natural coordinates of center and nodes
void vis_FaceRST (vis_Face *face, Vfloat rc[2], Vint *nix, Vfloat r[][2])
face Pointer to Face object.
rc Natural coordinates of center nix Number of nodes r Natural coordinates at nodes.
vis_FaceSetObject - set pointers to attribute objects
void vis_FaceSetObject (vis_Face *face, Vint objecttype, Vobject *object)
face Pointer to Face object. objecttype The name of the object type to be set. =VIS_COLORMAP ColorMap object =VIS_DATAINT DataInt object =VGL_DRAWFUN DrawFun object =VIS_GRIDFUN GridFun object =VIS_IDTRAN_COLOR IdTran color map index object =VIS_IDTRAN_DATAINDEX IdTran data index object =VIS_IDTRAN_TRANS IdTran transparency map index object =VIS_ISOCLIP IsoClip object =VIS_TRANSMAP TransMap object =VIS_VISCONTEXT VisContext object object Pointer to the object to be set.
None
vis_FaceSetTopology - set face topology
void vis_FaceSetTopology (vis_Face *face, Vint shape, Vint maxi, Vint maxj)
face Pointer to Face object. shape Face shape parameter =VIS_SHAPETRI Triangle =VIS_SHAPEQUAD Quadrilateral =VIS_SHAPEPOLYGON Polygon maxi Topology parameters maxj
None
vis_FaceTangRST - compute material tangents at a point.
void vis_FaceTangRST (vis_Face *face, Vfloat x[][3], Vfloat r[2], Vfloat g[2][3])
face Pointer to Face object. x Array of point locations along face. r Natural r,s coordinates of point
g Material tangents.
vis_FaceTrav - traverse and draw a group of element faces.
void vis_FaceTrav (vis_Face *face, vis_Group *group, vis_ElemDat *elemdat)
face Pointer to Face object. group Pointer to Group object of element faces. elemdat Pointer to ElemDat object of element face normals.
None
The faces are drawn with the constant color and transparency specified in the visualization context unless IdTran attribute objects are set which contain a color map or transparency map index for each element. All the faces in an element are drawn with this constant color or transparency. If a VIS_IDTRAN_DATAINDEX IdTran attribute object has been set then a DataIndex drawing function is called with the value contained in the IdTran object prior to drawing the faces for an element.
The underlying model information is accessed using the GridFun attribute object. Set the GridFun and IdTran objects using vis_FaceSetObject. The visualization contexts Shrink and ShrinkType can be used to control shrink.
*vis_CellBegin - create an instance of a Cell object vis_CellEnd - destroy an instance of a Cell object vis_CellError - return Cell object error flag
vis_CellComputeDist - compute equivalent nodal loads vis_CellConvertDist - compute distributed tractions vis_CellCurv - draw curvilinear cell vis_CellCurvColor - draw curvilinear, color interpolated cell vis_CellInterpolate - interpolate field data vis_CellIntersectPoint - compute closet point to input point vis_CellRST - compute natural coordinates of center and nodes vis_CellSetElemNode - set input polyhedral cell connectivity vis_CellSetFaceFlag - set cell faces to be drawn vis_CellSetObject - set pointers to attribute objects. vis_CellSetParami - set parameters for cell visualization vis_CellSetTopology - set input cell topology vis_CellTangRST - compute material tangents at a point. vis_CellTrav - traverse and draw a group of elements
The Cell module supports a number of functions to support useful computations performed upon cell geometry and data. The vis_CellIntersectPoint function is designed to help applications interactively pick and probe cell geometry and data. It returns, among other information, the world coordinate and natural coordinate points of intersection. Use vis_CellInterpolate to compute field data at nodes to a specified cell natural coordinate location. This function is designed to be used in conjunction with the cell intersection function. If the current cell topology is polyhedral, ie VIS_SHAPEPOLYHED, the interpolation and intersection computations require that the polyhedral element connectivity be entered using vis_CellSetElemNode.
The Cell module duplicates many features of the Face module. It is intended primarily for performing point intersection and interpolation on solid elements.
Use the functions vis_CellComputeDist and vis_CellConvertDist to compute equivalent nodal loads from distibuted loads and vice versa. The elements are assumed to be isoparametric. The function vis_CellConvertDist is particularly useful for visualizing the distributed reactions from the nodal reactions for higher order elements.
*vis_CellBegin - create an instance of a Cell object
vis_Cell *vis_CellBegin ()
None
Destroy an instance of a Cell object using
void vis_CellEnd (vis_Cell *cell)
Return the current value of a Cell object error flag using
Vint vis_CellError (vis_Cell *cell)
vis_CellComputeDist - compute equivalent nodal loads
void vis_CellComputeDist (vis_Cell *cell, Vfloat x[][3], Vint nrws, Vfloat v[], Vfloat f[]) void vis_CellComputeDistdv (vis_Cell *cell, Vdouble x[][3], Vint nrws, Vdouble v[], Vdouble f[])
cell Pointer to Cell object. x Array of point locations along polyline defining cell. nrws Number of distributed components per point v Array of distributed loads.
f Array of equivalent nodal loads.
vis_CellConvertDist - compute distributed tractions
void vis_CellConvertDist (vis_Cell *cell, Vfloat x[][3], Vint nrws, Vfloat f[], Vfloat v[]) void vis_CellConvertDistdv (vis_Cell *cell, Vdouble x[][3], Vint nrws, Vdouble f[], Vdouble v[])
cell Pointer to Cell object. x Array of point locations along polyline defining cell. nrws Number of distributed components per point f Array of equivalent nodal loads.
v Array of distributed loads.
vis_CellCurv,vis_CellCurvColor - draw curvilinear cell
void vis_CellCurv (vis_Cell *cell, Vfloat x[][3]) void vis_CellCurvColor (vis_Cell *cell, Vfloat x[][3], Vfloat c[][3])
cell Pointer to Cell object. x Array of point locations defining cell. c Array of RGB color triples at point locations.
None
Note that in the interest of efficiency, vis_CellCurv does not issue a Color or Trans drawing function each time it is called to ensure that the cell to be drawn is rendered in the color and transparency in the current VisContext attribute object. Instead, Color and Trans drawing functions are issued only if the VisContext attribute object has been changed in any way since a previous call to vis_CellCurv. Therefore it is recommended to call vis_VisContextTouch with the VisContext attribute object before drawing a series of cells with vis_CellCurv.
vis_CellInterpolate - interpolate field data
void vis_CellInterpolate (vis_Cell *cell, Vfloat r[3], Vint nrws, Vfloat d[], Vfloat dr[])
cell Pointer to Cell object. r Natural coordinates to interpolate field data to nrws Row dimension of the field data array d. d Array of field data at node point locations.
dr Vector of interpolated field data at natural coordinate r.
vis_CellIntersectPoint - compute point of intersection
void vis_CellIntersectPoint (vis_Cell *cell, Vfloat x[][3], Vfloat xp[3], Vfloat r[3], Vfloat xr[3], Vfloat xd[3], Vint *status)
cell Pointer to Cell object. x Array of point locations on cell. xp Intersecting point
r Natural coordinates of closest point within cell. xr Coordinates at natural coordinates r. xd Vector from xr to point or closest point within cell status Intersection status
The case that the magnitude of xd is zero implies that the intersecting point lies within the cell.
The status variable is returned as unity if the length of vector xd is less than the DistTol element of the visualization context and zero otherwise. Use vis_CellInterpolate to interpolate field data at nodes to the intersection point represented by natural coordinates r.
vis_CellRST - compute natural coordinates of center and nodes
void vis_CellRST (vis_Cell *cell, Vfloat rc[3], Vint *nix, Vfloat r[][3])
cell Pointer to Cell object.
rc Natural coordinates of center nix Number of nodes r Natural coordinates at nodes.
vis_CellSetElemNode - set input polyhedral cell connectivity
void vis_CellSetElemNode (vis_Cell *cell, Vint ix[])
cell Pointer to Cell object. ix Element connectivity
None
vis_CellSetFaceFlag - set cell faces to be drawn
void vis_CellSetFaceFlag (vis_Cell *cell, Vint flag)
cell Pointer to Cell object. flag Element face bit flags to indicate faces to be drawn.
None
vis_CellSetObject - set pointers to attribute objects
void vis_CellSetObject (vis_Cell *cell, Vint objecttype, Vobject *object)
cell Pointer to Cell object. objecttype The name of the object type to be set. =VIS_COLORMAP ColorMap object =VIS_DATAINT DataInt object =VGL_DRAWFUN DrawFun object =VIS_GRIDFUN GridFun object =VIS_IDTRAN_COLOR IdTran color map index object =VIS_IDTRAN_DATAINDEX IdTran data index object =VIS_IDTRAN_TRANS IdTran transparency map index object =VIS_ISOCLIP IsoClip object =VIS_TRANSMAP TransMap object =VIS_VISCONTEXT VisContext object object Pointer to the object to be set.
None
vis_CellSetParami - set parameters for cell visualization
void vis_CellSetParami (vis_Cell *cell, Vint ptype, Vint iparam)
mark Pointer to Cell object. ptype Parameter type to set. =CELL_USERELEMNODE Enable using polyhedral connectivity iparam Specifies the integer value that ptype will be set to.
None
vis_CellSetTopology - set cell topology
void vis_CellSetTopology (vis_Cell *cell, Vint shape, Vint maxi, Vint maxj, Vint maxk)
cell Pointer to Cell object. shape Cell shape parameter =VIS_SHAPETET Tetrahedron =VIS_SHAPEPYR Pyramid =VIS_SHAPEWED Wedge =VIS_SHAPEHEX Hexahedron =VIS_SHAPEPOLYHED Polyhedron maxi Topology parameters maxj maxk
None
vis_CellTangRST - compute material tangents at a point.
void vis_CellTangRST (vis_Cell *cell, Vfloat x[][3], Vfloat r[3], Vfloat g[3][3]) void vis_CellTangRSTdv (vis_Cell *cell, Vdouble x[][3], Vdouble r[3], Vdouble g[3][3])
cell Pointer to Cell object. x Array of point locations on cell. r Natural r,s,t coordinates of point
g Material tangents.
vis_CellTrav - traverse and draw a group of elements
void vis_CellTrav (vis_Cell *cell, vis_Group *group)
cell Pointer to Cell object. group Pointer to Group object of elements, element faces or edges If NULL, then all elements are assumed.
None
The element faces are drawn with the constant color and transparency specified in the visualization context unless IdTran attribute objects are set which contain a color map or transparency map index for each element. All the faces in an element are drawn with this constant color or transparency. If a VIS_IDTRAN_DATAINDEX IdTran attribute object has been set then a DataIndex drawing function is called with the value contained in the IdTran object prior to drawing the faces for an element.
The underlying model information is accessed using the GridFun attribute object. Set the GridFun and IdTran objects using vis_CellSetObject. The visualization contexts Shrink and ShrinkType can be used to control shrink.