changed to handle
This commit is contained in:
parent
d4c511f52f
commit
b1feed4450
|
|
@ -1,8 +1,8 @@
|
|||
function [q,x,y,z] = read_field_complete_ucftar(file,field,varargin)
|
||||
function [q,x,y,z] = read_field_complete_ucftar(htar,field,varargin)
|
||||
% [q,x,y,z] = read_field_complete_ucftar(file,field,varargin)
|
||||
% Reads a specific field from all processor chunks.(UCF tar version)
|
||||
% Input
|
||||
% file name of tar-file to be read
|
||||
% htar handle of tar file (ustar object)
|
||||
% field field to be read
|
||||
% {'u','v','w','p','s1','s2',...}
|
||||
% ? step index of step to be read (default: 1)
|
||||
|
|
@ -18,7 +18,7 @@ function [q,x,y,z] = read_field_complete_ucftar(file,field,varargin)
|
|||
addParamValue(par,'verbosity',0,@isnumeric);
|
||||
addParamValue(par,'debug',0,@isnumeric);
|
||||
parse(par,varargin{:});
|
||||
istep = par.Results.timestep;
|
||||
istep = par.Results.step;
|
||||
|
||||
% Parse field
|
||||
switch field(1)
|
||||
|
|
@ -30,10 +30,6 @@ function [q,x,y,z] = read_field_complete_ucftar(file,field,varargin)
|
|||
otherwise; error('Invalid field: %s',field);
|
||||
end
|
||||
|
||||
% Open tar file
|
||||
htar = ustar();
|
||||
htar.open(file);
|
||||
|
||||
% Read parameters
|
||||
params = read_parameters_ucf(htar,'tarmode',1);
|
||||
|
||||
|
|
@ -57,7 +53,4 @@ function [q,x,y,z] = read_field_complete_ucftar(file,field,varargin)
|
|||
[data,ib,jb,kb,nxl,nyl,nzl] = read_field_chunk_ucf(htar,field,'tarmode',1,'rank',iproc,'ghost',0,'step',istep);
|
||||
q(ib:ib+nxl-1,jb:jb+nyl-1,kb:kb+nzl-1) = data;
|
||||
end
|
||||
|
||||
% Close tar file
|
||||
htar.close();
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue