    

 ## On this page

  

 

 # IndexMapper Class Reference

 Last update: 16.07.2025 

Accessor for indices in global vectors and matrices. [More...](class_index_mapper.xhtml#details)

## <a name="pub-types"></a>Public Types

<a id="a1745e2fb27a3a3783ac48a53630635aa"></a>typedef number [index\_type](class_index_mapper.xhtml#a1745e2fb27a3a3783ac48a53630635aa) number type for indices   
 <a id="a8437a75f0dfb1193644d4caafdfbf1db"></a>typedef std::pair&lt; number, number &gt; [TIndexPair](class_index_mapper.xhtml#a8437a75f0dfb1193644d4caafdfbf1db) a pair of 2 unsigned inetgers, eg. &lt;part index, point index&gt;   
 <a id="a400f48c00a9753ddadc21b980d382460"></a>typedef boost::tuples::tuple&lt; number, number, number &gt; [TIndexTriple](class_index_mapper.xhtml#a400f48c00a9753ddadc21b980d382460) a triple of 3 numberegers, eg. &lt;part index, element index, intpt index&gt;   
 <a id="a2c83b7348a2acedf114ab5847ad3ffcd"></a>typedef number [uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd) number type   
 <a id="ab95f123a6c9bcfee6a343170ef8c5f69"></a>typedef unsigned short [ushort](class_index_mapper.xhtml#ab95f123a6c9bcfee6a343170ef8c5f69) unsigned short type   
 ## <a name="pub-methods"></a>Public Member Functions

bool [exists\_element](class_index_mapper.xhtml#a38956be811e929b363960becd99792c3) ([uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd) part\_idx, [uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd) element\_idx) returns true if the given element is part of the index mapper [More...](#a38956be811e929b363960becd99792c3)  
 bool [exists\_grid](class_index_mapper.xhtml#a5cea17495b0718cac4b9aa4c081ee44d) ([uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd) x, [uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd) y, [uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd) z) returns true if the given node is part of the index mapper [More...](#a5cea17495b0718cac4b9aa4c081ee44d)  
 bool [exists\_intpt](class_index_mapper.xhtml#a593c63e0eca33f9bfeb03ab44f218161) ([uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd) part\_idx, [uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd) element\_idx, [uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd) intpt\_idx) returns true if the given integration point is part of the index mapper [More...](#a593c63e0eca33f9bfeb03ab44f218161)  
 bool [exists\_node](class_index_mapper.xhtml#aa6a12849b5e2afe61effc28053458bd7) ([uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd) part\_idx, [uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd) node\_idx) returns true if the given node is part of the index mapper It returns false, if the node is not allocated or was explicitly deactivated when creating the index mapper [More...](#aa6a12849b5e2afe61effc28053458bd7)  
 Eigen::Vector3i [gridDimension](class_index_mapper.xhtml#ae56e140da590cdb7219a4dc0a15b3a2e) () const  [IndexMapper](class_index_mapper.xhtml#a4b8e9990ceef5c2a33d4239d4237c39e) ([MeshAssembly](class_mesh_assembly.xhtml) assembly, groups::NodeSet \*nodes=0, groups::ElementSet \*elements=0) Analyzes the mesh, counts possible number of data sets and associates each node to the index in global data arrays. [More...](#a4b8e9990ceef5c2a33d4239d4237c39e)  
 [index\_type](class_index_mapper.xhtml#a1745e2fb27a3a3783ac48a53630635aa) [numElements](class_index_mapper.xhtml#a4d59f1cf9d216e4eb96d683277cc4399) () [index\_type](class_index_mapper.xhtml#a1745e2fb27a3a3783ac48a53630635aa) [numIntpts](class_index_mapper.xhtml#aab90cacf8b2875f5909b75ba8268ba00) () [index\_type](class_index_mapper.xhtml#a1745e2fb27a3a3783ac48a53630635aa) [numNodes](class_index_mapper.xhtml#ae83885e3e43084b86ce16db214378a96) () <a id="details" name="details"></a>## Detailed Description

Accessor for indices in global vectors and matrices.

Date2012 This class provides methods which compute an index for scalar data being stored at either nodes, elements or integration points. The index refers to a global vector which collects the complete structural data (regardless part-instances, or free space in the element index space).WarningThe structure must not be changed after creating the index relationships. 

## Constructor &amp; Destructor Documentation

<a id="a4b8e9990ceef5c2a33d4239d4237c39e"></a>## [◆ ](#a4b8e9990ceef5c2a33d4239d4237c39e)IndexMapper()

 [IndexMapper](class_index_mapper.xhtml)  ( [MeshAssembly](class_mesh_assembly.xhtml)  *assembly*,    groups::NodeSet \*  *nodes* = `0`,    groups::ElementSet \*  *elements* = `0`   ) 

Analyzes the mesh, counts possible number of data sets and associates each node to the index in global data arrays.

Parameters assemblythe mesh which is to be analyzed nodesIf this pointer is not NULL, it defines all FEM nodes to which this index mapper restricts its index space elementsIf this pointer is not NULL, it defines all FEM elements to which this index mapper restricts its index space 



## Member Function Documentation

<a id="a38956be811e929b363960becd99792c3"></a>## [◆ ](#a38956be811e929b363960becd99792c3)exists\_element()

 bool exists\_element  ( [uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd)  *part\_idx*,    [uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd)  *element\_idx*   ) 

returns true if the given element is part of the index mapper

It returns false, if the element is not allocated or was explicitly deactivated when creating the index mapper

Parameters part\_idxthe index of the part element\_idxthe index of the element in the part Returnstrue if it exists in the mapper 



<a id="a5cea17495b0718cac4b9aa4c081ee44d"></a>## [◆ ](#a5cea17495b0718cac4b9aa4c081ee44d)exists\_grid()

 bool exists\_grid  ( [uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd)  *x*,    [uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd)  *y*,    [uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd)  *z*   ) 

returns true if the given node is part of the index mapper

It returns false, if the node is not allocated or was explicitly deactivated when creating the index mapper

Parameters xthe 1st node index in grid ythe 2nd node index in grid zthe 3rd node index in grid Returnstrue if it exists in the mapper. False otherwiseWarningFOR NOW; ALWAYS RETURNS TRUE 



<a id="a593c63e0eca33f9bfeb03ab44f218161"></a>## [◆ ](#a593c63e0eca33f9bfeb03ab44f218161)exists\_intpt()

 bool exists\_intpt  ( [uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd)  *part\_idx*,    [uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd)  *element\_idx*,    [uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd)  *intpt\_idx*   ) 

returns true if the given integration point is part of the index mapper

It returns false, if the integration point is not allocated or was explicitly deactivated when creating the index mapper

Parameters part\_idxthe index of the part element\_idxthe index of the element in the part intpt\_idxthe index of the integration point in the element Returnstrue if it exists in the mapper 



<a id="aa6a12849b5e2afe61effc28053458bd7"></a>## [◆ ](#aa6a12849b5e2afe61effc28053458bd7)exists\_node()

 bool exists\_node  ( [uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd)  *part\_idx*,    [uint](class_index_mapper.xhtml#a2c83b7348a2acedf114ab5847ad3ffcd)  *node\_idx*   ) 

returns true if the given node is part of the index mapper It returns false, if the node is not allocated or was explicitly deactivated when creating the index mapper

Parameters part\_idxthe index of the part node\_idxthe index of the node in the part Returnstrue if it exists in the mapper 



<a id="ae56e140da590cdb7219a4dc0a15b3a2e"></a>## [◆ ](#ae56e140da590cdb7219a4dc0a15b3a2e)gridDimension()

 Eigen::Vector3i gridDimension  ( )  const

Returnsm\_grid\_dimension; 



<a id="a4d59f1cf9d216e4eb96d683277cc4399"></a>## [◆ ](#a4d59f1cf9d216e4eb96d683277cc4399)numElements()

 [index\_type](class_index_mapper.xhtml#a1745e2fb27a3a3783ac48a53630635aa) numElements  ( ) 

Returnsm\_number\_elements 



<a id="aab90cacf8b2875f5909b75ba8268ba00"></a>## [◆ ](#aab90cacf8b2875f5909b75ba8268ba00)numIntpts()

 [index\_type](class_index_mapper.xhtml#a1745e2fb27a3a3783ac48a53630635aa) numIntpts  ( ) 

Returnsm\_number\_intpts 



<a id="ae83885e3e43084b86ce16db214378a96"></a>## [◆ ](#ae83885e3e43084b86ce16db214378a96)numNodes()

 [index\_type](class_index_mapper.xhtml#a1745e2fb27a3a3783ac48a53630635aa) numNodes  ( ) 

Returnsm\_number\_nodes