SparseGridMultipleTopology
Sparse grid in 3D. Build a SparseGridTopology for several given Triangular meshes. A stiffness coefficient has to be assigned for each mesh. The last found stiffness coefficient is used for an element shared by several meshes => The mesh ordering is important, and so, more specific stiffness information must appear in last.
The SparseGridMultipleTopology builds a sparse grid topology from multiple triangular meshes, assigning distinct stiffness coefficients to each mesh. The ordering of the meshes determines how overlapping elements inherit their properties.
- module
- Sofa.Component.Topology.Container.Grid
- namespace
- sofa::component::topology::container::grid
- include
- sofa/component/topology/container/grid/SparseGridMultipleTopology.h
- inherits
-
- SparseGridRamificationTopology
The SparseGridMultipleTopology component in the SOFA framework is designed to build a sparse grid topology from multiple triangular meshes. Each mesh can have an associated stiffness coefficient, and these coefficients are used to determine the properties of elements shared by multiple meshes. The ordering of the meshes is crucial as it affects how overlapping elements inherit their stiffness values.
Governing Equations or Operators Contributed:
- Stiffness Matrix (K):
The stiffness matrix is influenced by the assigned stiffness coefficients for each mesh, and these coefficients determine the mechanical properties of the grid elements. If an element is shared by multiple meshes, the last specified stiffness coefficient in the list takes precedence.
Constitutive or Kinematic Laws Involved:
- Stiffness Coefficients:
The stiffness of each hexahedron (grid element) is defined based on the assigned stiffness coefficients for the triangular meshes. The component does not directly involve constitutive laws like strain measures, stress tensors, or hyperelastic potentials but uses these coefficients to modulate the mechanical behavior of the grid elements.
Role in Global FEM Pipeline:
- Mesh Generation and Assembly:
The SparseGridMultipleTopology is primarily responsible for generating a sparse grid topology from multiple input meshes. It handles the assembly of these grids, assigning appropriate stiffness and mass coefficients based on the specified values.
Numerical Methods or Discretization Choices:
- *Sparse Grid Construction:
The component constructs a sparse grid where each hexahedron can have different mechanical properties as defined by the user-specified stiffness and mass coefficients. It ensures that overlapping elements inherit their properties correctly, giving precedence to the last specified coefficient for overlapping regions.
Fitting into Variational/Lagrangian Mechanics Framework:
- Topology Construction:
The SparseGridMultipleTopology does not directly contribute to variational or Lagrangian mechanics formulations but provides the necessary topological information (i.e., grid structure and element properties) that is used by other components in the simulation pipeline. This topology construction step is crucial for defining the spatial discretization of the mechanical model.
Summary:
The SparseGridMultipleTopology component facilitates the creation of a composite sparse grid from multiple triangular meshes, allowing each mesh to have distinct stiffness coefficients. The resulting grid structure and element properties are essential inputs for subsequent FEM simulations, providing the necessary topological and material information.
Data Fields
| Name | Type | Default | Help |
|---|---|---|---|
d_computeRamifications |
bool | |
Are ramifications wanted? |
d_erasePreviousCoef |
bool | |
Does a new stiffness/mass coefficient replace the previous or blend half/half with it? |
Methods
void
init
()
virtual
void
buildAsFinest
()
virtual
void
buildFromFiner
()
virtual
void
buildVirtualFinerLevels
()
virtual
Index
findCube
(const type::Vec3 & pos, SReal & fx, SReal & fy, SReal & fz)
virtual
Index
findNearestCube
(const type::Vec3 & pos, SReal & fx, SReal & fy, SReal & fz)
virtual
void
buildFromTriangleMesh
(helper::io::Mesh * , unsigned int fileIdx)
void
assembleRegularGrids
(int & regularGridTypes, int & regularStiffnessCoefs, int & regularMassCoefs)
{
"name": "SparseGridMultipleTopology",
"namespace": "sofa::component::topology::container::grid",
"module": "Sofa.Component.Topology.Container.Grid",
"include": "sofa/component/topology/container/grid/SparseGridMultipleTopology.h",
"doc": "Sparse grid in 3D.\n\nBuild a SparseGridTopology for several given Triangular meshes.\nA stiffness coefficient has to be assigned for each mesh. The last found stiffness coefficient is used for an element shared by several meshes => The mesh ordering is important, and so, more specific stiffness information must appear in last.",
"inherits": [
"SparseGridRamificationTopology"
],
"templates": [],
"data_fields": [
{
"name": "d_computeRamifications",
"type": "bool",
"xmlname": "computeRamifications",
"help": "Are ramifications wanted?"
},
{
"name": "d_erasePreviousCoef",
"type": "bool",
"xmlname": "erasePreviousCoef",
"help": "Does a new stiffness/mass coefficient replace the previous or blend half/half with it?"
}
],
"links": [],
"methods": [
{
"name": "init",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "buildAsFinest",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "buildFromFiner",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "buildVirtualFinerLevels",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "findCube",
"return_type": "Index",
"params": [
{
"name": "pos",
"type": "const type::Vec3 &"
},
{
"name": "fx",
"type": "SReal &"
},
{
"name": "fy",
"type": "SReal &"
},
{
"name": "fz",
"type": "SReal &"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "findNearestCube",
"return_type": "Index",
"params": [
{
"name": "pos",
"type": "const type::Vec3 &"
},
{
"name": "fx",
"type": "SReal &"
},
{
"name": "fy",
"type": "SReal &"
},
{
"name": "fz",
"type": "SReal &"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "buildFromTriangleMesh",
"return_type": "void",
"params": [
{
"name": "",
"type": "helper::io::Mesh *"
},
{
"name": "fileIdx",
"type": "unsigned int"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
},
{
"name": "assembleRegularGrids",
"return_type": "void",
"params": [
{
"name": "regularGridTypes",
"type": "int &"
},
{
"name": "regularStiffnessCoefs",
"type": "int &"
},
{
"name": "regularMassCoefs",
"type": "int &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
}
],
"component": {
"name": "Sparse Grid Multiple Topology",
"description": "The Sparse Grid Multiple Topology (SGMT) is an advanced mesh generation and topology optimization tool used for creating complex 3D models based on multiple triangular meshes or surfaces. It extends the functionality of a standard sparse grid by incorporating information from several input geometries, allowing it to create a more accurate and detailed representation of composite shapes.",
"parameters": [
{
"name": "fileTopology",
"description": "The path to the primary topology file used for generating the initial sparse grid."
},
{
"name": "d_fileTopologies",
"description": "A list of paths to additional topology files that will be incorporated into the final model. These can include OBJ or TRIAN (triangular) mesh formats."
},
{
"name": "min",
"description": "The minimum bounding box coordinates for the sparse grid, used to define its spatial extent."
},
{
"name": "max",
"description": "The maximum bounding box coordinates for the sparse grid, used alongside 'min' to define the overall dimensions of the grid."
},
{
"name": "d_dataStiffnessCoefs",
"description": "A list of stiffness coefficients corresponding to each additional topology file. These values determine how stiff or rigid different regions within the composite model will be."
},
{
"name": "d_dataMassCoefs",
"description": "A list of mass coefficients corresponding to each additional topology file, defining the density or mass distribution across the final model."
},
{
"name": "nx",
"description": "The number of divisions along the x-axis for the sparse grid."
},
{
"name": "ny",
"description": "The number of divisions along the y-axis for the sparse grid."
},
{
"name": "nz",
"description": "The number of divisions along the z-axis for the sparse grid."
}
],
"functionality": [
"Generates a 3D sparse grid based on one primary and multiple secondary topological inputs.",
"Uses voxelization to convert input triangle meshes into hexahedral elements within the sparse grid.",
"Allows customization of stiffness and mass properties across different regions of the composite model.",
"Supports creation of finer levels within the grid for higher resolution modeling."
],
"usage": "The Sparse Grid Multiple Topology component is particularly useful in applications requiring detailed 3D models from multiple input geometries, such as in biomedical engineering, architectural design, or complex object simulation. It offers flexibility in defining material properties across different regions and supports hierarchical refinement of the model for improved accuracy.",
"example_scenarios": [
{
"scenario": "Biomedical Engineering",
"description": "Modeling a detailed anatomical structure composed of various tissue types, each with specific stiffness and density properties."
},
{
"scenario": "Architectural Design",
"description": "Creating an intricate building design from multiple surface inputs, enabling precise control over structural integrity across different sections."
}
]
},
"maths": "The SparseGridMultipleTopology component in the SOFA framework is designed to build a sparse grid topology from multiple triangular meshes. Each mesh can have an associated stiffness coefficient, and these coefficients are used to determine the properties of elements shared by multiple meshes. The ordering of the meshes is crucial as it affects how overlapping elements inherit their stiffness values.\n\n### Governing Equations or Operators Contributed:\n- **Stiffness Matrix (K):**\nThe stiffness matrix is influenced by the assigned stiffness coefficients for each mesh, and these coefficients determine the mechanical properties of the grid elements. If an element is shared by multiple meshes, the last specified stiffness coefficient in the list takes precedence.\n\n### Constitutive or Kinematic Laws Involved:\n- **Stiffness Coefficients:**\nThe stiffness of each hexahedron (grid element) is defined based on the assigned stiffness coefficients for the triangular meshes. The component does not directly involve constitutive laws like strain measures, stress tensors, or hyperelastic potentials but uses these coefficients to modulate the mechanical behavior of the grid elements.\n\n### Role in Global FEM Pipeline:\n- **Mesh Generation and Assembly:**\nThe SparseGridMultipleTopology is primarily responsible for generating a sparse grid topology from multiple input meshes. It handles the assembly of these grids, assigning appropriate stiffness and mass coefficients based on the specified values.\n\n### Numerical Methods or Discretization Choices:\n- **Sparse Grid Construction:*\nThe component constructs a sparse grid where each hexahedron can have different mechanical properties as defined by the user-specified stiffness and mass coefficients. It ensures that overlapping elements inherit their properties correctly, giving precedence to the last specified coefficient for overlapping regions.\n\n### Fitting into Variational/Lagrangian Mechanics Framework:\n- **Topology Construction:**\nThe SparseGridMultipleTopology does not directly contribute to variational or Lagrangian mechanics formulations but provides the necessary topological information (i.e., grid structure and element properties) that is used by other components in the simulation pipeline. This topology construction step is crucial for defining the spatial discretization of the mechanical model.\n\n### Summary:\nThe SparseGridMultipleTopology component facilitates the creation of a composite sparse grid from multiple triangular meshes, allowing each mesh to have distinct stiffness coefficients. The resulting grid structure and element properties are essential inputs for subsequent FEM simulations, providing the necessary topological and material information.",
"abstract": "The SparseGridMultipleTopology builds a sparse grid topology from multiple triangular meshes, assigning distinct stiffness coefficients to each mesh. The ordering of the meshes determines how overlapping elements inherit their properties.",
"sheet": "# SparseGridMultipleTopology\n\n**Overview:**\nSparseGridMultipleTopology constructs a sparse grid topology from multiple triangular meshes, where each mesh can have distinct stiffness coefficients. The component ensures that overlapping elements inherit their properties based on the last specified coefficient in the list.\n\n**Parameters and Data:*\nThe significant data fields are:\n- `computeRamifications`: A boolean indicating whether ramifications (additional topological features) are wanted (`default=false`).\n- `erasePreviousCoef`: A boolean determining if a new stiffness/mass coefficient replaces the previous one or blends half/half with it (`default=true`).\n\n**Dependencies and Connections:**\nThe component typically requires multiple triangular meshes as input. It fits into the scene graph by providing topological information for subsequent FEM simulations.\n\n**Practical Notes:**\nThe ordering of the meshes is crucial, as the last specified stiffness coefficient takes precedence in overlapping regions. Careful configuration is needed to ensure that more specific stiffness information appears later in the list."
}