PrintVisitor
`PrintVisitor` traverses and prints details about nodes, objects, and their properties within the SOFA simulation graph for debugging or visualization purposes.
- module
- Sofa.framework.Simulation.Core
- namespace
- sofa::simulation
- include
- sofa/simulation/PrintVisitor.h
- inherits
-
- Visitor
- description
The PrintVisitor class in the SOFA framework is designed for traversal and printing details about nodes, objects, and their properties within the simulation graph. It does not contribute to any governing equations or numerical methods directly related to Finite Element Method (FEM) simulations. Its primary role is to provide a means of inspecting and debugging the hierarchical structure and state of components in a SOFA simulation.
Mathematical and Physical Description:
Governing Equations / Operators
- The
PrintVisitordoes not implement or contribute to any specific governing equations, operators (e.g., mass matrix wzxhzdk:0, stiffness matrix wzxhzdk:1, internal force wzxhzdk:2), residuals (wzxhzdk:3), or similar physical quantities.
Constitutive and Kinematic Laws
- There are no constitutive laws (strain measures, stress tensors, hyperelastic potentials) or kinematic models (damping models, constraint Jacobians) involved in the
vec3, component. It is purely a tool for traversal and printing simulation graph details.
Role in FEM Pipeline
- The
PrintVisitordoes not play a role in any of the core stages of the FEM pipeline such as assembly, time integration, nonlinear solve, linear solve, constraint handling, or mapping. Instead, it provides functionality to traverse and print information about the simulation graph.
Numerical Methods / Discretization Choices
- The
PrintVisitordoes not encode any numerical methods or discretization choices relevant to FEM simulations. It focuses on providing a means of inspecting the simulation state through traversal and printing operations.
Integration into Variational / Lagrangian Mechanics Framework
- The
PrintVisitoris an auxiliary tool that supports debugging and visualization within the broader SOFA framework, which itself implements variational and Lagrangian mechanics principles. However, it does not directly contribute to the mathematical or physical formulation of FEM simulations.
Conclusion
The PrintVisitor class in SOFA serves as a utility for inspecting the hierarchical structure and properties of simulation components but does not have any mathematical or physical content related to FEM formulations or numerical methods.
Methods
void
setVerbose
(int v)
int
getVerbose
()
bool
treeTraversal
(TreeTraversalRepetition & repeat)
virtual
void
processObject
(T obj)
void
processObjects
(Seq & list, const char * name)
Result
processNodeTopDown
(simulation::Node * node)
virtual
void
processNodeBottomUp
(simulation::Node * node)
virtual
{
"name": "PrintVisitor",
"namespace": "sofa::simulation",
"module": "Sofa.framework.Simulation.Core",
"include": "sofa/simulation/PrintVisitor.h",
"doc": "",
"inherits": [
"Visitor"
],
"templates": [],
"data_fields": [],
"links": [],
"methods": [
{
"name": "setVerbose",
"return_type": "void",
"params": [
{
"name": "v",
"type": "int"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getVerbose",
"return_type": "int",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "treeTraversal",
"return_type": "bool",
"params": [
{
"name": "repeat",
"type": "TreeTraversalRepetition &"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "processObject",
"return_type": "void",
"params": [
{
"name": "obj",
"type": "T"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "processObjects",
"return_type": "void",
"params": [
{
"name": "list",
"type": "Seq &"
},
{
"name": "name",
"type": "const char *"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "processNodeTopDown",
"return_type": "Result",
"params": [
{
"name": "node",
"type": "simulation::Node *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "processNodeBottomUp",
"return_type": "void",
"params": [
{
"name": "node",
"type": "simulation::Node *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"description": "The `PrintVisitor` class in the SOFA framework is designed to traverse and print details about nodes, objects, and their properties within the simulation graph. It inherits from the `Visitor` class and provides methods for setting verbosity (`setVerbose`), retrieving verbosity level (`getVerbose`), and processing nodes and object lists (`processObject`, `processObjects`). The traversal of the node structure is performed in a top-down (`processNodeTopDown`) and bottom-up (`processNodeBottomUp`) manner, allowing the user to inspect the hierarchical organization and properties of various components within the simulation graph. This component is useful for debugging or visualizing the internal state of simulations.",
"maths": "The `PrintVisitor` class in the SOFA framework is designed for traversal and printing details about nodes, objects, and their properties within the simulation graph. It does not contribute to any governing equations or numerical methods directly related to Finite Element Method (FEM) simulations. Its primary role is to provide a means of inspecting and debugging the hierarchical structure and state of components in a SOFA simulation.\n\n### Mathematical and Physical Description:\n\n#### Governing Equations / Operators\n- The `PrintVisitor` does not implement or contribute to any specific governing equations, operators (e.g., mass matrix $M$, stiffness matrix $K$, internal force $\boldsymbol{f}_{int}$), residuals ($R$), or similar physical quantities.\n\n#### Constitutive and Kinematic Laws\n- There are no constitutive laws (strain measures, stress tensors, hyperelastic potentials) or kinematic models (damping models, constraint Jacobians) involved in the `PrintVisitor` component. It is purely a tool for traversal and printing simulation graph details.\n\n#### Role in FEM Pipeline\n- The `PrintVisitor` does not play a role in any of the core stages of the FEM pipeline such as assembly, time integration, nonlinear solve, linear solve, constraint handling, or mapping. Instead, it provides functionality to traverse and print information about the simulation graph.\n\n#### Numerical Methods / Discretization Choices\n- The `PrintVisitor` does not encode any numerical methods or discretization choices relevant to FEM simulations. It focuses on providing a means of inspecting the simulation state through traversal and printing operations.\n\n#### Integration into Variational / Lagrangian Mechanics Framework\n- The `PrintVisitor` is an auxiliary tool that supports debugging and visualization within the broader SOFA framework, which itself implements variational and Lagrangian mechanics principles. However, it does not directly contribute to the mathematical or physical formulation of FEM simulations.\n\n### Conclusion\nThe `PrintVisitor` class in SOFA serves as a utility for inspecting the hierarchical structure and properties of simulation components but does not have any mathematical or physical content related to FEM formulations or numerical methods.",
"abstract": "`PrintVisitor` traverses and prints details about nodes, objects, and their properties within the SOFA simulation graph for debugging or visualization purposes.",
"sheet": "# PrintVisitor\n\n## Overview\nThe `PrintVisitor` class in the SOFA framework is designed to traverse and print details about nodes, objects, and their properties within the simulation graph. It inherits from the `Visitor` class and provides methods for setting verbosity (`setVerbose`), retrieving verbosity level (`getVerbose`), and processing nodes and object lists (`processObject`, `processObjects`). The traversal of the node structure is performed in a top-down (`processNodeTopDown`) and bottom-up (`processNodeBottomUp`) manner, allowing users to inspect the hierarchical organization and properties of various components within the simulation graph.\n\n## Parameters and Data\n- **Verbose**: Controls the verbosity level of the output. The default value is `0` (minimal output).\n\n## Practical Notes\nThe `PrintVisitor` is a utility component that does not affect the numerical or physical aspects of simulations. It is primarily used for debugging purposes to inspect the internal state and structure of SOFA simulations."
}