rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
cache_velocity_matrixfile_extract.m
1 function fname = cache_velocity_matrixfile_extract(model,...
2  X, Y, ext)
3 %function fname = cache_velocity_matrixfile_extract(model, ...
4 % X, Y, ext)
5 %
6 % function checking the availability of the velocity matrixfile in the cache
7 % required for evaluation of the velocity in the given points.
8 % No real files are generated, but the persitent cache variable is used
9 % for storing these files.
10 
11 % Bernard Haasdonk 4.9.2007
12 
13 %fname = fullfile(rbmatlabhome,'datafunc','data',[ext,'_', ...
14 % params.velocity_matrixfile]);
15 
16 fname = [ext,'_', model.velocity_matrixfile];
17 fullfname = fullfile(rbmatlabhome,'datafunc','data',fname);
18 
19 %if ~exist(fullfname,'file')
20 if ~cache('exist',fullfname)
21  if model.verbose > 9
22  disp(['generating velocity data in cache: ',fname]);
23  end;
24  completefn = fullfile(rbmatlabhome,'datafunc','data',...
25  model.velocity_matrixfile);
26  [Vx,Vy, lambda] = ...
27  velocity_matrixfile_extract(completefn,X, Y);
28  tmp.X = X;
29  tmp.Y = Y;
30  tmp.lambda = lambda;
31  tmp.Vx = Vx;
32  tmp.Vy = Vy;
33  % save(fullfname,'X','Y','lambda','Vx','Vy');
34  cache('save',fullfname,tmp);
35 end;
36 
37 %| \docupdate
function r = verbose(level, message, messageId)
This function displays messages depending on a message-id and/or a level. Aditionally you can set/res...
Definition: verbose.m:17