Table of Contents

18. 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.

Table of Contents

18.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.

Table of Contents

18.2 Function Descriptions

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


Table of Contents , Group

NAME

*vis_GroupBegin - create an instance of a Group object

C SPECIFICATION

vis_Group *vis_GroupBegin ()

ARGUMENTS

None

FUNCTION RETURN VALUE

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

DESCRIPTION

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)
                                                                            


Table of Contents , Group

NAME

vis_GroupNode - query for active node

C SPECIFICATION

Vint vis_GroupNode (vis_Group *group,
                    Vint index)

ARGUMENTS

index        Index of entity

FUNCTION RETURN VALUE

The function returns the activity flag for the node.

DESCRIPTION

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


Table of Contents , Group

NAME

vis_GroupElem - query for active element

C SPECIFICATION

Vint vis_GroupElem (vis_Group *group,
                    Vint index)

ARGUMENTS

index        Index of entity

FUNCTION RETURN VALUE

The function returns the activity flag for the element.

DESCRIPTION

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 group object is NULL.


Table of Contents , Group

NAME

vis_GroupElemEnt - query for active element edge or face

C SPECIFICATION

Vint vis_GroupElemEnt (vis_Group *group,
                       Vint index,
                       Vint no)

ARGUMENTS

index        Index of entity
no           Element edge or face number

FUNCTION RETURN VALUE

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

DESCRIPTION

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.
                                                                            


Table of Contents , Group

NAME

vis_GroupAll,vis_GroupClear,vis_GroupComplement - unary group operations

C SPECIFICATION

void vis_GroupAll (vis_Group *group)

void vis_GroupClear (vis_Group *group)

void vis_GroupComplement (vis_Group *group)

INPUT ARGUMENTS

group        Pointer to Group object.

OUTPUT ARGUMENTS

None

DESCRIPTION

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.


Table of Contents , Group

NAME

vis_GroupBoolean - perform binary Boolean group operations

C SPECIFICATION

void vis_GroupBoolean (vis_Group *group,
                       Vint oper,
                       vis_Group *groupsrc)

INPUT ARGUMENTS

group        Pointer to Group object.
oper         Boolean operation to perform
             =GROUP_DELETE Delete groupsrc from group.
             =GROUP_INSERT Insert groupsrc in group.
             =GROUP_MASK   Mask groupsrc from group.
             =GROUP_SET    Copy groupsrc to group.
groupsrc     Pointer to source Group object.

OUTPUT ARGUMENTS

None

ERRORS

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

DESCRIPTION

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


Table of Contents , Group

NAME

vis_GroupCount - count active entities in a group

C SPECIFICATION

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

INPUT ARGUMENTS

group        Pointer to Group object.

OUTPUT ARGUMENTS

nparent      Number of currently active parent entities
nchild       Number of currently active child entities

DESCRIPTION

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.


Table of Contents , Group

NAME

vis_GroupDef - define parent and child entities

C SPECIFICATION

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

INPUT ARGUMENTS

group        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

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_VALUE is generated if nument is non positive. VIS_ERROR_ENUM is generated if an improper parenttype or childtype is specified.

DESCRIPTION

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)


Table of Contents , Group

NAME

vis_GroupIdTran - convert an IdTran object to a Group object

C SPECIFICATION

void vis_GroupIdTran (vis_Group *group,
                      vis_IdTran *idtran)

INPUT ARGUMENTS

group        Pointer to Group object.
idtran       Pointer to IdTran object.

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_VALUE is generated if an improper identifier is specified as an index. VIS_ERROR_OPERATION is generated if group parent or child type do not match the idtran type.

DESCRIPTION

Set the identifiers in the IdTran object, idtran, as active indices in the Group object, group. If the idtran object has no child type, the group object must be a node or element group with no child entity type. If the idtran object has a child type, the group 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.


Table of Contents , Group

NAME

vis_GroupInitIndex,vis_GroupNextIndex - initialize and get next active entity

C SPECIFICATION

void vis_GroupInitIndex (vis_Group *group)

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

INPUT ARGUMENTS

group        Pointer to Group object.

OUTPUT ARGUMENTS

index        Index of entity
flags        Activity flag(s) of entity.

DESCRIPTION

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.


Table of Contents , Group

NAME

vis_GroupSetIndex - set entity as active or inactive

C SPECIFICATION

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

INPUT ARGUMENTS

group        Pointer to Group object.
index        Index of entity to set activity
flags        Activity flag(s) of entity.

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_VALUE is generated if an improper index is specified.

DESCRIPTION

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 *flags)


Table of Contents , Group

NAME

vis_GroupSetIndices - set entities as active or inactive

C SPECIFICATION

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

INPUT ARGUMENTS

group        Pointer to Group object.
nix          Number of indices
indices      Indices of entities to set activity
flags        Activity flag(s) of entities.

OUTPUT ARGUMENTS

None

ERRORS

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

DESCRIPTION

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


Table of Contents , Group

NAME

vis_GroupNumEntFlag - get number of entity flags by index

C SPECIFICATION

void vis_GroupNumEntFlag (vis_Group *group,
                          Vint index,
                          Vint *numno,
                          Vint *maxno);

INPUT ARGUMENTS

group        Pointer to Group object.
index        Index of entity to set activity flag

OUTPUT ARGUMENTS

numno        Number of set element edges or faces.
maxno        Maximum element edge or face set.

ERRORS

VIS_ERROR_VALUE is generated if an improper index is specified.

DESCRIPTION

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


Table of Contents , Group

NAME

vis_GroupSetEntFlag - set entity flag by index and number

C SPECIFICATION

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

INPUT ARGUMENTS

group        Pointer to Group object.
index        Index of entity to set activity flag
no           Element edge or face number
flag         Activity flag of entity.

OUTPUT ARGUMENTS

None

ERRORS

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

DESCRIPTION

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)


Table of Contents , Group

NAME

vis_GroupSetName - set name string

C SPECIFICATION

void vis_GroupSetName (vis_Group *group,
                       Vchar *name)

INPUT ARGUMENTS

group        Pointer to Group object.
name         Name string

OUTPUT ARGUMENTS

None

DESCRIPTION

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[])


Table of Contents , Group

NAME

vis_GroupSetType - set type

C SPECIFICATION

void vis_GroupSetType (vis_Group *group,
                       Vint type)

INPUT ARGUMENTS

group        Pointer to Group object.
type         Integer general type

OUTPUT ARGUMENTS

None

DESCRIPTION

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)


Table of Contents , Group

NAME

vis_GroupSetSpec - set specific type

C SPECIFICATION

void vis_GroupSetSpec (vis_Group *group,
                       Vint spec)

INPUT ARGUMENTS

group        Pointer to Group object.
spec         Integer specific type

OUTPUT ARGUMENTS

None

DESCRIPTION

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)


Table of Contents

18.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.

Table of Contents

18.4 Function Descriptions

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


Table of Contents , IdTran

NAME

*vis_IdTranBegin - create an instance of an IdTran object

C SPECIFICATION

vis_IdTran *vis_IdTranBegin ()

ARGUMENTS

None

FUNCTION RETURN VALUE

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

DESCRIPTION

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)


Table of Contents , IdTran

NAME

vis_IdTranClear - clear identifiers to zero for all entities

C SPECIFICATION

void vis_IdTranClear (vis_IdTran *idtran)

INPUT ARGUMENTS

idtran       Pointer to IdTran object.

OUTPUT ARGUMENTS

None

DESCRIPTION

Clear identifiers for all defined indices to zero.


Table of Contents , IdTran

NAME

vis_IdTranCount - count the number of defined identifiers

C SPECIFICATION

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

INPUT ARGUMENTS

idtran       Pointer to IdTran object.
type         Type of count to return
             =IDTRAN_MAXINDEX         Maximum index set
             =IDTRAN_NUMINDICES       Number of non-zero identifiers
             =IDTRAN_NUMUNIQUE        Number of unique identifiers

OUTPUT ARGUMENTS

num          Number of indices

ERRORS

VIS_ERROR_ENUM is generated if an improper type in input.

DESCRIPTION

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


Table of Contents , IdTran

NAME

vis_IdTranDef - define number of entities

C SPECIFICATION

void vis_IdTranDef (vis_IdTran *idtran,
                    Vint nument)

INPUT ARGUMENTS

idtran       Pointer to IdTran object.
nument       Number of entities

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_VALUE is generated if nument is non positive.

DESCRIPTION

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)


Table of Contents , IdTran

NAME

vis_IdTranDelete - delete all set objects

C SPECIFICATION

void vis_IdTranDelete (vis_IdTran *idtran)

INPUT ARGUMENTS

idtran       Pointer to IdTran object.

OUTPUT ARGUMENTS

None

DESCRIPTION

Delete all objects which have been "Set" in the IdTran object. This includes objects set using vis_IdTranSetUProp,


Table of Contents , IdTran

NAME

vis_IdTranEquId - set equivalent id

C SPECIFICATION

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

INPUT ARGUMENTS

idtran       Pointer to IdTran object.
index        Index of entity to set identifier
id           Entity identifier

OUTPUT ARGUMENTS

None

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.

DESCRIPTION

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.


Table of Contents , IdTran

NAME

vis_IdTranEquSweep - sweep equivalent ids

C SPECIFICATION

void vis_IdTranEquSweep (vis_IdTran *idtran)

INPUT ARGUMENTS

idtran       Pointer to IdTran object.

OUTPUT ARGUMENTS

None

DESCRIPTION

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.


Table of Contents , IdTran

NAME

vis_IdTranEquReNumber - renumber equivalent ids

C SPECIFICATION

void vis_IdTranEquReNumber (vis_IdTran *idtran,
                            Vint *num)

INPUT ARGUMENTS

idtran       Pointer to IdTran object.

OUTPUT ARGUMENTS

num          Number of unique ids
None

DESCRIPTION

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.


Table of Contents , IdTran

NAME

vis_IdTranGroup - convert a Group object to an IdTran object

C SPECIFICATION

void vis_IdTranGroup (vis_IdTran *idtran,
                      vis_Group *group)

INPUT ARGUMENTS

idtran       Pointer to IdTran object.
group        Pointer to Group object.

OUTPUT ARGUMENTS

None

DESCRIPTION

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


Table of Contents , IdTran

NAME

vis_IdTranIndex,vis_IdTranIndices - get entity index or indices

C SPECIFICATION

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

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

INPUT ARGUMENTS

idtran       Pointer to IdTran object.
nids         Number of entity id translations to perform
id           Entity id for which to return entity index
ids          Array of entity ids for which to return entity indices

OUTPUT ARGUMENTS

index        Entity index
indices      Array of entity indices

DESCRIPTION

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.


Table of Contents , IdTran

NAME

vis_IdTranNumIndex - get number of entity indices given identifier

C SPECIFICATION

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

INPUT ARGUMENTS

idtran       Pointer to IdTran object.
id           Entity id for which to return number of entity indices

OUTPUT ARGUMENTS

num          Number of entity indices

DESCRIPTION

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


Table of Contents , IdTran

NAME

vis_IdTranAllIndex - get all entity indices given identifier

C SPECIFICATION

void vis_IdTranNumIndex (vis_IdTran *idtran,
                         Vint id,
                         Vint *num)
                         Vint indices[])

INPUT ARGUMENTS

idtran       Pointer to IdTran object.
id           Entity id for which to return number of entity indices

OUTPUT ARGUMENTS

num          Number of entity indices
indices      Array of entity indices

DESCRIPTION

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


Table of Contents , IdTran

NAME

vis_IdTranMatch - check for matching IdTran objects

C SPECIFICATION

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

INPUT ARGUMENTS

idtran       Pointer to IdTran object.
idtranm      Pointer to IdTran object.

OUTPUT ARGUMENTS

flag         Matching flag
             =SYS_OFF                 Not matching
             =SYS_ON                  Matching

DESCRIPTION

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


Table of Contents , IdTran

NAME

vis_IdTranAddId - add entity identifier

C SPECIFICATION

void vis_IdTranAddId (vis_IdTran *idtran,
                      Vint id)

INPUT ARGUMENTS

idtran       Pointer to IdTran object.
id           Entity identifier

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_MEMORY is generated if a memory allocation failure occurs.

DESCRIPTION

Add identifier at the next highest index.


Table of Contents , IdTran

NAME

vis_IdTranAddThruByIds - add list of entity identifiers

C SPECIFICATION

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

INPUT ARGUMENTS

idtran       Pointer to IdTran object.
num          Number of entries in listids.
listids      Entity list

OUTPUT ARGUMENTS

None

ERRORS

VIS_ERROR_MEMORY is generated if a memory allocation failure occurs. VIS_ERROR_VALUE if an improper THRU-BY syntax is encountered.

DESCRIPTION

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


Table of Contents , IdTran

NAME

vis_IdTranSetEnt - set entity face or edge number

C SPECIFICATION

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

INPUT ARGUMENTS

idtran       Pointer to IdTran object.
index        Index of entity to set identifier
no           Element face or edge number

OUTPUT ARGUMENTS

None

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.

DESCRIPTION

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[])


Table of Contents , IdTran

NAME

vis_IdTranSetEntType - set entity number type

C SPECIFICATION

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

INPUT ARGUMENTS

idtran       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

OUTPUT ARGUMENTS

None

ERRORS

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

DESCRIPTION

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)


Table of Contents , IdTran

NAME

vis_IdTranSetSpec - set finite element specific type

C SPECIFICATION

void vis_IdTranSetSpec (vis_IdTran *idtran,
                        Vint spec)

INPUT ARGUMENTS

idtran       Pointer to IdTran object.
spec         Finite element specific type

OUTPUT ARGUMENTS

None

DESCRIPTION

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)


Table of Contents , IdTran

NAME

vis_IdTranSetType - set finite element type

C SPECIFICATION

void vis_IdTranSetType (vis_IdTran *idtran,
                        Vint type)

INPUT ARGUMENTS

idtran       Pointer to IdTran object.
type         Finite element type

OUTPUT ARGUMENTS

None

DESCRIPTION

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)


Table of Contents , IdTran

NAME

vis_IdTranSetId - set entity index and associated identifier

C SPECIFICATION

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

INPUT ARGUMENTS

idtran       Pointer to IdTran object.
index        Index of entity to set identifier
id           Entity identifier

OUTPUT ARGUMENTS

None

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.

DESCRIPTION

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 vis_IdTranGetId and vis_IdTranGetIds functions.


Table of Contents , IdTran

NAME

vis_IdTranSetName - set name string

C SPECIFICATION

void vis_IdTranSetName (vis_IdTran *idtran,
                        Vchar *name)

INPUT ARGUMENTS

idtran       Pointer to IdTran object.
name         Name string

OUTPUT ARGUMENTS

None

DESCRIPTION

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[])


Table of Contents , IdTran

NAME

vis_IdTranSetUProp - set UProp object

C SPECIFICATION

void vis_IdTranSetUProp (vis_IdTran *idtran,
                         vis_UProp *uprop)

INPUT ARGUMENTS

idtran       Pointer to IdTran object.
uprop        Pointer to UProp object.

OUTPUT ARGUMENTS

None

DESCRIPTION

Set an optional UProp object of user defined properties.

Inquire uprop as an output argument.

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


Table of Contents , IdTran

NAME

vis_IdTranUnique - generate unique identifiers

C SPECIFICATION

void vis_IdTranUnique (vis_IdTran *idtran,
                       vis_IdTran *fromidtran)

INPUT ARGUMENTS

idtran       Pointer to IdTran object.
fromidtran   Pointer to IdTran object.

OUTPUT ARGUMENTS

None

DESCRIPTION

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