Changeset 25086


Ignore:
Timestamp:
06/19/20 22:46:58 (5 years ago)
Author:
Eric.Larour
Message:

CHG: super important change! Check that Dakota variables are declared in the right
order! First normals, then uniforms, then histograms. Otherwise, partition vectors
are picked up in the wrong order during the UpdateVectorFromDakota phase.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/qmu.m

    r25081 r25086  
    105105                        end
    106106
     107                        %go through variables, and check that we have normal uncertains first, then uniform uncertains
     108                        %and finally histogram_bin_uncertain. Indeed, dakota will order them this way, and when we send
     109                        %partitions for scaled variables, they better show up in the order dakota is feeding them to us
     110                        %in InputUpdateFromDakotax!
     111                        fv=fieldnames(self.variables); classlist={};
     112                        for i=1:length(fv),
     113                                classlist{i}=class(self.variables.(fv{i}));
     114                        end
     115                        classlist
     116                        n=0; u=0; h=0;
     117                        for i=1:length(classlist),
     118                                if strcmpi(classlist{i},'normal_uncertain')
     119                                        if (u~=0 | h~=0),
     120                                                error('normal_uncertain variables should be declared before uniform and histogram_bin uncertain variables');
     121                                        else
     122                                                n=1;
     123                                        end
     124                                end
     125                                if strcmpi(classlist{i},'uniform_uncertain')
     126                                        if  (h~=0),
     127                                                error('uniform_uncertain variables should be declared before histogram_bin uncertain variables');
     128                                        else
     129                                                u=1;
     130                                        end
     131                                end
     132                                if strcmpi(classlist{i},'histogram_bin_uncertain')
     133                                        h=1;
     134                                end
     135
     136                        end
     137
     138
    107139                end % }}}
    108140                function disp(self) % {{{
Note: See TracChangeset for help on using the changeset viewer.