[Getdp] Socket communication onelab, getdp

Peter Binde peter.binde at drbinde.de
Sun Sep 6 23:22:13 CEST 2015


Hi Alexander,

thanks for these information. We will check this and I am sure it will be
helpful. One difference to your work is that we are going to deal with
Matlab-Simulink were we have our control definition. But the rest I believe
can be very similar to what you have done.

Best wishes,
Peter Binde

-----Ursprüngliche Nachricht-----
Von: getdp [mailto:getdp-bounces at ace20.montefiore.ulg.ac.be] Im Auftrag von
Alexander Krimm
Gesendet: Donnerstag, 3. September 2015 13:33
An: getdp at geuz.org
Betreff: Re: [Getdp] Socket communication onelab, getdp

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