ElecIntegrator
The `ElecIntegrator` component in the SOFA ecosystem is part of the SofaMitchellSchaeffer plugin and inherits from the `ForceField` class. Its primary role is to call an electrical (elec) model using a finer time step, which enhances the precision and accuracy of the simulation involving electrical properties. This component interacts with other components through its public methods such as `init`, `addForce`, `addDForce`, `addKToMatrix`, `addBToMatrix`, `getPotentialEnergy`, `buildStiffnessMatrix`, and `draw`. These methods allow it to integrate forces, build stiffness matrices, calculate potential energy, and manage visualization aspects. The `ElecIntegrator` requires a coupling node (`l_coupling`) for the elec model integration, which is initialized in its `init()` method. Practical usage involves ensuring that the coupling node is correctly linked and configured within the simulation context.
- abstract
- The `ElecIntegrator` component enhances simulation accuracy by integrating an electrical model with finer time steps, improving the resolution of electrical dynamics within a SOFA simulation.
- sheet
- # ElecIntegrator ## Overview The `ElecIntegrator` is part of the SofaMitchellSchaeffer plugin and inherits from `ForceField`. It enhances precision by calling an electrical (elec) model with finer time steps, improving the accuracy of simulations involving electrical properties. ## Mathematical Model The core functionality involves integrating an electrical model over multiple sub-steps within a single simulation step. The time interval \( dt \) is divided into smaller intervals \( kk = dt / 1e-4 \). Each sub-step calls the elec model using a finer time step \( (dt / kk) \), ensuring that electrical dynamics are more accurately resolved. ## Parameters and Data The `ElecIntegrator` does not expose any significant Data fields. All parameters and data are managed internally through its methods. ## Dependencies and Connections This component requires a coupling node (`l_coupling`) for the elec model integration, which is initialized in its `init()` method. It interacts with other components to integrate forces, build stiffness matrices, calculate potential energy, and manage visualization aspects. ## Practical Notes Practical usage involves ensuring that the coupling node is correctly linked and configured within the simulation context. The component temporarily deactivates the coupling node during initialization to avoid interference, then activates it for integration and subsequently re-deactivates it.
- description
- The `ElecIntegrator` component in the SOFA ecosystem is part of the SofaMitchellSchaeffer plugin and inherits from the `ForceField` class. Its primary role is to call an electrical (elec) model using a finer time step, which enhances the precision and accuracy of the simulation involving electrical properties. This component interacts with other components through its public methods such as `init`, `addForce`, `addDForce`, `addKToMatrix`, `addBToMatrix`, `getPotentialEnergy`, `buildStiffnessMatrix`, and `draw`. These methods allow it to integrate forces, build stiffness matrices, calculate potential energy, and manage visualization aspects. The `ElecIntegrator` requires a coupling node (`l_coupling`) for the elec model integration, which is initialized in its `init()` method. Practical usage involves ensuring that the coupling node is correctly linked and configured within the simulation context.
- maths
- <h3>ElecIntegrator Component Mathematical and Physical Description</h3> <p>The <code>ElecIntegrator</code> component in the SOFA framework is designed to enhance precision by calling an electrical (elec) model with a finer time step. This approach improves the accuracy of simulations involving electrical properties.</p> <h4>Inheritance and Public Methods</h4> <p><code>ElecIntegrator</code> inherits from <code>ForceField</code>, which implies it integrates internal forces, stiffness matrices, and performs other tasks related to force fields in SOFA. The public methods are:</p> <ul> <li><strong>init()</strong>: Initializes the component and ensures that a coupling node is found for the elec model.</li> <li><strong>addForce()</strong>: Adds internal forces using finer time steps by calling an electrical model multiple times within one simulation step.</li> <li><strong>addDForce()</strong>, <strong>addKToMatrix()</strong>, and <strong>addBToMatrix()</strong>: These methods handle the differential force, stiffness matrix contributions, and damping contributions to the global matrix respectively. However, they are currently not contributing any specific values in this implementation.</li> <li><strong>getPotentialEnergy()</strong>: Returns the potential energy associated with the elec model. In this implementation, it returns zero as no explicit potential energy calculation is defined.</li> <li><strong>buildStiffnessMatrix()</strong>: Constructs the local stiffness matrix structure used by some solvers. No specific behavior is implemented here other than logging a message.</li> <li><strong>draw()</strong>: Manages custom drawing for visualization purposes, currently not utilized.</li> </ul> <h4>Integration of Electrical Model with Finer Time Steps</h4> <p>The core functionality of the <code>ElecIntegrator</code> is to integrate an electrical model over multiple sub-steps within a single simulation step. This is achieved by:</p> <ul> <li><strong>Sub-step Integration</strong>: The time interval <em>dt</em> is divided into smaller intervals (<code>kk = dt / 1e-4</code>). Each of these sub-steps calls the elec model using a finer time step <code>(dt / kk)</code>. This ensures that electrical dynamics are more accurately resolved.</li> <li><strong>Coupling Node Activation/Deactivation</strong>: The coupling node is temporarily deactivated during initialization to avoid interference, then activated for integration and subsequently re-deactivated. This process allows the elec model to integrate with other components without unnecessary side effects.</li> </ul> <h4>Role in Simulation Context</h4> <p>In a simulation context, the <code>ElecIntegrator</code> ensures that electrical properties are accurately modeled through finer time step integration. This is particularly important for simulations where electrical dynamics play a critical role in overall system behavior.</p>
{
"name": "ElecIntegrator",
"main": {
"name": "ElecIntegrator",
"namespace": "sofa_ff",
"module": "SofaMitchellSchaeffer",
"include": "ElecIntegrator.h",
"doc": "Components that calls the elec model with a finer time step",
"inherits": [
"ForceField"
],
"templates": [
"sofa::defaulttype::Vec3Types"
],
"data_fields": [],
"links": [],
"methods": [
{
"name": "init",
"return_type": "void",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "addForce",
"return_type": "void",
"params": [
{
"name": "mparams",
"type": "const core::MechanicalParams *"
},
{
"name": "f",
"type": "DataVecDeriv &"
},
{
"name": "x",
"type": "const DataVecCoord &"
},
{
"name": "v",
"type": "const DataVecDeriv &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "addDForce",
"return_type": "void",
"params": [
{
"name": "mparams",
"type": "const core::MechanicalParams *"
},
{
"name": "df",
"type": "DataVecDeriv &"
},
{
"name": "dx",
"type": "const DataVecDeriv &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "addKToMatrix",
"return_type": "void",
"params": [
{
"name": "mat",
"type": "sofa::linearalgebra::BaseMatrix *"
},
{
"name": "kFact",
"type": "SReal"
},
{
"name": "offset",
"type": "unsigned int &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "addBToMatrix",
"return_type": "void",
"params": [
{
"name": "mat",
"type": "sofa::linearalgebra::BaseMatrix *"
},
{
"name": "bFact",
"type": "SReal"
},
{
"name": "offset",
"type": "unsigned int &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getPotentialEnergy",
"return_type": "SReal",
"params": [
{
"name": "mparams",
"type": "const core::MechanicalParams *"
},
{
"name": "x",
"type": "const DataVecCoord &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "buildStiffnessMatrix",
"return_type": "void",
"params": [
{
"name": "matrix",
"type": "core::behavior::StiffnessMatrix *"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "draw",
"return_type": "void",
"params": [
{
"name": "vparams",
"type": "const core::visual::VisualParams *"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
]
},
"desc": {
"description": "The `ElecIntegrator` component in the SOFA ecosystem is part of the SofaMitchellSchaeffer plugin and inherits from the `ForceField` class. Its primary role is to call an electrical (elec) model using a finer time step, which enhances the precision and accuracy of the simulation involving electrical properties. This component interacts with other components through its public methods such as `init`, `addForce`, `addDForce`, `addKToMatrix`, `addBToMatrix`, `getPotentialEnergy`, `buildStiffnessMatrix`, and `draw`. These methods allow it to integrate forces, build stiffness matrices, calculate potential energy, and manage visualization aspects. The `ElecIntegrator` requires a coupling node (`l_coupling`) for the elec model integration, which is initialized in its `init()` method. Practical usage involves ensuring that the coupling node is correctly linked and configured within the simulation context."
},
"maths": {
"maths": "<h3>ElecIntegrator Component Mathematical and Physical Description</h3>\n\n<p>The <code>ElecIntegrator</code> component in the SOFA framework is designed to enhance precision by calling an electrical (elec) model with a finer time step. This approach improves the accuracy of simulations involving electrical properties.</p>\n\n<h4>Inheritance and Public Methods</h4>\n\n<p><code>ElecIntegrator</code> inherits from <code>ForceField</code>, which implies it integrates internal forces, stiffness matrices, and performs other tasks related to force fields in SOFA. The public methods are:</p>\n<ul>\n <li><strong>init()</strong>: Initializes the component and ensures that a coupling node is found for the elec model.</li>\n <li><strong>addForce()</strong>: Adds internal forces using finer time steps by calling an electrical model multiple times within one simulation step.</li>\n <li><strong>addDForce()</strong>, <strong>addKToMatrix()</strong>, and <strong>addBToMatrix()</strong>: These methods handle the differential force, stiffness matrix contributions, and damping contributions to the global matrix respectively. However, they are currently not contributing any specific values in this implementation.</li>\n <li><strong>getPotentialEnergy()</strong>: Returns the potential energy associated with the elec model. In this implementation, it returns zero as no explicit potential energy calculation is defined.</li>\n <li><strong>buildStiffnessMatrix()</strong>: Constructs the local stiffness matrix structure used by some solvers. No specific behavior is implemented here other than logging a message.</li>\n <li><strong>draw()</strong>: Manages custom drawing for visualization purposes, currently not utilized.</li>\n</ul>\n\n<h4>Integration of Electrical Model with Finer Time Steps</h4>\n\n<p>The core functionality of the <code>ElecIntegrator</code> is to integrate an electrical model over multiple sub-steps within a single simulation step. This is achieved by:</p>\n<ul>\n <li><strong>Sub-step Integration</strong>: The time interval <em>dt</em> is divided into smaller intervals (<code>kk = dt / 1e-4</code>). Each of these sub-steps calls the elec model using a finer time step <code>(dt / kk)</code>. This ensures that electrical dynamics are more accurately resolved.</li>\n <li><strong>Coupling Node Activation/Deactivation</strong>: The coupling node is temporarily deactivated during initialization to avoid interference, then activated for integration and subsequently re-deactivated. This process allows the elec model to integrate with other components without unnecessary side effects.</li>\n</ul>\n\n<h4>Role in Simulation Context</h4>\n\n<p>In a simulation context, the <code>ElecIntegrator</code> ensures that electrical properties are accurately modeled through finer time step integration. This is particularly important for simulations where electrical dynamics play a critical role in overall system behavior.</p>"
},
"summary": {
"abstract": "The `ElecIntegrator` component enhances simulation accuracy by integrating an electrical model with finer time steps, improving the resolution of electrical dynamics within a SOFA simulation.",
"sheet": "# ElecIntegrator\n\n## Overview\n\nThe `ElecIntegrator` is part of the SofaMitchellSchaeffer plugin and inherits from `ForceField`. It enhances precision by calling an electrical (elec) model with finer time steps, improving the accuracy of simulations involving electrical properties.\n\n## Mathematical Model\n\nThe core functionality involves integrating an electrical model over multiple sub-steps within a single simulation step. The time interval \\( dt \\) is divided into smaller intervals \\( kk = dt / 1e-4 \\). Each sub-step calls the elec model using a finer time step \\( (dt / kk) \\), ensuring that electrical dynamics are more accurately resolved.\n\n## Parameters and Data\n\nThe `ElecIntegrator` does not expose any significant Data fields. All parameters and data are managed internally through its methods.\n\n## Dependencies and Connections\n\nThis component requires a coupling node (`l_coupling`) for the elec model integration, which is initialized in its `init()` method. It interacts with other components to integrate forces, build stiffness matrices, calculate potential energy, and manage visualization aspects.\n\n## Practical Notes\n\nPractical usage involves ensuring that the coupling node is correctly linked and configured within the simulation context. The component temporarily deactivates the coupling node during initialization to avoid interference, then activates it for integration and subsequently re-deactivates it."
}
}