From: Adam Andersen Læssøe on
I have this loop, as part of a FEM-programme:

% Make library of global node to element and local no -------
gnolib = cell(nno,1); % Init cell array
for no=1:nno
% find local node numbers
index=cellfun(@(x) find(x==no),sys.T,'uniformoutput',false);

% Make list of el connected to no
conel=find(cellfun(@(x) any(x),index));

% Make library:
gnolib{no}=[conel ; [index{conel}]]';
% e.g. gnolib{i}=[element column, localnocolumn]
end

Especially on finer meshed geometry, this takes for ever. In Activity monitor (I'm on a mac), i notice that only one core is beeing used, the other almost idling. As cellfun applies the same operation to each cell, I would think, that it should be able to compute in parallel threads.
I looked in the Help file under multithreading, and it says it is on by default. But my cpu says otherwise.
 | 
Pages: 1
Prev: lsqcurvefit
Next: Resize Axes in figure....