Back

SphereQuadTopology

sofa::component::topology::container::constant::SphereQuadTopology
CubeTopology
Doc (from source)

Sphere topology constructed with deformed quads.

Abstract (AI generated)

The `SphereQuadTopology` generates a spherical mesh using deformed quads, defining the geometry and structure of a sphere for simulations. It inherits from `CubeTopology`, providing basic grid-based topological functionalities.

Metadata
module
Sofa.Component.Topology.Container.Constant
namespace
sofa::component::topology::container::constant
include
sofa/component/topology/container/constant/SphereQuadTopology.h
inherits
  • CubeTopology
description

The SphereQuadTopology component in the SOFA framework is responsible for generating a spherical mesh using deformed quads. This topology container inherits from the CubeTopology, which provides the basic grid-based topological functionalities. The primary purpose of this component is to define the geometry and structure of a sphere, suitable for use in simulations where quad-based discretization is required.

Mathematical Description

Parameters

  • Center of the Sphere: $\mathbf{c} = (c_x, c_y, c_z) \in \mathbb{R}^3$
  • Represented by the data field d_center in the component.
  • Radius of the Sphere: $r \in \mathbb{R}$
  • Represented by the data field d_radius in the component.

Discretization and Geometry

The sphere is discretized using a grid with indices $(x, y, z)$. The coordinates of points on the spherical surface are determined using these grid indices. Specifically, for each point $p_i$ indexed by $(x, y, z)$, its coordinates are given by:

egin{align}
p_i = \mathbf{c} + r \cdot \frac{(2x - (d_nx-1)), (2y - (d_ny-1)), (2z - (d_nz-1))}{\sqrt{(2x - (d_nx-1))^2 + (2y - (d_ny-1))^2 + (2z - (d_nz-1))^2}}
\end{align
}

where $d_nx, d_ny, d_nz$ are the number of grid points along each axis.

Role in FEM Pipeline

The SphereQuadTopology component plays a crucial role in defining the mesh and connectivity information required for subsequent stages of the finite element simulation pipeline. This includes: ag{844}

  • Mesh Generation: The component generates the nodal coordinates and topological relationships (e.g., which nodes form quads) necessary to discretize the sphere.
  • Integration with Mechanical Models: Other SOFA components, such as mechanical models, collision detection modules, and visualization pipelines, rely on this topology information for their respective operations. For instance, the mechanical model will use these points and connectivity to assemble mass matrices, stiffness matrices, and other operators required in the weak formulation of the governing equations.

Numerical Methods

The SphereQuadTopology does not directly involve numerical methods such as time integration or nonlinear solution techniques. Instead, it provides a geometric representation that is used by downstream components for these purposes. ag{845}

Physical Description

From a physical perspective, the SphereQuadTopology component defines the geometry of a deformable sphere that can be used in simulations involving soft tissues or other materials requiring quad-based discretization. The generated mesh serves as the basis for defining material properties and boundary conditions within the simulation framework. ag{846}klzzwxh:0012 ag{847}klzzwxh:0013 ag{848}klzzwxh:0014 ag{849}klzzwxh:0015 ag{850}klzzwxh:0016 ag{851}klzzwxh:0017 ag{852}klzzwxh:0042 ag{853}klzzwxh:0043 ag{854}klzzwxh:0044 ag{855}klzzwxh:0045 ag{856}klzzwxh:0046 ag{857}klzzwxh:0047 ag{858}klzzwxh:0048 ag{859}klzzwxh:0049 ag{860}klzzwxh:0050 ag{861}klzzwxh:0051 ag{862}klzzwxh:0052 ag{863}klzzwxh:0053 ag{864}klzzwxh:0054 ag{865}klzzwxh:0055 ag{866}klzzwxh:0056 ag{867}klzzwxh:0057 ag{868}klzzwxh:0058 ag{869}klzzwxh:0059 ag{870}klzzwxh:0060 ag{871}klzzwxh:0061 ag{872}klzzwxh:0062 ag{873}klzzwxh:0063 ag{874}klzzwxh:0064 ag{875}klzzwxh:0065 ag{876}klzzwxh:0066 ag{877}klzzwxh:0067 ag{878}klzzwxh:0068 ag{879}klzzwxh:0069 ag{880}klzzwxh:0070 ag{881}klzzwxh:0071 ag{882}klzzwxh:0072 ag{883}klzzwxh:0073 ag{884}klzzwxh:0074 ag{885}klzzwxh:0075 ag{886}klzzwxh:0076 ag{887}klzzwxh:0077 ag{888}klzzwxh:0080 ag{889}klzzwxh:0081 ag{890}klzzwxh:0082 ag{891}klzzwxh:0083 ag{892}klzzwxh:0084 ag{893}klzzwxh:0085 ag{894}klzzwxh:0086 ag{895}klzzwxh:0087 ag{896}klzzwxh:0088 ag{897}klzzwxh:0089 ag{898}klzzwxh:0090 ag{899}klzzwxh:0091 ag{900}klzzwxh:0092 ag{901}klzzwxh:0093 ag{902}klzzwxh:0094 ag{903}klzzwxh:0095 ag{904}klzzwxh:0096 ag{905}klzzwxh:0097 ag{906}klzzwxh:0098 ag{907}klzzwxh:0099 ag{908}klzzwxh:0100 ag{909}klzzwxh:0101 ag{910}klzzwxh:0102 ag{911}klzzwxh:0103 ag{912}klzzwxh:0104 ag{913}klzzwxh:0105 ag{914}klzzwxh:0106 ag{915}klzzwxh:0107 ag{916}klzzwxh:0108 ag{917}klzzwxh:0109 ag{918}klzzwxh:0110 ag{919}klzzwxh:0111 ag{920}klzzwxh:0112 ag{921}klzzwxh:0113 ag{922}klzzwxh:0114 ag{923}klzzwxh:0115 ag{924}klzzwxh:0116 ag{925}klzzwxh:0117 ag{926}klzzwxh:0118 ag{927}klzzwxh:0119 ag{928}klzzwxh:0120 ag{929}klzzwxh:0127 ag{930}klzzwxh:0128 ag{931}klzzwxh:0129 ag{932}klzzwxh:0130 ag{933}klzzwxh:0131 ag{934}klzzwxh:0132 ag{935}klzzwxh:0133 ag{936}klzzwxh:0134 ag{937}klzzwxh:0135 ag{938}klzzwxh:0136 ag{939}klzzwxh:0137 ag{940}klzzwxh:0138 ag{941}klzzwxh:0139 ag{942}klzzwxh:0140 ag{943}klzzwxh:0141 ag{944}klzzwxh:0142 ag{945}klzzwxh:0143 ag{946}klzzwxh:0144 ag{947}klzzwxh:0148 ag{948}klzzwxh:0149 ag{949}klzzwxh:0150 ag{950}klzzwxh:0151 ag{951}klzzwxh:0152 ag{952}klzzwxh:0153 ag{953}klzzwxh:0154 ag{954}klzzwxh:0155 ag{955}klzzwxh:0156 ag{956}klzzwxh:0157 ag{957}klzzwxh:0158 ag{958}klzzwxh:0159 ag{959}klzzwxh:0160 ag{960}klzzwxh:0161 ag{961}klzzwxh:0162 ag{962}klzzwxh:0163 ag{963}klzzwxh:0164 ag{964}klzzwxh:0165 ag{965}klzzwxh:0166 ag{966}klzzwxh:0167 ag{967}klzzwxh:0168 ag{968}klzzwxh:0169 ag{969}klzzwxh:0170 ag{970}klzzwxh:0171 ag{971}klzzwxh:0172 ag{972}klzzwxh:0173 ag{973}klzzwxh:0174 ag{974}klzzwxh:0175 ag{975}klzzwxh:0176 ag{976}klzzwxh:0177 ag{977}klzzwxh:0178 ag{978}klzzwxh:0179 ag{979}klzzwxh:0180 ag{980}klzzwxh:0181 ag{981}klzzwxh:0182 ag{982}klzzwxh:0183 ag{983}klzzwxh:0184 ag{984}klzzwxh:0185 ag{985}klzzwxh:0186 ag{986}klzzwxh:0187 ag{987}klzzwxh:0188 ag{988}klzzwxh:0189 ag{989}klzzwxh:0190 ag{990}klzzwxh:0191 ag{991}klzzwxh:0192 ag{992}klzzwxh:0193 ag{993}klzzwxh:0194 ag{994}klzzwxh:0195 ag{995}klzzwxh:0196 ag{996}klzzwxh:0197 ag{997}klzzwxh:0198 ag{998}klzzwxh:0199 ag{999}klzzwxh:0200 ag{1000}

Data Fields
NameTypeDefaultHelp
d_center Vec3 Center of the sphere
d_radius SReal Radius of the sphere
Methods
Vec3 getPoint (int x, int y, int z) virtual
{
  "name": "SphereQuadTopology",
  "namespace": "sofa::component::topology::container::constant",
  "module": "Sofa.Component.Topology.Container.Constant",
  "include": "sofa/component/topology/container/constant/SphereQuadTopology.h",
  "doc": "Sphere topology constructed with deformed quads.",
  "inherits": [
    "CubeTopology"
  ],
  "templates": [],
  "data_fields": [
    {
      "name": "d_center",
      "type": "Vec3",
      "xmlname": "center",
      "help": "Center of the sphere"
    },
    {
      "name": "d_radius",
      "type": "SReal",
      "xmlname": "radius",
      "help": "Radius of the sphere"
    }
  ],
  "links": [],
  "methods": [
    {
      "name": "getPoint",
      "return_type": "Vec3",
      "params": [
        {
          "name": "x",
          "type": "int"
        },
        {
          "name": "y",
          "type": "int"
        },
        {
          "name": "z",
          "type": "int"
        }
      ],
      "is_virtual": true,
      "is_pure_virtual": false,
      "is_static": false,
      "access": "public"
    }
  ],
  "description": "The `SphereQuadTopology` is a topology container in SOFA that generates a spherical mesh using deformed quads. It inherits from the `CubeTopology`, which provides basic grid-based topological functionalities. The primary purpose of this component is to define the geometry and structure of a sphere for use in simulations, particularly where quad-based discretization is required.\n\nThe `SphereQuadTopology` includes two data fields: `center` (of type `Vec3`) representing the center of the sphere, and `radius` (of type `SReal`) defining its radius. It provides a method `getPoint(x, y, z)` to retrieve the coordinates of points on the spherical surface based on grid indices.\n\nThis component interacts with other SOFA components that require topological information for simulation purposes, such as mechanical models, collision detection, and visualization pipelines. Practical usage involves setting the sphere's center and radius through XML configuration or programmatically.",
  "maths": "The `SphereQuadTopology` component in the SOFA framework is responsible for generating a spherical mesh using deformed quads. This topology container inherits from the `CubeTopology`, which provides the basic grid-based topological functionalities. The primary purpose of this component is to define the geometry and structure of a sphere, suitable for use in simulations where quad-based discretization is required.\n\n### Mathematical Description\n\n#### Parameters\n- **Center of the Sphere**: \\(\\mathbf{c} = (c_x, c_y, c_z) \\in \\mathbb{R}^3\\)\n  - Represented by the data field `d_center` in the component.\n- **Radius of the Sphere**: \\(r \\in \\mathbb{R}\\)\n  - Represented by the data field `d_radius` in the component.\n\n#### Discretization and Geometry\nThe sphere is discretized using a grid with indices \\((x, y, z)\\). The coordinates of points on the spherical surface are determined using these grid indices. Specifically, for each point \\(p_i\\) indexed by \\((x, y, z)\\), its coordinates are given by:\n\n\begin{align*}\n  p_i = \\mathbf{c} + r \\cdot \\frac{(2x - (d_nx-1)), (2y - (d_ny-1)), (2z - (d_nz-1))}{\\sqrt{(2x - (d_nx-1))^2 + (2y - (d_ny-1))^2 + (2z - (d_nz-1))^2}}\n\\end{align*}\n\nwhere \\(d_nx, d_ny, d_nz\\) are the number of grid points along each axis.\n\n#### Role in FEM Pipeline\nThe `SphereQuadTopology` component plays a crucial role in defining the mesh and connectivity information required for subsequent stages of the finite element simulation pipeline. This includes:\n\n- **Mesh Generation**: The component generates the nodal coordinates and topological relationships (e.g., which nodes form quads) necessary to discretize the sphere.\n- **Integration with Mechanical Models**: Other SOFA components, such as mechanical models, collision detection modules, and visualization pipelines, rely on this topology information for their respective operations. For instance, the mechanical model will use these points and connectivity to assemble mass matrices, stiffness matrices, and other operators required in the weak formulation of the governing equations.\n\n#### Numerical Methods\nThe `SphereQuadTopology` does not directly involve numerical methods such as time integration or nonlinear solution techniques. Instead, it provides a geometric representation that is used by downstream components for these purposes.\n\n### Physical Description\nFrom a physical perspective, the `SphereQuadTopology` component defines the geometry of a deformable sphere that can be used in simulations involving soft tissues or other materials requiring quad-based discretization. The generated mesh serves as the basis for defining material properties and boundary conditions within the simulation framework.",
  "abstract": "The `SphereQuadTopology` generates a spherical mesh using deformed quads, defining the geometry and structure of a sphere for simulations. It inherits from `CubeTopology`, providing basic grid-based topological functionalities.",
  "sheet": "<h1>SphereQuadTopology</h1>\n\n<h2>Overview</h2>\n<p>The <code>SphereQuadTopology</code> is responsible for generating the topology of a spherical mesh using deformed quads. It inherits from <code>CubeTopology</code>, which provides basic grid-based topological functionalities. This component defines the geometry and structure of a sphere, suitable for simulations where quad-based discretization is required.</p>\n\n<h2>Mathematical Model</h2>\n<p>The sphere is discretized using a grid with indices <span class=\"math-inline\">\\((x, y, z)\\)</span>. The coordinates of points on the spherical surface are determined based on these grid indices. Specifically, for each point <span class=\"math-inline\">\\(p_i\\)</span> indexed by <span class=\"math-inline\">\\((x, y, z)\\)</span>, its coordinates are given by:</p>\n<p><span class=\"math-display\">\\[ p_i = \\mathbf{c} + r \\cdot \\frac{(2x - (d_nx-1)), (2y - (d_ny-1)), (2z - (d_nz-1))}{\\sqrt{(2x - (d_nx-1))^2 + (2y - (d_ny-1))^2 + (2z - (d_nz-1))^2}} \\]</span></p>\n<p>where <span class=\"math-inline\">\\(\\mathbf{c} = (c_x, c_y, c_z)\\)</span> is the center of the sphere and <span class=\"math-inline\">\\(r\\)</span> is its radius.</p>\n\n<h2>Parameters and Data</h2>\n<p>The significant data fields exposed by this component are:</p>\n<ul>\n<li><strong>Center of the Sphere (d_center):</strong> <code>Vec3</code>, representing the center of the sphere. Default value is not specified.</li>\n<li><strong>Radius of the Sphere (d_radius):</strong> <code>SReal</code>, defining its radius. Default value is not specified.</li>\n</ul>\n\n<h2>Dependencies and Connections</h2>\n<p>The `SphereQuadTopology` component interacts with other SOFA components that require topological information for simulation purposes, such as mechanical models, collision detection, and visualization pipelines.</p>"
}