Back

PointSetTopologyContainer

sofa::component::topology::container::dynamic::PointSetTopologyContainer
Doc (from source)

Topology container dedicated to a point topology. The container class that stores a set of points and provides access to each point. This set of point may be a subset of the DOF of the mechanical model */

Abstract (AI generated)

The `PointSetTopologyContainer` manages point-based topologies by storing and manipulating sets of points, essential for defining nodes in finite element models.

Metadata
module
Sofa.Component.Topology.Container.Dynamic
namespace
sofa::component::topology::container::dynamic
include
sofa/component/topology/container/dynamic/PointSetTopologyContainer.h
description

The PointSetTopologyContainer in the SOFA framework is designed to manage point-based topologies. It stores a set of points, each representing a degree-of-freedom (DOF) in the mechanical model. The container provides methods for adding, removing, and accessing these points, which are essential for defining the discrete representation of the continuum within the Finite Element Method (FEM). Here is a detailed mathematical and physical description:

Governing Equations or Operators

  • Mass Matrix (M): Not directly involved. The mass matrix is defined based on the element formulation and shape functions, which are not managed by this topology container.
  • Stiffness Matrix (K): Similarly, the stiffness matrix depends on the material properties and geometric shape functions, which are also external to this component.
  • Internal Force (f_{int}): The internal forces are computed based on the deformation of the elements, again not directly managed by this topology container.
  • Residual (R): Not directly involved. The residual is defined in terms of nodal displacements and external/internal forces.

Constitutive or Kinematic Laws Involved

  • Points: Each point represents a location where displacement, velocity, and acceleration are tracked. These points do not have intrinsic constitutive behavior; instead, they form the basis for defining elements with material properties.
  • Displacement: The positions of these points (u_i) in space can be described by their coordinates (x_i, y_i, z_i). In FEM, the displacement at any point X within an element is interpolated from nodal displacements using shape functions:
$$ u(X,t) = \sum_{i} N_i(X) u_i(t) $$

Role in the Global FEM Pipeline

  • Mesh Generation: The container manages the set of points, which form the nodes of the mesh. It allows adding and removing points, thereby enabling dynamic changes to the mesh topology.
  • Shape Functions Selection: While this component does not define shape functions directly, it provides the nodal positions required for constructing these functions within elements.
  • Weak Form Derivation: Not involved; the weak form is defined in terms of elements rather than individual points.
  • Element Operator Derivation: Again, not involved. Element operators like mass and stiffness matrices are computed based on element formulations.
  • Gauss Integration: Not directly involved; integration is performed over element domains using shape functions and quadrature rules.

Numerical Methods or Discretization Choices

The PointSetTopologyContainer does not implement numerical methods or discretization choices. Instead, it focuses on maintaining the set of points required for constructing finite elements. It provides:
- Initialization: The component can be initialized with a specific number of points.
- Dynamic Point Management: Methods to add and remove points allow for dynamic changes in the mesh topology during simulation.
- Point Access: Provides access to the coordinates of each point, which are essential for constructing elements and evaluating shape functions.

Integration into Variational / Lagrangian Mechanics Framework

While PointSetTopologyContainer does not directly implement the variational or Lagrangian mechanics framework, it provides a fundamental component required for defining discrete systems in FEM. The points managed by this container serve as nodes for finite elements, which are then used to discretize the weak form of the governing equations and construct global matrices such as mass (M) and stiffness (K).

In summary, PointSetTopologyContainer is a foundational component responsible for storing and managing point-based topologies in SOFA. It ensures that the nodal positions required for constructing elements are maintained accurately and efficiently.

Data Fields
NameTypeDefaultHelp
d_checkTopology bool Parameter to activate internal topology checks (might slow down the simulation)
Methods
void addPoint(SReal px, SReal py, SReal pz) ()
void removePoint() ()
void getPX(Index i) ()
void getPY(Index i) ()
void getPZ(Index i) ()
{
  "name": "PointSetTopologyContainer",
  "namespace": "sofa::component::topology::container::dynamic",
  "module": "Sofa.Component.Topology.Container.Dynamic",
  "include": "sofa/component/topology/container/dynamic/PointSetTopologyContainer.h",
  "doc": "Topology container dedicated to a point topology.\n\nThe container class that stores a set of points and provides access\nto each point. This set of point may be a subset of the DOF of the mechanical model */",
  "inherits": [],
  "templates": [],
  "data_fields": [
    {
      "name": "d_checkTopology",
      "type": "bool",
      "xmlname": "checkTopology",
      "help": "Parameter to activate internal topology checks (might slow down the simulation)"
    }
  ],
  "links": [],
  "methods": [
    {
      "name": "addPoint(SReal px, SReal py, SReal pz)",
      "description": "Adds a new point with specified coordinates (px, py, pz) to the set. The method updates both the number of points and their position array accordingly."
    },
    {
      "name": "removePoint()",
      "description": "Removes one point from the container, reducing the total count of points in the set by one."
    },
    {
      "name": "getPX(Index i)",
      "type": "SReal",
      "description": "Retrieves the X-coordinate value for a given index (i) within the point set."
    },
    {
      "name": "getPY(Index i)",
      "type": "SReal",
      "description": "Retrieves the Y-coordinate value for a specific point, identified by its index (i)."
    },
    {
      "name": "getPZ(Index i)",
      "type": "SReal",
      "description": "Obtains the Z-coordinate of a particular point based on its index (i)."
    }
  ],
  "description": "The `PointSetTopologyContainer` is a specialized topology container in the SOFA (Simulation Open-Framework Architecture) framework dedicated to managing point-based topologies. This component stores and manipulates a set of points, providing functionalities for adding, removing, and accessing these points. It ensures that the points' positions are maintained accurately and efficiently.",
  "parameters": [
    {
      "name": "position",
      "type": "VecCoord",
      "description": "Initial position of the points in the point set. This data field allows setting and retrieving the initial coordinates of all points."
    },
    {
      "name": "nbPoints",
      "type": "Size",
      "description": "The number of points currently stored in the container. This parameter defines the size of the point set and can be modified by adding or removing points."
    },
    {
      "name": "checkTopology",
      "type": "bool",
      "description": "A flag to enable internal topology checks, which might slow down the simulation process but can help ensure data consistency."
    }
  ],
  "features": [
    "The `PointSetTopologyContainer` manages points efficiently using internal mechanisms to track changes and ensure data integrity.",
    "It provides methods for adding and removing individual or multiple points, allowing flexible manipulation of the point set during simulation runs.",
    "The component supports basic coordinate retrieval operations for accessing the position details of any point within the container.",
    "Internal consistency can be checked through an optional flag (`checkTopology`), which may introduce overhead but helps maintain data accuracy."
  ],
  "usage": "The `PointSetTopologyContainer` is primarily used in simulations where managing a set of points is essential. Its functionalities make it suitable for initializing particle systems, defining initial positions for deformable models, or handling any scenario requiring precise point management within the SOFA framework.",
  "maths": "The `PointSetTopologyContainer` in the SOFA framework is designed to manage point-based topologies. It stores a set of points, each representing a degree-of-freedom (DOF) in the mechanical model. The container provides methods for adding, removing, and accessing these points, which are essential for defining the discrete representation of the continuum within the Finite Element Method (FEM). Here is a detailed mathematical and physical description:\n\n### Governing Equations or Operators\n- **Mass Matrix** (`M`): Not directly involved. The mass matrix is defined based on the element formulation and shape functions, which are not managed by this topology container.\n- **Stiffness Matrix** (`K`): Similarly, the stiffness matrix depends on the material properties and geometric shape functions, which are also external to this component.\n- **Internal Force** (`f_{int}`): The internal forces are computed based on the deformation of the elements, again not directly managed by this topology container.\n- **Residual** (`R`): Not directly involved. The residual is defined in terms of nodal displacements and external/internal forces.\n\n### Constitutive or Kinematic Laws Involved\n- **Points**: Each point represents a location where displacement, velocity, and acceleration are tracked. These points do not have intrinsic constitutive behavior; instead, they form the basis for defining elements with material properties.\n- **Displacement**: The positions of these points (`u_i`) in space can be described by their coordinates `(x_i, y_i, z_i)`. In FEM, the displacement at any point `X` within an element is interpolated from nodal displacements using shape functions:\n  \n  \\[\nu(X,t) = \\sum_{i} N_i(X) u_i(t)\n  \\]\n\n### Role in the Global FEM Pipeline\n- **Mesh Generation**: The container manages the set of points, which form the nodes of the mesh. It allows adding and removing points, thereby enabling dynamic changes to the mesh topology.\n- **Shape Functions Selection**: While this component does not define shape functions directly, it provides the nodal positions required for constructing these functions within elements.\n- **Weak Form Derivation**: Not involved; the weak form is defined in terms of elements rather than individual points.\n- **Element Operator Derivation**: Again, not involved. Element operators like mass and stiffness matrices are computed based on element formulations.\n- **Gauss Integration**: Not directly involved; integration is performed over element domains using shape functions and quadrature rules.\n\n### Numerical Methods or Discretization Choices\nThe `PointSetTopologyContainer` does not implement numerical methods or discretization choices. Instead, it focuses on maintaining the set of points required for constructing finite elements. It provides:\n- **Initialization**: The component can be initialized with a specific number of points.\n- **Dynamic Point Management**: Methods to add and remove points allow for dynamic changes in the mesh topology during simulation.\n- **Point Access**: Provides access to the coordinates of each point, which are essential for constructing elements and evaluating shape functions.\n\n### Integration into Variational / Lagrangian Mechanics Framework\nWhile `PointSetTopologyContainer` does not directly implement the variational or Lagrangian mechanics framework, it provides a fundamental component required for defining discrete systems in FEM. The points managed by this container serve as nodes for finite elements, which are then used to discretize the weak form of the governing equations and construct global matrices such as mass (`M`) and stiffness (`K`).\n\nIn summary, `PointSetTopologyContainer` is a foundational component responsible for storing and managing point-based topologies in SOFA. It ensures that the nodal positions required for constructing elements are maintained accurately and efficiently.",
  "abstract": "The `PointSetTopologyContainer` manages point-based topologies by storing and manipulating sets of points, essential for defining nodes in finite element models.",
  "sheet": "# PointSetTopologyContainer\n\n## Overview\nThe `PointSetTopologyContainer` is a specialized topology container in the SOFA framework dedicated to managing point-based topologies. It stores and manipulates a set of points, providing functionalities for adding, removing, and accessing these points. This component ensures that the points' positions are maintained accurately and efficiently.\n\n## Parameters and Data\n- **checkTopology**: A boolean parameter (`bool`) to activate internal topology checks (default: `false`). Activating this might slow down the simulation."
}