[Getdp] GetDP integrated in MATLAB?

François Henrotte francois.henrotte at uclouvain.be
Fri Sep 14 16:09:10 CEST 2012


Le 13 sept. 2012 à 17:49, Thomas_W a écrit :

> 
> Dear all,
> 
> my aim is to apply an iterative procedure where I call a PDE solver with different coefficients each time and use the output to update the parameters. I think of prototyping this algorithm in MATLAB, and my question is whether the GetDP solver can be integrated in this environment. In the archive entries I did not find any definitive answer. So I hope you bear with me asking this global question.
> 
> I think of a MATLAB function like this:
> 
> 1:   function sol = algo(a,filename,options,n)
> 2:
> 3:   for i = 1:n
> 4:
> 5:    		sol = getDP(a,filename,options);
> 6:
> 7:  		if endcriterium(sol) < 0.01
> 8:			break;
> 9:  		end
> 10:
> 11:
> 12: 		a = newparameter(sol);
> 13:
> 14:  end


Hallo,

you can of course make a system call in matlab:
http://www.mathworks.nl/help/matlab/ref/system.html;jsessionid=3fedf590baa0193e36d40b603415
but probably this is not what you want because
you wish to supply getdp with parameters from within matlab.

This kind of solver coupling is precisely what we are developing
with the project ONELAB. See http://onelab.info
It is still very much a work in progress but sufficiently mature already
to make more or less what you are describing above.

Take a look to the onelab.info website, and if you have gmsh installed on your system
check the tutorial example:

http://onelab.info/wiki/Tutorial  (Feedback on this tutorial example is very much appreciated!). 

I could be more specific in my answer if you would tell more about your getDP model
and the details of the retroaction you want  to establish with matlab. 

Fr.



> Is there any way to integrate the GetDP package in a way like indicated in line 5 in the above code?
> So that I have matlab strings specifying filename and options as well as a providing the INPUT, and the OUTPUT sol being provided by the package itself?
> 
> As mentioned, I have not seen any example in this direction.
> Is it
> -possible
> -complicated?
> Does such an example already exist ?
> (So probably, if it is possible and not so difficult, it would probably GetDP would be of use not only to me, but to many other users as well, who use MATLAB for prototyping their algorithms.)
> 
> I suspect that the more complicated thing will be to make the getDP-function in line 5 managing the interface between the matlab vector of the parameter a and the geometric description of parameters required by the GetDP package. The matlab vector would just consist of one value per triangle in the mesh. By the iterative procedure as outline above, it will be adapted in each iterative step. Correct? Or would you think this is the easy part of the problem?
> 
> Thank you!
> 
> Thomas
> 
> 
> _______________________________________________
> getdp mailing list
> getdp at geuz.org
> http://www.geuz.org/mailman/listinfo/getdp

--
François Henrotte Dr Ir
UCL - Bâtiment Euler - Av. G. Lemaître 4-6 
B-1348 Louvain-la-Neuve
Tél: +32(0)10 47 80 56  Fax: id. 23 50