AnalyzeNF2FF depreciated message & some checks

pull/1/head
Thorsten Liebig 2012-02-07 10:24:50 +01:00
parent d0d2593ab3
commit b74dd90558
1 changed files with 14 additions and 7 deletions

View File

@ -31,6 +31,8 @@ if ~isscalar(f)
error 'Currently only one frequency is supported. Call this function multiple times.' error 'Currently only one frequency is supported. Call this function multiple times.'
end end
warning('openEMS:AnalyzeNF2FF','This function is depreciated , use CalcNF2FF instead');
filenames_E = nf2ff.filenames_E; filenames_E = nf2ff.filenames_E;
filenames_H = nf2ff.filenames_H; filenames_H = nf2ff.filenames_H;
@ -41,16 +43,21 @@ end
% read time domain field data and transform into frequency domain % read time domain field data and transform into frequency domain
for n=find(nf2ff.directions==1) for n=find(nf2ff.directions==1)
[Ef{n}, E_mesh{n}] = ReadHDF5Dump( [Sim_Path '/' filenames_E{n} '.h5'], 'Frequency', f ); [Ef{n}, E_mesh{n}] = ReadHDF5Dump( [Sim_Path '/' filenames_E{n} '.h5'], 'Frequency', f );
if (Ef{n}.FD.freq(1) ~= f)
error 'frequency mismach'
end
%clear out time domain data %clear out time domain data
if isfield(Ef{n},'TD')
Ef{n} = rmfield(Ef{n},'TD'); Ef{n} = rmfield(Ef{n},'TD');
end
[Hf{n}, H_mesh{n}] = ReadHDF5Dump( [Sim_Path '/' filenames_H{n} '.h5'], 'Frequency', f ); [Hf{n}, H_mesh{n}] = ReadHDF5Dump( [Sim_Path '/' filenames_H{n} '.h5'], 'Frequency', f );
%clear out time domain data %clear out time domain data
if isfield(Hf{n},'TD')
Hf{n} = rmfield(Hf{n},'TD'); Hf{n} = rmfield(Hf{n},'TD');
end
% matlab error concerning memory management
% perform memory garbage collection
pack
% reshape mesh into row vector % reshape mesh into row vector
mesh{n}.x = reshape( E_mesh{n}.lines{1}, 1, [] ); mesh{n}.x = reshape( E_mesh{n}.lines{1}, 1, [] );