[MBDyn-users] A plug in module for calling GNU-octave functions and classes from MBDyn

Resch Reinhard Reinhard.RESCH at accomp.it
Mon Apr 23 13:26:16 CEST 2012

Dear all,

In the attached file you can find an enhanced version of the octave module.

New features are:
- A direct interface to selected MBDyn objects (DataManager, StructNode) callable from octave.
  The same object oriented syntax like in C++ is used in octave. Other MBDyn objects could be added easily. This interface should work on Microsoft Windows too.

- Automatic forward differentiation of octave functions with respect to time or with respect to dVar. In order to enable this feature the octave-ad package and a special .m file are required.

- Differentiable template drive callers of any dimension (doublereal, Vec3, Vec6, Mat3x3, Mat6x6).

- User defined elements written entirely in octave. For this purpose it is necessary to define a octave class with member functions like WorkSpaceDim, AssRes, AssJac. An arbitrary number of user defined arguments can be passed to the constructor of the octave class within the MBDyn input file.

- A differentiable octave scalar function

- Optional updating of all global variables before each call of a octave function.

- A derivative drive caller that returns the derivative of the input drive caller.

Two examples are provided in the .tar archive:

One example for drive callers, scalar functions and automatic differentiation, and on example for user defined elements.

I have provided three patches for MBDyn in the .tar archive which are needed to compile and run the examples.

The module has been tested with MBDyn version 1.4.3 and GNU-octave version 3.2.3 with static linking.

For static linking the flag --with-static-modules must be enabled when running configure. Also two additional patches are required for static linking (mbdyn/base/userelem.cc, mbdyn/struct/Makefile.am).

The following linker flags are required for compilation: -L/usr/lib/octave-3.2.3 -loctinterp -loctave -lcruft

Also the LD_LIBRARY_PATH environment variable has to be defined at run time.

export LD_LIBRARY_PATH=/usr/lib/octave-3.2.3:${LD_LIBRARY_PATH}

Best regards,

Reinhard Resch

Le informazioni contenute in questo messaggio e negli eventuali allegati sono riservate e per uso esclusivo del destinatario. Persone diverse dallo  stesso non possono copiare o distribuire il messaggio a terzi. Chiunque riceva questo messaggio per errore, ? pregato di distruggerlo e di informare immediatamente il mittente.

HINWEIS: Dies ist eine vertrauliche Nachricht und nur f?r den Adressaten bestimmt. Es ist nicht erlaubt, diese Nachricht zu kopieren oder Dritten zug?nglich zu machen. Sollten Sie diese Nachricht irrt?mlich erhalten haben, bitte ich um Ihre Mitteilung per E-Mail oder unter der oben angegebenen Telefonnummer.

The information transmitted is intended for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: module-octave.tar.gz
Type: application/x-gzip
Size: 17622 bytes
Desc: module-octave.tar.gz
URL: <http://mail.mbdyn.org/pipermail/mbdyn-users/attachments/20120423/7d72eea8/attachment.bin>

More information about the MBDyn-users mailing list