PointsFromIndices
Find the points given a list of indices. This class returns the points given a list of indices.
Extracts specific points from a set of position coordinates based on provided indices.
- module
- Sofa.Component.Engine.Select
- namespace
- sofa::component::engine::select
- include
- sofa/component/engine/select/PointsFromIndices.h
- inherits
-
- DataEngine
- templates
-
- sofa::defaulttype::Vec3Types
- description
The PointsFromIndices component in the SOFA framework is designed to extract specific points from a set of position coordinates based on provided indices. It does not directly involve any governing equations or operators related to FEM, such as mass matrix $M$, stiffness matrix $K$, internal force $f_{int}$, residual $R$, etc. Instead, it serves as an engine to filter or select subsets of point positions according to specified indices, facilitating operations such as extracting relevant parts of a mesh for further processing or visualization.
Role in the Global FEM Pipeline
In terms of its role within the broader variational / Lagrangian mechanics framework and FEM simulation pipeline:
- Data Processing: The component processes input data consisting of position coordinates ($oldsymbol{X}$) and a set of indices. It outputs only those points from $oldsymbol{X}$ that correspond to the specified indices.
Constitutive or Kinematic Laws Involved
This component does not involve any constitutive laws, kinematic models, or physical principles such as strain measures, stress tensors, hyperelastic potentials, damping models, constraint Jacobians, etc. It is purely a data manipulation tool.
Numerical Methods and Discretization Choices
The PointsFromIndices component implements no numerical methods or discretization choices related to FEM simulation. Instead, it operates on the given set of position coordinates and indices by filtering out the required points.
Implementation Details
- Input Data:
- $oldsymbol{X}$: Position coordinates of the degrees of freedom (VecCoord).
-
$I$: Indices specifying which points to extract (SetIndex).
-
Output Data:
- $oldsymbol{X}_I$: Coordinates of the selected points based on indices (VecCoord).
The component ensures that only unique positions are included in the output, avoiding duplicates.
Summary
In summary, PointsFromIndices is a utility component for extracting specific points from a larger set based on provided indices. It does not contribute to any physical simulation or numerical discretization but serves as a preprocessing step for data filtering and selection.
Data Fields
| Name | Type | Default | Help |
|---|---|---|---|
f_X |
VecCoord | |
Position coordinates of the degrees of freedom |
f_indices |
SetIndex | |
Indices of the points |
f_indices_position |
VecCoord | |
Coordinates of the points contained in indices |
Methods
void
init
()
virtual
void
reinit
()
virtual
void
doUpdate
()
virtual
{
"name": "PointsFromIndices",
"namespace": "sofa::component::engine::select",
"module": "Sofa.Component.Engine.Select",
"include": "sofa/component/engine/select/PointsFromIndices.h",
"doc": "Find the points given a list of indices.\n\nThis class returns the points given a list of indices.",
"inherits": [
"DataEngine"
],
"templates": [
"sofa::defaulttype::Vec3Types"
],
"data_fields": [
{
"name": "f_X",
"type": "VecCoord",
"xmlname": "position",
"help": "Position coordinates of the degrees of freedom"
},
{
"name": "f_indices",
"type": "SetIndex",
"xmlname": "indices",
"help": "Indices of the points"
},
{
"name": "f_indices_position",
"type": "VecCoord",
"xmlname": "indices_position",
"help": "Coordinates of the points contained in indices"
}
],
"links": [],
"methods": [
{
"name": "init",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "reinit",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "doUpdate",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"description": "The `PointsFromIndices` component in the SOFA framework is designed to extract specific points from a set of position coordinates based on provided indices. It inherits from `DataEngine`, which suggests it processes data and computes derived outputs from input data.\n\n### Role and Purpose\nThis class serves as an engine to filter or select subsets of point positions according to specified indices, facilitating operations such as extracting relevant parts of a mesh for further processing or visualization.\n\n### Interactions with Other Components\n`PointsFromIndices` interacts with other components through its API. It takes input coordinates (`f_X`) and index sets (`f_indices`). The output is the filtered position data (`f_indices_position`).\n\nIt inherits methods like `init()`, `reinit()`, and `doUpdate()` from the `DataEngine` class, which it overrides to implement specific initialization logic and update operations.\n\n### Practical Usage Guidance\n- **Input Fields**:\n - `f_X`: Position coordinates of the degrees of freedom (VecCoord).\n - `f_indices`: Indices specifying which points to extract (SetIndex).\n\n- **Output Field**:\n - `f_indices_position`: Coordinates of the selected points based on indices (VecCoord).\n\nThe component ensures that only unique positions are included in the output, avoiding duplicates.",
"maths": "The `PointsFromIndices` component in the SOFA framework is designed to extract specific points from a set of position coordinates based on provided indices. It does not directly involve any governing equations or operators related to FEM, such as mass matrix $M$, stiffness matrix $K$, internal force $f_{int}$, residual $R$, etc. Instead, it serves as an engine to filter or select subsets of point positions according to specified indices, facilitating operations such as extracting relevant parts of a mesh for further processing or visualization.\n\n### Role in the Global FEM Pipeline\nIn terms of its role within the broader variational / Lagrangian mechanics framework and FEM simulation pipeline:\n- **Data Processing**: The component processes input data consisting of position coordinates ($\boldsymbol{X}$) and a set of indices. It outputs only those points from $\boldsymbol{X}$ that correspond to the specified indices.\n\n### Constitutive or Kinematic Laws Involved\nThis component does not involve any constitutive laws, kinematic models, or physical principles such as strain measures, stress tensors, hyperelastic potentials, damping models, constraint Jacobians, etc. It is purely a data manipulation tool.\n\n### Numerical Methods and Discretization Choices\nThe `PointsFromIndices` component implements no numerical methods or discretization choices related to FEM simulation. Instead, it operates on the given set of position coordinates and indices by filtering out the required points.\n\n### Implementation Details\n- **Input Data**:\n - $\boldsymbol{X}$: Position coordinates of the degrees of freedom (VecCoord).\n - $I$: Indices specifying which points to extract (SetIndex).\n\n- **Output Data**:\n - $\boldsymbol{X}_I$: Coordinates of the selected points based on indices (VecCoord).\n\nThe component ensures that only unique positions are included in the output, avoiding duplicates.\n\n### Summary\nIn summary, `PointsFromIndices` is a utility component for extracting specific points from a larger set based on provided indices. It does not contribute to any physical simulation or numerical discretization but serves as a preprocessing step for data filtering and selection.",
"abstract": "Extracts specific points from a set of position coordinates based on provided indices.",
"sheet": "# PointsFromIndices\n\n## Overview\nThe `PointsFromIndices` component is an engine that filters point positions based on specified indices, facilitating operations such as extracting relevant parts of a mesh for further processing or visualization.\n\n## Parameters and Data\n- **f_X**: Position coordinates of the degrees of freedom (VecCoord).\n- **f_indices**: Indices specifying which points to extract (SetIndex).\n- **f_indices_position**: Coordinates of the selected points based on indices (VecCoord)."
}