3. Entity Sets and Identifier Translation - Group, IdTran

The Group and IdTran modules perform entity subsetting and user identifier translation. Functions exist to convert Group objects to IdTran objects and vice versa so that the most useful form of an entity subset may be represented.

The Group object is useful for archiving entity sets if there are a small number of sets and the sets are therefore dense. Internally a Group object allocates a slot for each entity, such as the total number of nodes or elements, in the model. The total memory required for set storage will be proportional to the number of groups and this memory could be large for a large number of groups.

The IdTran object is useful for archiving entity sets if there are a large number of sets and the sets are therefore sparse. Internall an IdTran object allocates a slot for each entity in the set. If the sets are disjoint, the total memory required for set storage will be generally bounded by the total number of entities in the model.

3.1. Entity Sets - Group

The Group module maintains lists of active entities such as elements and nodes and child entities such as element faces and edges. The terms “element” and “node” will be used as generic terms in place of “cell” and “vertex” which are typically used in reference to block structured grids.

Users of a Group object may set or query for active entities. The Group module also supports Boolean operations so that entity subsets may be combined, intersected, copied, etc. Normally the active entities in a Group object are set by a function in another module such as vis_ConnectFaceGroup() in the Connect module. The functions associated with a Group object are the following.

Instance a Group object initially using vis_GroupBegin() and define parent and child entity types and parent entity size with vis_GroupDef(). Currently allowable entity types are parent element and node, and child face and edge. The child entity type is optional. The following four combinations are permitted (1) element, (2) element face, (3) element edge, and (4) node. If the exact number of parent entities to be entered into a Group object is unknown, then make an initial estimate, (0 is allowed), and call vis_GroupDef() with that estimate. The Group object will adjust memory dynamically if required.

The actual data structures used to hold active entity flags are private to the Group object. The user accesses active entities in a Group using a suite of functions. These functions fall into three basic categories, (1) query for the activity flags of a particular entity by index, (2) query for the activity flag of a particular entity by index and edge or face number, (3) query for the index of the “next” active entity.

The activity flags which are returned for basic element and node entities, using vis_GroupGetIndex() for example, are returned as the low order bit in an integer data type (Vint). For non polygonal or polyhedral finite element shapes the flags for element faces are returned encoded as the low order 6 bits in an integer. Each bit set indicates that the associated element face (numbered 1 to 6 in a hexahedron for example) is active. The flags for element edges are returned encoded as the low order 12 bits in an integer. Each bit set indicates that the associated element edge (numbered 1 to 12 in a hexahedron for example) is active. For polygonal and polyhedral shapes (VIS_SHAPEPOLYGON and VIS_SHAPEPOLYHED) the integer activity index only encodes the activity flags for the first 32 edges or faces. The function vis_GroupGetEntFlag() has been designed to query any activity flag individually by index and edge or face number.

The functions vis_GroupNode(), vis_GroupElem(), and vis_GroupElemEnt() are designed to test for activity flag(s) and return the flag as the return value of the function.

Boolean and other operations on Group objects may be performed using vis_GroupAll(), vis_GroupClear(), vis_GroupCopy(), vis_GroupBoolean() and vis_GroupComplement(). The vis_GroupIdTran() function may be used to convert an ordered list of identifiers in an IdTran object into a set of active entity flags in a Group object.

As a convenience, a name string may be associated with the Group object using vis_GroupSetName(). The functions vis_GroupSetType(), vis_GroupGetType() and vis_GroupSetSpec(), vis_GroupGetSpec() may be used to set useful integer data which describe the general and specific types of the group. These integers are usually set to the values associated with the element associations VIS_FEATYPE and VIS_FEASPEC respectively.

3.2. Function Descriptions

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

vis_Group *vis_GroupBegin(void)

create an instance of a Group object

Create an instance of a Group object. Memory is allocated for the object private data and the pointer to the data is returned. By default the group has a parent element type, no child entity type and zero parent entities.

Destroy an instance of a Group object using

void vis_GroupEnd (vis_Group *group)

Return the current value of a Group object error flag using

Vint vis_GroupError (vis_Group *group)

Make a copy of a Group object. The private data from the fromgroup object is copied to the group object. Any previous private data in group is lost.

void vis_GroupCopy (vis_Group *group,
                    vis_Group *fromgroup)

Returns:

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

void vis_GroupEnd(vis_Group *p)

destroy an instance of a Group object

See vis_GroupBegin()

Vint vis_GroupError(vis_Group *p)

return the current value of a Group object error flag

See vis_GroupBegin()

void vis_GroupDef(vis_Group *p, Vint nument, Vint parenttype, Vint childtype)

define parent and child entities

Specify the number of parent entities and type of parent and child entities. A child entity type may be specified if element faces or element edges are to managed by the group. If purely elements or nodes are to be managed by the group, then childtype should be set to SYS_NONE. This function call initializes all entities to be inactive.

Inquire of defined nument, parenttype and childtype as output arguments. The value of nument is the maximum index referenced by vis_GroupDef() or vis_GroupSetIndex().

void vis_GroupInq (const vis_Group *group,
                   Vint *nument,
                   Vint *parenttype,
                   Vint *childtype)

Errors

  • VIS_ERROR_VALUE is generated if nument is non positive.

  • VIS_ERROR_ENUM is generated if an improper parenttype or childtype

Parameters:
  • p – Pointer to Group object.

  • nument – Number of parent entities

  • parenttype – Type of parent entity

    =SYS_ELEM     Element type
    =SYS_NODE     Node type
    

  • childtype – Type of child entity.

    =SYS_NONE     No child entity
    =SYS_FACE     Face type
    =SYS_EDGE     Edge type
    

void vis_GroupInq(const vis_Group *p, Vint *nument, Vint *enttype, Vint *subtype)

inquire of defined nument, enttype and subtype as output arguments

See vis_GroupDef()

void vis_GroupSetIndex(vis_Group *p, Vint index, Vint flags)

set entity as active or inactive

Set activity of the entity specified by index. For basic node and element entities (no child type is specified) the activity is simply specified by the low order bit in flags. For element face entities, the activity is specified by the low order 6 bits in flags, one bit for each element face. For element edge entities, the activity is specified by the low order 12 bits in flags, one bit for each element edge.

Get flags as an output argument.

void vis_GroupGetIndex (const vis_Group *group,
                        Vint index,
                        Vint *flag)

Errors

VIS_ERROR_VALUE is generated if an improper index is specified.

Parameters:
  • p – Pointer to Group object.

  • index – Index of entity to set activity

  • flags – Activity flag(s) of entity.

void vis_GroupSetIndices(vis_Group *p, Vint nix, Vint indices[], Vint flags)

set entities as active or inactive

Set activity of the entities specified by indices. The function `vis_GroupSetIndex()´ is called for each index in indices.

Errors

VIS_ERROR_VALUE is generated if an improper entry of indices is specified.

Parameters:
  • p – Pointer to Group object.

  • nix – Number of indices

  • indices – Indices of entities to set activity

  • flags – Activity flag(s) of entities.

void vis_GroupGetIndex(const vis_Group *p, Vint index, Vint *flag)

get entity as active or inactive

See vis_GroupSetIndex()

void vis_GroupSetEntFlag(vis_Group *p, Vint index, Vint no, Vint flag)

set entity flag by index and number

Set the activity flag of a specific element edge or face.

Get flag as an output argument.

void vis_GroupGetEntFlag (const vis_Group *group,
                          Vint index,
                          Vint no,
                          Vint *flag)

Errors

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

Parameters:
  • p – Pointer to Group object.

  • index – Index of entity to set activity flag

  • no – Element edge or face number

  • flag – Activity flag of entity.

void vis_GroupGetEntFlag(const vis_Group *p, Vint index, Vint no, Vint *flag)

get entity flag by index and number

See vis_GroupSetEntFlag()

void vis_GroupNumEntFlag(const vis_Group *p, Vint index, Vint *numno, Vint *maxno)

get number of entity flags by index

Return the number of activity flags and the maximum activity flag set at an element edge or face.

Errors

VIS_ERROR_VALUE is generated if an improper index is specified.

Parameters:
  • p – Pointer to Group object.

  • index – Index of entity to set activity flag

  • numno[out] Number of set element edges or faces.

  • maxno[out] Maximum element edge or face set.

Vint vis_GroupNode(const vis_Group *p, Vint index)

query for active node

Query for the activity flag for an element. The flag is set if any element edge or face flag is set. Note that the return value is 1 if the input p object is NULL.

Parameters:
  • p – Pointer to Group object.

  • index – Index of entity

Returns:

The function returns the activity flag for the node.

Vint vis_GroupElem(const vis_Group *p, Vint index)

query for active element

Query for the activity flag for a node. Note that the return value is 1 if the input p object is NULL.

Parameters:
  • p – Pointer to Group object.

  • index – Index of entity

Returns:

The function returns the activity flag for the element.

Vint vis_GroupElemEnt(const vis_Group *p, Vint index, Vint no)

query for active element edge or face

Query for the activity flag for an element edge or face. Note that the return value is 1 if the input group object is NULL.

Parameters:
  • p – Pointer to Group object.

  • index – Index of entity

  • no – Element edge or face number

Returns:

The function returns the activity flag for the element edge for face

void vis_GroupSetName(vis_Group *p, Vchar *name)

set name string

Set a name string. The name string can contain up to 81 characters including the terminating NULL. If the name is not specified it is returned as a single NULL character using vis_GroupGetName().

Get name as an output argument.

void vis_GroupGetName (const vis_Group *group,
                       Vchar name[])

Parameters:
  • p – Pointer to Group object.

  • name – Name string

void vis_GroupGetName(vis_Group *p, Vchar name[])

get name string

See vis_GroupSetName()

void vis_GroupSetType(vis_Group *p, Vint type)

set type

Set a general type integer. If the type is not specified it is returned as zero using vis_GroupGetType().

Get type as an output argument.

void vis_GroupGetType (const vis_Group *group,
                       Vint *type)

Parameters:
  • p – Pointer to Group object.

  • type – Integer general type

void vis_GroupGetType(vis_Group *p, Vint *type)

get type

See vis_GroupSetType()

void vis_GroupSetSpec(vis_Group *p, Vint spec)

set specific type

Set a specific type integer. If the specific type is not specified it is returned as zero using vis_GroupGetSpec().

Get spec as an output argument.

void vis_GroupGetSpec (const vis_Group *group,
                       Vint *spec)

Parameters:
  • p – Pointer to Group object.

  • spec – Integer specific type

void vis_GroupGetSpec(vis_Group *p, Vint *spec)

get specific type

See vis_GroupSetSpec()

void vis_GroupInitIndex(vis_Group *p)

initialize and get next active entity

These two functions may be used to query for active entities. Use vis_GroupInitIndex() to initialize the query sequence. Then subsequent calls to vis_GroupNextIndex() will return the index and activity flags of the next active entity. The next active entity is defined as the active entity with the next higher index from the entity index returned from the previous call to vis_GroupNextIndex(). The first call to vis_GroupNextIndex() after vis_GroupInitIndex() returns the active entity with the lowest index. Any calls to vis_GroupNextIndex() after the active entity with the highest index has been returned, will return a value of index = 0.

Parameters:

p – Pointer to Group object.

void vis_GroupNextIndex(vis_Group *p, Vint *index, Vint *flags)

initialize and get next active entity

See vis_GroupInitIndex()

Parameters:
  • p – Pointer to Group object.

  • index[out] Index of entity

  • flags[out] Activity flag(s) of entity.

void vis_GroupClear(vis_Group *p)

unary group operations

Use vis_GroupAll() to set all entities active in a group. Use vis_GroupClear() to set all entities inactive (delete all entities) in a group. Use vis_GroupComplement() to take the complement of a group.

Parameters:

p – Pointer to Group object.

void vis_GroupAll(vis_Group *p)

unary group operations

Use vis_GroupAll() to set all entities active in a group. Use vis_GroupClear() to set all entities inactive (delete all entities) in a group. Use vis_GroupComplement() to take the complement of a group.

Parameters:

p – Pointer to Group object.

void vis_GroupBoolean(vis_Group *p, Vint operation, vis_Group *groupsrc)

perform binary Boolean group operations

Perform Boolean operations on a group. The GROUP_DELETE operation deletes all active entities in groupsrc from p. The GROUP_INSERT operation inserts all active entities in groupsrc in p. The resultant p contains all the original active entities in p plus the active entities in groupsrc. The GROUP_MASK operation intersects the active entities in groupsrc with p. The resultant p contains the original active entities in p which were also in groupsrc. The GROUP_SET operation sets or copies all active entities in groupsrc into p. The resultant p is identical to groupsrc.

Errors

VIS_ERROR_OPERATION is generated if the p and groupsrc groups do not have identical definitions, (same number and type of parent entities and same child entity type).

Parameters:
  • p – Pointer to Group object.

  • operation – Boolean operation to perform

    x=GROUP_DELETE Delete groupsrc from p.
     =GROUP_INSERT Insert groupsrc in p.
     =GROUP_MASK   Mask groupsrc from p.
     =GROUP_SET    Copy groupsrc to  p.
    

  • groupsrc – Pointer to source Group object.

void vis_GroupComplement(vis_Group *p)

unary group operations

Use vis_GroupAll() to set all entities active in a group. Use vis_GroupClear() to set all entities inactive (delete all entities) in a group. Use vis_GroupComplement() to take the complement of a group.

Parameters:

p – Pointer to Group object.

void vis_GroupCount(const vis_Group *p, Vint *nparent, Vint *nchild)

count active entities in a group

Return the number of currently active parent, nparent, and child, nchild entities. If the group was defined with no child type, then nchild is returned as zero or can be ignored using NULL.

Parameters:
  • p – Pointer to Group object.

  • nparent[out] Number of currently active parent entities

  • nchild[out] Number of currently active child entities

void vis_GroupIdTran(vis_Group *p, vis_IdTran *idtran)

convert an IdTran object to a Group object

Set the identifiers in the IdTran object, idtran, as active indices in the Group object, p. If the idtran object has no child type, the p object must be a node or element group with no child entity type. If the idtran object has a child type, the p object must be an element group with a matching child type. The function may be used to convert an ordered list of identifiers contained in an IdTran object to an unordered, Boolean set of active entities in a Group object.

Errors

  • VIS_ERROR_VALUE is generated if an improper identifier is specified as an index.

  • VIS_ERROR_OPERATION is generated if p parent or child type do not match the idtran type.

Parameters:
  • p – Pointer to Group object.

  • idtran – Pointer to IdTran object.

void vis_GroupCopy(vis_Group *p, vis_Group *fromp)

make a copy of a Group object

See vis_GroupBegin()

3.3. Entity Identifier Translation - IdTran

The IdTran module is primarily used to translate user defined entity identifiers (user name space), such as node and element numbers, to a 1 based sequential entity index name space. It is a common feature of commercial finite element analysis systems to allow user defined node and element numbers of arbitrary magnitude and order. It is useful to be able to quickly translate the user defined identifier to an index for quick lookup of entity properties in linear data structures. The computational burden of translating between user defined entity identifiers and entity indices is only performed during user input/output operations such as displaying node numbers on a graphics display or reading element connectivity from an input deck. The IdTran module performs this mapping from entity identifier to entity index as well as the reverse mapping from index to identifier. Memory requirements for the translation are optimized dependent upon the properties of the identifiers.

The IdTran module can also be used to store sets of nodes and elements, including element entities such as element faces and edges. Functions are provided to store and query for set names, integer identifier, etc. The functions associated with a IdTran object are the following.

Instance an IdTran object using vis_IdTranBegin(). Define the total number of entities using vis_IdTranDef(). If the exact number of entities to be entered is known then call vis_IdTranDef() with the proper number otherwise make an initial estimate (0 is allowed) and the IdTran object will adjust memory dynamically as required.

Next the index-identifier mapping must be defined. Use a call to vis_IdTranSetId() for each entity identifier. The order in which the indices are defined is immaterial. Identifiers may be mapped to indices either one at a time or in a set using vis_IdTranIndex() and vis_IdTranIndices() respectively. Use vis_IdTranGetId() and vis_IdTranGetIds() to map indices to identifiers. The index-identifier mapping may be changed at any time using vis_IdTranSetId(), however before the reverse mapping may be queried using vis_IdTranIndex() and vis_IdTranIndices(), the IdTran object must analyze the index-identifier mapping which is a potentially computationally expensive operation. If there are entities with duplicate identifiers then the functions vis_IdTranNumIndex() and vis_IdTranAllIndex() may be used to get a list of entities which share a given identifier.

The IdTran object may be used to store and query node and element and element face and edge sets. Each element face or edge is characterized by the element identifier and face or edge number. In the case of element face and edge sets, use the function vis_IdTranSetEnt() to set the face or edge number associated with an element. The element identifier must have been previously defined for an index using vis_IdTranSetId(). Note that if several element faces or edges are to be set for a single element, an index with the element identifier must be specified first for each face or edge.

As an option, the IdTran object can be used to store and query auxiliary set information. Use vis_IdTranSetEntType() and vis_IdTranGetEntType() to store the entity type (node or element) and subtype (none, face, edge). The functions vis_IdTranSetType() and vis_IdTranSetSpec() are designed to store the element type, VIS_FEATYPE and element specific, VIS_FEASPEC associations which may characterize the set. Use vis_IdTranGetType() and vis_IdTranGetSpec() to query this information. This auxiliary information has no effect on the operation of the IdTran object, it is only for the user to store and query.

The IdTran object may also be used to manage identifier equivalencing using the functions IdTranClear, IdTranEquId, IdTranEquSweep and IdTranEquReNumber. The IdTran object should be initially cleared (all identifiers set to zero) using IdTranClear. Identifier equivalences are then entered pair by pair using IdTranEquId. After the last equivalenced pair are entered, sweep the equivalences using IdTranEquSweep. This function will ensure that all equivalenced identifiers point to the lowest common equivalenced index. The lowest common equivalenced identifiers and all other index identifiers will be zero. Use IdTranEquReNumber to renumber all the identifiers starting from one.

The vis_IdTranGroup() function may be used to convert the set of active entity flags in a Group object to an ordered list of identifiers in an IdTran object.

As a convenience, a name string may be associated with the IdTran object using vis_IdTranSetName().

3.4. Function Descriptions

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

vis_IdTran *vis_IdTranBegin(void)

create an instance of an IdTran object

Create an instance of an IdTran object. Memory is allocated for the object private data and the pointer to the data is returned. By default the number of entities is zero.

Destroy an instance of a IdTran object using

void vis_IdTranEnd (vis_IdTran *connect)

Return the current value of a IdTran object error flag using

Vint vis_IdTranError (vis_IdTran *connect)

Make a copy of a IdTran object. The private data from the fromidtran object is copied to the IdTran object. Any previous private data in idtran is lost.

void vis_IdTranCopy (vis_IdTran *idtran,
                     vis_IdTran *fromidtran)

Returns:

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

void vis_IdTranEnd(vis_IdTran *p)

destroy an instance of a IdTran object

See vis_IdTranBegin()

Vint vis_IdTranError(vis_IdTran *p)

return the current value of a IdTran object error flag

See vis_IdTranBegin()

void vis_IdTranDef(vis_IdTran *p, Vint nument)

define number of entities

Specify the number of entities. If the number of entities to be set in the IdTran object is not known, make a good initial guess if possible (0 is acceptable) and the IdTran object will adjust memory dynamically as required. If the exact number of entities is known, then enter this number and memory reallocations will be minimized. This function call initializes all identifiers to zero.

Inquire of defined nument or the maximum index for which an identifier has been defined using vis_IdTranSetId(), as an output argument using

void vis_IdTranInq (const vis_IdTran *idtran,
                    Vint *nument)

Errors

VIS_ERROR_VALUE is generated if nument is non positive.

Parameters:
  • p – Pointer to IdTran object.

  • nument – Number of entities

void vis_IdTranInq(const vis_IdTran *p, Vint *nument)

inquire number of entities

See vis_IdTranDef()

void vis_IdTranSetId(vis_IdTran *p, Vint index, Vint id)

set entity index and associated identifier

Set identifier of the entity specified by index. The indices may be input in any order.

Get a single id associated with an index as an output argument.

void vis_IdTranGetId (const vis_IdTran *idtran,
                      Vint index,
                      Vint *id)

Get a set of ids associated with a set of indices where nindices is the number of indices. The array arguments indices and ids may be safely used as the same array.

void vis_IdTranGetIds (const vis_IdTran *idtran,
                       Vint nindices,
                       Vint indices[],
                       Vint ids[])

Note that there is no error checking for the validity of the index or indices input to the a vis_IdTranGetId() and vis_IdTranGetIds() functions.

Errors

  • VIS_ERROR_VALUE is generated if an index less than 1 is specified.

  • VIS_ERROR_MEMORY is generated if a memory allocation failure occurs.

Parameters:
  • p – Pointer to IdTran object.

  • index – Index of entity to set identifier

  • id – Entity identifier

void vis_IdTranGetId(const vis_IdTran *p, Vint index, Vint *id)

get entity index and associated identifier

See vis_IdTranSetId()

void vis_IdTranGetIds(const vis_IdTran *p, Vint nindices, Vint indices[], Vint ids[])

get entity index and associated identifier

See vis_IdTranSetId()

void vis_IdTranSetEnt(vis_IdTran *p, Vint index, Vint no)

set entity face or edge number

Set element face or edge number of the entity specified by index. The element identifier associated with index must have been previously set using vis_IdTranSetId().

Get a single no associated with an index as an output argument.

void vis_IdTranGetEnt (const vis_IdTran *idtran,
                       Vint index,
                       Vint *no)

Get a set of nos associated with a set of indices where nindices is the number of indices.

void vis_IdTranGetEnts (const vis_IdTran *idtran,
                        Vint nindices,
                        Vint indices[],
                        Vint nos[])

Errors

  • VIS_ERROR_VALUE is generated if an index not previously defined.

  • VIS_ERROR_OPERATION is generated if the identifier associated with index is zero.

  • VIS_ERROR_MEMORY is generated if a memory allocation failure occurs.

Parameters:
  • p – Pointer to IdTran object.

  • index – Index of entity to set identifier

  • no – Element face or edge number

void vis_IdTranGetEnt(const vis_IdTran *p, Vint index, Vint *ent)

get entity face or edge number

See vis_IdTranSetEnt()

void vis_IdTranGetEnts(const vis_IdTran *p, Vint nindices, Vint indices[], Vint ents[])

get entity face or edge number

See vis_IdTranSetEnt()

void vis_IdTranAddId(vis_IdTran *p, Vint id)

add entity identifier

Add identifier at the next highest index.

Errors

VIS_ERROR_MEMORY is generated if a memory allocation failure occurs.

Parameters:
  • p – Pointer to IdTran object.

  • id – Entity identifier

void vis_IdTranAddThruByIds(vis_IdTran *p, Vint num, Vint listids[])

add list of entity identifiers

Add a list of identifiers at the next highest index. The list consists of a series of positivie integer identifiers with optional “thru”, IDTRAN_THRU, and “by”, IDTRAN_BY entries. For example, the following list of length num=11,

5,7,IDTRAN_THRU,11,20,25,IDTRAN_THRU,29,IDTRAN_BY,2,3
generates the following series of identifiers.
5,7,8,9,10,11,20,25,27,29,3

Errors

  • VIS_ERROR_MEMORY is generated if a memory allocation failure occurs.

  • VIS_ERROR_VALUE if an improper THRU-BY syntax is encountered.

Parameters:
  • p – Pointer to IdTran object.

  • num – Number of entries in listids.

  • listids – Entity list

void vis_IdTranEquId(vis_IdTran *p, Vint index, Vint id)

set equivalent id

Set equivalenced identifier of the entity specified by index. The function vis_IdTranClear() must be called before the first equivalenced identifier is specified. After all equivalences are specified, the functiuon vis_IdTranEquSweep() must be called to process the equivalences so that all equivalenced identifiers point to the lowest common equivalenced index.

Errors

  • VIS_ERROR_VALUE is generated if an index less than 1 is specified.

  • VIS_ERROR_MEMORY is generated if a memory allocation failure occurs.

  • VIS_ERROR_OPERATION is generated if an equivalenced identifier is unable to be set. This error will occur if the funtion vis_IdTranClear() is not initially called before the first equivalenced identifier is specified.

Parameters:
  • p – Pointer to IdTran object.

  • index – Index of entity to set identifier

  • id – Entity identifier

void vis_IdTranEquSweep(vis_IdTran *p)

sweep equivalent ids

Sweep and process equivalenced identifiers so that all equivalenced identifiers point to the lowest common equivalenced index. The lowest common equivalenced identifiers and all other index identifiers will be zero.

Parameters:

p – Pointer to IdTran object.

void vis_IdTranEquReNumber(vis_IdTran *p, Vint *num)

renumber equivalent ids

Renumber equivalenced identifiers starting from one. This function is called after vis_IdTranEquSweep(). All identifier will now be nonzero. The function returns the number of unique identifiers assigned.

Parameters:
  • p – Pointer to IdTran object.

  • num[out] Number of unique ids

void vis_IdTranSetUID(vis_IdTran *p, Vint id)

set IdTran user Identifier

Set an optional IdTran user Identifier.

Get id as an output argument.

void vis_IdTranGetUID (const vis_IdTran *idtran,
                       Vint *id)

Parameters:
  • p – Pointer to IdTran object.

  • id – User Identifier

void vis_IdTranGetUID(vis_IdTran *p, Vint *id)

get optional IdTran user Identifier

See vis_IdTranSetUID()

void vis_IdTranSetName(vis_IdTran *p, Vchar *name)

set name string

Set a name string. The name string can contain up to 81 characters including the terminating NULL. If the name is not specified it is returned as a single NULL character using vis_IdTranGetName().

Get name as an output argument.

void vis_IdTranGetName (const vis_IdTran *idtran,
                        Vchar name[])

Parameters:
  • p – Pointer to IdTran object.

  • name – Name string

void vis_IdTranGetName(vis_IdTran *p, Vchar name[])

get name string

See vis_IdTranSetName()

void vis_IdTranSetUProp(vis_IdTran *p, vis_UProp *uprop)

set UProp object

Set an optional UProp object of user defined properties.

Inquire uprop as an output argument.

void vis_IdTranGetUProp (vis_IdTran *idtran,
                         vis_UProp **uprop)

Parameters:
  • p – Pointer to IdTran object.

  • uprop – Pointer to UProp object.

void vis_IdTranGetUProp(vis_IdTran *p, vis_UProp **uprop)

get UProp object

See vis_IdTranSetUProp()

void vis_IdTranDelete(vis_IdTran *p)

delete all set objects

Delete all objects which have been “Set” in the IdTran object. This includes objects set using vis_IdTranSetUProp(),

Parameters:

p – Pointer to IdTran object.

void vis_IdTranSetType(vis_IdTran *p, Vint type)

set finite element type

Specify the finite element type. The values of type are intended to be those supported by the element association VIS_FEATYPE. See vis_ConnectSetElemAssoc().

Inquire type as an output argument.

void vis_IdTranGetType (vis_IdTran *idtran,
                        Vint *type)

Parameters:
  • p – Pointer to IdTran object.

  • type – Finite element type

void vis_IdTranGetType(vis_IdTran *p, Vint *type)

get finite element type

See vis_IdTranSetType()

void vis_IdTranSetSpec(vis_IdTran *p, Vint spec)

set finite element specific type

Specify the finite element specific type. The values of spec are intended to be those supported by the element association VIS_FEASPEC. See vis_ConnectSetElemAssoc().

Inquire spec as an output argument.

void vis_IdTranGetSpec (vis_IdTran *idtran,
                        Vint *spec)

Parameters:
  • p – Pointer to IdTran object.

  • spec – Finite element specific type

void vis_IdTranGetSpec(vis_IdTran *p, Vint *spec)

get finite element specific type

See vis_IdTranSetSpec()

void vis_IdTranSetEntType(vis_IdTran *p, Vint parenttype, Vint childtype)

set entity number type

Specify the type of parent and child entities.

Inquire parenttype and childtype as output arguments.

void vis_IdTranGetEntType (vis_IdTran *idtran,
                           Vint *parenttype,
                           Vint *childtype)

Errors

VIS_ERROR_ENUM is generated if an improper parenttype or childtype is specified.

Parameters:
  • p – Pointer to IdTran object.

  • parenttype – Type of parent entity

    =SYS_ELEM     Element type
    =SYS_NODE     Node type
    

  • childtype – Type of child entity.

    =SYS_NONE     No child entity
    =SYS_FACE     Face type
    =SYS_EDGE     Edge type
    

void vis_IdTranGetEntType(vis_IdTran *p, Vint *enttype, Vint *subtype)

get entity number type

See vis_IdTranSetEntType()

void vis_IdTranClear(vis_IdTran *p)

clear identifiers to zero for all entities

Clear identifiers for all defined indices to zero.

Parameters:

p – Pointer to IdTran object.

void vis_IdTranCount(vis_IdTran *p, Vint type, Vint *num)

count the number of defined identifiers

Return either the maximum index set, the number of positive identifiers or the number of unique identifiers which have been defined using vis_IdTranSetId().

Errors

VIS_ERROR_ENUM is generated if an improper type in input.

Parameters:
  • p – Pointer to IdTran object.

  • type – Type of count to return

    x=IDTRAN_MAXINDEX         Maximum index set
     =IDTRAN_NUMINDICES       Number of non-zero identifiers
     =IDTRAN_NUMUNIQUE        Number of unique identifiers
    

  • num[out] Number of indices

void vis_IdTranGroup(vis_IdTran *p, vis_Group *group)

convert a Group object to an IdTran object

Set the active indices of the Group object, group, as consecutive identifiers in the IdTran object p. The IdTran object is initially cleared by this function. The active indices in group are set as identifiers in p with indices incrementing from 1.

Parameters:
  • p – Pointer to IdTran object.

  • group – Pointer to Group object.

void vis_IdTranUnique(vis_IdTran *p, vis_IdTran *fromidtran)

generate unique identifiers

Set the positive unique identifiers in the fromidtran object into the p object. This operation removes duplicate identifiers from an IdTran object. The identifiers are placed in the p object in ascending order with indices incrementing from 1.

Parameters:
  • p – Pointer to IdTran object.

  • fromidtran – Pointer to IdTran object.

void vis_IdTranIndex(vis_IdTran *p, Vint id, Vint *index)

get entity index

Perform entity identifier to entity index translation for either a single identifier, vis_IdTranIndex(), or an array of nids identifiers, vis_IdTranIndices(). Any undefined identifiers return an index of zero. The array arguments ids and indices may be safely used as the same array.

Parameters:
  • p – Pointer to IdTran object.

  • id – Entity id for which to return entity index

  • index[out] Entity index

void vis_IdTranIndices(vis_IdTran *p, Vint nids, Vint ids[], Vint indices[])

get entity indices

Perform entity identifier to entity index translation for either a single identifier, vis_IdTranIndex(), or an array of nids identifiers, vis_IdTranIndices(). Any undefined identifiers return an index of zero. The array arguments ids and index may be safely used as the same array.

Parameters:
  • p – Pointer to IdTran object.

  • nids – Number of entity id translations to perform

  • ids – Array of entity ids for which to return entity indices

  • indices[out] Array of entity indices

void vis_IdTranNumIndex(vis_IdTran *p, Vint id, Vint *num)

get number of entity indices given identifier

Determine the number of entities which share a given identifier. If no entities have the given identifier, num is returned as zero.

Parameters:
  • p – Pointer to IdTran object.

  • id – Entity id for which to return number of entity indices

  • num[out] Number of entity indices

void vis_IdTranAllIndex(vis_IdTran *p, Vint id, Vint *num, Vint index[])

get all entity indices given identifier

Perform entity identifier to entity index translation for a single identifier. This function is useful if several entities share an identifier.

Parameters:
  • p – Pointer to IdTran object.

  • id – Entity id for which to return number of entity indices

  • num[out] Number of entity indices

  • index[out] Array of entity indices

void vis_IdTranMatch(vis_IdTran *p, vis_IdTran *idtranm, Vint *flag)

check for matching IdTran objects

Check for matching IdTran objects. The order and values of the indicies must be identical for a match to occur.

Parameters:
  • p – Pointer to IdTran object.

  • idtranm – Pointer to IdTran object.

  • flag[out] Matching flag

    x=SYS_OFF                 Not matching
     =SYS_ON                  Matching
    

void vis_IdTranCopy(vis_IdTran *p, vis_IdTran *fromp)

make a copy of a IdTran object

See vis_IdTranBegin()