The aim of this tutorial is to show the different ways to create linear mesh topologies. In this tutorial, three linear pendulums are represented, implying:
- A mechanicalObject with geometry point positions.
- A mass for gravity and fixed points.
- A mesh spring forcefield to create springs between points
- An ODE scheme and a linear solver to solve the system at each time step.
- And a topological component.
Key points
There are three possible ways to build a linear mesh using the components:
- MeshTopology, to create a static mesh. I.e a component able to handle different topologies (2D/3D), either triangles, tetrahedra, quads, or hexahedra. But this component is only a container. This means, the structure can be accessed, as well as further information. But no modifications are possible.
- RegularGridTopology, to create a regular mesh. I.e a component able to create a mesh (no mesh file needed) with a regular grid, by giving the boundaries and the scaling.
- EdgeSetTopologyContainer, to create a dynamic mesh. I.e a component able to handle only edge topology, but, other classes can be added to perform topological operations. Classes are EdgeSetTopologyModifier (for unitary operation), EdgeSetTopologyAlgorithms (for more complex topological operations) and EdgeSetGeometryAlgorithms (to couple topology algorithms and geometry positions).
Results
Thus, when simulate, the three models will act as a pendulum, the same way.