Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
communication between Comsol 5.3a and Matlab really slow
Posted 29.01.2018, 10:37 GMT-5 General, LiveLink for MATLAB Version 5.3a 1 Reply
Please login with a confirmed email address before reporting spam
Hello, I want Matlab to calculate my pressure distribution for an optimization. Right now I do have a my pressure distribution over time (constant in x,y,z). With Matlab I want to make a 4 dimensional Inteprolation to have it in x,y,z,t.
But I realized that the optimiziation starts to be really slow. My initial optimization took like 40hours. The optimization with my Matlab function barely finished the first iteration after that time. To test if my Matlab function was the problem I just wrote a function which gives a constant pressure.
So my current Matlab function is a one liner like
function [p] = myFunction (x,~,~,~) p = zeros(1,length(x)); for i=1:length(x) p(i)=100000; end end
Even with this simple code my optimization barely calculates one iteration in 40 hours.
So I think the issue is between the communication of Matlab and Comsol.
Can I speed this up somewhere? Like: Comsol asking for more values at once and store them in the RAM?
Thanks in advance