|
|
<table>
|
|
|
<tr>
|
|
|
<th colspan="2">Double pendulum model in C++</th>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td style="text-align:center"><img src="Double-pendulum-model-in-C++_screenshot1.png" width=100%></td>
|
|
|
<td style="text-align:center"><img src="Double-pendulum-model-in-C++_screenshot2.png" width=100%></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th colspan="2">Browse <a href="https://gitlab.onelab.info/doc/tutorials/tree/master/PendulumC++/">model files</a></th>
|
|
|
</tr>
|
|
|
</table>
|
|
|
|
|
|
## Quick start
|
|
|
|
|
|
To run the model, first compile `pend.cpp` with a C++ compiler to create an
|
|
|
executable `pend.exe`, e.g. with
|
|
|
|
|
|
```
|
|
|
c++ pend.cpp -o pend.exe
|
|
|
```
|
|
|
|
|
|
Them open `pend.exe` with Gmsh and click on the "Run" button in the left panel.
|
|
|
|
|
|
## Features addressed in this tutorial
|
|
|
|
|
|
* C++ ONELAB model
|
|
|
|
|
|
## Additional information
|
|
|
|
|
|
Any C++ code can become a native ONELAB client by including the
|
|
|
[`onelab.h`](https://gitlab.onelab.info/gmsh/gmsh/tree/master/Common/onelab.h)
|
|
|
and header (which depends on
|
|
|
[`GmshSocket.h`](https://gitlab.onelab.info/gmsh/gmsh/tree/master/Common/GmshSocket.h)).
|
|
|
|
|
|
----
|
|
|
*Model developed by @henrotte and @geuzaine.* |