Changeset 863 for trunk/src/calc_field_interp.m
- Timestamp:
- Feb 3, 2015, 7:59:58 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/calc_field_interp.m
r809 r863 50 50 Operator{ilist}='';%default empty operator (vec, norm,...) 51 51 r=regexp(FieldName{ilist},'(?<Operator>(^vec|^norm|^curl|^div|^strain))\((?<UName>.+),(?<VName>.+)\)$','names');% analyse the field name 52 if isempty(r) % the field name is a variable itself52 if isempty(r) % no operator: the field name is a variable itself 53 53 ivar=find(strcmp(FieldName{ilist},Data.ListVarName)); 54 if isempty(ivar) 54 if isempty(ivar)% the requested variable does not exist 55 55 check_skipped(ilist)=1; %variable not found 56 elseif isempty(find(strcmp(FieldName{ilist},InputVarList), 1)); 56 elseif isempty(find(strcmp(FieldName{ilist},InputVarList), 1));% the variable exists and has not been already selected 57 57 if isfield(Data.VarAttribute{ivar},'Role') &&... 58 (strcmp(Data.VarAttribute{ivar}.Role,'ancillary')||strcmp(Data.VarAttribute{ivar}.Role,'warnflag')||strcmp(Data.VarAttribute{ivar}.Role,'errorflag')) 59 check_interp(ilist)=0; % ancillary variable, not interpolated 58 (strcmp(Data.VarAttribute{ivar}.Role,'ancillary')||strcmp(Data.VarAttribute{ivar}.Role,'warnflag')||strcmp(Data.VarAttribute{ivar}.Role,'errorflag')) 59 check_interp(ilist)=0; % ancillary variable, not interpolated ????? 60 check_skipped(ilist)=1; %variable not used 61 else 62 InputVarList=[InputVarList FieldName{ilist}];% the variable is added to the list of input variables 60 63 end 61 InputVarList=[InputVarList FieldName{ilist}];% the variable is added to the list of input variables if it is not already in the list62 64 end 63 65 else … … 161 163 162 164 %% put an error flag to indicate NaN data 163 if exist('XI','var')&&~isempty(VarVal)164 nbvar=numel(VarVal);165 ListVarName{nbvar+1}='FF';166 VarVal{nbvar+1}=isnan(VarVal{nbvar});167 VarAttribute{nbvar+1}.Role='errorflag';168 end165 % if exist('XI','var')&&~isempty(VarVal) 166 % nbvar=numel(VarVal); 167 % ListVarName{nbvar+1}='FF'; 168 % VarVal{nbvar+1}=isnan(VarVal{nbvar}); 169 % VarAttribute{nbvar+1}.Role='errorflag'; 170 % end 169 171 170 172
Note: See TracChangeset
for help on using the changeset viewer.