[Getdp] Socket communication onelab, getdp

Alexander Krimm alex at wirew0rm.de
Thu Sep 3 13:32:41 CEST 2015


Hello Peter,

There are basically two things you could do, either implement a onelab server in matlab, which would offer most control, but you would have to handle all the parameters etc yourself and I don't know if the onelab protocol will have incompatible changes in the future.

The approach that I used is implementing my code as client (written in octave) that connects to the Onelab Server (which is included in gmsh) and then run GetDP as a subclient from the octave code. In your getdp *.pro files you can use Onelab-Parameters, which your matlab-client has set and also send PostProcessing Results back to the Server and read them from matlab. Exchangin Field Quantities is at the moment only possible by saving them to a file.

actually the code and my thesis are available at
https://thalia.gsc.ce.tu-darmstadt.de/krimm/onelab-field-circuit-coupling

The getdp-ocs folder contains an example where onelab is communicating with octave via onelab. It also contains the octave package written that provides onelab functionality (onelab-1.0.0.tar.gz). It basically wraps the most needed functionalities of the onelab.h client implementation for usage in octave. This archive can be directly compiled and installed from octave with the pkg command or extracted to browse the code and some (rudimental) documentation.

As I don't know what exactly you are planning I don't know how usefull my code is for you, but if you have questions I'll try to answer them.

Alexander Krimm


On 02.09.2015 12:17, Sebastian Schöps wrote:
> Alex Krimm has recently created a nice interface to Octave (a free Matlab clone) based on the C code at http://onelab.info/wiki/C%2B%2B. Octave's socket package was not convenient. I assume you could do the same using MEX files in Matlab (however, be aware of possible licensing issues). Alex' work is not yet published at onelab.info but I can send you a copy of his thesis.
> 
> Sebastian Schoeps
> 
>> Date: Tue, 1 Sep 2015 12:15:42 +0200
>> From: "Peter Binde" <peter.binde at drbinde.de>
>> To: <getdp at geuz.org>
>> Subject: [Getdp] Socket communication onelab, getdp
>> Message-ID: <007201d0e49f$29204ca0$7b60e5e0$@drbinde.de>
>> Content-Type: text/plain; charset="us-ascii"
>>
>> We are building an interface between getdp and matlab. Goal is to define
>> controls in matlab and therefore use input/output from FE models simulated
>> in getdp. Our idea is to exploit the socket communication capability that
>> works between onelab and getdp. And my question is if there is any example
>> or documentation about how this works. 
>>
>>
>> Thanks for any help,
>>
>> Peter Binde

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://www.geuz.org/pipermail/getdp/attachments/20150903/ee37b8c7/attachment.asc>