2. Grid Topology and Geometry - Connect, GridFun

VisTools supports the management of grid topology and geometry for unstructured (finite element) grids. The goal is to provide a uniform method for querying for grid connectivity, adjacency and geometry information regardless of the details of the underlying grid topology. The Connect module has been constructed to manage finite element grids in this manner. In addition, this module supports a variety of identifier associations for nodes (vertices) and elements (cells) which are commonly used in the application areas of finite element grid technology. These associations include element type, property identifier, iblanking, etc.

2.1. Finite Element (Unstructured) Grids - Connect

The Connect module is designed to manage finite element connectivities and generate information which is dependent upon the adjacency properties of the finite element mesh. For example, the Connect module can provide sets of the external faces and unique edges of any element subset. Element adjacencies may be be queried across element faces, edges or nodes.

Element adjacency properties are not immediately accessible from standard finite element node connectivity lists. As an example, traditionally, it has been a long standing problem to efficiently compute the external faces of a finite element grid for rendering, contouring, etc. In addition, modern visualization techniques require other adjacency related queries to be answered efficiently to propagate derived features such as streamlines or cutting planes throughout a finite element grid. The Connect module generates and maintains a data structure, termed the connection “kernel”, which is approximately the same size as the element node connectivity list. This single data structure provides efficient query of all the above mentioned adjacency related data. The Connect object can manage the adjacency kernel information in one of two ways, 1) statically, optimized for unchanging element connections such as in post-processing and 2) dynamically, optimized for a frequently changing element connections such as can occur in pre-processing.

The Connect module may optionally allocate and manage the basic element node connectivities or access this information from host application data structures via a GridFun object. This feature gives the software designer the option of retaining element node connectivity data structures within the host application or yielding the management of this data to a Connect object. The functions associated with a Connect object are the following.

Instance a Connect object using vis_ConnectBegin(). Once a Connect object is instanced, the user may specify the precision used to maintain node coordinates using vis_ConnectPre(). By default, node coordinates are held in single precision. The number of nodes and elements to be represented by the object is defined using vis_ConnectDef(). At this stage, only a very small amount of memory has been allocated by the Connect object for internal pointer and attribute variables. If the exact number of nodes and/or elements is not known, then make initial estimates (0 is allowed) and call vis_ConnectDef() with these estimates. The Connect module will adjust memory as required. Use vis_ConnectEnd() to release all memory associated with a Connect object.

The primary data managed by the Connect object is element topology and connectivity and node coordinates. The Connect object can obtain access to this data in two ways: (1) implement a set of GridFun element connectivity and node coordinate query functions and set this as an attribute object using vis_ConnectSetObject() or (2) load element topology, connectivity and node coordinates directly into the Connect object using vis_ConnectSetTopology(), vis_ConnectSetElemNode() and vis_ConnectSetCoords() respectively. The first option requires that the host application “own” the element connectivity and geometry, the Connect object allocates no memory for it. All element connectivity information required by the Connect object is obtained from the host application via the GridFun query functions. The second option requires that the host application load element topology, connectivity and node coordinates into the Connect object. Once Connect has access to the primary element and node information the functions vis_ConnectTopology(), vis_ConnectElemNode() and vis_ConnectCoords() which query element connectivity and node coordinate information may be called.

2.2. Node and Element Editing and Element Adjacency Query

If the primary element and node information has been loaded directly into the Connect object (rather than using a GridFun), there are two ways to ask Connect to manage the data depending upon the volatility of the data. The internal data structures used are optimized for these two modes. If the primary element and node information is unchanging, as in a post-processing application, this is termed the static mode, if the primary element and node information is volatile, as in a pre-processing application, this is termed the “dynamic” mode. By default the Connect object is in the static mode. Use the function vis_ConnectMode() to change from static to dynamic mode or vice versa. If the primary element and node information is accessed using a GridFun only the static mode is supported.

In the dynamic mode, the Connect object supports element and node editing using the functions vis_ConnectDelElem(), vis_ConnectIsElem(), vis_ConnectGenElem() and corresponding functions for nodes, vis_ConnectDelNode(), vis_ConnectIsNode(), vis_ConnectGenNode(). Deleting an element or node sets the VIS_FEATYPE association to VIS_ELEM_UNDEFINED or VIS_NODE_UNDEFINED respectively, and releases internal memory for use to define other elements or nodes. By default an element is undefined until it is entered using vis_ConnectSetTopology() or queried using vis_ConnectGenElem(). A node is undefined until it is entered explicitly using vis_ConnectSetCoords() or vis_ConnectSetCoordsdv(), referenced in the element connectivity list of an element using vis_ConnectSetElemNode() or queried using vis_ConnectGenNode(). The functions vis_ConnectIsElem() and vis_ConnectIsNode() return a flag indicating whether an element or node has been defined. The functions vis_ConnectGenElem() and vis_ConnectGenNode() return an available undefined element or node index and in the process change its status to a defined element or node. Elements and nodes may be redefined by calling vis_ConnectSetTopology() and vis_ConnectSetCoords() or vis_ConnectSetCoordsdv() respectively.

In addition to the primary element and node information, the Connect object can derive element adjacency information from the primary element connectivity. Providing element adjacency information requires additional memory and processing effort. The data structure used to provide the adjacency information is termed the “kernel”. In the static mode, the kernel must be generated explicitly using vis_ConnectKernel(). This function allocates a quantity of memory approximately equal to the number of entries in the element node connection list. This function also is the most compute intensive Connect method. The algorithm to create the connection kernel has the quality of being linear with respect to the number of elements. In the dynamic mode, the kernel is maintained implicitly as each element or node is generated and/or deleted. The function call to vis_ConnectKernel() is not required.

Once the kernel is created, adjacency requests may be made. Use vis_ConnectElemAdj() to return a list of elements adjacent to a given element through a face, edge or node. Use vis_ConnectElemAdjEnt() to return a list of elements and their associated edges or faces adjacent to a given element through a face, edge or node. Use vis_ConnectNodeAdj() to return a list of elements adjacent to a given set of nodes. Sets of element edges and faces with important properties (external faces, free edges or unique edges) may be returned for any element subset encoded in a Group object using vis_ConnectEdgeGroup() and vis_ConnectFaceGroup() respectively.

2.3. Node and Element Associations

Nodes, elements and element edges and faces may be assigned integer values called “associations”. There are a number of types of associations which may be assigned to nodes and elements. For example, a user identifier may be assigned to each node and element, a property identifier may be assigned to each element, etc. Any association type may be assigned to either nodes or elements or both, however some associations are specifically designed for use by either nodes, elements, element edges or element faces. The full set of association types are the following:

  • VIS_COLORID, Color identifier

  • VIS_CMATID, Material coordinate system identifier

  • VIS_CMATFLAG, Material coordinate system flag

  • VIS_CSYSID, Solution coordinate system identifier

  • VIS_ENDACON, Element end A connection

  • VIS_ENDBCON, Element end B connection

  • VIS_ENDATOPO, Element end A topology

  • VIS_ENDBTOPO, Element end B topology

  • VIS_EXTNAMEA, First four letters of element external name

  • VIS_EXTNAMEB, Second four letters of element external name

  • VIS_FEATECH, Element technology

  • VIS_FEATYPE, Element generic type

  • VIS_FEASPEC, Element specific type

  • VIS_FEATWOD, Element two dimension type

  • VIS_GEOBODY, Geometry body identifier

  • VIS_GEOEDGE, Geometry edge identifier

  • VIS_GEOFACE, Geometry face identifier

  • VIS_GEOVERT, Geometry vertex identifier

  • VIS_IBLANK, Iblank code

  • VIS_MATLID, Material identifier

  • VIS_MISCID, Miscellaneous identifier

  • VIS_MISCID0, Miscellaneous identifier 0, same as VIS_MISCID

  • VIS_MISCID1, Miscellaneous identifier 1

  • VIS_MISCID2, Miscellaneous identifier 2

  • VIS_MISCID3, Miscellaneous identifier 3

  • VIS_MISCID4, Miscellaneous identifier 4

  • VIS_MISCID5, Miscellaneous identifier 5

  • VIS_MISCID6, Miscellaneous identifier 6

  • VIS_MISCID7, Miscellaneous identifier 7

  • VIS_MISCID8, Miscellaneous identifier 8

  • VIS_ORIENTINDEX, Orientation node index

  • VIS_PARTID, Part identifier

  • VIS_PINFLAGS, Element pin flags A bit is set to release a degree of freedom associated with the end points of beam elements. The first 6 bits reference the translations and rotations at the first endpoint, the second 6 bits reference the second endpoint.

  • VIS_PROPID, Property identifier

  • VIS_SEID, Superelement identifier

  • VIS_SPCFLAGS, Node single point constraint flags A bit is set to permanently constrain a degree of freedom at a node.

  • VIS_SYMMID, Symmetry group identifier

  • VIS_DOMAIN, Domain decomposition regions

  • VIS_USERID, User identifier

The miscellaneous identifiers are for generic use. It is always the case that VIS_MISCID0 = VIS_MISCID+0, VIS_MISCID1 = VIS_MISCID+1, VIS_MISCID2 = VIS_MISCID+2, etc. Typically a user will specify a single association of a particular type to a node or element. This single association is set at nodes and elements using vis_ConnectSetNodeAssoc() and vis_ConnectSetElemAssoc() respectively. It may be queried using vis_ConnectNodeAssoc() and vis_ConnectElemAssoc(). If a particular association has not been set, its value will be returned as a 0 when it is queried.

Associations may be set for individual element edges and faces. This type of association is termed an element entity association. This type of association is set uing vis_ConnectSetElemEntAssoc() and is queried using vis_ConnectElemEntAssoc(). Element edge and face associations are most often used to associate these features with underlying geometry edge and face identifiers.

It is possible to specify multiple associations of a particular type. In the case of node associations, multiple node associations are managed using vis_ConnectAddNodeAssoc(), vis_ConnectDelNodeAssoc(), vis_ConnectNumNodeAssoc() and vis_ConnectAllNodeAssoc(). The multiple associations for The function vis_ConnectAddNodeAssoc() will specify associations at a node in addition to the single association (which may have a value of 0) always present at a node. Any additional node associations may be deleted using vis_ConnectDelNodeAssoc(). This function only affects node associations added using vis_ConnectAddNodeAssoc(). The total number of associations of a type specified at a node may be queried using vis_ConnectNumNodeAssoc(). The number returned is 1 plus the number of associations added using vis_ConnectAddNodeAssoc(). All associations defined at a node may be queried using vis_ConnectAllNodeAssoc(). The function returns the single association set using vis_ConnectSetNodeAssoc() and all additional associations specified using vis_ConnectAddNodeAssoc().

The VIS_PARTID association is designed to be used with the naming capability of the Connect object. The function vis_ConnectSetPartName() can be used to associate a character string with each VIS_PARTID value. Use vis_ConnectPartName() to retrieve the name character string given the VIS_PARTID value. It is also possible to specify the block IJK structure of a part. Use the function vis_ConnectSetPartIJK() to associate a block IJK structure with each VIS_PARTID value. Use vis_ConnectPartIJK() to retrieve the IJK block structure given the VIS_PARTID value. If a part has a block IJK structure the nodes and elements of the block will be sequentially ordered in the I direction first, followed by the J and K directions respectively.

2.4. Element, Element Face, Element Edge and Node Groups

The Connect object has four functions to generate Group objects of elements, element faces, element edges and nodes. These four types of Group objects are generated by the functions vis_ConnectElemGroup(), vis_ConnectFaceGroup(), vis_ConnectEdgeGroup() and vis_ConnectNodeGroup() respectively. Examples of generated groups are: element groups of intersecting elements, element face groups of external faces, element edge groups of feature edges and node groups of nodes connected to the corner nodes of higher order elements. Each function has an optional input source Group to limit the operation to the entities in the source Group.

A particularly useful set of element face and element edge operations prepare sets of element faces and element edges for graphical display purposes. These operations access a specified element association type which is used to partition the full set of elements.

  • vis_ConnectFaceGroup(), Use the CONNECT_ASSOCDIFF operation to generate the element faces which lie on elements with an adjacent element across the face with differing association value. This option is typically used with association types VIS_MATLID, VIS_PROPID or VIS_PARTID to generate the faces which bound elements in each material, property or part region. By default the free faces of reach region are not included in the generated Group. Enable the inclusion of free faces using the function vis_ConnectSetGroupParami() with type CONNECT_ASSOCFREE turned on.

  • vis_ConnectEdgeGroup(), Use the CONNECT_UNIQUEASSOCDIFF and CONNECT_FEATUREASSOCDIFF operations with an input element face group generated as mentioned above to generate the unique edges or feature edges of the element faces flagged in the source group. These groups are useful for graphical display of the element mesh edges or element mesh feature edges of the bounding element faces. Use the CONNECT_UNIQUEASSOC operation with an element source group to generate all the unique edges of the sets of elements which share edge association value. This group is useful for graphical display of all mesh edges of each material, property or part region.

2.5. Element Face Normals and Edge Tangents

The Connect object contains functions to refine the geometry of elements by specifying optional element face normals and element edge tangents. Use vis_ConnectSetElemNorm() to set element face normals and vis_ConnectSetElemTang() to set element edge tangents. The functions vis_ConnectElemNorm() and vis_ConnectElemTang() may be used to query element face normals and tangents respectively. If the face normals or edge tangents have not been set using vis_ConnectSetElemNorm() or vis_ConnectSetElemTang() then the normals and tangents are computed using the element node coordinate geomtery. The functions vis_ConnectIsElemNorm() and vis_ConnectIsElemTang() may be used to query whether the face normals or edge tangents have been set.

2.6. Geometric Tesselation

The vis_ConnectTess() function can be used to tesselate a collection of lines and arcs. This operation involves computing the intersections of lines and arcs and breaking the input collection at these intersection points. Lines and arcs are orientation-dependent. A segment connecting nodes 1 and 2 is considered different from a segment connecting nodes 2 and 1.

Arcs are specified as 3-noded lines. Rather than computing a parabola through these 3 points as the line’s topology indicates, 3-noded lines are instead interpreted as arcs for the purpose of computing the intersection with other arcs or straight segments.

Prior to the computation of the intersections, two major steps are internally performed: all nodes whose relative distance is within the tolerance set with the floating-point parameter CONNECT_TOLERANCE are merged together. In addition, all arcs are decomposed into straight lines whose length is given by the floating-point parameter CONNECT_SIZE.

As intersections are computed and lines split they inherit all element associations from the original element.

2.7. Parallel Functions

2.8. Attribute Objects

A Connect object uses a GridFun object to optionally access finite element data from the host application.

The Connect object calls the following grid functions set in the GridFun attribute object.

Coords
Coordsdv
ElemNode
ElemAssoc
MaxElemNode
NumElemNode
NodeAssoc
Number
Topology

2.9. Function Descriptions

The currently available Connect functions are described in detail in this section.

vis_Connect *vis_ConnectBegin(void)

create an instance of a Connect object

Create an instance of a Connect object. Memory is allocated for the object private data and the pointer to the data is returned. By default all attribute object pointers are NULL.

Destroy an instance of a Connect object using

void vis_ConnectEnd (vis_Connect *connect)

Return the current value of a Connect object error flag using

Vint vis_ConnectError (vis_Connect *connect)

Make a copy of a Connect object. The private data from the fromconnect object is copied to the Connect object. Any previous private data in connect is lost.

void vis_ConnectCopy (vis_Connect *connect,
                      vis_Connect *fromconnect)

Returns:

The function returns a pointer to the newly created Connect object. If the object creation fails, NULL is returned.

void vis_ConnectEnd(vis_Connect *p)

destroy an instance of a Connect object

See vis_ConnectBegin()

Vint vis_ConnectError(vis_Connect *p)

return the current value of a Connect object error flag

See vis_ConnectBegin()

void vis_ConnectPre(vis_Connect *p, Vint pre)

specify precision of node coordinates

Specify the precision used to maintain node coordinates. All previously defined nodes and elements are cleared by this function. The function should be called before vis_ConnectDef(). By default, node coordinates are held in single precision.

Errors

VIS_ERROR_ENUM is generated if an improper pre is specified.

Parameters:
  • p – Pointer to Connect object.

  • pre – Precision of node coordinates

void vis_ConnectDef(vis_Connect *p, Vint nnode, Vint nelem)

define number of nodes and elements

Specify the number of nodes and elements to be managed in the Connect object. If the exact number of nodes and/or elements is not known, then make initial estimates. The Connect object will adjust memory as required. If the exact number of nodes and elements is entered, then memory adjustment overhead will be a minimum. This function must be called before any node or element data may be set in the object. All previously defined nodes and elements are cleared by this function.

Inquire of defined nnode or nelem as output arguments using

void vis_ConnectInq (const vis_Connect *connect,
                     Vint *numnode,
                     Vint *numelem)

Errors

  • VIS_ERROR_VALUE is generated if either nnode or nelem is less than zero.

Parameters:
  • p – Pointer to Connect object.

  • nnode – Number of nodes

  • nelem – Number of elements

void vis_ConnectInq(const vis_Connect *p, Vint *nnode, Vint *nelem)

inquire of defined numnode or numelem as output arguments

See vis_ConnectDef()

void vis_ConnectMode(vis_Connect *p, Vint mode)

set static or dynamic mode

Set the current operating mode. If type is set to CONNECT_DYNAMIC, all current elements and nodes are converted to the dynamic mode and the element kernel is made current. If type is set to CONNECT_STATIC, all current elements and nodes are converted to the static mode and the element kernel is destroyed. Call the function vis_ConnectKernel() to create the adjacency kernel in this case. By default the operating mode is CONNECT_STATIC.

Errors

  • VIS_ERROR_ENUM is generated if an improper operation type is specified.

  • VIS_ERROR_OPERATION is generated if type is set to CONNECT_DYNAMIC and a GridFun has been set using vis_ConnectSetObject().

Parameters:
  • p – Pointer to Connect object.

  • mode – Set static or dynamic mode

    x=CONNECT_DYNAMIC        Dynamic mode
     =CONNECT_STATIC         Static mode
    

void vis_ConnectSetObject(vis_Connect *p, Vint objecttype, Vobject *object)

set pointers to attribute objects

Set a pointer to an attribute object. If a GridFun attribute object is set then all finite element topology, connectivity, node coordinate and node and element association queries will be made through the GridFun interface. To deactivate the GridFun interface, set a NULL GridFun object pointer. While a GridFun object is active do not attempt to “Set” any of the associated node or element data.

If a State attribute object is set then the node coordinates are assumed to be defined as a vector quantity in the State object. All node coordinate queries performed using vis_ConnectCoords() will access the State attribute object. In the case where both GridFun and State attribute objects have been set, the State object is used.

Get object as an output argument using

void vis_ConnectGetObject (vis_Connect *connect,
                           Vint objecttype,
                           Vobject **object)

Errors

VIS_ERROR_OBJECTTYPE is generated if an improper objecttype is specified.

Parameters:
  • p – Pointer to Connect object.

  • objecttype – The name of the object type to be set.

    x=VIS_GRIDFUN            GridFun object
     =VIS_STATE              State object
    

  • object – Pointer to the object to be set.

void vis_ConnectGetObject(vis_Connect *p, Vint objecttype, Vobject **object)

get pointers to attribute objects

See vis_ConnectSetObject()

void vis_ConnectSetParamf(vis_Connect *p, Vint ptype, Vfloat param)

set floating point parameters

Set floating point parameters

The parameter CONNECT_TOLERANCE is used to control the distance tolerance for merging coincident nodes using vis_ConnectMerge(). It is also used in vis_ConnectTess() for merging nodes and closely spaced lines. The default value is .0001 .

Use parameter CONNECT_SIZE to set the arc length used to tesselate arcs with the function vis_ConnectTess(). The default value is 1.

Errors

VIS_ERROR_ENUM is generated if an improper type ptype is specified.

Parameters:
  • p – Pointer to Connect object.

  • ptype – Type of parameter to set

    x=CONNECT_TOLERANCE      Node merge tolerance
     =CONNECT_SIZE           Arc length
    

  • param – Specifies the value that ptype will be set to.

void vis_ConnectSetParami(vis_Connect *p, Vint ptype, Vint iparam)

set integer parameters

Set integer parameters

The parameter CONNECT_EXACTADJACENCY is used to control algorithm used for element adjacency calculations, in particular the element adjacency calculations across element faces. If not enabled then an element is said to be adjacent to a given element face if it contains all the nodes of the given element face. If enabled then an element is said to be adjacent to a given element face if a face contains only the nodes of the given element face. Enabling this option can result in a significant performance penalty. The default value is off.

The parameter CONNECT_ZEROUSERID is used to toggle the value returned for a zero valued node or element VIS_USERID association. If enabled a zero valued user id association is returned as zero. If not enabled (off) a zero valuled user id association is returned equal to the node or element index value. The default value is off.

Errors

VIS_ERROR_ENUM is generated if an improper type ptype is specified.

Parameters:
  • p – Pointer to Connect object.

  • ptype – Type of parameter to set

    x=CONNECT_EXACTADJACENCY Exact adjacency computations
     =CONNECT_ZEROUSERID     Return 0 valued user id
    

  • iparam – Specifies the value that ptype will be set to.

void vis_ConnectNumber(const vis_Connect *p, Vint type, Vint *numentity)

get number of entities

Return the number of entities of the requested type. If type is an unrecognizable type, then numentity is returned as zero.

Parameters:
  • p – Pointer to Connect object.

  • type – Entity type

    =SYS_ELEM     Element
    =SYS_NODE     Node
    =SYS_FACE     Face
    =SYS_EDGE     Edge
    

  • numentity[out] Number of entities of requested type

void vis_ConnectSetDimension(vis_Connect *p, Vint ndim)

set spatial dimension

Set spatial dimension. Query the spatial dimension using vis_ConnectDimension(). The input value of ndim must be between 0 and 3. If a value of 0 is input then the function vis_ConnectDimension() will guess the spatial dimension from the element type and topology. The default value of ndim is 0.

Errors

VIS_ERROR_VALUE is generated if an improper ndim is specified.

Parameters:
  • p – Pointer to Connect object.

  • ndim – Spatial dimension

void vis_ConnectSetTopology(vis_Connect *p, Vint index, Vint shape, Vint maxi, Vint maxj, Vint maxk)

set element topologies

Set element topology. This function must be called for an element before element connectivity may be defined using vis_ConnectElemNode(). Use vis_ConnectTopology() to retrieve element topology. When the topology of an element is specified with this function, the associated element type is set to VIS_ELEM_SOLID for VIS_SHAPETET, VIS_SHAPEPYR, VIS_SHAPEWED and VIS_SHAPEHEX; VIS_ELEM_SHELL for VIS_SHAPETRI and VIS_SHAPEQUAD; VIS_ELEM_BEAM for VIS_SHAPELINE; and VIS_ELEM_MASS for VIS_SHAPEPOINT. Use vis_ConnectElemAssoc() to get the associated element type for any element. See section Computational Cells for a description of element topology conventions.

Errors

  • VIS_ERROR_VALUE is generated if an improper element index is specified.

  • VIS_ERROR_ENUM is generated if an improper shape is specified.

Parameters:
  • p – Pointer to Connect object.

  • index – Element index to set topology

  • shape – Cell shape parameter

    x=VIS_SHAPEUNDEFINED     Undefined
     =VIS_SHAPEPOINT         Point
     =VIS_SHAPELINE          Line
     =VIS_SHAPETRI           Triangle
     =VIS_SHAPEQUAD          Quadrilateral
     =VIS_SHAPETET           Tetrahedron
     =VIS_SHAPEPYR           Pyramid
     =VIS_SHAPEWED           Wedge
     =VIS_SHAPEHEX           Hexahedron
     =VIS_SHAPEPOLYGON       Polygon
     =VIS_SHAPEPOLYHED       Polyhedron
    

  • maxi – Topology parameter

  • maxj – Topology parameter

  • maxk – Topology parameter

void vis_ConnectTopology(const vis_Connect *p, Vint index, Vint *shape, Vint *maxi, Vint *maxj, Vint *maxk)

get element topology

Get element topology for a specified element index. Use vis_ConnectSetTopology() to set the topology of an element. See section Computational Cells for a description of element topology conventions.

Parameters:
  • p – Pointer to Connect object.

  • index – Element index to get topology

  • shape[out] Cell shape parameter

  • maxi[out] The number of points along the i direction.

  • maxj[out] The number of points along the j direction.

  • maxk[out] The number of points along the k direction.

void vis_ConnectDelElem(vis_Connect *p, Vint index)

delete an element

Delete an element. The element association VIS_FEATYPE is set to VIS_ELEM_UNDEFINED and the index is made available to be returned by a subsequent call to vis_ConnectGenElem().

Errors

VIS_ERROR_OPERATION is generated if the current mode is static.

Parameters:
  • p – Pointer to Connect object.

  • index – Element index to delete

void vis_ConnectIsElem(vis_Connect *p, Vint index, Vint *flag)

query for element defined

Query for element definition. The flag is returned as 0 if the element has not been defined or has been deleted, otherwise it is returned as 1.

Parameters:
  • p – Pointer to Connect object.

  • index – Element index

  • flag[out] Defined flag

void vis_ConnectGenElem(vis_Connect *p, Vint *index)

generate an element

Generate an element. An undefined element index is returned and it is marked as defined.

Errors

VIS_ERROR_OPERATION is generated if the current mode is static.

Parameters:
  • p – Pointer to Connect object.

  • index[out] Generated element index

void vis_ConnectSetNumEIP(vis_Connect *p, Vint index, Vint numeip)

set number of element integration points

Set the number of element integration points at a specified element, index. Query for the number of integration points using vis_ConnectNumEIP().

Errors

  • VIS_ERROR_VALUE is generated if an improper element index is specified.

  • VIS_ERROR_VALUE is generated if a negative element numeip is specified.

Parameters:
  • p – Pointer to Connect object.

  • index – Element index

  • numeip – Number of element integration points

void vis_ConnectNumEIP(vis_Connect *p, Vint index, Vint *numeip)

get number of element integration points

Query for the number of element integration points at a specified element, index. If the number of element integration points at an element has not been set using vis_ConnectSetNumEIP(), then zero is returned.

Errors

VIS_ERROR_VALUE is generated if an improper element index is specified.

Parameters:
  • p – Pointer to Connect object.

  • index – Element index

  • numeip[out] Number of element integration points

void vis_ConnectSetElemNode(vis_Connect *p, Vint index, Vint ix[])

set element node connectivity

Set element connectivity. Before this function may be called, the element topology must be defined using vis_ConnectSetTopology(). Use vis_ConnectElemNode() to retrieve element connectivity. By convention element node connectivities use a 1 based sequential index for nodes.

Errors

VIS_ERROR_VALUE is generated if an improper element index is specified.

Parameters:
  • p – Pointer to Connect object.

  • index – Element index to set connected nodes

  • ix – Vector of connected node indices.

void vis_ConnectMaxElemNode(const vis_Connect *p, Vint *maxnum)

get maximum nodes connected to element

Get the maximum number of nodes connected to any element in the Connect object. The number of nodes connected to any element is a function of the element topology.

Parameters:
  • p – Pointer to Connect object.

  • maxnum[out] Maximum number of nodes connected to any element.

void vis_ConnectNumElemNode(const vis_Connect *p, Vint index, Vint *nix)

get number of nodes connected to element

Get the number of nodes connected to an element. The number of nodes connected to an element will never exceed the maximum number of nodes connected to any element as returned by the vis_ConnectMaxElemNode() function.

Parameters:
  • p – Pointer to Connect object.

  • index – Element index to get connected nodes.

  • nix[out] Number of nodes connected to element.

void vis_ConnectElemNode(const vis_Connect *p, Vint index, Vint *nix, Vint ix[])

get nodes connected to an element

Get the node indices connected to an element. This function returns the number of nodes and node indices. The number of nodes connected to an element will never exceed the maximum number of nodes connected to any element as returned by the vis_ConnectMaxElemNode() function. Use vis_ConnectSetElemNode() to set the element node connectivity.

Parameters:
  • p – Pointer to Connect object.

  • index – Element index to get connected nodes.

  • nix[out] Number of nodes connected to element.

  • ix[out] Vector of connected nodes.

void vis_ConnectSetCoords(vis_Connect *p, Vint index, Vfloat x[3])

set node coordinates

Set x,y,z world coordinates, x, for a specified node index. Use vis_ConnectCoords() to retrieve node coordinates. Use vis_ConnectCoordsdv() to retrieve node coordinates in double precision. When the coordinates of a node are specified with this function, the associated node type is set to VIS_NODE_GRID. Use vis_ConnectNodeAssoc() to get the associated node type for any node.

Errors

VIS_ERROR_VALUE is generated if an improper node index is specified.

Parameters:
  • p – Pointer to Connect object.

  • index – Node index to set coordinates

  • x – World coordinates of node (x,y,z)

void vis_ConnectCoords(const vis_Connect *p, Vint nix, Vint ix[], Vfloat x[][3])

get node coordinates

Gather node coordinates, x for a set of nodes, ix. Use vis_ConnectSetCoords() to set the coordinates of a node. Use vis_ConnectSetCoordsdv() to set the coordinates of a node in double precision.

Parameters:
  • p – Pointer to Connect object.

  • nix – Number of nodes

  • ix – Array of node indices

  • x[out] Array of world coordinates of nodes (x,y,z)

void vis_ConnectCoordsdv(const vis_Connect *p, Vint nids, Vint ids[], Vdouble x[][3])

get node coordinates

See vis_ConnectCoords()

void vis_ConnectNodeIndex(vis_Connect *p, Vint id, Vint *index)

get node index given user id

Return node index given the node user id, ie the node VIS_USERID associated with it.

Parameters:
  • p – Pointer to Connect object.

  • id – User identifier

  • index[out] Node index

void vis_ConnectElemIndex(vis_Connect *p, Vint id, Vint *index)

get element index given user id

Return element index given the element user id, ie the element VIS_USERID associated with it.

Parameters:
  • p – Pointer to Connect object.

  • id – User identifier

  • index[out] Element index

void vis_ConnectSetPartName(vis_Connect *p, Vint partid, Vchar *name)

set part name string

Set the name string associated with partid. Only the first 80 characters of the name string will be set.

Errors

VIS_ERROR_VALUE is generated if a zero partid is input.

Parameters:
  • p – Pointer to Connect object.

  • partid – Part identifier

  • name – Name string

void vis_ConnectPartName(const vis_Connect *p, Vint partid, Vchar name[])

get part name string

Get the name string associated with partid. If no name string has been set for partid, then a single null character is returned in name. The part identifier is the value associated with the VIS_PARTID element association.

Parameters:
  • p – Pointer to Connect object.

  • partid – Part identifier

  • name[out] Name string

void vis_ConnectNumPartName(vis_Connect *p, Vint *numpartname)

get number of partnames

Get the number of part names defined. Use vis_ConnectIthPartName() to get a specific part name and associated part identifier.

Parameters:
  • p – Pointer to Connect object.

  • numpartname[out] Number of part names

void vis_ConnectIthPartName(vis_Connect *p, Vint ith, Vint *partid, Vchar name[])

get specific partname

Get a specific part name and the associated part identifier. The part identifier is the value associated with the VIS_PARTID element association. Use vis_ConnectNumPartName() to get the number of part names, numpartname.

Parameters:
  • p – Pointer to Connect object.

  • ith – Ith part name 1 <= ith <= numpartname

  • partid[out] Part identifier

  • name[out] Name string

void vis_ConnectSetPartIJK(vis_Connect *p, Vint partid, Vint ijk[3])

set part IJK block parameters

Set the IJK block parameters associated with partid.

Errors

VIS_ERROR_VALUE is generated if a zero partid is input.

Parameters:
  • p – Pointer to Connect object.

  • partid – Part identifier

  • ijk – IJK block parameters

void vis_ConnectPartIJK(const vis_Connect *p, Vint partid, Vint ijk[])

get part IJK block

Get the IJK block parameters associated with partid. If no block parameters have been set for partid, then zeros are returned in ijk. The part identifier is the value associated with the VIS_PARTID element association.

Parameters:
  • p – Pointer to Connect object.

  • partid – Part identifier

  • ijk[out] IJK block parameters

void vis_ConnectNumPartIJK(vis_Connect *p, Vint *numpartijk)

get number of part IJK blocks

Get the number of part IJK blocks defined. Use vis_ConnectIthPartIJK() to get a specific part IJK block and associated part identifier.

Parameters:
  • p – Pointer to Connect object.

  • numpartijk[out] Number of part IJK blocks

void vis_ConnectIthPartIJK(vis_Connect *p, Vint ith, Vint *partid, Vint ijk[])

get specific part IJK block

Get a specific part IJK block and the associated part identifier. The part identifier is the value associated with the VIS_PARTID element association. Use vis_ConnectNumPartIJK() to get the number of part IJK blocks, numpartijk.

Parameters:
  • p – Pointer to Connect object.

  • ith – Ith part IJK block 1 <= ith <= numpartijk

  • partid[out] Part identifier

  • ijk[out] IJK block parameters

void vis_ConnectDelNode(vis_Connect *p, Vint index)

delete a node

Delete a node. The node association VIS_FEATYPE is set to VIS_NODE_UNDEFINED and the index is made available to be returned by a subsequent call to vis_ConnectGenNode().

Errors

VIS_ERROR_OPERATION is generated if the current mode is static.

Parameters:
  • p – Pointer to Connect object.

  • index – Node index to delete

void vis_ConnectIsNode(vis_Connect *p, Vint index, Vint *flag)

query for node defined

Query for node definition. The flag is returned as 0 if the node has not been defined or has been deleted, otherwise it is returned as 1.

Parameters:
  • p – Pointer to Connect object.

  • index – Element index

  • flag[out] Defined flag

void vis_ConnectGenNode(vis_Connect *p, Vint *index)

generate a node

Generate a node. An undefined node index is returned and it is marked as defined.

Errors

VIS_ERROR_OPERATION is generated if the current mode is static.

Parameters:
  • p – Pointer to Connect object.

  • index[out] Generated node index

void vis_ConnectSetNodeAssoc(vis_Connect *p, Vint type, Vint index, Vint aid)

set node associations

Set node association, aid, of type, type for a specified node index. Use vis_ConnectNodeAssoc() to retrieve node associations. Note that VIS_MISCID+i is the same value as VIS_MISCIDi. Note that vis_ConnectSetCoords() sets a default node type. The node type, VIS_FEATYPE, association should be set to one of the following constants.

VIS_NODE_UNDEFINED
VIS_NODE_GRID
VIS_NODE_SCALAR
Errors

  • VIS_ERROR_ENUM is generated if an improper association type is specified.

  • VIS_ERROR_VALUE is generated if an improper node index is specified.

  • VIS_ERROR_VALUE is generated if a user id is set which is less than zero.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of node association

    x=VIS_COLORID            Color identifier
     =VIS_CREFID             Reference coordinate system identifier
     =VIS_CSYSID             Solution coordinate system identifier
     =VIS_FEATYPE            Node type
     =VIS_IBLANK             Iblank code
     =VIS_MISCID             Miscellaneous identifier
     =VIS_MISCID0            Miscellaneous identifier 0
     =VIS_MISCID1            Miscellaneous identifier 1
     =VIS_MISCID2            Miscellaneous identifier 2
     =VIS_MISCID3            Miscellaneous identifier 3
     =VIS_MISCID4            Miscellaneous identifier 4
     =VIS_MISCID5            Miscellaneous identifier 5
     =VIS_MISCID6            Miscellaneous identifier 6
     =VIS_MISCID7            Miscellaneous identifier 7
     =VIS_MISCID8            Miscellaneous identifier 8
     =VIS_PARTID             Part identifier
     =VIS_SPCFLAGS           Node single point constraint flags
     =VIS_USERID             User node identifier
    

  • index – Node index to set association

  • aid – Node association

void vis_ConnectNodeAssoc(vis_Connect *p, Vint type, Vint nix, Vint ix[], Vint aids[])

get node associations

Get node associations, aids, for a set of specified nodes ix. If a node association has not been defined for a node index, zero is returned, except for the case type = VIS_USERID. In this case the return value is dependent upon the CONNECT_ZEROUSERID parameter set using vis_ConnectSetParami(). By default if the value has not been set or has been set to zero the node index is returned as the association. Use vis_ConnectSetNodeAssoc() to set node associations.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of node association

  • nix – Number of node indices to get associations

  • ix – Vector of node indices.

  • aids[out] Vector of node associations

void vis_ConnectAddNodeAssoc(vis_Connect *p, Vint type, Vint index, Vint aid)

add node association

Add a node association, aid, of type, type for a specified node, index. Use vis_ConnectDelNodeAssoc() to delete any added associations at a node.

Errors

  • VIS_ERROR_ENUM is generated if an improper association type is specified.

  • VIS_ERROR_OPERATION is generated if an type of VIS_USERID is specified.

  • VIS_ERROR_VALUE is generated if an improper node index is specified.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of association

  • index – Node index

  • aid – Association

void vis_ConnectDelNodeAssoc(vis_Connect *p, Vint type, Vint index)

delete added node associations

Delete any node associations of type, type added at a specified node, index. Only those associations specified by vis_ConnectAddNodeAssoc() are deleted.

Errors

  • VIS_ERROR_ENUM is generated if an improper association type is specified.

  • VIS_ERROR_VALUE is generated if an improper node index is specified.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of association

  • index – Node index

void vis_ConnectNumNodeAssoc(vis_Connect *p, Vint type, Vint index, Vint *num)

query total number of node associations

Query for the total number, num >= 1 of node associations of type, type at a specified node, index. The number, num, is returned as 1 if no additional associations have been added for type at the node using vis_ConnectAddNodeAssoc().

Errors

  • VIS_ERROR_ENUM is generated if an improper association type is specified.

  • VIS_ERROR_VALUE is generated if an improper node index is specified.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of association

  • index – Node index

  • num[out] Total number of node associations

void vis_ConnectAllNodeAssoc(vis_Connect *p, Vint type, Vint index, Vint *num, Vint aids[])

query all node associations

Query for all node associations of type, type at a specified node, index. The total number of node associations, num >= 1 is returned as well as num associations in vector aids. The single association set using vis_ConnectSetNodeAssoc() is always the first entry in aids. The number, num, is returned as 1 if no additional associations have been added for type at the node using vis_ConnectAddNodeAssoc()

Errors

  • VIS_ERROR_ENUM is generated if an improper association type is specified.

  • VIS_ERROR_VALUE is generated if an improper node index is specified.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of association

  • index – Node index

  • num[out] Total number of node associations

  • aids[out] Associations

void vis_ConnectSetElemAssoc(vis_Connect *p, Vint type, Vint index, Vint aid)

set element associations

Set element association, aid, of type, type for a specified element index. Use vis_ConnectElemAssoc() to retrieve element associations. Note that VIS_MISCID+i is the same value as VIS_MISCIDi. Note that vis_ConnectSetTopology() sets a default element type.

The end topology, VIS_ENDATOPO or VIS_ENDATOPO, associations are designed to be used with certain point and line connections. They should be set to one of the following constants.

SYS_TOPO_POINT1
SYS_TOPO_LINE2
SYS_TOPO_LINE3
SYS_TOPO_TRI3
SYS_TOPO_TRI6SER
SYS_TOPO_TRI6LAG
SYS_TOPO_QUAD4SER
SYS_TOPO_QUAD4LAG
SYS_TOPO_QUAD8
SYS_TOPO_QUAD9
The end connection, VIS_ENDACON or VIS_ENDBCON, associations specify certain point and line connections. These associations are required if the geometric location of an element end point is offset in some respect from the geometric location of the node connectivity at which the degrees of freedom are located. An example would be beam element offset vectors. A positive value indicates a node number. A zero value means that the element end point is colocated with the node connectivity A negative value is identified by one of the following constants.
SYS_ELEMEND_POSITION, position vector
SYS_ELEMEND_OFFSET, offset vector
The external name, VIS_EXTNAMEA and VIS_EXTNAMEB, associations contain the character name of the element in Hollerith format. Association VIS_EXTNAMEA contains the first 4 characters of the name and VIS_EXTNAMEB contains the second 4 characters of the name. If the character name is less than 8 characters then trailing blank characters will appear.

The element type, VIS_FEATYPE, association should be set to one of the following constants.

SYS_ELEM_UNDEFINED
SYS_ELEM_SOLID
SYS_ELEM_SHELL
SYS_ELEM_MEMBRANE
SYS_ELEM_BEAM
SYS_ELEM_TRUSS
SYS_ELEM_GAP
SYS_ELEM_SPRINGDASHPOT
SYS_ELEM_RIGID
SYS_ELEM_CONSTRAINT
SYS_ELEM_PLOT
SYS_ELEM_MASS
SYS_ELEM_INTER
SYS_ELEM_SUPER
SYS_ELEM_REINFORCEMENT
The specific element type, VIS_FEASPEC, association should be set to one of the following constants depending upon the element type.
VIS_FEATYPE = SYS_ELEM_SOLID
    SYS_SOLID_SOLID, solid (as opposed to fluid) region
    SYS_SOLID_FLUID, fluid region
    SYS_SOLID_SHELL, continuum shell: ABAQUS SC6R, SC8R

VIS_FEATYPE = SYS_ELEM_MEMBRANE
    SYS_MEMBRANE_STAN, plane stress membrane: ABAQUS M3Dx
    SYS_MEMBRANE_SHEAR, shear panel: NASTRAN CSHEAR
    SYS_MEMBRANE_FACE, geometry face facet.

VIS_FEATYPE = SYS_ELEM_BEAM
    SYS_BEAM_STAN, standard beam: NASTRAN CBEAM
    SYS_BEAM_ROD, axial force and torque: NASTRAN CROD
    SYS_BEAM_WELD, weld element: NASTRAN CWELD
    SYS_BEAM_CBEND, curved beam or pipe: NASTRAN CBEND

VIS_FEATYPE = SYS_ELEM_TRUSS
    SYS_TRUSS_STAN, standard truss: ABAQUS T3D3
    SYS_TRUSS_EDGE, geometry edge segment.

VIS_FEATYPE = SYS_ELEM_INTER
    SYS_INTER_NONE, no known specific type
    SYS_INTER_CONTACT, contact
    SYS_INTER_WALL, wall
    SYS_INTER_INLET, pressure inlet
    SYS_INTER_OUTLET, pressure outlet
    SYS_INTER_SURF, surface
    SYS_INTER_SURF_ENVIRONMENT, surface with environment surface
    SYS_INTER_SYMMETRY, symmetry
    SYS_INTER_PERIODIC_SHADOW, periodic shadow
    SYS_INTER_PRESSURE_FARFIELD, pressure far field
    SYS_INTER_INLET_VELOCITY, velocity inlet
    SYS_INTER_PERIODIC, periodic
    SYS_INTER_FAN, fan
    SYS_INTER_INLET_MASSFLOW, mass flow inlet
    SYS_INTER_INTERFACE, interface
    SYS_INTER_PARENT, parent
    SYS_INTER_OUTFLOW, outflow
    SYS_INTER_AXIS, axis
    SYS_INTER_USER_DEFINED, user defined
    SYS_INTER_DEGENERATE_LINE, degenerate line
    SYS_INTER_DIRICHLET, Dirichlet
    SYS_INTER_FARFIELD, far field
    SYS_INTER_NEUMANN, Neumann
    SYS_INTER_GENERAL, general
    SYS_INTER_INFLOW_SUBSONIC, inflow subsonic
    SYS_INTER_OUTFLOW_SUBSONIC, outflow subsonic
    SYS_INTER_INFLOW_SUPERSONIC, inflow supersonic
    SYS_INTER_OUTFLOW_SUPERSONIC, outflow supersonic
    SYS_INTER_TUNNEL_INFLOW, tunnel inflow
    SYS_INTER_TUNNEL_OUTFLOW, tunnel outflow
    SYS_INTER_SYMMETRY_POLAR, polar symmetry
    SYS_INTER_WALL_VISCOUS, wall viscous
    SYS_INTER_WALL_VISCOUS_HEAT_FLUX, wall viscous heat flux
    SYS_INTER_WALL_VISCOUS_ISOTHERMAL, wall viscous isothermal
    SYS_INTER_WALL_INVISCID, wall inviscid
    SYS_INTER_GASKET, gasket
    SYS_INTER_COHESIVE, cohesive

VIS_FEATYPE = SYS_ELEM_SPRINGDASHPOT
    SYS_SPRINGDASHPOT_SCALAR, scalar stiffness and damping: NASTRAN CELASx, CDAMPx
    SYS_SPRINGDASHPOT_VECTOR, vector stiffness and damping: ABAQUS SPRING2
    SYS_SPRINGDASHPOT_WELD, weld: NASTRAN CWELD
    SYS_SPRINGDASHPOT_BUSH, bushing: NASTRAN CBUSH
    SYS_SPRINGDASHPOT_LINK, link: ABAQUS SPRINGA
    SYS_SPRINGDASHPOT_SCALARDAMP, scalar damping: NASTRAN CDAMPx
    SYS_SPRINGDASHPOT_LINKDAMP, damper: ABAQUS DASHPOTA

VIS_FEATYPE = SYS_ELEM_RIGID
    SYS_RIGID_KINE,   kinematic coupling: NASTRAN RBE1, RBE2, RBAR
    SYS_RIGID_DIST,   distributing coupling: ABAQUS DCOUP3D.
    SYS_RIGID_LINK,   inextensional coupling: NASTRAN RROD
    SYS_RIGID_MPC,    multipoint constraint: NASTRAN MPC, ABAQUS *EQUATION
    SYS_RIGID_RBE3,   interpolation constraint: NASTRAN RBE3.
    SYS_RIGID_SPLINE, spline constraint: NASTRAN RSPLINE.
    SYS_RIGID_JOINT,  coincident node joint: NASTRAN RJOINT.

VIS_FEATYPE = SYS_ELEM_MASS
    SYS_MASS_SCALAR, scalar mass: NASTRAN CMASSx
    SYS_MASS_LUMP,   translational mass and moments of inertia: NASTRAN CONM2
    SYS_MASS_MATRIX, mass matrix: NASTRAN CONM1
    SYS_MASS_VERTEX, geometry vertex point.

VIS_FEATYPE = SYS_ELEM_REINFORCEMENT
    SYS_ELEM_SOLID,    Solid base element
    SYS_ELEM_SHELL,    Shell base element
    SYS_ELEM_MEMBRANE, Membrane base element
For 2-D elements, the element two dimension type, VIS_FEATWOD, association should be set to one of the following non-zero constants. Any element which is not a 2-D element will have an association value of zero.
SYS_PLANESTRAIN
SYS_PLANESTRESS
SYS_AXISYMMETRIC
SYS_AXISYMFOURIER
The element technology, VIS_FEATECH, association is designed to be set to one of the following constants.
SYS_TECH_ISOP
SYS_TECH_BBAR
SYS_TECH_URED
SYS_TECH_KIRCHHOFF
SYS_TECH_MIXED
SYS_TECH_ENHANCED
SYS_TECH_ANS
Errors

  • VIS_ERROR_ENUM is generated if an improper association type is specified.

  • VIS_ERROR_VALUE is generated if an improper element index is specified.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of element association

    x=VIS_COLORID            Color identifier
     =VIS_CMATID             Material coordinate system identifier
     =VIS_CMATFLAG           Material coordinate system flag
     =VIS_CSYSID             Solution coordinate system identifier
     =VIS_DOMAIN             Domain decomposition regions
     =VIS_ENDACON            Element end A connection
     =VIS_ENDBCON            Element end B connection
     =VIS_ENDATOPO           Element end A topology
     =VIS_ENDBTOPO           Element end B topology
     =VIS_EXTNAMEA           Element external name, first 4 char
     =VIS_EXTNAMEB           Element external name, second 4 char
     =VIS_FEATECH            Element technology
     =VIS_FEATYPE            Element generic type
     =VIS_FEASPEC            Element specific type
     =VIS_FEATWOD            Element two dimension type
     =VIS_GEOVERT            Geometry vertex
     =VIS_GEOEDGE            Geometry edge
     =VIS_GEOFACE            Geometry face
     =VIS_GEOBODY            Geometry body
     =VIS_MATLID             Material identifier
     =VIS_MISCID             Miscellaneous identifier
     =VIS_MISCID0            Miscellaneous identifier 0
     =VIS_MISCID1            Miscellaneous identifier 1
     =VIS_MISCID2            Miscellaneous identifier 2
     =VIS_MISCID3            Miscellaneous identifier 3
     =VIS_MISCID4            Miscellaneous identifier 4
     =VIS_MISCID5            Miscellaneous identifier 5
     =VIS_MISCID6            Miscellaneous identifier 6
     =VIS_MISCID7            Miscellaneous identifier 7
     =VIS_MISCID8            Miscellaneous identifier 8
     =VIS_ORIENTINDEX        Orientation node index
     =VIS_PARTID             Part identifier
     =VIS_PINFLAGS           Element pin flags
     =VIS_PROPID             Property identifier
     =VIS_SEID               Superelement identifier
     =VIS_SYMMID             Symmetry group identifier
     =VIS_USERID             User element identifier
    

  • index – Element index to set association

  • aid – Element association

void vis_ConnectElemAssoc(vis_Connect *p, Vint type, Vint nix, Vint ix[], Vint aids[])

get element associations

Get element associations, aids, for a set of specified elements ix. If an element association has not been defined for an element index, zero is returned, except for the case type = VIS_USERID. In this case the return value is dependent upon the CONNECT_ZEROUSERID parameter set using vis_ConnectSetParami(). By default if the value has not been set or has been set to zero the element index is returned as the association. Use vis_ConnectSetElemAssoc() to set element associations.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of element association

  • nix – Number of element indices to get associations

  • ix – Vector of element indices.

  • aids[out] Vector of element associations

void vis_ConnectAddElemAssoc(vis_Connect *p, Vint type, Vint index, Vint aid)

add element association

Add an element association, aid, of type, type for a specified element, index. Use vis_ConnectDelElemAssoc() to delete any added associations at an element.

Errors

  • VIS_ERROR_ENUM is generated if an improper association type is specified.

  • VIS_ERROR_VALUE is generated if an improper element index is specified.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of association

  • index – Element index

  • aid – Association

void vis_ConnectDelElemAssoc(vis_Connect *p, Vint type, Vint index)

delete added element associations

Delete any element associations of type, type added at a specified element, index. Only those associations specified by vis_ConnectAddElemAssoc() are deleted.

Errors

  • VIS_ERROR_ENUM is generated if an improper association type is specified.

  • VIS_ERROR_VALUE is generated if an improper element index is specified.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of association

  • index – Element index

void vis_ConnectNumElemAssoc(vis_Connect *p, Vint type, Vint index, Vint *num)

query total number of element associations

Query for the total number, num >= 1 of element associations of type, type at a specified element, index. The number, num, is returned as 1 if no additional associations have been added for type at the element using vis_ConnectAddElemAssoc().

Errors

  • VIS_ERROR_ENUM is generated if an improper association type is specified.

  • VIS_ERROR_VALUE is generated if an improper element index is specified.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of association

  • index – Element index

  • num[out] Total number of element associations

void vis_ConnectAllElemAssoc(vis_Connect *p, Vint type, Vint index, Vint *num, Vint aids[])

query all element associations

Query for all element associations of type, type at a specified element, index. The total number of element associations, num >= 1 is returned as well as num associations in vector aids. The single association set using vis_ConnectSetElemAssoc() is always the first entry in aids. The number, num, is returned as 1 if no additional associations have been added for type at the element using vis_ConnectAddElemAssoc()

Errors

  • VIS_ERROR_ENUM is generated if an improper association type is specified.

  • VIS_ERROR_VALUE is generated if an improper element index is specified.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of association

  • index – Element index

  • num[out] Total number of element associations

  • aids[out] Associations

void vis_ConnectSetElemEntAssoc(vis_Connect *p, Vint type, Vint enttype, Vint index, Vint no, Vint aid)

set element entity association

Set element entity association, aid, of type, type for a specified element edge or face. Element face and edge numbers are 1 based. Use vis_ConnectElemEntAssoc() to retrieve element entity associations.

Errors

  • VIS_ERROR_ENUM is generated if an improper association type is specified.

  • VIS_ERROR_VALUE is generated if an improper element index or no is specified.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of element association

  • enttype – Type of element entity.

    =SYS_EDGE     Element edge
    =SYS_FACE     Element face
    

  • index – Element index

  • no – Element face or edge number

  • aid – Element entity association

void vis_ConnectAddElemEntAssoc(vis_Connect *p, Vint type, Vint enttype, Vint index, Vint no, Vint aid)

add element entity association

Add an element entity association, aid, of type, type for a specified element, index, at face or edge no. Use vis_ConnectDelElemEntAssoc() to delete any added associations at an element entity.

Errors

  • VIS_ERROR_ENUM is generated if an improper association type is specified.

  • VIS_ERROR_VALUE is generated if an improper element index or no is specified.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of association

  • enttype – Type of element entity.

    =SYS_EDGE     Element edge
    =SYS_FACE     Element face
    

  • index – Element index

  • no – Element face or edge number

  • aid – Association

void vis_ConnectNumElemEntAssoc(vis_Connect *p, Vint type, Vint enttype, Vint index, Vint no, Vint *num)

query total number of element entity associations

Query for the total number, num >= 1 of element entity associations of type, type at a specified element, index and edge or face number no. The number, num, is returned as 1 if no additional associations have been added for type at the element entity using vis_ConnectAddElemEntAssoc().

Errors

  • VIS_ERROR_ENUM is generated if an improper association type is specified.

  • VIS_ERROR_VALUE is generated if an improper element index or no is specified.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of association

  • enttype – Type of element entity.

    =SYS_EDGE     Element edge
    =SYS_FACE     Element face
    

  • index – Element index

  • no – Element face or edge number

  • num[out] Total number of element associations

void vis_ConnectDelElemEntAssoc(vis_Connect *p, Vint type, Vint enttype, Vint index, Vint no)

delete added element entity associations

Delete any element entity associations of type, type added at a specified element, index, and edge or face number no. Only those associations specified by vis_ConnectAddElemEntAssoc() are deleted.

Errors

  • VIS_ERROR_ENUM is generated if an improper association type is specified.

  • VIS_ERROR_VALUE is generated if an improper element index or no is specified.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of association

  • enttype – Type of element entity.

    =SYS_EDGE     Element edge
    =SYS_FACE     Element face
    

  • index – Element index

  • no – Element face or edge number

void vis_ConnectElemEntAssoc(vis_Connect *p, Vint type, Vint enttype, Vint index, Vint no, Vint *aid)

get element entity association

Get element entity association, aid, for a specified element edge or face. Element face and edge numbers are 1 based. If an element entity association has not been defined, zero is returned, Use vis_ConnectSetElemEntAssoc() to set element entity associations.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of element association

  • enttype – Type of element entity.

    =SYS_EDGE     Element edge
    =SYS_FACE     Element face
    

  • index – Element index

  • no – Element face or edge number

  • aid[out] Element entity association

void vis_ConnectAllElemEntAssoc(vis_Connect *p, Vint type, Vint enttype, Vint index, Vint no, Vint *num, Vint aids[])

query all element entity associations

Query for all element entity associations of type, type at a specified element, index, and edge or face number no. The total number of element entity associations, num >= 1 is returned as well as num associations in vector aid. The single association set using vis_ConnectSetElemEntAssoc() is always the first entry in aids. The number, num, is returned as 1 if no additional associations have been added for type at the element entity using vis_ConnectAddElemEntAssoc()

Errors

  • VIS_ERROR_ENUM is generated if an improper association type is specified.

  • VIS_ERROR_VALUE is generated if an improper element index or no is specified.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of association

  • enttype – Type of element entity.

    =SYS_EDGE     Element edge
    =SYS_FACE     Element face
    

  • index – Element index

  • no – Element face or edge number

  • num[out] Total number of element associations

  • aids[out] Associations

void vis_ConnectDimension(vis_Connect *p, Vint *ndim)

determine spatial dimension

Determine dimensionality of finite element model. If ndim = 2 the finite element model is a 2 dimensional model. This is used for 2D planar or 2D axisymmetric models. If ndim = 3 the finite element model is a full 3 dimensional model.

The dimension of the model may be set specifically using vis_ConnectSetDimension(). If the dimension has not been explicitly set to a positive value, then the dimensionality of the model is determined by checking the shape topology of solid, shell and beam element types.

Parameters:
  • p – Pointer to Connect object.

  • ndim[out] Number of spatial dimensions

void vis_ConnectDemo(vis_Connect *p, Vint oper, Vfloat f, Vint shape, Vint numi, Vint numj, Vint numk)

create “demo” finite element model

Generate a finite element model of 1D, 2D or 3D finite elements. The shape and size of the model are specified by type and f. If oper is CONNECT_DEMO_CUBE then a cube of edge length f is generated. If oper is CONNECT_DEMO_CYLINDER then a cylinder with a 270 degree circumferential angle and an inner radius, thickness and height of f is generated. If oper is CONNECT_DEMO_SPHERE then a cylinder with a 270 degree circumferential angle, a 67.5 elevation angle and an inner radius and thickness of f is generated.

If 1D elements are implied by the cell shape, then elements are generated along the i direction only at j = 1 and k = 1. If 2D elements are implied by the cell shape, then elements are generated along the i direction first and j direction second only at k = 1.

The i, j, k directions for a cube are along the global x,y and z axes; for a cylinder, along the circumferential direction (global x,y plane), the global z axis and the radial direction; and for a sphere, along the circumferential direction (global x,y plane), the azimuthal direction and the radial direction;

Errors

  • VIS_ERROR_ENUM is generated if an improper operation, oper, or cell shape, shape, is specified.

  • VIS_ERROR_VALUE is generated if an improper number of points, numi, numj or numk, is specified.

Parameters:
  • p – Pointer to Connect object.

  • oper – Operation specified to create finite element model

    x=CONNECT_DEMO_CUBE      Create cube model
     =CONNECT_DEMO_CYLINDER  Create cylinder model
     =CONNECT_DEMO_SPHERE    Create sphere model
    

  • f – Floating point size factor.

  • shape – Cell shape parameter

    x=VIS_SHAPELINE          Line
     =VIS_SHAPETRI           Triangle
     =VIS_SHAPEQUAD          Quadrilateral
     =VIS_SHAPETET           Tetrahedron
     =VIS_SHAPEWED           Wedge
     =VIS_SHAPEHEX           Hexahedron
    

  • numi – The number of points along the i direction.

  • numj – The number of points along the j direction.

  • numk – The number of points along the k direction.

void vis_ConnectRead(vis_Connect *p, Vint type, const Vchar *path)

read model from simple file formats

Read models from simple file formats. The SYS_FILE_STL and SYS_FILE_STLBIN types result in a set of completely unconnected triangles. Use vis_ConnectMerge() to merge coincident nodes together. The SYS_FILE_STL type will attempt to determine if the input file is ASCII or binary. If it detects a binary file it will automatically switch to reading a binary STL file.

The SYS_ASCII and SYS_BINARY formats are VKI internal formats. Use vis_ConnectWrite to write connect data to a file format.

There are a number of additional file formats which are supported, please contact us for details.

Errors

  • SYS_ERROR_ENUM is generated if an improper type is specified.

  • SYS_ERROR_FILE is generated if the file can not be opened.

  • SYS_ERROR_FORMAT is generated if the file contents are not correctly

Parameters:
  • p – Pointer to Connect object.

  • type – File type

    x=SYS_ASCII            ASCII format
     =SYS_BINARY           Binary format
     =SYS_FILE_STL         Read triangles from ASCII STL file
     =SYS_FILE_STLBIN      Read triangles from binary STL file
     =SYS_FILE_OBJ         Read triangles from OBJ file
    

  • path – File path

void vis_ConnectKernel(vis_Connect *p, Vint flag)

generate connection kernel

Generate connection kernel. This call must be made before the following functions may be called, vis_ConnectFaceGroup(), vis_ConnectEdgeGroup(), vis_ConnectNodeGroup(), vis_ConnectElemAdj(), vis_ConnectMaxNodeElem() and vis_ConnectNodeElem().

The connection kernel is a data structure which allows for efficient query of adjacency information derived from the basic element node connectivity. The generation of the connection kernel is a computationally intensive operation. If the kernel exists and no new nodes have been defined and no existing element connectivity changed or new element connectivity added, then this function will return without regenerating the kernel. Use vis_ConnectClearKernel() to clear and deallocate a connecttion kernel.

Parameters:
  • p – Pointer to Connect object.

  • flag – Not used

void vis_ConnectClearKernel(vis_Connect *p)

clear connection kernel

Clear and deallocate connection kernel.

Parameters:

p – Pointer to Connect object.

void vis_ConnectWrite(vis_Connect *p, Vint type, const Vchar *path)

write model to simple file formats

Write connect data to standard CAE file formats. The SYS_ASCII and SYS_BINARY formats are VKI internal formats. Use vis_ConnectRead to read connect data from VKI internal formats.

There are a number of additional file formats which are supported, please contact Visual Kinematics, Inc. for details.

Errors

  • SYS_ERROR_ENUM is generated if an improper type is specified.

  • SYS_ERROR_FILE is generated if the file can not be opened.

Parameters:
  • p – Pointer to Connect object.

  • type – File type

    x=SYS_ASCII            ASCII format
     =SYS_BINARY           Binary format
     =SYS_ABAQUS_INPUT     Write to ABAQUS input file
     =SYS_ANSYS_INPUT      Write to ANSYS input file
     =SYS_LSTC_INPUT       Write to LS-DYNA input file
     =SYS_NASTRAN_BULKDATA Write to NASTRAN Bulk Data file
     =SYS_PATRAN_NEUTRAL   Write to Patran Neutral file
     =SYS_SDRC_UNIVERSAL   Write to SDRC Universal file
    

  • path – File path

void vis_ConnectMaxNodeElem(vis_Connect *p, Vint *maxnum)

get maximum elements connected to node

Get the maximum number of elements connected to any node in the Connect object. The number of elements connected to any node may only be queried after vis_ConnectKernel() is called.

Errors

VIS_ERROR_OPERATION is generated if vis_ConnectKernel() has not been previously called.

Parameters:
  • p – Pointer to Connect object.

  • maxnum[out] Maximum number of elements connected to any node.

void vis_ConnectNumNodeElem(vis_Connect *p, Vint index, Vint *nix)

get number of elements connected to node

Get the number of elements connected to a node. The number of elements connected to a node will never exceed the maximum number of elements connected to any node as returned by the vis_ConnectMaxNodeElem() function.

Parameters:
  • p – Pointer to Connect object.

  • index – Node index to get connected elements.

  • nix[out] Number of elements connected to node.

void vis_ConnectNodeElem(const vis_Connect *p, Vint index, Vint *nix, Vint ix[])

get elements connected to a node

Get the element indices connected to a node. This function returns the number of elements and elements indices. The number of elements connected to a node will never exceed the maximum number of elements connected to any node as returned by the vis_ConnectMaxNodeElem() function.

If vis_ConnectKernel() has not been previously called then nix is returned as zero. If an improper node index is input then the operation of this function is undefined.

Parameters:
  • p – Pointer to Connect object.

  • index – Node index to get connected elements

  • nix[out] Number of elements connected to node.

  • ix[out] Vector of connected elements.

void vis_ConnectElemAdj(const vis_Connect *p, Vint type, Vint id, Vint no, Vint *nidadj, Vint idadj[])

get elements adjacent to a given element

Get the element indices connected to a specified element. This function returns elements adjacent to (connected to) a specified element across an element face, edge or node. The type of element feature across which adjacent elements are requested is specified by type. The element is specified by id and the element face, edge or node is specified by no. The number of connected elements, nidadj, and the vector of connected elements, idadj, do not contain the element id. The number of elements connected to a specified element will never exceed the maximum number of elements connected to any node as returned by the vis_ConnectMaxNodeElem() function.

If vis_ConnectKernel() has not been previously called then nidadj is returned as zero. If an improper element feature, type, is input then nidadj is returned as zero. If an improper element id or no is input then the operation of this function is undefined.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of element feature.

    =SYS_FACE     Element face
    =SYS_EDGE     Element edge
    =SYS_NODE     Element node
    

  • id – Element index to get connected elements

  • no – Element face, edge or node number

  • nidadj[out] Number of elements connected to specified element

  • idadj[out] Vector of connected elements.

void vis_ConnectElemAdjEnt(const vis_Connect *p, Vint type, Vint index, Vint no, Vint *nix, Vint ixadj[], Vint noadj[])

get adjacent element entities across element entity

Get the element indices and entities connected to a specified element. This function returns elements adjacent to (connected to) a specified element across an element face, edge or node. The type of element feature across which adjacent elements are requested is specified by a type. The element is specified by index and the element face, edge or node is specified by no. The number of connected elements, nix, and the vector of connected elements, ixadj, do not contain the element index. The vector, noadj, will contain the face, edge or node of the connected element. The number of elements connected to a specified element will never exceed the maximum number of elements connected to any node as returned by the vis_ConnectMaxNodeElem() function.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of element feature.

    =SYS_FACE     Element face
    =SYS_EDGE     Element edge
    =SYS_NODE     Element node
    

  • index – Element index to get connected elements

  • no – Element face, edge or node number

  • nix[out] Number of elements connected to specified element

  • ixadj[out] Vector of connected elements.

  • noadj[out] Vector of connected element entities

void vis_ConnectNodeAdj(const vis_Connect *p, Vint nindices, Vint indices[], Vint *nix, Vint ix[])

get elements adjacent to nodes

Get the element indices connected to a set of nodes. Each returned element will contain the complete set of input nodes in its node connectivity. The number of elements connected to a set of nodes will never exceed the maximum number of elements connected to any node as returned by the vis_ConnectMaxNodeElem() function.

If vis_ConnectKernel() has not been previously called then nix is returned as zero.

Parameters:
  • p – Pointer to Connect object.

  • nindices – Number of node indices

  • indices – Vector of node indices

  • nix[out] Number of elements connected to specified nodes

  • ix[out] Vector of connected elements.

void vis_ConnectElemNum(const vis_Connect *p, Vint type, Vint index, Vint *num)

get number of faces, edges or nodes in an element

Get the number of faces, edges or nodes in an element. For example, the number of faces in a hexahedral element is 6. If an improper element feature, type, is input then num is returned as zero. If an improper element index is input then the operation of this function is undefined.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of element feature.

    =SYS_FACE     Element face
    =SYS_EDGE     Element edge
    =SYS_NODE     Element node
    

  • index – Element index to get number of faces, edges or nodes

  • num[out] Number of faces, edges or nodes in element.

void vis_ConnectElemCon(const vis_Connect *p, Vint type, Vint index, Vint no, Vint *nix, Vint ix[])

get element face or edge connectivity

Get the node indices connected to a specified element, element face, edge or node. If an improper element feature, type, is input then nix is returned as zero. If an improper element index or no is input then the operation of this function is undefined.

The value of no is ignored if type is SYS_ELEM. In this case the complete element connectivity is returned. If type is SYS_NODE then the value of no is the node connection number. The first position in the element node connectivity has node a connection number of 1.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of element feature.

    =SYS_ELEM     Element
    =SYS_FACE     Element face
    =SYS_EDGE     Element edge
    =SYS_NODE     Element node
    

  • index – Element index to get connected nodes

  • no – Element face, edge or node number

  • nix[out] Number of nodes connected to specified element entity

  • ix[out] Vector of connected nodes.

void vis_ConnectElemCnn(const vis_Connect *p, Vint type, Vint index, Vint no, Vint *nix, Vint in[])

get element face or edge node connection number

Get the node connection numbers of a specified element face or edge. Node connection numbers specify positions of nodes in the element node connectivity list. The first position in the element node connectivity has node a connection number of 1. If an improper element feature, type, is input then nix is returned as zero. If an improper element index or no is input then the operation of this function is undefined. Element face and edge numbers are 1 based. If type is SYS_ELEM, then no is ignored.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of element feature.

    =SYS_ELEM     Element
    =SYS_FACE     Element face
    =SYS_EDGE     Element edge
    

  • index – Element index to get node connection numbers

  • no – Element face or edge number

  • nix[out] Number of nodes connected to specified element face or edge

  • in[out] Vector of node connection numbers.

void vis_ConnectElemCorn(const vis_Connect *p, Vint type, Vint index, Vint no, Vint *nix, Vint in[])

get element corner connection number

Get the corner node connection numbers of a specified element face or edge. Node corner connection numbers specify positions of nodes in the element node connectivity list. The first position in the element node connectivity has a node connection number of 1. If an improper element feature, type, is input then nix is returned as zero. If an improper element index or no is input then the operation of this function is undefined. Element face and edge numbers are 1 based. If type is SYS_ELEM, then no is ignored.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of element feature.

    =SYS_ELEM     Element
    =SYS_FACE     Element face
    =SYS_EDGE     Element edge
    

  • index – Element index to get corner node connection numbers

  • no – Element face or edge number

  • nix[out] Number of corner nodes

  • in[out] Vector of corner node connection numbers.

void vis_ConnectElemTopo(const vis_Connect *p, Vint type, Vint index, Vint no, Vint *shape, Vint *maxi, Vint *maxj)

get element face or edge topology

Query for the topology of an element face or edge. For element edges, maxj is always returned as zero. Use vis_ConnectTopology() to get the element topology. If an improper element feature, type, is input then shape is returned as VIS_SHAPEUNDEFINED. If an improper element index or no is input then the operation of this function is undefined. Element face and edge numbers are 1 based.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of element feature.

    =SYS_FACE     Element face
    =SYS_EDGE     Element edge
    

  • index – Element index to get topology of faces or edges.

  • no – Element face or edge number

  • shape[out] Face shape parameter

  • maxi[out] The number of points along the i direction.

  • maxj[out] The number of points along the j direction.

void vis_ConnectSetElemNorm(vis_Connect *p, Vint index, Vint no, Vfloat v[][3])

set element face normals

Set the normals to an element face at the element face nodes. The element face node connectivity order is as returned by vis_ConnectElemCon().

Parameters:
  • p – Pointer to Connect object.

  • index – Element index

  • no – Element face number

  • v – Normal vectors at face nodes

void vis_ConnectSetElemNormdv(vis_Connect *p, Vint id, Vint no, Vdouble v[][3])

set element face normals

See vis_ConnectSetElemNorm()

void vis_ConnectIsElemNorm(const vis_Connect *p, Vint index, Vint no, Vint *flag)

query if set element face normal

Query for element face normal definition. The flag is returned as 0 if the element face normals have not been set using vis_ConnectSetElemNorm(), otherwise it is returned as 1.

Parameters:
  • p – Pointer to Connect object.

  • index – Element index

  • no – Element face number

  • flag[out] Defined flag

void vis_ConnectElemNorm(const vis_Connect *p, Vint index, Vint no, Vfloat v[][3])

get element face normals

Get the normals to an element face at the element face nodes. The element face node connectivity order is as returned by vis_ConnectElemCon(). If the element face normals have not been previously set using vis_ConnectSetElemNorm() then the face node normals are computed from the element geometry. Use vis_ConnectIsElemNorm() to query if the face node normals have been previously set.

Parameters:
  • p – Pointer to Connect object.

  • index – Element index

  • no – Element face number

  • v[out] Normal vectors at face nodes

void vis_ConnectElemNormdv(const vis_Connect *p, Vint id, Vint no, Vdouble v[][3])

get element face normals

See vis_ConnectElemNorm()

void vis_ConnectSetElemTang(vis_Connect *p, Vint index, Vint no, Vfloat v[][3])

set element edge tangents

Set the tangents to an element edge at the element edge nodes. The element edge node connectivity order is as returned by vis_ConnectElemCon().

Parameters:
  • p – Pointer to Connect object.

  • index – Element index

  • no – Element edge number

  • v[out] Tangent vectors at edge nodes

void vis_ConnectSetElemTangdv(vis_Connect *p, Vint id, Vint no, Vdouble v[][3])

set element edge tangents

See vis_ConnectSetElemTang()

void vis_ConnectIsElemTang(const vis_Connect *p, Vint index, Vint no, Vint *flag)

query if set element edge tangent

Query for element edge tangent definition. The flag is returned as 0 if the element edge tangents have not been set using vis_ConnectSetElemTang(), otherwise it is returned as 1.

Parameters:
  • p – Pointer to Connect object.

  • index – Element index

  • no – Element edge number

  • flag[out] Define flag

void vis_ConnectElemTang(const vis_Connect *p, Vint index, Vint no, Vfloat v[][3])

get element edge tangents

Get the tangents to an element edge at the element edge nodes. The element edge node connectivity order is as returned by vis_ConnectElemCon(). If the element edge tangents have not been previously set using vis_ConnectSetElemTang() then the edge node tangents are computed from the element geometry. Use vis_ConnectIsElemTang() to query if the edge node tangents have been previously set.

Parameters:
  • p – Pointer to docref2{Connect} object.

  • index – Element index

  • no – Element edge number

  • v[out] Tangent vectors at edge nodes

void vis_ConnectElemTangdv(const vis_Connect *p, Vint id, Vint no, Vdouble v[][3])

get element edge tangents

See vis_ConnectElemTang()

void vis_ConnectExtent(vis_Connect *p, vis_Group *group, Vfloat extent[2][3])

compute node coordinate extent

Return the coordinates of two points defining the world coordinate extent box of a set of nodes. The point extent[0] is the minimum and the point extent[1] is the maximum. If no node point coordinates have been specified, then the contents of extent are undefined. Use vis_ConnectSetCoords() to define node coordinates.

Errors

VIS_ERROR_VALUE is generated if group is not a node group.

Parameters:
  • p – Pointer to Connect object.

  • group – Pointer to Group object of nodes. If NULL, then all nodes are assumed.

  • extent[out] World coordinates of points at minimum x,y,z and maximum x,y,z.

void vis_ConnectExtentdv(vis_Connect *p, vis_Group *group, Vdouble extent[2][3])

compute node coordinate extent

See vis_ConnectExtent()

void vis_ConnectExtentLoc(vis_Connect *p, vis_Group *group, Vfloat extent[2][3], Vint ix[2][3])

get node coordinate extent and indices

Return the coordinates of two points defining the world coordinate extent box of a set of nodes. The point extent[0] is the minimum and the point extent[1] is the maximum. The ix array contains the node indices corresponding to the extreme values in extent.

Errors

VIS_ERROR_VALUE is generated if group is not a node group.

Parameters:
  • p – Pointer to Connect object.

  • group – Pointer to Group object of nodes. If NULL, then all nodes are assumed.

  • extent[out] World coordinates of points at minimum x,y,z and maximum x,y,z.

  • ix[out] Node indices

void vis_ConnectCoordSysExtentLoc(vis_Connect *p, vis_Group *group, vis_CoordSys *coordsys, Vfloat extent[2][3], Vint ix[2][3])

get node coordinate extent and indices

Return the coordinates of two points defining the local coordinate extent of a set of nodes. The local coordinate system is specified by the input CoordSys object. The point extent[0] is the minimum and the point extent[1] is the maximum. The ix array contains the node indices corresponding to the extreme values in extent.

Errors

  • VIS_ERROR_VALUE is generated if group is not a node group.

  • VIS_ERROR_NULLOBJECT is generated if coordsys is NULL.

Parameters:
  • p – Pointer to Connect object.

  • group – Pointer to Group object of nodes. If NULL, then all nodes are assumed.

  • coordsys – Pointer to CoordSys object.

  • extent[out] World coordinates of points at minimum x,y,z and maximum x,y,z.

  • ix[out] Node indices

void vis_ConnectSetGroupParamf(vis_Connect *p, Vint ptype, Vfloat vparam)

set group derivation parameters

Set group derivation parameters.

The CONNECT_ASSOCID and CONNECT_ASSOCTYPE parameters are integer values which affect the generation of node and element groups by matching an association id of a particular type. The parameter CONNECT_ASSOCTYPE must match one of the standard association types (see the ptype argument of either vis_ConnectSetElemAssoc() or vis_ConnectSetNodeAssoc()) and CONNECT_ASSOCID specifies the association id to match.

The CONNECT_DIMENSION parameter is an integer value specifying element dimension of 0, 1, 2 or 3. The CONNECT_SHAPE parameter is an integer value specifying element shape (see the shape argument of vis_ConnectSetTopology()).

The CONNECT_EXTENT parameters are six float values specifying coordinate extent, minimum x,y,z followed by maximum x,y,z. The extent check includes the extreme values.

The CONNECT_CURVATURECHANGE parameter is a float value which affects the generation of edges due to curvature discontinuity across the edge. An edge is determined to be a curvature discontinuity edge if the curvature change in the direction perpendicular to the edge between the faces connected to the edge is greater than the specified curvature change.

The CONNECT_FEATUREANGLE parameter is a float value, specified in degrees, which affects the generation of feature edges and feature nodes. The default feature angle is 30 degrees. An edge is determined to be a feature if the angle of discontinuity between the faces connected to the edge is greater than the feature angle. In addition, if anything other than 2 faces are connected to an edge it is a feature edge. Similarly a node is a feature node if the discontinuity between the connected edges is greater than the feature angle or if anything other than 2 edges are connected to a node.

The CONNECT_FEATURENONMAN parameter is an integer value which determines whether non-manifold edges are always flagged as a feature edge. In this case a non-manifold element edge refers to an edge which is shared by more than 2 element faces. By default CONNECT_FEATURENONMAN is set to VIS_ON.

The CONNECT_FEATURESENSE parameter is an integer value which determines whether the senses of the normals of adjacent entities are taken into account in determining features. By default CONNECT_FEATURESENSE is set to VIS_OFF.

The CONNECT_MODELVIEWMATRIX model view matrix is a 4 by 4 matrix which specifies the eye coordinate system relative to the world coordinate system.

The CONNECT_NUMBER parameter is an integer value which determines the number of elements an entity is “used” by or attached to. By default CONNECT_NUMBER is set to 1.

The CONNECT_SAMPLEDISTANCE parameter is a float value which affects the sample density when generating CONNECT_SAMPLE groups using vis_ConnectNodeGroup() or vis_ConnectElemGroup(). Nodes or elements are sampled so that no two nodes or element centroids in a sampled group are closer, approximately, than the current sample distance. By default CONNECT_SAMPLEDISTANCE is set to 1.

The CONNECT_TOLERANCE parameter is a float value which is used to check for coincident node locations when using vis_ConnectMerge(). By default CONNECT_TOLERANCE is set to 1.e-12.

Errors

VIS_ERROR_ENUM is generated if an improper node ptype is specified.

Parameters:
  • p – Pointer to Connect object.

  • ptype – Type of group parameter to set

    x=CONNECT_ASSOCID        Association id, iparam
     =CONNECT_ASSOCTYPE      Association type, iparam
     =CONNECT_CURVATURECHANGE Curvature change, param
     =CONNECT_DIMENSION      Dimension value, iparam
     =CONNECT_EXTENT         Coordinate extent, vparam
     =CONNECT_FEATUREANGLE   Feature angle, param
     =CONNECT_FEATURENONMAN  Feature nonmanifold, iparam
     =CONNECT_FEATURESENSE   Feature sense, iparam
     =CONNECT_MODELVIEWMATRIX Model view matrix, param
     =CONNECT_NUMBER         Use number, iparam
     =CONNECT_SEEDELEM       Seed element, iparam
     =CONNECT_SEEDEDGE       Seed edge number, iparam
     =CONNECT_SEEDFACE       Seed face number, iparam
     =CONNECT_SEEDNODE       Seed node, iparam
     =CONNECT_SHAPE          Shape value, iparam
     =CONNECT_SAMPLEDISTANCE Sample distance, param
     =CONNECT_TOLERANCE      Merge tolerance, param
    

  • vparam – Specifies the value that ptype will be set to.

void vis_ConnectSetGroupParamfv(vis_Connect *p, Vint ptype, Vfloat param[])

set group derivation parameters

See vis_ConnectSetGroupParamf()

void vis_ConnectSetGroupParami(vis_Connect *p, Vint ptype, Vint param)

set group derivation parameters

See vis_ConnectSetGroupParamf()

void vis_ConnectSetGroupObject(vis_Connect *p, Vint type, Vobject *object)

set group derivation object

Set a pointer to a group derivation object.

The CONNECT_SEEDGROUP object is a Group object which bounds a CONNECT_SEED operation. The Group must be an element edge group when performing a face group derivation with vis_ConnectFaceGroup(). The Group must be a node group when performing an edge group derivation with vis_ConnectEdgeGroup().

Errors

VIS_ERROR_ENUM is generated if an improper type is specified.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of group parameter to set

    x=CONNECT_SEEDGROUP      Group seed group
    

  • object – Pointer to the object to be set.

void vis_ConnectMergeWithNodeMapping(vis_Connect *p, vis_Group *group, vis_IdTran *previousToNewNodeIndices)

merge coincident nodes

Merge coincident nodes. The distance tolerance is set using vis_ConnectSetParamf() with parameter type CONNECT_TOLERANCE. The node coordinates and node associations are merged with coincident nodes. The lowest numbered node of a set of coincident nodes retains the node coordinates and associations for the set. The total number of nodes is reduced by the number of coincident nodes. Element connectivity is reordered to reflect the node renumbering. If an input node group is specified only the nodes appearing in the group are merged.

Errors

VIS_ERROR_VALUE is generated if group is not a node group.

Parameters:
  • p – Pointer to Connect object.

  • group – Pointer to Group object of nodes. If NULL, then all nodes are assumed.

  • previousToNewNodeIndices – Pointer to IdTran object, mapping previous node indices to new indices

void vis_ConnectMerge(vis_Connect *p, vis_Group *group)

merge coincident nodes

Merge coincident nodes. The distance tolerance is set using vis_ConnectSetParamf() with parameter type CONNECT_TOLERANCE. The node coordinates and node associations are merged with coincident nodes. The lowest numbered node of a set of coincident nodes retains the node coordinates and associations for the set. The total number of nodes is reduced by the number of coincident nodes. Element connectivity is reordered to reflect the node renumbering. If an input node group is specified only the nodes appearing in the group are merged.

Errors

VIS_ERROR_VALUE is generated if group is not a node group.

Parameters:
  • p – Pointer to Connect object.

  • group – Pointer to Group object of nodes. If NULL, then all nodes are assumed.

void vis_ConnectElemGroup(vis_Connect *p, Vint oper, vis_Group *group, vis_Group *groupdst)

parallel derive groups of elements

Derive a group of elements from an input group of elements using a specified operation. The output groupdst must have been previously created and defined as an element group. Note that groupdst is not cleared by this function, in other words the derived element entities are added to any existing elements in the output groupdst.

The CONNECT_ASSOC, CONNECT_DIMENSION, CONNECT_EXTENT and CONNECT_SHAPE operations are only valid for source element groups. The association type and id are specified using vis_ConnectSetGroupParami(). The element dimension is specified using vis_ConnectSetGroupParami(). The element shape is specified using vis_ConnectSetGroupParami(). The element centroid is used to check against extent limits. The extent limits are specified using vis_ConnectSetGroupParamfv()`

The CONNECT_ASSOCANY operation is only valid for source element groups. The association type is specified using vis_ConnectSetGroupParami(). Any non-zero value of the specified association type will flag the element.

The CONNECT_CONNECTED and CONNECT_CONTAINED operations are only valid for source node groups. The CONNECT_CONNECTED operation selects an element if it is connected to a specified number of nodes. The number of node connections is specified using vis_ConnectSetGroupParami() with a parameter type of CONNECT_NUMBER The CONNECT_CONTAINED operation selects an element if all of its nodes exist in the source node group.

The CONNECT_INCONSISTENT operation checks for inconsistent connectivity of 2D elements (triangles and quadrilaterals). Inconsistent connectivity is detected by checking each edge shared by two 2D elements. The connectivity of the two attached elements must traverse the edge in opposite directions, otherwise an inconsistency is flagged. The first 2D element encountered is assumed to be consistently oriented.

The CONNECT_INTERSECT operation checks for intersections of element edges with element faces. Any element containing an edge which intersects with another element face which is not topologically connected to it is flagged.

The CONNECT_SAMPLE operation is only valid for element groups. Elements are selected so that no two element centroids are closer than an approximate sample distance. This operation is useful for selecting elements for drawing markers or icons of some type so that the display does not become too dense in regions of closely spaced elements. The sample distance is specified using vis_ConnectSetGroupParamf() with a parameter type of CONNECT_SAMPLEDISTANCE.

Errors

  • VIS_ERROR_ENUM is generated if an improper operation oper is specified.

  • VIS_ERROR_VALUE is generated if group is not an element group.

Parameters:
  • p – Pointer to Connect object.

  • oper – Operation specified to derive group

    x=CONNECT_ASSOC          Elements with an association value
     =CONNECT_ASSOCANY       Elements with any association value
     =CONNECT_CONNECTED      Element connections to nodes
     =CONNECT_CONTAINED      Element contained entirely by nodes
     =CONNECT_DIMENSION      Elements of a given dimensionality
     =CONNECT_EXTENT         Elements lying in a coordinate box
     =CONNECT_INCONSISTENT   Inconsistent connectivity
     =CONNECT_INTERSECT      Intersecting elements
     =CONNECT_SAMPLE         Sample elements
     =CONNECT_SHAPE          Elements of a given shape
    

  • group – Pointer to source Group object of elements or nodes. If NULL, then all elements are assumed.

  • groupdst[out] Pointer to derived Group object of elements.

void vis_ConnectFaceGroup(vis_Connect *p, Vint oper, vis_Group *group, vis_Group *groupdst)

parallel derive groups of element faces

Derive a group of element faces from an input group of elements using a specified operation. The output groupdst must have been previously created and defined as an element face group. Note that groupdst is not cleared by this function, in other words, the derived element face entities are added to any existing element faces in the output groupdst.

The CONNECT_ASSOC operation is only valid for source element groups. The association type and id are specified using vis_ConnectSetGroupParami().

The CONNECT_ASSOCANY operation is only valid for source element groups. The association type is specified using vis_ConnectSetGroupParami(). Any non-zero value of the specified association type will flag the face.

The CONNECT_ASSOCDIFF operation is only valid for source element groups. The association type is specified using vis_ConnectSetGroupParami(). If any elements connected to a face have differing association values the face will be flagged. An option may be enabled to include free faces in the face group. Enable this option using vis_ConnectSetGroupParami() with type CONNECT_ASSOCFREE.

The CONNECT_CONNECTED and CONNECT_CONTAINED operations are only valid for source node groups. The CONNECT_CONNECTED operation selects an element face if it is connected to a specified number of nodes. The number of node connections is specified using vis_ConnectSetGroupParami() with a parameter type of CONNECT_NUMBER The CONNECT_CONTAINED operation selects an element face if all of its nodes exist in the source node group.

The CONNECT_ELEM operation is only valid for source element groups. An element face is selected if it is the face of a 2D element. A 2D element is any element with a shape of SYS_SHAPETRI or SYS_SHAPEQUAD.

The CONNECT_FREE operation is valid for source element groups. An element face is selected if it connected to only one element.

The CONNECT_SEED operation is valid for source element face groups. An element face is selected if it connected to the specified seed node or seed element face or is adjacent to a selected face and is in the source face group. The face adjacency neighborhood is bounded by a specified element edge seed group. A seed node is specified using vis_ConnectSetGroupParami() with a parameter type of CONNECT_SEEDNODE A seed element face is specified using vis_ConnectSetGroupParami() with a parameter types of CONNECT_SEEDELEM and CONNECT_SEEDFACE. A non-zero specified seed node takes priority over a specified element face. The bounding element edge group is specified using vis_ConnectSetGroupObject() with a type of CONNECT_SEEDGROUP

The CONNECT_UNIQUE operation is valid for source element groups. The first occurrence of each element face is selected. If two or more element faces are connected to the same nodes then only the element face of the lower numbered element is selected.

The CONNECT_USE operation is only valid for source element groups. An element face is selected if it connected (used) to (by) a specified number of elements. The number of element uses is specified using vis_ConnectSetGroupParami() with a parameter type of CONNECT_NUMBER.

Errors

  • VIS_ERROR_ENUM is generated if an improper operation oper is specified.

  • VIS_ERROR_OPERATION is generated if vis_ConnectKernel() has not been previously called.

  • VIS_ERROR_VALUE is generated if group is not an element group.

Parameters:
  • p – Pointer to Connect object.

  • oper – Operation specified to derive group

  • group – Pointer to source Group object of elements or nodes. If NULL, then all elements are assumed.

  • groupdst[out] Pointer to derived Group object of element faces.

void vis_ConnectEdgeGroup(vis_Connect *p, Vint oper, vis_Group *group, vis_Group *groupdst)

parallel derive groups of element edges

Derive a group of element edges from an input group of elements or element faces using a specified operation. The output groupdst must have been previously created and defined as an element edge group. Note that groupdst is not cleared by this function, in other words, the derived element edge entities are added to any existing element edges in the output groupdst.

The CONNECT_ASSOC operation is only valid for source element groups. The association type and id are specified using vis_ConnectSetGroupParami().

The CONNECT_ASSOCANY operation is only valid for source element groups. The association type is specified using vis_ConnectSetGroupParami(). Any non-zero value of the specified association type will flag the edge.

The CONNECT_ASSOCDIFF operation is only valid for source element groups. The association type is specified using vis_ConnectSetGroupParami(). If any elements connected to an edge have differing association values the edge will be flagged. An option may be enabled to include free edges in the edge group. Enable this option using vis_ConnectSetGroupParami() with type CONNECT_ASSOCFREE.

The CONNECT_CONNECTED and CONNECT_CONTAINED operations are only valid for source node groups. The CONNECT_CONNECTED operation selects an element edge if it is connected to a specified number of nodes. The number of node connections is specified using vis_ConnectSetGroupParami() with a parameter type of CONNECT_NUMBER The CONNECT_CONTAINED operation selects an element edge if all of its nodes exist in the source node group.

The CONNECT_CURVATURE, CONNECT_FEATURE and CONNECT_SILHOUETTE operations are only valid for source element face groups. The curvature discontinuity tolerance is specified using vis_ConnectSetGroupParamf() with a parameter type of CONNECT_CURVATURECHANGE. The feature angle tolerance is specified using vis_ConnectSetGroupParamf() with a parameter type of CONNECT_FEATUREANGLE. The model view matrix for silhouette edges is specified using vis_ConnectSetGroupParamfv() with a parameter type of CONNECT_MODELVIEWMATRIX.

The CONNECT_FEATUREASSOCDIFF operation is valid for source element face groups. All edges are flagged which satisfy the feature angle specifications connected to element faces sharing each association value.

The CONNECT_ELEM operation is only valid for source element groups. An element edge is selected if it is the edge of a 1D element. A 1D element is any element with a shape of SYS_SHAPELINE.

The CONNECT_FREE operation is valid for source element and element face groups. An element edge is selected if it connected to only one element or element face respectively.

The CONNECT_UNIQUE operation is valid for source element and element face groups. An element edge is selected if it connected to exactly two element faces.

The CONNECT_UNIQUEASSOC operation is valid for source element groups. All unique edges are flagged connected to elements sharing each association value.

The CONNECT_UNIQUEASSOCDIFF operation is valid for source element face groups. All unique edges are flagged connected to element faces sharing each association value.

The CONNECT_SEED operation is valid for source element edge groups. An element edge is selected if it connected to the specified seed node or seed element edge or is adjacent to a selected edge and is in the source edge group. The edge adjacency neighborhood is bounded by a specified node seed group. A seed node is specified using vis_ConnectSetGroupParami() with a parameter type of CONNECT_SEEDNODE A seed element edge is specified using vis_ConnectSetGroupParami() with a parameter types of CONNECT_SEEDELEM and CONNECT_SEEDEDGE. A non-zero specified seed node takes priority over a specified element edge. The bounding node group is specified using vis_ConnectSetGroupObject() with a type of CONNECT_SEEDGROUP

The CONNECT_UNIQUE operation is valid for source element and element face groups. The first occurrence of each element edge is selected. If two or more element edges are connected to the same nodes then only the element edge of the lower numbered element is selected.

The CONNECT_USE operation is only valid for source element groups. An element edge is selected if it connected (used) to (by) a specified number of elements. The number of element uses is specified using vis_ConnectSetGroupParami() with a parameter type of CONNECT_NUMBER

Errors

  • VIS_ERROR_ENUM is generated if an improper operation oper is specified.

  • VIS_ERROR_OPERATION is generated if vis_ConnectKernel() has not been previously called.

  • VIS_ERROR_VALUE is generated if group is not an element or element face group.

Parameters:
  • p – Pointer to Connect object.

  • oper – Operation specified to derive group

  • group – Pointer to source Group object of elements, element faces or nodes.

  • groupdst[out] Pointer to derived Group object of element edges.

void vis_ConnectNodeGroup(vis_Connect *p, Vint oper, vis_Group *group, vis_Group *groupdst)

derive groups of nodes

Derive a group of nodes from an input source group of elements, element faces, element edges or nodes using a specified operation. The output groupdst must have been previously created and defined as a node group. Note that groupdst is not cleared by this function, in other words the derived node entities are added to any existing nodes in the output groupdst.

The CONNECT_ASSOC and CONNECT_EXTENT operations are only valid for source node groups. The association type and id are specified using vis_ConnectSetGroupParami(). The extent limits are specified using vis_ConnectSetGroupParamfv()

The CONNECT_ASSOCANY operation is only valid for source node groups. The association type is specified using vis_ConnectSetGroupParami(). Any non-zero value of the specified association type will flag the node.

The CONNECT_CORNER operation is valid for source element, element face and element edge groups. A node is selected if it connected to the corner (as opposed to midside, midface or midbody) of a element, element face or element edge respectively. All nodes of linear elements are assumed to be corners.

The CONNECT_ELEM operation is only valid for source element groups. A node is selected if it is connected to a 0D element. A 0D element is any element with a shape of SYS_SHAPEPOINT.

The CONNECT_FEATURE operation is only valid for source element edge groups. The feature angle tolerance is specified using vis_ConnectSetGroupParamf() with a parameter type of CONNECT_FEATUREANGLE.

The CONNECT_FREE operation is valid for source element, element face and element edge groups. A node is selected if it connected to only one element, element face or element edge respectively.

The CONNECT_SAMPLE operation is only valid for source node groups. Nodes are selected so that no two nodes are closer than an approximate sample distance. This operation is useful for selecting nodes for drawing markers or icons of some type so that the display does not become too dense in regions of closely spaced nodes. The sample distance is specified using vis_ConnectSetGroupParamf() with a parameter type of CONNECT_SAMPLEDISTANCE.

The CONNECT_UNIQUE operation is valid for source element, element face and element edge groups. A node is selected if it connected to any element, element face or element edge respectively.

The CONNECT_USE operation is only valid for source element groups. The number of node uses is specified using vis_ConnectSetGroupParami() with a parameter type of CONNECT_NUMBER

Errors

  • VIS_ERROR_ENUM is generated if an improper operation oper is specified.

  • If oper is CONNECT_ELEM, CONNECT_FEATURE, CONNECT_FREE or CONNECT_UNIQUE then VIS_ERROR_OPERATION is generated if vis_ConnectKernel()` has not been previously called.

  • VIS_ERROR_VALUE is generated if group is not an element, element face or element edge group.

  • If oper is CONNECT_ASSOC, CONNECT_ASSOCANY or CONNECT_EXTENT then VIS_ERROR_VALUE is generated if group is not a node group.

Parameters:
  • p – Pointer to Connect object.

  • oper – Operation specified to derive group

    x=CONNECT_ASSOC          Nodes with an association value
     =CONNECT_ASSOCANY       Nodes with any association value
     =CONNECT_CORNER         Node on element corner
     =CONNECT_ELEM           Node of 0D element
     =CONNECT_EXTENT         Nodes lying in a coordinate box
     =CONNECT_FEATURE        Feature nodes
     =CONNECT_FREE           Free nodes
     =CONNECT_SAMPLE         Sample nodes
     =CONNECT_UNIQUE         Unique nodes
     =CONNECT_USE            Node use
    

  • group – Pointer to source Group object of elements, element faces, element edges or nodes. If NULL, then all elements or nodes are assumed depending upon the operation.

  • groupdst[out] Pointer to derived Group object of nodes.

void vis_ConnectElemIdTran(vis_Connect *p, Vint oper, vis_Group *group, vis_IdTran *idtran)

derive element regions

Derive regions of elements from an input group of elements using a specified operation. The regions are numbered sequentially from 1.

The CONNECT_FREEBODY operation creates regions of connected elements which are not connected to any elements in any other region. The CONNECT_TOPOBODY operation creates regions of connected elements which are connected to topologically similar elements.

The CONNECT_MAP operation creates regions of connected elements which are suitable for averaging element based result quantities to nodes. Each region contains topologically similar, simply connected elements with identical VIS_PROPID element associations.

Errors

VIS_ERROR_ENUM is generated if an improper operation oper is specified.

Parameters:
  • p – Pointer to Connect object.

  • oper – Operation specified to derive group

    x=CONNECT_FREEBODY       Unconnected regions
     =CONNECT_TOPOBODY       Topologically similar regions
     =CONNECT_MAP            Mappable regions
    

  • group – Pointer to source Group object of elements or nodes. If NULL, then all elements are assumed.

  • idtran[out] Pointer to IdTran of element regions

void vis_ConnectSplitElem(vis_Connect *p, Vint type, Vint index, Vint no, Vint nind)

split simplex elements

Split element index using node index, nind. Elements which may be split include 2 node lines, 3 node triangles and 4 node tetrahedra. The element index connectivity is replaced by one of the elements resulting from the split.

If the element is split then for lines one additional line element is generated, for triangles two additional triangle elements are generated, and for tetrahedra three additional tetrahedral elements are generated.

If the element edge is split then all elements adjacent to element index across the specified edge are split. An adjacent element is not split if the element is not a simplex of the same shape.

Errors

  • SYS_ERROR_VALUE is generated if an improper index or nind is specified.

  • SYS_ERROR_OPERATION is generated if the element is not a simplex element.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of element feature.

    =SYS_ELEM     Element
    =SYS_FACE     Element face
    =SYS_EDGE     Element edge
    

  • index – Element index

  • no – Element face or edge number

  • nind – Node index used to split element

void vis_ConnectSizeElemdv(vis_Connect *p, Vint type, Vint index, Vint no, Vdouble *s)

compute element sizes

Compute element edge length, face area or element volume. For 1D elements, the element volume is length, for 2D elements the element volume is area.

Errors

  • SYS_ERROR_VALUE is generated if an improper index is specified.

  • SYS_ERROR_OPERATION is generated if the element is not a linear element.

Parameters:
  • p – Pointer to Connect object.

  • type – Type of element feature.

    =SYS_ELEM     Element
    =SYS_FACE     Element face
    =SYS_EDGE     Element edge
    

  • index – Element index

  • no – Element face or edge number

  • s[out] Element size

void vis_ConnectCopy(vis_Connect *p, vis_Connect *fromp)

make a copy of a Connect object

See vis_ConnectBegin()

void vis_ConnectAppend(vis_Connect *p, vis_Connect *fromconnect)

append a Connect object

Append the contents of the fromconnect object to p. If the user node or element identifiers in fromconnect are equal to the node or element index respectively, then the user node or element identifiers are offset by the maximum user node or element identifiers in the p object. If the identifiers are not equal to the index, then the user node or element identifers in fromconnect are set directly into p.

Parameters:
  • p – Pointer to Connect object.

  • fromconnect – Pointer to Connect object.

void vis_ConnectSubset(vis_Connect *p, vis_Group *group, vis_Connect *subconnect, vis_IdTran *idtrannode)

extract a subset of a Connect object

Extract a subset of p and place it in subconnect. The subset of p is specified by the source group of elements. All nodes connected to the specified elements are extracted. The node IdTran object is filled with the parent node indices of the extracted nodes.

Parameters:
  • p – Pointer to Connect object.

  • group – Pointer to source Group object of elements.

  • subconnect – Pointer to subset Connect object.

  • idtrannode – Pointer to node IdTran object of parent node indices.

void vis_ConnectSubsetWithElementMapping(vis_Connect *p, vis_Group *group, vis_Connect *subconnect, vis_IdTran *idtranNode, vis_IdTran *idtranElement)

extract a subset of a Connect object

Extract a subset of p and place it in subconnect. The subset of p is specified by the source group of elements. All nodes connected to the specified elements are extracted. The node IdTran object is filled with the parent node indices of the extracted nodes. The element IdTran object is filled with the parent element indices of the extracted nodes.

Parameters:
  • p – Pointer to Connect object.

  • group – Pointer to source Group object of elements.

  • subconnect – Pointer to subset Connect object.

  • idtranNode – Pointer to node IdTran object of parent node indices.

  • idtranElement – Pointer to element IdTran object of parent element indices.

void vis_ConnectTess(vis_Connect *p, vis_Connect *input)

tesselate a collection of lines

Tesselate an input, two-dimensional Connect object by computing the intersections of lines and arcs and breaking the input lines at those points. All resulting nodes and lines inherit the associations assigned to the parent element or node, respectively. Use vis_ConnectSetParamf() with parameter CONNECT_TOLERANCE to set the merge tolerance. Use parameter CONNECT_SIZE to set the arc length used to tesselate arcs.

Parameters:
  • p – Pointer to resulting Connect object.

  • input – Pointer to input Connect object.

void vis_ConnectGridFun(vis_Connect *p, vis_GridFun *gridfun)

return pointers to grid functions

Fill a GridFun object with grid functions. Use the GridFun object as an attribute object for any global VisTools module which requires access to domain information.

Parameters:
  • p – Pointer to Connect object.

  • gridfun – Pointer to GridFun object to be filled with grid functions

void vis_ConnectPlaneIntersect(vis_Connect *p, Vdouble plane_eq[4], vis_Group *group, vis_Group *groupdst)

Intersects the mesh represented by the Connect object and a plane.

Errors

VIS_ERROR_VALUE is generated if groupdst is not an element group. VIS_ERROR_VALUE is generated if group is not NULL and is not an element group. VIS_ERROR_VALUE is generated if the normal of the plane equation is zero.

Parameters:
  • p – Pointer to Connect object

  • plane_eq – Coefficients a, b, c and d for the plane equation in general form (a*x + b*y + c*z + d = 0)

  • group – Pointer to Group object of elements that will be checked for intersection. If NULL, then all elements are assumed.

  • groupdst[out] Elements resulting from intersection. The indices of the intersected elements are activated in the Group object. A valid Group object with size equal to the number of elements in the mesh, is expected as input.

void vis_ConnectSetNumThreads(vis_Connect *p, Vint num)

set the number of processes to use

Parameters:
  • p – Pointer to resulting Connect object.

  • num – Number of processes.

2.10. Grid Topology and Geometry Query Functions - GridFun

The GridFun module implements a query interface between certain VisTools objects and the finite element data subsystem. Function pointers are required by VisTools modules such as the Connect and State modules to query finite element model and results data. If a GridFun object is meant to interface to finite element data maintained by the host application, it is the responsibility of the user to implement the appropriate query functions. If a VisTools object is selected to maintain basic finite element data, then the GridFun object function pointers are set by the VisTools object. The functions associated with a GridFun object are the following.

Set pointers to the necessary grid functions using vis_GridFunSet().

2.11. Function Descriptions

The currently available GridFun functions are described in detail in this section.

vis_GridFun *vis_GridFunBegin(void)

create an instance of a GridFun object

Create an instance of a GridFun object. Memory is allocated for the object private data and the pointer to the data is returned. By default all function pointers are NULL.

Destroy an instance of a GridFun object using

void vis_GridFunEnd (vis_GridFun *gridfun)

Return the current value of a GridFun object error flag using

Vint vis_GridFunError (vis_GridFun *gridfun)

Make a copy of a GridFun object. The private data from the fromgridfun object is copied to the gridfun object. Any previous private data in gridfun is lost.

void vis_GridFunCopy (vis_GridFun *gridfun,
                      vis_GridFun *fromgridfun)

Returns:

The function returns a pointer to the newly created GridFun object. If the object creation fails, NULL is returned.

void vis_GridFunEnd(vis_GridFun *p)

destroy an instance of a GridFun object

See vis_GridFunBegin()

Vint vis_GridFunError(vis_GridFun *p)

return the current value of a GridFun object error flag

See vis_GridFunBegin()

void vis_GridFunSet(vis_GridFun *p, Vint type, Vfunc *function)

set pointer to grid function

Set pointers to grid functions. The function descriptions are identical to the associated Connect functions.

Get function as an output argument using

void vis_GridFunGet (vis_GridFun *gridfun,
                     Vint type,
                     void (**function)())

Errors

VIS_ERROR_ENUM is generated if an improper type is input.

Parameters:
  • p – Pointer to GridFun object.

  • type – Function type being set

    x=GRIDFUN_COORDS         Set Coords function
     =GRIDFUN_COORDSDV       Set Coordsdv function
     =GRIDFUN_ELEMADJ        Set ElemAdj function
     =GRIDFUN_ELEMASSOC      Set ElemAssoc function
     =GRIDFUN_ELEMCON        Set ElemCon function
     =GRIDFUN_ELEMCNN        Set ElemCnn function
     =GRIDFUN_ELEMCORN       Set ElemCorn function
     =GRIDFUN_ELEMNODE       Set ElemNode function
     =GRIDFUN_ELEMNUM        Set ElemNum function
     =GRIDFUN_ELEMTOPO       Set ElemTopo function
     =GRIDFUN_EXTENT         Set Extent function
     =GRIDFUN_ITHPARTNAME    Set IthPartName function
     =GRIDFUN_MAXELEMNODE    Set MaxElemNode function
     =GRIDFUN_MAXNODELEM     Set MaxNodeElem function
     =GRIDFUN_NODEADJ        Set NodeAdj function
     =GRIDFUN_NODEASSOC      Set NodeAssoc function
     =GRIDFUN_NODEELEM       Set NodeElem function
     =GRIDFUN_NUMBER         Set Number function
     =GRIDFUN_NUMELEMNODE    Set NumElemNode function
     =GRIDFUN_NUMNODEELEM    Set NumNodeElem function
     =GRIDFUN_NUMPARTNAME    Set NumPartName function
     =GRIDFUN_PARTNAME       Set PartName function
     =GRIDFUN_TOPOLOGY       Set Topology function
    

  • function – Pointer to grid function

void vis_GridFunSetErrorFunction(vis_GridFun *p, VfuncInt *function)

set pointer to error function

Set pointers to error function.

Parameters:
  • p – Pointer to GridFun object.

  • function – Pointer to error function

void vis_GridFunGet(vis_GridFun *p, Vint type, Vfunc **function)

get pointer to grid function

See vis_GridFunSet()

void vis_GridFunSetObj(vis_GridFun *p, Vobject *obj)

set pointer to auxiliary object

Set pointer to grid function auxiliary object.

Get obj as an output argument using

void vis_GridFunGetObj (vis_GridFun *gridfun,
                        Vobject **obj)

Parameters:
  • p – Pointer to GridFun object.

  • obj – Pointer to auxiliary object

void vis_GridFunGetObj(vis_GridFun *p, Vobject **obj)

get pointer to auxiliary object

See vis_GridFunSetObj()

void vis_GridFunCopy(vis_GridFun *p, vis_GridFun *fromp)

make a copy of a GridFun object

See vis_GridFunBegin()

void vis_GridFunTopology(const vis_GridFun *p, Vint id, Vint *shape, Vint *maxi, Vint *maxj, Vint *maxk)

set element topologies

See vis_ConnectSetTopology()

void vis_GridFunElemNode(const vis_GridFun *p, Vint id, Vint *nix, Vint ix[])

get nodes connected to an element

See vis_ConnectElemNode()

void vis_GridFunCoords(const vis_GridFun *p, Vint nids, Vint ids[], Vfloat x[][3])

get node coordinates

See vis_ConnectCoords()

void vis_GridFunElemNum(const vis_GridFun *p, Vint type, Vint id, Vint *num)

get number of faces, edges or nodes in an element

See vis_ConnectElemNum()

void vis_GridFunElemCon(const vis_GridFun *p, Vint type, Vint id, Vint no, Vint *nix, Vint ix[])

get element face or edge connectivity

See vis_ConnectElemCon()

void vis_GridFunElemCnn(const vis_GridFun *p, Vint type, Vint id, Vint no, Vint *nix, Vint in[])

get element face or edge node connection number

See vis_ConnectElemCnn()