IndexMapper Class Reference
Last update: 16.07.2025Accessor for indices in global vectors and matrices. More...
Public Types | |
| typedef number | index_type |
| number type for indices | |
| typedef std::pair< number, number > | TIndexPair |
| a pair of 2 unsigned inetgers, eg. <part index, point index> | |
| typedef boost::tuples::tuple< number, number, number > | TIndexTriple |
| a triple of 3 numberegers, eg. <part index, element index, intpt index> | |
| typedef number | uint |
| number type | |
| typedef unsigned short | ushort |
| unsigned short type | |
Public Member Functions | |
| bool | exists_element (uint part_idx, uint element_idx) |
| returns true if the given element is part of the index mapper More... | |
| bool | exists_grid (uint x, uint y, uint z) |
| returns true if the given node is part of the index mapper More... | |
| bool | exists_intpt (uint part_idx, uint element_idx, uint intpt_idx) |
| returns true if the given integration point is part of the index mapper More... | |
| bool | exists_node (uint part_idx, uint 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... | |
| Eigen::Vector3i | gridDimension () const |
| IndexMapper (MeshAssembly 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... | |
| index_type | numElements () |
| index_type | numIntpts () |
| index_type | numNodes () |
Detailed Description
Accessor for indices in global vectors and matrices.
- Date
- 2012 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).
- Warning
- The structure must not be changed after creating the index relationships.
Constructor & Destructor Documentation
◆ IndexMapper()
| IndexMapper | ( | MeshAssembly | 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
-
assembly the mesh which is to be analyzed nodes If this pointer is not NULL, it defines all FEM nodes to which this index mapper restricts its index space elements If this pointer is not NULL, it defines all FEM elements to which this index mapper restricts its index space
Member Function Documentation
◆ exists_element()
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_idx the index of the part element_idx the index of the element in the part
- Returns
- true if it exists in the mapper
◆ exists_grid()
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
-
x the 1st node index in grid y the 2nd node index in grid z the 3rd node index in grid
- Returns
- true if it exists in the mapper. False otherwise
- Warning
- FOR NOW; ALWAYS RETURNS TRUE
◆ exists_intpt()
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_idx the index of the part element_idx the index of the element in the part intpt_idx the index of the integration point in the element
- Returns
- true if it exists in the mapper
◆ exists_node()
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_idx the index of the part node_idx the index of the node in the part
- Returns
- true if it exists in the mapper
◆ gridDimension()
| Eigen::Vector3i gridDimension | ( | ) | const |
- Returns
- m_grid_dimension;
◆ numElements()
| index_type numElements | ( | ) |
- Returns
- m_number_elements
◆ numIntpts()
| index_type numIntpts | ( | ) |
- Returns
- m_number_intpts
◆ numNodes()
| index_type numNodes | ( | ) |
- Returns
- m_number_nodes