Ignore:
Timestamp:
Feb 3, 2015, 7:59:58 PM (6 years ago)
Author:
sommeria
Message:

civ2vel3C_introduced

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/calc_field_interp.m

    r809 r863  
    5050    Operator{ilist}='';%default empty operator (vec, norm,...)
    5151    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 itself
     52    if isempty(r) % no operator: the field name is a variable itself
    5353        ivar=find(strcmp(FieldName{ilist},Data.ListVarName));
    54         if isempty(ivar)
     54        if isempty(ivar)% the requested variable does not exist
    5555            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
    5757            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
    6063            end
    61             InputVarList=[InputVarList FieldName{ilist}];% the variable is added to the list of input variables if it is not already in the list
    6264        end
    6365    else
     
    161163
    162164%% 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 end
     165% 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
    169171
    170172
Note: See TracChangeset for help on using the changeset viewer.