Back

NaturalOrderingMethod

sofa::component::linearsolver::ordering::NaturalOrderingMethod
BaseOrderingMethod
Doc (from source)

Natural order (no permutation). Corresponding to an identity matrix.

Abstract (AI generated)

The `NaturalOrderingMethod` maintains the natural order of matrix elements, corresponding to an identity permutation, ensuring no reordering occurs during linear system solving processes.

Metadata
module
Sofa.Component.LinearSolver.Ordering
namespace
sofa::component::linearsolver::ordering
include
sofa/component/linearsolver/ordering/NaturalOrderingMethod.h
inherits
  • BaseOrderingMethod
description

The NaturalOrderingMethod is a component within the SOFA framework's linear solver ordering module (Sofa.Component.LinearSolver.Ordering). Its primary role is to maintain the natural order of matrix elements, which corresponds to an identity permutation (no reordering). This method inherits from the BaseOrderingMethod, implementing a straightforward approach where no changes are made to the original indices. The component defines two methods: methodName returns a string representing the name of the method, and computePermutation calculates the natural ordering for input sparse matrix patterns by setting both permutation and inverse-permutation arrays to their respective identity values.

Mathematical Description:

The role of the NaturalOrderingMethod is to preserve the original order of indices in a linear system. This means that if we have a matrix wzxhzdk:0 with elements arranged according to some ordering, the natural ordering method ensures that no permutation occurs, i.e., the index mapping remains identity.

In terms of mathematical notation:
- Let wzxhzdk:1 be the permutation matrix used for reordering. For the NaturalOrderingMethod, wzxhzdk:2 is simply the identity matrix wzxhzdk:3.
- Given a linear system represented by the equation wzxhzdk:4, where wzxhzdk:5 is the matrix and wzxhzdk:6 are vectors, the natural ordering method ensures that wzxhzdk:7 remains unchanged after any reordering process.

Constitutive or Kinematic Laws:

  • The NaturalOrderingMethod does not involve constitutive laws (such as stress-strain relationships), kinematic measures (like deformation gradients), or specific material models. It is purely a numerical method for maintaining the original order of matrix elements.

Role in FEM Pipeline:

  • In the context of the global FEM pipeline, this component operates during the linear solve phase to ensure that no reordering occurs in the stiffness matrix wzxhzdk:8 or mass matrix wzxhzdk:9. This is particularly useful when the inherent structure and sparsity pattern of the matrices are already optimized for efficient solution.

Numerical Methods:

  • The computePermutation method iterates through the indices of the input sparse matrix pattern (inPattern) and sets both the permutation array (outPermutation) and inverse-permutation array (outInversePermutation) to the identity values, i.e., wzxhzdk:10 and wzxhzdk:11.

Variational/Lagrangian Mechanics Framework:

  • The NaturalOrderingMethod does not directly contribute to the variational or Lagrangian mechanics framework. It is a support component that helps maintain the integrity of matrix ordering, which can indirectly affect the efficiency and stability of iterative linear solvers used in the nonlinear solve phase.

Summary:

  • This component ensures no reordering occurs, preserving the natural index order of matrices. It does not introduce any physical or constitutive laws but provides a straightforward identity permutation that is useful for maintaining matrix structure during linear system solving.
Methods
int methodName ()
void computePermutation (const SparseMatrixPattern & inPattern, int * outPermutation, int * outInversePermutation) virtual
{
  "name": "NaturalOrderingMethod",
  "namespace": "sofa::component::linearsolver::ordering",
  "module": "Sofa.Component.LinearSolver.Ordering",
  "include": "sofa/component/linearsolver/ordering/NaturalOrderingMethod.h",
  "doc": "Natural order (no permutation). Corresponding to an identity matrix.",
  "inherits": [
    "BaseOrderingMethod"
  ],
  "templates": [],
  "data_fields": [],
  "links": [],
  "methods": [
    {
      "name": "methodName",
      "return_type": "int",
      "params": [],
      "is_virtual": false,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    },
    {
      "name": "computePermutation",
      "return_type": "void",
      "params": [
        {
          "name": "inPattern",
          "type": "const SparseMatrixPattern &"
        },
        {
          "name": "outPermutation",
          "type": "int *"
        },
        {
          "name": "outInversePermutation",
          "type": "int *"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    }
  ],
  "description": "The `NaturalOrderingMethod` is a component within the SOFA framework's linear solver ordering module (`Sofa.Component.LinearSolver.Ordering`). Its primary role is to maintain the natural order of matrix elements, which corresponds to an identity permutation (no reordering). This method inherits from the `BaseOrderingMethod`, implementing a straightforward approach where no changes are made to the original indices. The component defines two methods: `methodName` returns a string representing the name of the method, and `computePermutation` calculates the natural ordering for input sparse matrix patterns by setting both permutation and inverse-permutation arrays to their respective identity values. This component is useful when no reordering is desired in linear system solving processes.",
  "maths": "The `NaturalOrderingMethod` is a component within the SOFA framework's linear solver ordering module (`Sofa.Component.LinearSolver.Ordering`). Its primary role is to maintain the natural order of matrix elements, which corresponds to an identity permutation (no reordering). This method inherits from the `BaseOrderingMethod`, implementing a straightforward approach where no changes are made to the original indices. The component defines two methods: `methodName` returns a string representing the name of the method, and `computePermutation` calculates the natural ordering for input sparse matrix patterns by setting both permutation and inverse-permutation arrays to their respective identity values.\n\n### Mathematical Description:\n\nThe role of the `NaturalOrderingMethod` is to preserve the original order of indices in a linear system. This means that if we have a matrix \\( A \\) with elements arranged according to some ordering, the natural ordering method ensures that no permutation occurs, i.e., the index mapping remains identity.\n\nIn terms of mathematical notation:\n- Let \\( P \\) be the permutation matrix used for reordering. For the `NaturalOrderingMethod`, \\( P \\) is simply the identity matrix \\( I \\).\n- Given a linear system represented by the equation \\( A x = b \\), where \\( A \\) is the matrix and \\( x, b \\) are vectors, the natural ordering method ensures that \\( A \\) remains unchanged after any reordering process.\n\n### Constitutive or Kinematic Laws:\n- The `NaturalOrderingMethod` does not involve constitutive laws (such as stress-strain relationships), kinematic measures (like deformation gradients), or specific material models. It is purely a numerical method for maintaining the original order of matrix elements.\n\n### Role in FEM Pipeline:\n- In the context of the global FEM pipeline, this component operates during the linear solve phase to ensure that no reordering occurs in the stiffness matrix \\( K \\) or mass matrix \\( M \\). This is particularly useful when the inherent structure and sparsity pattern of the matrices are already optimized for efficient solution.\n\n### Numerical Methods:\n- The `computePermutation` method iterates through the indices of the input sparse matrix pattern (`inPattern`) and sets both the permutation array (`outPermutation`) and inverse-permutation array (`outInversePermutation`) to the identity values, i.e., \\( outPermutation[i] = i \\) and \\( outInversePermutation[i] = i \\).\n\n### Variational/Lagrangian Mechanics Framework:\n- The `NaturalOrderingMethod` does not directly contribute to the variational or Lagrangian mechanics framework. It is a support component that helps maintain the integrity of matrix ordering, which can indirectly affect the efficiency and stability of iterative linear solvers used in the nonlinear solve phase.\n\n### Summary:\n- This component ensures no reordering occurs, preserving the natural index order of matrices. It does not introduce any physical or constitutive laws but provides a straightforward identity permutation that is useful for maintaining matrix structure during linear system solving.",
  "abstract": "The `NaturalOrderingMethod` maintains the natural order of matrix elements, corresponding to an identity permutation, ensuring no reordering occurs during linear system solving processes.",
  "sheet": "# NaturalOrderingMethod\n\n## Overview\n\nThe `NaturalOrderingMethod` is a component within the SOFA framework's linear solver ordering module (`Sofa.Component.LinearSolver.Ordering`). Its primary role is to maintain the natural order of matrix elements, which corresponds to an identity permutation (no reordering). This method inherits from the `BaseOrderingMethod`, implementing a straightforward approach where no changes are made to the original indices.\n\n## Parameters and Data\n\nThe `NaturalOrderingMethod` does not expose any significant data fields. It relies on its methods to ensure that the natural order is maintained without altering the matrix elements' arrangement."
}