Index: sm/trunk/src/m/classes/continuous_design.m
===================================================================
--- /issm/trunk/src/m/classes/continuous_design.m	(revision 9547)
+++ 	(revision )
@@ -1,227 +1,0 @@
-%
-%  definition for the continuous_design class.
-%
-%  [cdv]=continuous_design(varargin)
-%
-%  where the required varargin are:
-%    descriptor    (char, description, '')
-%    initpt        (double, initial point, 0.)
-%  and the optional varargin and defaults are:
-%    lower         (double, lower bound, -Inf)
-%    upper         (double, upper bound,  Inf)
-%    scale_type    (char, scaling type, 'none')
-%    scale         (double, scaling factor, 1.)
-%
-%  note that zero arguments constructs a default instance; one
-%  argument of the class copies the instance; and two or more
-%  arguments constructs a new instance from the arguments.
-%
-%  "Copyright 2009, by the California Institute of Technology.
-%  ALL RIGHTS RESERVED. United States Government Sponsorship
-%  acknowledged. Any commercial use must be negotiated with
-%  the Office of Technology Transfer at the California Institute
-%  of Technology.  (J. Schiermeier, NTR 47078)
-%
-%  This software may be subject to U.S. export control laws.
-%  By accepting this  software, the user agrees to comply with
-%  all applicable U.S. export laws and regulations. User has the
-%  responsibility to obtain export licenses, or other export
-%  authority as may be required before exporting such information
-%  to foreign countries or providing access to foreign persons."
-%
-classdef continuous_design
-    properties
-        descriptor='';
-        initpt    = 0.;
-        lower     =-Inf;
-        upper     = Inf;
-        scale_type='none';
-        scale     = 1.;
-    end
-    
-    methods
-        function [cdv]=continuous_design(varargin)
-
-            switch nargin
-
-%  create a default object
-
-                case 0
-
-%  copy the object
-
-                case 1
-                    if isa(varargin{1},'continuous_design')
-                        cdv=varargin{1};
-                    else
-                        error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
-                            inputname(1),class(varargin{1}),'continuous_design');
-                    end
-
-%  create the object from the input
-
-                otherwise
-                    asizec=num2cell(array_size(varargin{1:min(nargin,6)}));
-                    cdv(asizec{:})=continuous_design;
-                    clear asizec
-                    
-                    if ischar(varargin{1})
-                        varargin{1}=cellstr(varargin{1});
-                    end
-                    for i=1:numel(cdv)
-                        if (numel(varargin{1}) > 1)
-                            cdv(i).descriptor=varargin{1}{i};
-                        else
-                            cdv(i).descriptor=[char(varargin{1}) string_dim(cdv,i,'vector')];
-                        end
-                    end
-
-                    if (nargin >= 2)
-                        for i=1:numel(cdv)
-                            if (numel(varargin{2}) > 1)
-                                cdv(i).initpt    =varargin{2}(i);
-                            else
-                                cdv(i).initpt    =varargin{2};
-                            end
-                        end
-                        if (nargin >= 3)
-                            for i=1:numel(cdv)
-                                if (numel(varargin{3}) > 1)
-                                    cdv(i).lower     =varargin{3}(i);
-                                else
-                                    cdv(i).lower     =varargin{3};
-                                end
-                            end
-                            if (nargin >= 4)
-                                for i=1:numel(cdv)
-                                    if (numel(varargin{4}) > 1)
-                                        cdv(i).upper     =varargin{4}(i);
-                                    else
-                                        cdv(i).upper     =varargin{4};
-                                    end
-                                end
-                                if (nargin >= 5)
-                                    if ischar(varargin{5})
-                                        varargin{5}=cellstr(varargin{5});
-                                    end
-                                    for i=1:numel(cdv)
-                                        if (numel(varargin{5}) > 1)
-                                            cdv(i).scale_type=varargin{5}{i};
-                                        else
-                                            cdv(i).scale_type=char(varargin{5});
-                                        end
-                                    end
-                                    if (nargin >= 6)
-                                        for i=1:numel(cdv)
-                                            if (numel(varargin{6}) > 1)
-                                                cdv(i).scale     =varargin{6}(i);
-                                            else
-                                                cdv(i).scale     =varargin{6};
-                                            end
-                                        end
-                                        if (nargin > 6)
-                                            warning('continuous_design:extra_arg',...
-                                                'Extra arguments for object of class ''%s''.',...
-                                                class(cdv));
-                                        end
-                                    end
-                                end
-                            end
-                        end
-                    end
-            end
-
-        end
-
-        function []=disp(cdv)
-
-%  display the object
-
-            disp(sprintf('\n'));
-            for i=1:numel(cdv)
-                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
-                    class(cdv),inputname(1),string_dim(cdv,i)));
-                disp(sprintf('    descriptor: ''%s'''  ,cdv(i).descriptor));
-                disp(sprintf('        initpt: %g'      ,cdv(i).initpt));
-                disp(sprintf('         lower: %g'      ,cdv(i).lower));
-                disp(sprintf('         upper: %g'      ,cdv(i).upper));
-                disp(sprintf('    scale_type: ''%s'''  ,cdv(i).scale_type));
-                disp(sprintf('         scale: %g\n'    ,cdv(i).scale));
-            end
-
-        end
-
-        function [desc]  =prop_desc(cdv,dstr)
-            desc=cell(1,numel(cdv));
-            for i=1:numel(cdv)
-                if ~isempty(cdv(i).descriptor)
-                    desc(i)=cellstr(cdv(i).descriptor);
-                elseif ~isempty(inputname(1))
-                    desc(i)=cellstr([inputname(1) string_dim(cdv,i,'vector')]);
-                elseif exist('dstr','var')
-                    desc(i)=cellstr([dstr         string_dim(cdv,i,'vector')]);
-                else
-                    desc(i)=cellstr(['cdv'        string_dim(cdv,i,'vector')]);
-                end
-            end
-            desc=allempty(desc);
-        end
-        function [initpt]=prop_initpt(cdv)
-            initpt=zeros(1,numel(cdv));
-            for i=1:numel(cdv)
-                initpt(i)=cdv(i).initpt;
-            end
-            initpt=allequal(initpt,0.);
-        end
-        function [lower] =prop_lower(cdv)
-            lower=zeros(1,numel(cdv));
-            for i=1:numel(cdv)
-                lower(i)=cdv(i).lower;
-            end
-            lower=allequal(lower,-Inf);
-        end
-        function [upper] =prop_upper(cdv)
-            upper=zeros(1,numel(cdv));
-            for i=1:numel(cdv)
-                upper(i)=cdv(i).upper;
-            end
-            upper=allequal(upper, Inf);
-        end
-        function [mean]  =prop_mean(cdv)
-            mean=[];
-        end
-        function [stddev]=prop_stddev(cdv)
-            stddev=[];
-        end
-        function [initst]=prop_initst(cdv)
-            initst=[];
-        end
-        function [stype] =prop_stype(cdv)
-            stype=cell(1,numel(cdv));
-            for i=1:numel(cdv)
-                stype(i)=cellstr(cdv(i).scale_type);
-            end
-            stype=allequal(stype,'none');
-        end
-        function [scale] =prop_scale(cdv)
-            scale=zeros(1,numel(cdv));
-            for i=1:numel(cdv)
-                scale(i)=cdv(i).scale;
-            end
-            scale=allequal(scale,1.);
-        end
-    end
-    
-    methods (Static)
-        function []=dakota_write(fidi,dvar)
-
-%  collect only the variables of the appropriate class
-
-            cdv=struc_class(dvar,'continuous_design');
-
-%  write variables
-
-            vlist_write(fidi,'continuous_design','cdv',cdv);
-        end
-    end
-end
Index: sm/trunk/src/m/classes/continuous_state.m
===================================================================
--- /issm/trunk/src/m/classes/continuous_state.m	(revision 9547)
+++ 	(revision )
@@ -1,192 +1,0 @@
-%
-%  definition for the continuous_state class.
-%
-%  [csv]=continuous_state(varargin)
-%
-%  where the required varargin are:
-%    descriptor    (char, description, '')
-%    initst        (double, initial state, 0.)
-%  and the optional varargin and defaults are:
-%    lower         (double, lower bound, -Inf)
-%    upper         (double, upper bound,  Inf)
-%
-%  note that zero arguments constructs a default instance; one
-%  argument of the class copies the instance; and two or more
-%  arguments constructs a new instance from the arguments.
-%
-%  "Copyright 2009, by the California Institute of Technology.
-%  ALL RIGHTS RESERVED. United States Government Sponsorship
-%  acknowledged. Any commercial use must be negotiated with
-%  the Office of Technology Transfer at the California Institute
-%  of Technology.  (J. Schiermeier, NTR 47078)
-%
-%  This software may be subject to U.S. export control laws.
-%  By accepting this  software, the user agrees to comply with
-%  all applicable U.S. export laws and regulations. User has the
-%  responsibility to obtain export licenses, or other export
-%  authority as may be required before exporting such information
-%  to foreign countries or providing access to foreign persons."
-%
-classdef continuous_state
-    properties
-        descriptor='';
-        initst    = 0.;
-        lower     =-Inf;
-        upper     = Inf;
-    end
-    
-    methods
-        function [csv]=continuous_state(varargin)
-
-            switch nargin
-
-%  create a default object
-
-                case 0
-
-%  copy the object
-
-                case 1
-                    if isa(varargin{1},'continuous_state')
-                        csv=varargin{1};
-                    else
-                        error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
-                            inputname(1),class(varargin{1}),'continuous_state');
-                    end
-
-%  create the object from the input
-
-                otherwise
-                    asizec=num2cell(array_size(varargin{1:min(nargin,4)}));
-                    csv(asizec{:})=continuous_state;
-                    clear asizec
-                    
-                    if ischar(varargin{1})
-                        varargin{1}=cellstr(varargin{1});
-                    end
-                    for i=1:numel(csv)
-                        if (numel(varargin{1}) > 1)
-                            csv(i).descriptor=varargin{1}{i};
-                        else
-                            csv(i).descriptor=[char(varargin{1}) string_dim(csv,i,'vector')];
-                        end
-                    end
-
-                    if (nargin >= 2)
-                        for i=1:numel(csv)
-                            if (numel(varargin{2}) > 1)
-                                csv(i).initst    =varargin{2}(i);
-                            else
-                                csv(i).initst    =varargin{2};
-                            end
-                        end
-                        if (nargin >= 3)
-                            for i=1:numel(csv)
-                                if (numel(varargin{3}) > 1)
-                                    csv(i).lower     =varargin{3}(i);
-                                else
-                                    csv(i).lower     =varargin{3};
-                                end
-                            end
-                            if (nargin >= 4)
-                                for i=1:numel(csv)
-                                    if (numel(varargin{4}) > 1)
-                                        csv(i).upper     =varargin{4}(i);
-                                    else
-                                        csv(i).upper     =varargin{4};
-                                    end
-                                end
-                                if (nargin > 4)
-                                    warning('continuous_state:extra_arg',...
-                                        'Extra arguments for object of class ''%s''.',...
-                                        class(csv));
-                                end
-                            end
-                        end
-                    end
-            end
-
-        end
-
-        function []=disp(csv)
-
-%  display the object
-
-            disp(sprintf('\n'));
-            for i=1:numel(csv)
-                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
-                    class(csv),inputname(1),string_dim(csv,i)));
-                disp(sprintf('    descriptor: ''%s'''  ,csv(i).descriptor));
-                disp(sprintf('        initst: %g'      ,csv(i).initst));
-                disp(sprintf('         lower: %g'      ,csv(i).lower));
-                disp(sprintf('         upper: %g\n'    ,csv(i).upper));
-            end
-
-        end
-
-        function [desc]  =prop_desc(csv,dstr)
-            desc=cell(1,numel(csv));
-            for i=1:numel(csv)
-                if ~isempty(csv(i).descriptor)
-                    desc(i)=cellstr(csv(i).descriptor);
-                elseif ~isempty(inputname(1))
-                    desc(i)=cellstr([inputname(1) string_dim(csv,i,'vector')]);
-                elseif exist('dstr','var')
-                    desc(i)=cellstr([dstr         string_dim(csv,i,'vector')]);
-                else
-                    desc(i)=cellstr(['csv'        string_dim(csv,i,'vector')]);
-                end
-            end
-            desc=allempty(desc);
-        end
-        function [initpt]=prop_initpt(csv)
-            initpt=[];
-        end
-        function [lower] =prop_lower(csv)
-            lower=zeros(1,numel(csv));
-            for i=1:numel(csv)
-                lower(i)=csv(i).lower;
-            end
-            lower=allequal(lower,-Inf);
-        end
-        function [upper] =prop_upper(csv)
-            upper=zeros(1,numel(csv));
-            for i=1:numel(csv)
-                upper(i)=csv(i).upper;
-            end
-            upper=allequal(upper, Inf);
-        end
-        function [mean]  =prop_mean(csv)
-            mean=[];
-        end
-        function [stddev]=prop_stddev(csv)
-            stddev=[];
-        end
-        function [initst]=prop_initst(csv)
-            initst=zeros(1,numel(csv));
-            for i=1:numel(csv)
-                initst(i)=csv(i).initst;
-            end
-            initst=allequal(initst,0.);
-        end
-        function [stype] =prop_stype(csv)
-            stype={};
-        end
-        function [scale] =prop_scale(csv)
-            scale=[];
-        end
-    end
-    
-    methods (Static)
-        function []=dakota_write(fidi,dvar)
-
-%  collect only the variables of the appropriate class
-
-            csv=struc_class(dvar,'continuous_state');
-
-%  write variables
-
-            vlist_write(fidi,'continuous_state','csv',csv);
-        end
-    end
-end
Index: sm/trunk/src/m/classes/least_squares_term.m
===================================================================
--- /issm/trunk/src/m/classes/least_squares_term.m	(revision 9547)
+++ 	(revision )
@@ -1,187 +1,0 @@
-%
-%  definition for the least_squares_term class.
-%
-%  [lst]=least_squares_term(varargin)
-%
-%  where the required varargin are:
-%    descriptor    (char, description, '')
-%  and the optional varargin and defaults are:
-%    scale_type    (char, scaling type, 'none')
-%    scale         (double, scaling factor, 1.)
-%    weight        (double, weighting factor, 1.)
-%
-%  note that zero arguments constructs a default instance; one
-%  argument of the class copies the instance; and one or more
-%  arguments constructs a new instance from the arguments.
-%
-%  "Copyright 2009, by the California Institute of Technology.
-%  ALL RIGHTS RESERVED. United States Government Sponsorship
-%  acknowledged. Any commercial use must be negotiated with
-%  the Office of Technology Transfer at the California Institute
-%  of Technology.  (J. Schiermeier, NTR 47078)
-%
-%  This software may be subject to U.S. export control laws.
-%  By accepting this  software, the user agrees to comply with
-%  all applicable U.S. export laws and regulations. User has the
-%  responsibility to obtain export licenses, or other export
-%  authority as may be required before exporting such information
-%  to foreign countries or providing access to foreign persons."
-%
-classdef least_squares_term
-    properties
-        descriptor='';
-        scale_type='none';
-        scale     = 1.;
-        weight    = 1.;
-    end
-    
-    methods
-        function [lst]=least_squares_term(varargin)
-
-            switch nargin
-
-%  create a default object
-
-                case 0
-
-%  copy the object or create the object from the input
-
-                otherwise
-                    if  (nargin == 1) && isa(varargin{1},'least_squares_term')
-                        lst=varargin{1};
-                    else
-                        asizec=num2cell(array_size(varargin{1:min(nargin,4)}));
-                        lst(asizec{:})=least_squares_term;
-                        clear asizec
-                    
-                        if ischar(varargin{1})
-                            varargin{1}=cellstr(varargin{1});
-                        end
-                        for i=1:numel(lst)
-                            if (numel(varargin{1}) > 1)
-                                lst(i).descriptor=varargin{1}{i};
-                            else
-                                lst(i).descriptor=[char(varargin{1}) string_dim(lst,i,'vector')];
-                            end
-                        end
-
-                        if (nargin >= 2)
-                            if ischar(varargin{2})
-                                varargin{2}=cellstr(varargin{2});
-                            end
-                            for i=1:numel(lst)
-                                if (numel(varargin{2}) > 1)
-                                    lst(i).scale_type=varargin{2}{i};
-                                else
-                                    lst(i).scale_type=char(varargin{2});
-                                end
-                            end
-                            if (nargin >= 3)
-                                for i=1:numel(lst)
-                                    if (numel(varargin{3}) > 1)
-                                        lst(i).scale     =varargin{3}(i);
-                                    else
-                                        lst(i).scale     =varargin{3};
-                                    end
-                                end
-                                if (nargin >= 4)
-                                    for i=1:numel(lst)
-                                        if (numel(varargin{4}) > 1)
-                                            lst(i).weight    =varargin{4}(i);
-                                        else
-                                            lst(i).weight    =varargin{4};
-                                        end
-                                    end
-
-                                    if (nargin > 4)
-                                        warning('least_squares_term:extra_arg',...
-                                            'Extra arguments for object of class ''%s''.',...
-                                            class(lst));
-                                    end
-                                end
-                            end
-                        end
-                    end
-            end
-
-        end
-
-        function []=disp(lst)
-
-%  display the object
-
-            disp(sprintf('\n'));
-            for i=1:numel(lst)
-                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
-                    class(lst),inputname(1),string_dim(lst,i)));
-                disp(sprintf('    descriptor: ''%s'''  ,lst(i).descriptor));
-                disp(sprintf('    scale_type: ''%s'''  ,lst(i).scale_type));
-                disp(sprintf('         scale: %g'      ,lst(i).scale));
-                disp(sprintf('        weight: %g\n'    ,lst(i).weight));
-            end
-
-        end
-
-        function [desc]  =prop_desc(lst,dstr)
-            desc=cell(1,numel(lst));
-            for i=1:numel(lst)
-                if ~isempty(lst(i).descriptor)
-                    desc(i)=cellstr(lst(i).descriptor);
-                elseif ~isempty(inputname(1))
-                    desc(i)=cellstr([inputname(1) string_dim(lst,i,'vector')]);
-                elseif exist('dstr','var')
-                    desc(i)=cellstr([dstr         string_dim(lst,i,'vector')]);
-                else
-                    desc(i)=cellstr(['lst'        string_dim(lst,i,'vector')]);
-                end
-            end
-            desc=allempty(desc);
-        end
-        function [stype] =prop_stype(lst)
-            stype=cell(1,numel(lst));
-            for i=1:numel(lst)
-                stype(i)=cellstr(lst(i).scale_type);
-            end
-            stype=allequal(stype,'none');
-        end
-        function [scale] =prop_scale(lst)
-            scale=zeros(1,numel(lst));
-            for i=1:numel(lst)
-                scale(i)=lst(i).scale;
-            end
-            scale=allequal(scale,1.);
-        end
-        function [weight]=prop_weight(lst)
-            weight=zeros(1,numel(lst));
-            for i=1:numel(lst)
-                weight(i)=lst(i).weight;
-            end
-            weight=allequal(weight,1.);
-        end
-        function [lower] =prop_lower(lst)
-            lower=[];
-        end
-        function [upper] =prop_upper(lst)
-            upper=[];
-        end
-        function [target]=prop_target(lst)
-            target=[];
-        end
-    end
-    
-    methods (Static)
-        function [rdesc]=dakota_write(fidi,dresp,rdesc)
-
-%  collect only the responses of the appropriate class
-
-            lst=struc_class(dresp,'least_squares_term');
-
-%  write responses
-
-            [rdesc]=rlist_write(fidi,'least_squares_terms','least_squares_term',lst,rdesc);
-        end
-
-        function []=dakota_rlev_write(fidi,dresp,params)
-        end
-    end
-end
Index: sm/trunk/src/m/classes/linear_equality_constraint.m
===================================================================
--- /issm/trunk/src/m/classes/linear_equality_constraint.m	(revision 9547)
+++ 	(revision )
@@ -1,182 +1,0 @@
-%
-%  constructor for the linear_equality_constraint class.
-%
-%  [lec]=linear_equality_constraint(varargin)
-%
-%  where the required varargin are:
-%    matrix        (double row, variable coefficients, NaN)
-%    target        (double vector, target values, 0.)
-%  and the optional varargin and defaults are:
-%    scale_type    (char, scaling type, 'none')
-%    scale         (double, scaling factor, 1.)
-%
-%  note that zero arguments constructs a default instance; one
-%  argument of the class copies the instance; and two or more
-%  arguments constructs a new instance from the arguments.
-%
-%  "Copyright 2009, by the California Institute of Technology.
-%  ALL RIGHTS RESERVED. United States Government Sponsorship
-%  acknowledged. Any commercial use must be negotiated with
-%  the Office of Technology Transfer at the California Institute
-%  of Technology.  (J. Schiermeier, NTR 47078)
-%
-%  This software may be subject to U.S. export control laws.
-%  By accepting this  software, the user agrees to comply with
-%  all applicable U.S. export laws and regulations. User has the
-%  responsibility to obtain export licenses, or other export
-%  authority as may be required before exporting such information
-%  to foreign countries or providing access to foreign persons."
-%
-classdef linear_equality_constraint
-    properties
-        matrix    = NaN;
-        target    = 0.;
-        scale_type='none';
-        scale     = 1.;
-    end
-    
-    methods
-        function [lec]=linear_equality_constraint(varargin)
-
-            switch nargin
-
-%  create a default object
-
-                case 0
-
-%  copy the object
-
-                case 1
-                    if isa(varargin{1},'linear_equality_constraint')
-                        lec=varargin{1};
-                    else
-                        error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
-                            inputname(1),class(varargin{1}),'linear_equality_constraint');
-                    end
-
-%  create the object from the input
-
-                otherwise
-                    if     (size(varargin{1},1) == array_numel(varargin{2:min(nargin,4)}) || ...
-                            size(varargin{1},1) == 1)
-                        asizec=num2cell(array_size(varargin{2:min(nargin,4)}));
-                    elseif (array_numel(varargin{2:min(nargin,4)}) == 1)
-                        asizec=num2cell([size(varargin{1},1) 1]);
-                    else
-                        error('Matrix for object of class ''%s'' has inconsistent number of rows.',...
-                              class(lec));
-                    end
-                    lec(asizec{:})=linear_equality_constraint;
-                    clear asizec
-                    
-                    for i=1:numel(lec)
-                        if (size(varargin{1},1) > 1)
-                            lec(i).matrix    =varargin{1}(i,:);
-                        else
-                            lec(i).matrix    =varargin{1};
-                        end
-                    end
-
-                    if (nargin >= 2)
-                        for i=1:numel(lec)
-                            if (numel(varargin{2}) > 1)
-                                lec(i).target    =varargin{2}(i);
-                            else
-                                lec(i).target    =varargin{2};
-                            end
-                        end
-                        if (nargin >= 3)
-                            if ischar(varargin{3})
-                                varargin{3}=cellstr(varargin{3});
-                            end
-                            for i=1:numel(lec)
-                                if (numel(varargin{3}) > 1)
-                                    lec(i).scale_type=varargin{3}{i};
-                                else
-                                    lec(i).scale_type=char(varargin{3});
-                                end
-                            end
-                            if (nargin >= 4)
-                                for i=1:numel(lec)
-                                    if (numel(varargin{4}) > 1)
-                                        lec(i).scale     =varargin{4}(i);
-                                    else
-                                        lec(i).scale     =varargin{4};
-                                    end
-                                end
-
-                                if (nargin > 4)
-                                    warning('linear_equality_constraint:extra_arg',...
-                                        'Extra arguments for object of class ''%s''.',...
-                                        class(lec));
-                                end
-                            end
-                        end
-                    end
-            end
-        end
-
-        function []=disp(lec)
-
-%  display the object
-
-            disp(sprintf('\n'));
-            for i=1:numel(lec)
-                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
-                    class(lec),inputname(1),string_dim(lec,i)));
-                disp(sprintf('        matrix: %s'      ,string_vec(lec(i).matrix)));
-                disp(sprintf('        target: %g'      ,lec(i).target));
-                disp(sprintf('    scale_type: ''%s'''  ,lec(i).scale_type));
-                disp(sprintf('         scale: %g\n'    ,lec(i).scale));
-            end
-
-        end
-
-        function [matrix]=prop_matrix(lec)
-            matrix=zeros(numel(lec),0);
-            for i=1:numel(lec)
-                matrix(i,1:size(lec(i).matrix,2))=lec(i).matrix(1,:);
-            end
-        end
-        function [lower] =prop_lower(lec)
-            lower=[];
-        end
-        function [upper] =prop_upper(lec)
-            upper=[];
-        end
-        function [target]=prop_target(lec)
-            target=zeros(size(lec));
-            for i=1:numel(lec)
-                target(i)=lec(i).target;
-            end
-            target=allequal(target,0.);
-        end
-        function [stype] =prop_stype(lec)
-            stype=cell(size(lec));
-            for i=1:numel(lec)
-                stype(i)=cellstr(lec(i).scale_type);
-            end
-            stype=allequal(stype,'none');
-        end
-        function [scale] =prop_scale(lec)
-            scale=zeros(size(lec));
-            for i=1:numel(lec)
-                scale(i)=lec(i).scale;
-            end
-            scale=allequal(scale,1.);
-        end
-    end
-    
-    methods (Static)
-        function []=dakota_write(fidi,dvar)
-
-%  collect only the variables of the appropriate class
-
-            lec=struc_class(dvar,'linear_equality_constraint');
-
-%  write constraints
-
-            lclist_write(fidi,'linear_equality_constraints','linear_equality',lec);
-        end
-    end
-end
Index: sm/trunk/src/m/classes/linear_inequality_constraint.m
===================================================================
--- /issm/trunk/src/m/classes/linear_inequality_constraint.m	(revision 9547)
+++ 	(revision )
@@ -1,205 +1,0 @@
-%
-%  constructor for the linear_inequality_constraint class.
-%
-%  [lic]=linear_inequality_constraint(varargin)
-%
-%  where the required varargin are:
-%    matrix        (double row, variable coefficients, NaN)
-%    lower         (double vector, lower bounds, -Inf)
-%    upper         (double vector, upper bounds, 0.)
-%  and the optional varargin and defaults are:
-%    scale_type    (char, scaling type, 'none')
-%    scale         (double, scaling factor, 1.)
-%
-%  note that zero arguments constructs a default instance; one
-%  argument of the class copies the instance; and three or more
-%  arguments constructs a new instance from the arguments.
-%
-%  "Copyright 2009, by the California Institute of Technology.
-%  ALL RIGHTS RESERVED. United States Government Sponsorship
-%  acknowledged. Any commercial use must be negotiated with
-%  the Office of Technology Transfer at the California Institute
-%  of Technology.  (J. Schiermeier, NTR 47078)
-%
-%  This software may be subject to U.S. export control laws.
-%  By accepting this  software, the user agrees to comply with
-%  all applicable U.S. export laws and regulations. User has the
-%  responsibility to obtain export licenses, or other export
-%  authority as may be required before exporting such information
-%  to foreign countries or providing access to foreign persons."
-%
-classdef linear_inequality_constraint
-    properties
-        matrix    = NaN;
-        lower     =-Inf;
-        upper     = 0.;
-        scale_type='none';
-        scale     = 1.;
-    end
-    
-    methods
-        function [lic]=linear_inequality_constraint(varargin)
-
-            switch nargin
-
-%  create a default object
-
-                case 0
-
-%  copy the object
-
-                case 1
-                    if isa(varargin{1},'linear_inequality_constraint')
-                        lic=varargin{1};
-                    else
-                        error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
-                            inputname(1),class(varargin{1}),'linear_inequality_constraint');
-                    end
-
-%  not enough arguments
-
-                case 2
-                    error('Construction of ''%s'' class object requires at least %d inputs.',...
-                        'linear_inequality_constraint',3)
-
-%  create the object from the input
-
-                otherwise
-                    if     (size(varargin{1},1) == array_numel(varargin{2:min(nargin,5)}) || ...
-                            size(varargin{1},1) == 1)
-                        asizec=num2cell(array_size(varargin{2:min(nargin,5)}));
-                    elseif (array_numel(varargin{2:min(nargin,5)}) == 1)
-                        asizec=num2cell([size(varargin{1},1) 1]);
-                    else
-                        error('Matrix for object of class ''%s'' has inconsistent number of rows.',...
-                              class(lic));
-                    end
-                    lic(asizec{:})=linear_inequality_constraint;
-                    clear asizec
-                    
-                    for i=1:numel(lic)
-                        if (size(varargin{1},1) > 1)
-                            lic(i).matrix    =varargin{1}(i,:);
-                        else
-                            lic(i).matrix    =varargin{1};
-                        end
-                    end
-
-                    if (nargin >= 2)
-                        for i=1:numel(lic)
-                            if (numel(varargin{2}) > 1)
-                                lic(i).lower     =varargin{2}(i);
-                            else
-                                lic(i).lower     =varargin{2};
-                            end
-                        end
-                        if (nargin >= 3)
-                            for i=1:numel(lic)
-                                if (numel(varargin{3}) > 1)
-                                    lic(i).upper     =varargin{3}(i);
-                                else
-                                    lic(i).upper     =varargin{3};
-                                end
-                            end
-                            if (nargin >= 4)
-                                if ischar(varargin{4})
-                                    varargin{4}=cellstr(varargin{4});
-                                end
-                                for i=1:numel(lic)
-                                    if (numel(varargin{4}) > 1)
-                                        lic(i).scale_type=varargin{4}{i};
-                                    else
-                                        lic(i).scale_type=char(varargin{4});
-                                    end
-                                end
-                                if (nargin >= 5)
-                                    for i=1:numel(lic)
-                                        if (numel(varargin{5}) > 1)
-                                            lic(i).scale     =varargin{5}(i);
-                                        else
-                                            lic(i).scale     =varargin{5};
-                                        end
-                                    end
-
-                                    if (nargin > 5)
-                                        warning('linear_inequality_constraint:extra_arg',...
-                                            'Extra arguments for object of class ''%s''.',...
-                                            class(lic));
-                                    end
-                                end
-                            end
-                        end
-                    end
-            end
-        end
-
-        function []=disp(lic)
-
-%  display the object
-
-            disp(sprintf('\n'));
-            for i=1:numel(lic)
-                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
-                    class(lic),inputname(1),string_dim(lic,i)));
-                disp(sprintf('        matrix: %s'      ,string_vec(lic(i).matrix)));
-                disp(sprintf('         lower: %g'      ,lic(i).lower));
-                disp(sprintf('         upper: %g'      ,lic(i).upper));
-                disp(sprintf('    scale_type: ''%s'''  ,lic(i).scale_type));
-                disp(sprintf('         scale: %g\n'    ,lic(i).scale));
-            end
-
-        end
-
-        function [matrix]=prop_matrix(lic)
-            matrix=zeros(numel(lic),0);
-            for i=1:numel(lic)
-                matrix(i,1:size(lic(i).matrix,2))=lic(i).matrix(1,:);
-            end
-        end
-        function [lower] =prop_lower(lic)
-            lower=zeros(size(lic));
-            for i=1:numel(lic)
-                lower(i)=lic(i).lower;
-            end
-            lower=allequal(lower,-Inf);
-        end
-        function [upper] =prop_upper(lic)
-            upper=zeros(size(lic));
-            for i=1:numel(lic)
-                upper(i)=lic(i).upper;
-            end
-            upper=allequal(upper,0.);
-        end
-        function [target]=prop_target(lic)
-            target=[];
-        end
-        function [stype] =prop_stype(lic)
-            stype=cell(size(lic));
-            for i=1:numel(lic)
-                stype(i)=cellstr(lic(i).scale_type);
-            end
-            stype=allequal(stype,'none');
-        end
-        function [scale] =prop_scale(lic)
-            scale=zeros(size(lic));
-            for i=1:numel(lic)
-                scale(i)=lic(i).scale;
-            end
-            scale=allequal(scale,1.);
-        end
-    end
-    
-    methods (Static)
-        function []=dakota_write(fidi,dvar)
-
-%  collect only the variables of the appropriate class
-
-            lic=struc_class(dvar,'linear_inequality_constraint');
-
-%  write constraints
-
-            lclist_write(fidi,'linear_inequality_constraints','linear_inequality',lic);
-        end
-    end
-end
-
Index: sm/trunk/src/m/classes/model.m
===================================================================
--- /issm/trunk/src/m/classes/model.m	(revision 9547)
+++ 	(revision )
@@ -1,783 +1,0 @@
-%MODEL class definition
-%
-%   Usage:
-%      md = model(varargin)
-
-classdef model
-    properties (SetAccess=public) %Model fields
-		 % {{{1
-		 %Careful here: no other class should be used as default value this is a bug of matlab
-		 %in what follows, any field is defined according to the following convention: 
-		 %field={defaultvalue,marshall?,data type,matrix type}
-
-		 %Model general information
-		 notes           = modelfield('default','','marshall',false);
-		 name            = modelfield('default','','marshall',true,'format','String');
-		 runtimename     = modelfield('default','','marshall',false); %name used when running a parallel job
-		 counter         = modelfield('default',0,'marshall',false);
-
-		 %Mesh
-		 bamg                = modelfield('default',struct(),'marshall',false);
-		 dim                 = modelfield('default',0,'marshall',true,'format','Integer');
-		 numberofelements    = modelfield('default',0,'marshall',true,'format','Integer');
-		 numberofnodes       = modelfield('default',0,'marshall',true,'format','Integer');
-		 elements            = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
-		 elements_type       = modelfield('default',NaN,'marshall',true,'preprocess','marshallapproximations','format','DoubleMat','mattype',2);
-		 vertices_type       = modelfield('default',NaN,'marshall',true,'preprocess','marshallapproximations','format','DoubleMat','mattype',1);
-		 x                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 y                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 z                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 nodeconnectivity    = modelfield('default',NaN,'marshall',false);
-		 elementconnectivity = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
-		 edges               = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
-
-		 %I/O
-		 io_gather           = modelfield('default',0,'marshall',true,'format','Boolean');
-
-		 %Initial 2d mesh 
-		 numberofelements2d = modelfield('default',0,'marshall',true,'format','Integer');
-		 numberofnodes2d    = modelfield('default',0,'marshall',true,'format','Integer');
-		 elements2d         = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
-		 x2d                = modelfield('default',NaN,'marshall',false);
-		 y2d                = modelfield('default',NaN,'marshall',false);
-
-		 %latlon of the coorinates
-		 lat        = modelfield('default',NaN,'marshall',false);
-		 long       = modelfield('default',NaN,'marshall',false);
-		 hemisphere = modelfield('default',NaN,'marshall',false);
-
-		 %Elements type
-		 ishutter             = modelfield('default',0,'marshall',true,'format','Boolean');
-		 ismacayealpattyn     = modelfield('default',0,'marshall',true,'format','Boolean');
-		 isstokes             = modelfield('default',0,'marshall',true,'format','Boolean');
-
-		 %Elements
-		 elementonhutter      = modelfield('default',NaN,'marshall',false);
-		 elementonmacayeal    = modelfield('default',NaN,'marshall',false);
-		 elementonpattyn      = modelfield('default',NaN,'marshall',false);
-		 elementonstokes      = modelfield('default',NaN,'marshall',false);
-
-		 %Nodes
-		 nodeonhutter         = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 nodeonmacayeal       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 nodeonpattyn         = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 nodeonstokes         = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 borderstokes         = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
-
-		 %Stokes
-		 stokesreconditioning = modelfield('default',0,'marshall',true,'format','Double');
-		 shelf_dampening      = modelfield('default',0,'marshall',true,'format','Integer');
-
-		 %Penalties
-		 penalties            = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
-		 penalty_offset       = modelfield('default',0,'marshall',true,'format','Double');
-		 penalty_lock         = modelfield('default',0,'marshall',true,'format','Integer');
-		 segments             = modelfield('default',NaN,'marshall',false);
-		 segmentmarkers       = modelfield('default',NaN,'marshall',false);
-		 rifts                = modelfield('default',NaN,'marshall',true,'preprocess','marshallrifts','format','DoubleMat','mattype',3);
-		 riftproperties       = modelfield('default',NaN,'marshall',false);
-		 numrifts             = modelfield('default',0,'marshall',true,'format','Integer');
-
-		 %Projections
-		 uppernodes           = modelfield('default',NaN,'marshall',false);
-		 upperelements        = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
-		 lowerelements        = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
-		 lowernodes           = modelfield('default',NaN,'marshall',false);
-
-		 %Extrusion
-		 numlayers         = modelfield('default',0,'marshall',true,'format','Integer');
-		 elementonbed      = modelfield('default',NaN,'marshall',true,'format','BooleanMat','mattype',2);
-		 elementonsurface  = modelfield('default',NaN,'marshall',true,'format','BooleanMat','mattype',2);
-		 nodeonbed         = modelfield('default',NaN,'marshall',true,'format','BooleanMat','mattype',1);
-		 nodeonsurface     = modelfield('default',NaN,'marshall',true,'format','BooleanMat','mattype',1);
-		 minh              = modelfield('default',0,'marshall',false);
-
-		 %Extraction
-		 extractednodes    = modelfield('default',NaN,'marshall',false);
-		 extractedelements = modelfield('default',NaN,'marshall',false);
-
-		 %Materials parameters
-		 rho_ice                    = modelfield('default',0,'marshall',true,'format','Double');
-		 rho_water                  = modelfield('default',0,'marshall',true,'format','Double');
-		 heatcapacity               = modelfield('default',0,'marshall',true,'format','Double');
-		 latentheat                 = modelfield('default',0,'marshall',true,'format','Double');
-		 thermalconductivity        = modelfield('default',0,'marshall',true,'format','Double');
-		 meltingpoint               = modelfield('default',0,'marshall',true,'format','Double');
-		 referencetemperature       = modelfield('default',0,'marshall',true,'format','Double'); %for enthalpy
-		 beta                       = modelfield('default',0,'marshall',true,'format','Double');
-		 mixed_layer_capacity       = modelfield('default',0,'marshall',true,'format','Double');
-		 thermal_exchange_velocity  = modelfield('default',0,'marshall',true,'format','Double');
-		 min_thermal_constraints    = modelfield('default',0,'marshall',true,'format','Integer');
-		 min_mechanical_constraints = modelfield('default',0,'marshall',true,'format','Integer');
-		 stabilize_constraints      = modelfield('default',0,'marshall',true,'format','Integer');
-
-		 %Physical parameters
-		 g                = modelfield('default',0,'marshall',true,'format','Double');
-		 yts              = modelfield('default',0,'marshall',true,'format','Double');
-		 drag_coefficient = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 drag_p           = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
-		 drag_q           = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
-		 rheology_B       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 rheology_n       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
-		 rheology_law     = modelfield('default','','marshall',true,'preprocess','StringToEnum','format','Integer');
-
-		 %Geometrical parameters
-		 elementoniceshelf = modelfield('default',NaN,'marshall',true,'format','BooleanMat','mattype',2);
-		 elementonicesheet = modelfield('default',NaN,'marshall',true,'format','BooleanMat','mattype',2);
-		 elementonwater    = modelfield('default',NaN,'marshall',true,'format','BooleanMat','mattype',2);
-		 nodeoniceshelf    = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 nodeonicesheet    = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 nodeonwater       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 surface           = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 thickness         = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 thickness_coeff   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 bed               = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 bathymetry        = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-
-		 %Boundary conditions
-		 nodeonboundary = modelfield('default',NaN,'marshall',false);
-		 pressureload   = modelfield('default',NaN,'marshall',true,'preprocess','marshallpressureload','format','DoubleMat','mattype',3);
-		 spcvx          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 spcvy          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 spcvz          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 spctemperature = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 spcthickness   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 spcwatercolumn = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 diagnostic_ref = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-
-		 %Observations 
-		 vx_obs                    = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 vy_obs                    = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 vel_obs                   = modelfield('default',NaN,'marshall',false);
-		 surface_accumulation_rate = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 surface_ablation_rate     = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 surface_mass_balance      = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 dhdt                      = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 geothermalflux            = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 thickness_obs             = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-
-		 %Statics parameters
-		 eps_res                  = modelfield('default',0,'marshall',true,'format','Double');
-		 eps_rel                  = modelfield('default',0,'marshall',true,'format','Double');
-		 eps_abs                  = modelfield('default',0,'marshall',true,'format','Double');
-		 max_nonlinear_iterations = modelfield('default',0,'marshall',true,'format','Integer');
-		 max_steadystate_iterations = modelfield('default',0,'marshall',true,'format','Integer');
-		 connectivity             = modelfield('default',0,'marshall',true,'format','Integer');
-		 lowmem                   = modelfield('default',0,'marshall',true,'format','Boolean');
-		 viscosity_overshoot      = modelfield('default',0,'marshall',true,'format','Double');
-
-		 %Transient 
-		 dt                     = modelfield('default',0,'marshall',true,'format','Double');
-		 ndt                    = modelfield('default',0,'marshall',true,'format','Double');
-		 time_adapt             = modelfield('default',0,'marshall',true,'format','Boolean');
-		 cfl_coefficient        = modelfield('default',0,'marshall',true,'format','Double');
-		 artificial_diffusivity = modelfield('default',0,'marshall',true,'format','Integer');
-		 prognostic_DG          = modelfield('default',0,'marshall',true,'format','Integer');
-		 hydrostatic_adjustment = modelfield('default',0,'marshall',true,'preprocess','StringToEnum','format','Integer');
-		 isprognostic = modelfield('default',0,'marshall',true,'format','Boolean');
-		 isdiagnostic = modelfield('default',0,'marshall',true,'format','Boolean');
-		 isthermal    = modelfield('default',0,'marshall',true,'format','Boolean');
-		 %Control
-		 control_analysis = modelfield('default',0,'marshall',true,'format','Boolean');
-		 control_type     = modelfield('default',NaN,'marshall',true,'preprocess','marshallcontroltype','format','DoubleMat','mattype',3);
-		 weights          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 nsteps           = modelfield('default',0,'marshall',true,'format','Integer');
-		 maxiter          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
-		 cm_responses     = modelfield('default',NaN,'marshall',true,'preprocess','marshallcmresponses','format','DoubleMat','mattype',3);
-		 tolx             = modelfield('default',0,'marshall',true,'format','Double');
-		 optscal          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
-		 eps_cm           = modelfield('default',0,'marshall',true,'format','Double');
-		 cm_min           = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
-		 cm_max           = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
-		 cm_jump          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
-		 cm_gradient      = modelfield('default',0,'marshall',true,'format','Boolean');
-		 epsvel                         = modelfield('default',0,'marshall',true,'format','Double');
-		 meanvel                        = modelfield('default',0,'marshall',true,'format','Double');
-		 num_control_type               = modelfield('default',0,'marshall',true,'format','Integer');
-		 num_cm_responses               = modelfield('default',0,'marshall',true,'format','Integer');
-		 %Output
-		 requested_outputs               = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
-		 %Debugging
-		 verbose                        = modelfield('default',0,'marshall',true,'preprocess','marshallverbose','format','Integer');
-		 mem_debug                      = modelfield('default',0,'marshall',false);
-		 gprof                          = modelfield('default',0,'marshall',false);
-		 %Results fields
-		 output_frequency               = modelfield('default',0,'marshall',true,'format','Integer');
-		 results_on_vertices            = modelfield('default',0,'marshall',true,'format','Boolean');
-		 inputfilename                  = modelfield('default','','marshall',true,'format','String');
-		 outputfilename                 = modelfield('default','','marshall',true,'format','String');
-		 results                        = modelfield('default',struct(),'marshall',false);
-		 vx                             = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 vy                             = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 vz                             = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 vel                            = modelfield('default',NaN,'marshall',false);
-		 temperature                    = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1); %temperature solution vector
-		 waterfraction                  = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 groundingline_melting_rate                = modelfield('default',NaN,'marshall',true,'format','Double');
-		 basal_melting_rate             = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 basal_melting_rate_correction  = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 pressure                       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 %Hydrology
-		 watercolumn                    = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-
-		 %Hydrology
-		 hydro_n                        = modelfield('default',0,'marshall',true,'format','Double'); 
-		 hydro_CR                       = modelfield('default',0,'marshall',true,'format','Double');
-		 hydro_p                        = modelfield('default',0,'marshall',true,'format','Double');
-		 hydro_q                        = modelfield('default',0,'marshall',true,'format','Double');
-		 hydro_kn                       = modelfield('default',0,'marshall',true,'format','Double');
-		 
-		 %Parallelisation
-		 cluster       = modelfield('default',NaN,'marshall',false);
-		 outlog        = modelfield('default','','marshall',false);
-		 errlog        = modelfield('default','','marshall',false);
-		 waitonlock    = modelfield('default',0,'marshall',true,'format','Boolean');
-
-		 %dummy
-		 dummy = modelfield('default',NaN,'marshall',false);
-
-		 %PETSc and MATLAB solver string
-		 petscoptions  = modelfield('default',NaN,'marshall',false);
-
-		 %Analysis
-		 solution_type = modelfield('default','','marshall',false);
-
-		 %radar power images
-		 sarpwr = modelfield('default',NaN,'marshall',false);
-		 sarxm  = modelfield('default',NaN,'marshall',false);
-		 sarym  = modelfield('default',NaN,'marshall',false);
-
-		 %qmu
-		 variables                       = modelfield('default',struct(),'marshall',false);
-		 responses                       = modelfield('default',struct(),'marshall',false);
-		 qmu_method                      = modelfield('default',struct(),'marshall',false);
-		 qmu_params                      = modelfield('default',struct(),'marshall',false);
-		 dakotaresults                   = modelfield('default',struct(),'marshall',false);
-		 dakotain                        = modelfield('default','','marshall',false);
-		 dakotaout                       = modelfield('default','','marshall',false);
-		 dakotadat                       = modelfield('default','','marshall',false);
-		 qmu_analysis                    = modelfield('default',0,'marshall',true,'format','Boolean');
-		 part                            = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
-		 npart                           = modelfield('default',0,'marshall',true,'format','Integer');
-		 numberofvariables               = modelfield('default',0,'marshall',true,'format','Integer');
-		 numberofresponses               = modelfield('default',0,'marshall',true,'format','Integer');
-		 variabledescriptors             = modelfield('default',{},'marshall',true,'format','StringArray');
-		 responsedescriptors             = modelfield('default',{},'marshall',true,'format','StringArray');
-		 qmu_mass_flux_profile_directory = modelfield('default',NaN,'marshall',false);
-		 qmu_mass_flux_profiles          = modelfield('default',NaN,'marshall',false);
-		 qmu_mass_flux_segments          = modelfield('default',{},'marshall',true,'format','MatArray');
-		 qmu_relax                       = modelfield('default',0,'marshall',false);
-
-		 %flaim
-		 fm_tracks             = modelfield('default','','marshall',false);
-		 fm_flightreqs         = modelfield('default',struct(),'marshall',false);
-		 fm_criterion          = modelfield('default',NaN,'marshall',false);
-		 fm_gridsatequator     = modelfield('default',200000,'marshall',false);
-		 fm_usevalueordering   = modelfield('default',true,'marshall',false);
-		 fm_split_antimeridian = modelfield('default',true,'marshall',false);
-		 fm_solution           = modelfield('default','','marshall',false);
-		 fm_quality            = modelfield('default',0,'marshall',false);
-
-		 %grounding line migration: 
-		 groundingline_migration = modelfield('default','','marshall',true,'preprocess','StringToEnum','format','Integer');
-
-		 %partitioner:
-		 adjacency = modelfield('default',NaN,'marshall',false);
-		 vwgt      = modelfield('default',NaN,'marshall',false);
-		 %}}}
-	 end
-	 methods (Static)
-		 function md = loadobj(md) % {{{
-			 % This function is directly called by matlab when a model object is
-			 % loaded. If the input is a struct it is an old version of model and
-			 % old fields must be recovered (make sure they are in the deprecated
-			 % model properties)
-
-			 if verLessThan('matlab','7.9'),
-				 disp('Warning: your matlab version is old and there is a risk that load does not work correctly');
-				 disp('         if the model is not loaded correctly, rename temporarily loadobj so that matlab does not use it');
-
-				 % This is a Matlab bug: all the fields of md have their default value
-				 % md.name = {''    [1]    'String'}
-				 % instead of recovering the saved fields
-				 % 
-				 % Example of error message:
-				 % Warning: Error loading an object of class 'model':
-				 % Undefined function or method 'exist' for input arguments of type 'cell'
-				 %
-				 % This has been fixed in MATLAB 7.9 (R2009b) and later versions
-			 end
-
-			 if isstruct(md)
-				 disp('Recovering model object from a previous version');
-				 md = structtomodel(model,md);
-			 end
-		 end% }}}
-		 function temp = template() % {{{
-
-			 %Get default fields
-			 md=model(0);
-			 modelprops=properties('model');
-
-			 %build output
-			 temp=struct();
-			 for i=1:length(modelprops),
-				 temp.(modelprops{i})=md.(modelprops{i});
-			 end
-
-		 end% }}}
-	 end
-	 methods
-		 function md = model(varargin) % {{{1
-
-			 switch nargin
-				 case 0
-
-					 %set default parameters
-					 md=setdefaultparameters(md);
-
-				 case 1
-					 in=varargin{1};
-					 if (isa(in,'model'))
-						 %If single argument of class model, we have a copy constructor. 
-						 md = in;
-					 elseif (isa(in,'numeric') & in==0)
-							 %just requesting model, without default parameters, do nothing.
-					 else
-						 error('model constructor error message: unknown constructor for ''model'' class object');
-					 end 
-
-				 otherwise
-					 error('model constructor error message: 0 of 1 argument only in input.');
-				 end
-		 end
-		 %}}}
-		 function disp(md) % {{{1
-			 disp(sprintf('\n%s = \n',inputname(1)));
-
-			 %name
-			 disp(sprintf('   Name:'));
-			 if isempty(md.name),
-				 disp(sprintf('      N/A'));
-			 else
-				 disp(sprintf('      %s',md.name));
-			 end
-
-			 %notes: md.notes is a cell array of strings
-			 disp(sprintf('   Notes:'));
-			 if isempty(md.notes),
-				 disp(sprintf('      N/A'));
-			 else
-				 if iscell(md.notes),
-					 strings=md.notes;
-					 for i=1:length(strings),
-						 string=char(strings(i));
-						 if i==1,
-							 disp(sprintf('      %s',string));
-						 else
-							 disp(sprintf('      %s',string));
-						 end
-					 end
-				 elseif ischar(md.notes),
-					 disp(sprintf('      %s',md.notes));
-				 else
-					 disp('display error message: ''notes'' for model is neither a cell array of string, nor a string. Cannot display.');
-				 end
-			 end
-
-			 %diverse
-			 disp(sprintf('   Mesh:'));
-			 disp(sprintf('%s%s%s','      Mesh: type ''',inputname(1),'.mesh'' to display'));
-			 disp(sprintf('   Parameters:'));
-			 disp(sprintf('%s%s%s','      Boundary conditions: type ''',inputname(1),'.bc'' to display'));
-			 disp(sprintf('%s%s%s','      Observations: type ''',inputname(1),'.obs'' to display'));
-			 disp(sprintf('%s%s%s','      Materials: type ''',inputname(1),'.mat'' to display'));
-			 disp(sprintf('%s%s%s','      Parameters: type ''',inputname(1),'.par'' to display'));
-			 disp(sprintf('%s%s%s','      ExpPar: type ''',inputname(1),'.exppar'' to display'));
-			 disp(sprintf('   Solution parameters: %s'));
-			 disp(sprintf('%s%s%s','      Qmu: type ''',inputname(1),'.qmu'' to display'));
-			 disp(sprintf('%s%s%s','      FLAIM: type ''',inputname(1),'.flaim'' to display'));
-			 disp(sprintf('%s%s%s','      Diagnostic solution parameters: type ''',inputname(1),'.diagnostic'' to display'));
-			 disp(sprintf('%s%s%s','      Thermal solution parameters: type ''',inputname(1),'.thermal'' to display'));
-			 disp(sprintf('%s%s%s','      Prognostic solution parameters: type ''',inputname(1),'.prognostic'' to display'));
-			 disp(sprintf('%s%s%s','      Transient solution parameters: type ''',inputname(1),'.transient'' to display'));
-			 disp(sprintf('%s%s%s','      Control solution parameters: type ''',inputname(1),'.control'' to display'));
-			 disp(sprintf('   Parallel:'));
-			 disp(sprintf('%s%s%s','      Parallel options: type ''',inputname(1),'.parallel'' to display'));
-			 if(md.numrifts)disp(sprintf('      rifts: %i',md.numrifts));end
-			 disp(sprintf('   Results:'));
-			 disp(sprintf('%s%s%s','      Results: type ''',inputname(1),'.res'' to display'));
-			 if(md.numrifts)disp(sprintf('      rifts: %i',md.numrifts));end
-		 end
-		 %}}}
-		 function md = structtomodel(md,structmd) % {{{
-
-			 if ~isstruct(structmd) error('input model is not a structure'); end
-
-			 %loaded model is a struct, initialize output and recover all fields
-			 md = structtoobj(model,structmd);
-
-			 %Field name change
-			 if isfield(structmd,'drag'), md.drag_coefficient=structmd.drag; end
-			 if isfield(structmd,'p'), md.drag_p=structmd.p; end
-			 if isfield(structmd,'q'), md.drag_q=structmd.p; end
-			 if isfield(structmd,'B'), md.rheology_B=structmd.B; end
-			 if isfield(structmd,'n'), md.rheology_n=structmd.n; end
-			 if isfield(structmd,'melting'), md.basal_melting_rate=structmd.melting; end
-			 if isfield(structmd,'melting_rate'), md.basal_melting_rate=structmd.melting_rate; end
-			 if isfield(structmd,'accumulation'), md.surface_mass_balance=structmd.accumulation; end
-			 if isfield(structmd,'accumulation_rate'), md.surface_mass_balance=structmd.accumulation_rate; end
-			 if isfield(structmd,'numberofgrids'), md.numberofnodes=structmd.numberofgrids; end
-			 if isfield(structmd,'numberofgrids2d'), md.numberofnodes2d=structmd.numberofgrids2d; end
-			 if isfield(structmd,'gridonhutter'), md.nodeonhutter=structmd.gridonhutter; end
-			 if isfield(structmd,'gridonmacayeal'), md.nodeonmacayeal=structmd.gridonmacayeal; end
-			 if isfield(structmd,'gridonpattyn'), md.nodeonpattyn=structmd.gridonpattyn; end
-			 if isfield(structmd,'gridonstokes'), md.nodeonstokes=structmd.gridonstokes; end
-			 if isfield(structmd,'uppergrids'), md.uppernodes=structmd.uppergrids; end
-			 if isfield(structmd,'lowergrids'), md.lowernodes=structmd.lowergrids; end
-			 if isfield(structmd,'gridonbed'), md.nodeonbed=structmd.gridonbed; end
-			 if isfield(structmd,'gridonsurface'), md.nodeonsurface=structmd.gridonsurface; end
-			 if isfield(structmd,'extractedgrids'), md.extractednodes=structmd.extractedgrids; end
-			 if isfield(structmd,'gridoniceshelf'), md.nodeoniceshelf=structmd.gridoniceshelf; end
-			 if isfield(structmd,'gridonicesheet'), md.nodeonicesheet=structmd.gridonicesheet; end
-			 if isfield(structmd,'gridonwater'), md.nodeonwater=structmd.gridonwater; end
-			 if isfield(structmd,'gridonnuna'), md.nodeonnuna=structmd.gridonnuna; end
-			 if isfield(structmd,'gridonboundary'), md.nodeonboundary=structmd.gridonboundary; end
-
-			 %Field changes
-			 if (isfield(structmd,'type') & ischar(structmd.type)), 
-				 if strcmpi(structmd.type,'2d'), md.dim=2; end
-				 if strcmpi(structmd.type,'3d'), md.dim=3; end
-			 end
-			 if isnumeric(md.verbose),
-				 md.verbose=verbose;
-			 end
-			 if isfield(structmd,'spcvelocity'), 
-				 md.spcvx=NaN*ones(md.numberofnodes,1);
-				 md.spcvy=NaN*ones(md.numberofnodes,1);
-				 md.spcvz=NaN*ones(md.numberofnodes,1);
-				 pos=find(structmd.spcvelocity(:,1)); md.spcvx(pos)=structmd.spcvelocity(pos,4); 
-				 pos=find(structmd.spcvelocity(:,2)); md.spcvy(pos)=structmd.spcvelocity(pos,5); 
-				 pos=find(structmd.spcvelocity(:,3)); md.spcvz(pos)=structmd.spcvelocity(pos,6); 
-			 end
-			 if isfield(structmd,'spcvelocity'), 
-				 md.spcvx=NaN*ones(md.numberofnodes,1);
-				 md.spcvy=NaN*ones(md.numberofnodes,1);
-				 md.spcvz=NaN*ones(md.numberofnodes,1);
-				 pos=find(structmd.spcvelocity(:,1)); md.spcvx(pos)=structmd.spcvelocity(pos,4); 
-				 pos=find(structmd.spcvelocity(:,2)); md.spcvy(pos)=structmd.spcvelocity(pos,5); 
-				 pos=find(structmd.spcvelocity(:,3)); md.spcvz(pos)=structmd.spcvelocity(pos,6); 
-			 end
-			 if ismember(structmd.pressureload(end,end),[118 119 120]),
-				 pos=find(structmd.pressureload(:,end)==120); md.pressureload(pos,end)=0;
-				 pos=find(structmd.pressureload(:,end)==118); md.pressureload(pos,end)=1;
-				 pos=find(structmd.pressureload(:,end)==119); md.pressureload(pos,end)=2;
-			 end
-			 if (structmd.elements_type(end,end)>100),
-				 pos=find(structmd.elements_type==59); md.elements_type(pos,end)=0;
-				 pos=find(structmd.elements_type==55); md.elements_type(pos,end)=1;
-				 pos=find(structmd.elements_type==56); md.elements_type(pos,end)=2;
-				 pos=find(structmd.elements_type==60); md.elements_type(pos,end)=3;
-				 pos=find(structmd.elements_type==62); md.elements_type(pos,end)=4;
-				 pos=find(structmd.elements_type==57); md.elements_type(pos,end)=5;
-				 pos=find(structmd.elements_type==58); md.elements_type(pos,end)=6;
-				 pos=find(structmd.elements_type==61); md.elements_type(pos,end)=7;
-			 end
-			 if isnumeric(structmd.rheology_law),
-				 if (structmd.rheology_law==272), md.rheology_law='None';      end
-				 if (structmd.rheology_law==368), md.rheology_law='Paterson';  end
-				 if (structmd.rheology_law==369), md.rheology_law='Arrhenius'; end
-			 end
-			 if isnumeric(structmd.groundingline_migration),
-				 if (structmd.groundingline_migration==272), md.groundingline_migration='None';      end
-				 if (structmd.groundingline_migration==273), md.groundingline_migration='AgressiveMigration';  end
-				 if (structmd.groundingline_migration==274), md.groundingline_migration='SoftMigration'; end
-			 end
-			 if isnumeric(md.control_type),
-				 if (structmd.control_type==143), md.control_type={'DragCoefficient'}; end
-				 if (structmd.control_type==190), md.control_type={'RheologyBbar'}; end
-				 if (structmd.control_type==147), md.control_type={'Dhdt'}; end
-			 end
-			 if ismember(structmd.cm_responses(end,end),[165:170 383 388 389]),
-				 pos=find(structmd.cm_responses==166), md.control_type(pos)=101;
-				 pos=find(structmd.cm_responses==167), md.control_type(pos)=102;
-				 pos=find(structmd.cm_responses==168), md.control_type(pos)=103;
-				 pos=find(structmd.cm_responses==169), md.control_type(pos)=104;
-				 pos=find(structmd.cm_responses==170), md.control_type(pos)=105;
-				 pos=find(structmd.cm_responses==165), md.control_type(pos)=201;
-				 pos=find(structmd.cm_responses==389), md.control_type(pos)=501;
-				 pos=find(structmd.cm_responses==388), md.control_type(pos)=502;
-				 pos=find(structmd.cm_responses==382), md.control_type(pos)=503;
-			 end
-
-			 %New fields
-			 if ~isfield(structmd,'upperelements');
-				 md.upperelements=transpose(1:md.numberofelements)+md.numberofelements2d;
-				 md.upperelements(end-md.numberofelements2d+1:end)=NaN;
-			 end
-			 if ~isfield(structmd,'lowerelements');
-				 md.lowerelements=transpose(1:md.numberofelements)-md.numberofelements2d;
-				 md.lowerelements(1:md.numberofelements2d)=NaN;
-			 end
-			 if ~isfield(structmd,'diagnostic_ref');
-				 md.diagnostic_ref=NaN*ones(md.numberofnodes2d,6);
-			 end
-		 end% }}}
-		 function md = setdefaultparameters(md) % {{{1
-		 %SETDEFAULTPARAMETERS - plug default parameters onto model
-		 %
-		 %   Although the model parameterization should be done in
-		 %   the parameter file, some parameters are initialized here
-		 %   with a default value.
-		 %   These default values can be changed if necessary.
-		 %
-		 %   Usage:
-		 %      md=setdefaultparameters(md);
-
-			 %first, use the defaults provided by the properties definition above. 
-			 fieldnames=fields(md);
-			 for i=1:length(fieldnames),
-				 fieldname=fieldnames{i};
-				 md.(fieldname)=md.(fieldname).default;
-			 end
-
-			 %Materials parameters
-
-			 %ice density (kg/m^3)
-			 md.rho_ice=917;
-
-			 %water density (kg/m^3)
-			 md.rho_water=1023;
-
-			 %ice heat capacity cp (J/kg/K)
-			 md.heatcapacity=2093;
-
-			 %ice latent heat of fusion L (J/kg)
-			 md.latentheat=3.34*10^5;
-
-			 %basal melting rate correction: 
-			 md.groundingline_melting_rate=0; 
-
-			 %ice thermal conductivity lamda (W/m/K)
-			 md.thermalconductivity=2.4;
-
-			 %the melting point of ice at 1 atmosphere of pressure in K
-			 md.meltingpoint=273.15;
-
-			 %the reference temperature for enthalpy model (cf Aschwanden)
-			 md.referencetemperature=223.15;
-
-			 %rate of change of melting point with pressure (K/Pa)
-			 md.beta=9.8*10^-8;
-
-			 %mixed layer (ice-water interface) heat capacity (J/kg/K)
-			 md.mixed_layer_capacity=3974;
-
-			 %thermal exchange velocity (ice-water interface) (m/s)
-			 md.thermal_exchange_velocity=1.00*10^-4;
-
-			 %Physical parameters
-
-			 %acceleration due to gravity (m/s^2)
-			 md.g=9.81;
-
-			 %converstion from year to seconds
-			 md.yts=365*24*3600;
-
-			 %Solver parameters
-
-			 %mechanical residue convergence criterion norm(K(uold)uold - F)/norm(F)
-			 md.eps_res=10^-4; %from test233 in nightly runs
-
-			 %relative convergence criterion ((vel(n-1)-vel(n))/vel(n))
-			 md.eps_rel=0.01;
-
-			 %absolute convergence criterion (max(vel(n-1)-vel(n)) (m/year)
-			 md.eps_abs=10;
-
-			 %maximum of non-linear iterations.
-			 md.max_nonlinear_iterations=100;
-			 
-			 %maximum of steady state iterations
-			 md.max_steadystate_iterations=100;
-
-			 %the connectivity is the avergaded number of nodes linked to a
-			 %given node through an edge. This connectivity is used to initially
-			 %allocate memory to the stiffness matrix. A value of 16 seems to
-			 %give a good memory/time ration. This value can be checked in
-			 %trunk/test/Miscellaneous/runme.m
-			 md.connectivity=25;
-
-			 %lowmem??
-			 md.lowmem=0;
-
-			 %coefficient to update the viscosity between each iteration of
-			 %a diagnostic according to the following formula
-			 %viscosity(n)=viscosity(n)+viscosity_overshoot(viscosity(n)-viscosity(n-1))
-			 md.viscosity_overshoot=0;
-
-			 %parameter used to print temporary results (convergence criterion,
-			 %current step,...)
-			 md.verbose=verbose('solution',true,'qmu',true,'control',true);
-
-			 %Stokes
-			 md.stokesreconditioning=10^13;
-			 md.shelf_dampening=0;
-
-			 %Penalties
-
-			 %the penalty offset is the power used to compute the value
-			 %of the penalty as follows
-			 %kappa=max(stiffness matrix)*10^penalty_offset
-			 md.penalty_offset=3;
-
-			 %in some solutions, it might be needed to stop a run when only
-			 %a few constraints remain unstable. For thermal computation, this
-			 %parameter is often used.
-			 md.penalty_lock=10;
-
-			 %minimum thickness to avoid stiffness singularity, used in
-			 %the parameter file
-			 md.minh=1;
-
-			 %in some cases, it might be needed to stop a run when only
-			 %a few constraints remain unstable. For thermal computation, this
-			 %parameter is often used.
-			 md.min_thermal_constraints=0;
-			 md.min_mechanical_constraints=0;
-
-			 %Transient parameters
-
-			 %time between 2 time steps
-			 md.dt=1/2;
-
-			 %number of time steps = md.ndt / md.dt
-			 md.ndt=10*md.dt;
-
-			 %time adaptation? 
-			 md.time_adapt=0;
-			 md.cfl_coefficient=.5;
-
-			 %Hydrostatic adjustment
-			 md.hydrostatic_adjustment='Absolute';
-			 %the artificial diffusivity is used in prognostic to avoid
-			 %numerical wiggles of the solution.
-			 md.artificial_diffusivity=1;
-
-			 %Discontinuous Galerkin is used in prognostic to avoid
-			 %numerical wiggles of the solution and conserve mass
-			 md.prognostic_DG=0;
-
-			 %Solution activated for transient runs. By default we do a
-			 %full analysis: Diagnostic, Prognostic and Thermal
-			 md.isprognostic=1;
-			 md.isdiagnostic=1;
-			 md.isthermal=1;
-
-			 %Control
-
-			 %parameter to be inferred by control methods (only
-			 %drag and B are supported yet)
-			 md.control_type={'DragCoefficient'};
-
-			 %number of steps in the control methods
-			 md.nsteps=20;
-
-			 %maximum number of iteration in the optimization algorithm for
-			 %each step
-			 md.maxiter=20*ones(md.nsteps,1);
-
-			 %tolerance used by the optimization algorithm
-			 md.tolx=10^-4;
-
-			 %the inversed parameter is updated as follows:
-			 %new_par=old_par + optscal(n)*C*gradient with C in [0 1];
-			 %usually the optscal must be of the order of magnitude of the 
-			 %inversed parameter (10^8 for B, 50 for drag) and can be decreased
-			 %after the first iterations
-			 md.optscal=50*ones(md.nsteps,1);
-
-			 %several responses can be used:
-			 md.cm_responses=101*ones(md.nsteps,1);
-
-			 %cm_jump is used to speed up control method. When
-			 %misfit(1)/misfit(0) < md.cm_jump, we go directly to
-			 %the next step
-			 md.cm_jump=.7*ones(md.nsteps,1); %30 per cent decrement.
-
-			 %stop control solution at the gradient computation and return it? 
-			 md.cm_gradient=0;
-
-			 %eps_cm is a criteria to stop the control methods.
-			 %if J[n]-J[n-1]/J[n] < criteria, the control run stops
-			 %NaN if not applied
-			 md.eps_cm=NaN; %not activated
-
-			 %minimum velocity to avoid the misfit to be singular
-			 md.epsvel=eps;
-
-			 %averaged velocity used to scale the logarithmic Misfit (000 m/an)
-			 md.meanvel=1000/(365*24*3600);
-
-			 %grounding line migration: 
-			 md.groundingline_migration='None';
-
-			 %How often to save results, default is 1 so save every step
-			 md.output_frequency=1;
-
-			 %Parallelisation parameters
-
-			 %cluster set as none for serial
-			 md.cluster=none;
-
-			 %this option can be activated to load automatically the results
-			 %onto the model after a parallel run by waiting for the lock file
-			 %N minutes that is generated once the solution has converged
-			 %0 to desactivate
-			 md.waitonlock=Inf;
-
-			 %hydrology:  from Johnson's 2002 thesis, section 3.5.4			 
-			 md.hydro_n=.02;			 
-			 md.hydro_CR=2;		 
-			 md.hydro_p=2;		 
-			 md.hydro_q=1;		 
-			 md.hydro_kn=0;
-
-			 %set petsc options for different analysis
-			 md.petscoptions=petscoptions;
-			 md.petscoptions=addoptions(md.petscoptions,DiagnosticVertAnalysisEnum,mumpsoptions);
-
-			 %Rheology law: what is the temperature dependence of B with T
-			 %available: none, paterson and arrhenius
-			 md.rheology_law='Paterson';
-
-			 %i/o:
-			 md.io_gather=1;
-		 end
-		 %}}}
-		 function result = subsref(md,index) % {{{1
-
-			 if length(index)==1,
-				 index1=index(1);
-				 if(strcmp(index1.subs,'mesh')), displaymesh(md);return; end
-				 if(strcmp(index1.subs,'bc')), displaybc(md);return; end
-				 if(strcmp(index1.subs,'mat')), displaymaterials(md);return; end
-				 if(strcmp(index1.subs,'par')), displayparameters(md);return; end
-				 if(strcmp(index1.subs,'exppar')), displayexppar(md);return; end
-				 if(strcmp(index1.subs,'res')), displayresults(md);return; end
-				 if(strcmp(index1.subs,'obs')), displayobservations(md);return; end
-				 if(strcmp(index1.subs,'qmu')), displayqmu(md);return; end
-				 if(strcmp(index1.subs,'flaim')), displayflaim(md);return; end
-				 if(strcmp(index1.subs,'diagnostic')), displaydiagnostic(md);return; end
-				 if(strcmp(index1.subs,'prognostic')), displayprognostic(md);return; end
-				 if(strcmp(index1.subs,'thermal')), displaythermal(md);return; end
-				 if(strcmp(index1.subs,'transient')), displaytransient(md);return; end
-				 if(strcmp(index1.subs,'control')), displaycontrol(md);return; end
-				 if(strcmp(index1.subs,'parallel')), displayparallel(md);return; end
-			 end
-
-			 %return built in value
-			 result=builtin('subsref',md,index);
-		 end %}}}
-	 end
- end
Index: /issm/trunk/src/m/classes/model/model.m
===================================================================
--- /issm/trunk/src/m/classes/model/model.m	(revision 9548)
+++ /issm/trunk/src/m/classes/model/model.m	(revision 9548)
@@ -0,0 +1,783 @@
+%MODEL class definition
+%
+%   Usage:
+%      md = model(varargin)
+
+classdef model
+    properties (SetAccess=public) %Model fields
+		 % {{{1
+		 %Careful here: no other class should be used as default value this is a bug of matlab
+		 %in what follows, any field is defined according to the following convention: 
+		 %field={defaultvalue,marshall?,data type,matrix type}
+
+		 %Model general information
+		 notes           = modelfield('default','','marshall',false);
+		 name            = modelfield('default','','marshall',true,'format','String');
+		 runtimename     = modelfield('default','','marshall',false); %name used when running a parallel job
+		 counter         = modelfield('default',0,'marshall',false);
+
+		 %Mesh
+		 bamg                = modelfield('default',struct(),'marshall',false);
+		 dim                 = modelfield('default',0,'marshall',true,'format','Integer');
+		 numberofelements    = modelfield('default',0,'marshall',true,'format','Integer');
+		 numberofnodes       = modelfield('default',0,'marshall',true,'format','Integer');
+		 elements            = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
+		 elements_type       = modelfield('default',NaN,'marshall',true,'preprocess','marshallapproximations','format','DoubleMat','mattype',2);
+		 vertices_type       = modelfield('default',NaN,'marshall',true,'preprocess','marshallapproximations','format','DoubleMat','mattype',1);
+		 x                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 y                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 z                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 nodeconnectivity    = modelfield('default',NaN,'marshall',false);
+		 elementconnectivity = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
+		 edges               = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
+
+		 %I/O
+		 io_gather           = modelfield('default',0,'marshall',true,'format','Boolean');
+
+		 %Initial 2d mesh 
+		 numberofelements2d = modelfield('default',0,'marshall',true,'format','Integer');
+		 numberofnodes2d    = modelfield('default',0,'marshall',true,'format','Integer');
+		 elements2d         = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
+		 x2d                = modelfield('default',NaN,'marshall',false);
+		 y2d                = modelfield('default',NaN,'marshall',false);
+
+		 %latlon of the coorinates
+		 lat        = modelfield('default',NaN,'marshall',false);
+		 long       = modelfield('default',NaN,'marshall',false);
+		 hemisphere = modelfield('default',NaN,'marshall',false);
+
+		 %Elements type
+		 ishutter             = modelfield('default',0,'marshall',true,'format','Boolean');
+		 ismacayealpattyn     = modelfield('default',0,'marshall',true,'format','Boolean');
+		 isstokes             = modelfield('default',0,'marshall',true,'format','Boolean');
+
+		 %Elements
+		 elementonhutter      = modelfield('default',NaN,'marshall',false);
+		 elementonmacayeal    = modelfield('default',NaN,'marshall',false);
+		 elementonpattyn      = modelfield('default',NaN,'marshall',false);
+		 elementonstokes      = modelfield('default',NaN,'marshall',false);
+
+		 %Nodes
+		 nodeonhutter         = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 nodeonmacayeal       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 nodeonpattyn         = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 nodeonstokes         = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 borderstokes         = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
+
+		 %Stokes
+		 stokesreconditioning = modelfield('default',0,'marshall',true,'format','Double');
+		 shelf_dampening      = modelfield('default',0,'marshall',true,'format','Integer');
+
+		 %Penalties
+		 penalties            = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
+		 penalty_offset       = modelfield('default',0,'marshall',true,'format','Double');
+		 penalty_lock         = modelfield('default',0,'marshall',true,'format','Integer');
+		 segments             = modelfield('default',NaN,'marshall',false);
+		 segmentmarkers       = modelfield('default',NaN,'marshall',false);
+		 rifts                = modelfield('default',NaN,'marshall',true,'preprocess','marshallrifts','format','DoubleMat','mattype',3);
+		 riftproperties       = modelfield('default',NaN,'marshall',false);
+		 numrifts             = modelfield('default',0,'marshall',true,'format','Integer');
+
+		 %Projections
+		 uppernodes           = modelfield('default',NaN,'marshall',false);
+		 upperelements        = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
+		 lowerelements        = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
+		 lowernodes           = modelfield('default',NaN,'marshall',false);
+
+		 %Extrusion
+		 numlayers         = modelfield('default',0,'marshall',true,'format','Integer');
+		 elementonbed      = modelfield('default',NaN,'marshall',true,'format','BooleanMat','mattype',2);
+		 elementonsurface  = modelfield('default',NaN,'marshall',true,'format','BooleanMat','mattype',2);
+		 nodeonbed         = modelfield('default',NaN,'marshall',true,'format','BooleanMat','mattype',1);
+		 nodeonsurface     = modelfield('default',NaN,'marshall',true,'format','BooleanMat','mattype',1);
+		 minh              = modelfield('default',0,'marshall',false);
+
+		 %Extraction
+		 extractednodes    = modelfield('default',NaN,'marshall',false);
+		 extractedelements = modelfield('default',NaN,'marshall',false);
+
+		 %Materials parameters
+		 rho_ice                    = modelfield('default',0,'marshall',true,'format','Double');
+		 rho_water                  = modelfield('default',0,'marshall',true,'format','Double');
+		 heatcapacity               = modelfield('default',0,'marshall',true,'format','Double');
+		 latentheat                 = modelfield('default',0,'marshall',true,'format','Double');
+		 thermalconductivity        = modelfield('default',0,'marshall',true,'format','Double');
+		 meltingpoint               = modelfield('default',0,'marshall',true,'format','Double');
+		 referencetemperature       = modelfield('default',0,'marshall',true,'format','Double'); %for enthalpy
+		 beta                       = modelfield('default',0,'marshall',true,'format','Double');
+		 mixed_layer_capacity       = modelfield('default',0,'marshall',true,'format','Double');
+		 thermal_exchange_velocity  = modelfield('default',0,'marshall',true,'format','Double');
+		 min_thermal_constraints    = modelfield('default',0,'marshall',true,'format','Integer');
+		 min_mechanical_constraints = modelfield('default',0,'marshall',true,'format','Integer');
+		 stabilize_constraints      = modelfield('default',0,'marshall',true,'format','Integer');
+
+		 %Physical parameters
+		 g                = modelfield('default',0,'marshall',true,'format','Double');
+		 yts              = modelfield('default',0,'marshall',true,'format','Double');
+		 drag_coefficient = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 drag_p           = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
+		 drag_q           = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
+		 rheology_B       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 rheology_n       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
+		 rheology_law     = modelfield('default','','marshall',true,'preprocess','StringToEnum','format','Integer');
+
+		 %Geometrical parameters
+		 elementoniceshelf = modelfield('default',NaN,'marshall',true,'format','BooleanMat','mattype',2);
+		 elementonicesheet = modelfield('default',NaN,'marshall',true,'format','BooleanMat','mattype',2);
+		 elementonwater    = modelfield('default',NaN,'marshall',true,'format','BooleanMat','mattype',2);
+		 nodeoniceshelf    = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 nodeonicesheet    = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 nodeonwater       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 surface           = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 thickness         = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 thickness_coeff   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 bed               = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 bathymetry        = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+
+		 %Boundary conditions
+		 nodeonboundary = modelfield('default',NaN,'marshall',false);
+		 pressureload   = modelfield('default',NaN,'marshall',true,'preprocess','marshallpressureload','format','DoubleMat','mattype',3);
+		 spcvx          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 spcvy          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 spcvz          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 spctemperature = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 spcthickness   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 spcwatercolumn = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 diagnostic_ref = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+
+		 %Observations 
+		 vx_obs                    = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 vy_obs                    = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 vel_obs                   = modelfield('default',NaN,'marshall',false);
+		 surface_accumulation_rate = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 surface_ablation_rate     = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 surface_mass_balance      = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 dhdt                      = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 geothermalflux            = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 thickness_obs             = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+
+		 %Statics parameters
+		 eps_res                  = modelfield('default',0,'marshall',true,'format','Double');
+		 eps_rel                  = modelfield('default',0,'marshall',true,'format','Double');
+		 eps_abs                  = modelfield('default',0,'marshall',true,'format','Double');
+		 max_nonlinear_iterations = modelfield('default',0,'marshall',true,'format','Integer');
+		 max_steadystate_iterations = modelfield('default',0,'marshall',true,'format','Integer');
+		 connectivity             = modelfield('default',0,'marshall',true,'format','Integer');
+		 lowmem                   = modelfield('default',0,'marshall',true,'format','Boolean');
+		 viscosity_overshoot      = modelfield('default',0,'marshall',true,'format','Double');
+
+		 %Transient 
+		 dt                     = modelfield('default',0,'marshall',true,'format','Double');
+		 ndt                    = modelfield('default',0,'marshall',true,'format','Double');
+		 time_adapt             = modelfield('default',0,'marshall',true,'format','Boolean');
+		 cfl_coefficient        = modelfield('default',0,'marshall',true,'format','Double');
+		 artificial_diffusivity = modelfield('default',0,'marshall',true,'format','Integer');
+		 prognostic_DG          = modelfield('default',0,'marshall',true,'format','Integer');
+		 hydrostatic_adjustment = modelfield('default',0,'marshall',true,'preprocess','StringToEnum','format','Integer');
+		 isprognostic = modelfield('default',0,'marshall',true,'format','Boolean');
+		 isdiagnostic = modelfield('default',0,'marshall',true,'format','Boolean');
+		 isthermal    = modelfield('default',0,'marshall',true,'format','Boolean');
+		 %Control
+		 control_analysis = modelfield('default',0,'marshall',true,'format','Boolean');
+		 control_type     = modelfield('default',NaN,'marshall',true,'preprocess','marshallcontroltype','format','DoubleMat','mattype',3);
+		 weights          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 nsteps           = modelfield('default',0,'marshall',true,'format','Integer');
+		 maxiter          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
+		 cm_responses     = modelfield('default',NaN,'marshall',true,'preprocess','marshallcmresponses','format','DoubleMat','mattype',3);
+		 tolx             = modelfield('default',0,'marshall',true,'format','Double');
+		 optscal          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
+		 eps_cm           = modelfield('default',0,'marshall',true,'format','Double');
+		 cm_min           = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
+		 cm_max           = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
+		 cm_jump          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
+		 cm_gradient      = modelfield('default',0,'marshall',true,'format','Boolean');
+		 epsvel                         = modelfield('default',0,'marshall',true,'format','Double');
+		 meanvel                        = modelfield('default',0,'marshall',true,'format','Double');
+		 num_control_type               = modelfield('default',0,'marshall',true,'format','Integer');
+		 num_cm_responses               = modelfield('default',0,'marshall',true,'format','Integer');
+		 %Output
+		 requested_outputs               = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
+		 %Debugging
+		 verbose                        = modelfield('default',0,'marshall',true,'preprocess','marshallverbose','format','Integer');
+		 mem_debug                      = modelfield('default',0,'marshall',false);
+		 gprof                          = modelfield('default',0,'marshall',false);
+		 %Results fields
+		 output_frequency               = modelfield('default',0,'marshall',true,'format','Integer');
+		 results_on_vertices            = modelfield('default',0,'marshall',true,'format','Boolean');
+		 inputfilename                  = modelfield('default','','marshall',true,'format','String');
+		 outputfilename                 = modelfield('default','','marshall',true,'format','String');
+		 results                        = modelfield('default',struct(),'marshall',false);
+		 vx                             = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 vy                             = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 vz                             = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 vel                            = modelfield('default',NaN,'marshall',false);
+		 temperature                    = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1); %temperature solution vector
+		 waterfraction                  = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 groundingline_melting_rate                = modelfield('default',NaN,'marshall',true,'format','Double');
+		 basal_melting_rate             = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 basal_melting_rate_correction  = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 pressure                       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 %Hydrology
+		 watercolumn                    = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+
+		 %Hydrology
+		 hydro_n                        = modelfield('default',0,'marshall',true,'format','Double'); 
+		 hydro_CR                       = modelfield('default',0,'marshall',true,'format','Double');
+		 hydro_p                        = modelfield('default',0,'marshall',true,'format','Double');
+		 hydro_q                        = modelfield('default',0,'marshall',true,'format','Double');
+		 hydro_kn                       = modelfield('default',0,'marshall',true,'format','Double');
+		 
+		 %Parallelisation
+		 cluster       = modelfield('default',NaN,'marshall',false);
+		 outlog        = modelfield('default','','marshall',false);
+		 errlog        = modelfield('default','','marshall',false);
+		 waitonlock    = modelfield('default',0,'marshall',true,'format','Boolean');
+
+		 %dummy
+		 dummy = modelfield('default',NaN,'marshall',false);
+
+		 %PETSc and MATLAB solver string
+		 petscoptions  = modelfield('default',NaN,'marshall',false);
+
+		 %Analysis
+		 solution_type = modelfield('default','','marshall',false);
+
+		 %radar power images
+		 sarpwr = modelfield('default',NaN,'marshall',false);
+		 sarxm  = modelfield('default',NaN,'marshall',false);
+		 sarym  = modelfield('default',NaN,'marshall',false);
+
+		 %qmu
+		 variables                       = modelfield('default',struct(),'marshall',false);
+		 responses                       = modelfield('default',struct(),'marshall',false);
+		 qmu_method                      = modelfield('default',struct(),'marshall',false);
+		 qmu_params                      = modelfield('default',struct(),'marshall',false);
+		 dakotaresults                   = modelfield('default',struct(),'marshall',false);
+		 dakotain                        = modelfield('default','','marshall',false);
+		 dakotaout                       = modelfield('default','','marshall',false);
+		 dakotadat                       = modelfield('default','','marshall',false);
+		 qmu_analysis                    = modelfield('default',0,'marshall',true,'format','Boolean');
+		 part                            = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
+		 npart                           = modelfield('default',0,'marshall',true,'format','Integer');
+		 numberofvariables               = modelfield('default',0,'marshall',true,'format','Integer');
+		 numberofresponses               = modelfield('default',0,'marshall',true,'format','Integer');
+		 variabledescriptors             = modelfield('default',{},'marshall',true,'format','StringArray');
+		 responsedescriptors             = modelfield('default',{},'marshall',true,'format','StringArray');
+		 qmu_mass_flux_profile_directory = modelfield('default',NaN,'marshall',false);
+		 qmu_mass_flux_profiles          = modelfield('default',NaN,'marshall',false);
+		 qmu_mass_flux_segments          = modelfield('default',{},'marshall',true,'format','MatArray');
+		 qmu_relax                       = modelfield('default',0,'marshall',false);
+
+		 %flaim
+		 fm_tracks             = modelfield('default','','marshall',false);
+		 fm_flightreqs         = modelfield('default',struct(),'marshall',false);
+		 fm_criterion          = modelfield('default',NaN,'marshall',false);
+		 fm_gridsatequator     = modelfield('default',200000,'marshall',false);
+		 fm_usevalueordering   = modelfield('default',true,'marshall',false);
+		 fm_split_antimeridian = modelfield('default',true,'marshall',false);
+		 fm_solution           = modelfield('default','','marshall',false);
+		 fm_quality            = modelfield('default',0,'marshall',false);
+
+		 %grounding line migration: 
+		 groundingline_migration = modelfield('default','','marshall',true,'preprocess','StringToEnum','format','Integer');
+
+		 %partitioner:
+		 adjacency = modelfield('default',NaN,'marshall',false);
+		 vwgt      = modelfield('default',NaN,'marshall',false);
+		 %}}}
+	 end
+	 methods (Static)
+		 function md = loadobj(md) % {{{
+			 % This function is directly called by matlab when a model object is
+			 % loaded. If the input is a struct it is an old version of model and
+			 % old fields must be recovered (make sure they are in the deprecated
+			 % model properties)
+
+			 if verLessThan('matlab','7.9'),
+				 disp('Warning: your matlab version is old and there is a risk that load does not work correctly');
+				 disp('         if the model is not loaded correctly, rename temporarily loadobj so that matlab does not use it');
+
+				 % This is a Matlab bug: all the fields of md have their default value
+				 % md.name = {''    [1]    'String'}
+				 % instead of recovering the saved fields
+				 % 
+				 % Example of error message:
+				 % Warning: Error loading an object of class 'model':
+				 % Undefined function or method 'exist' for input arguments of type 'cell'
+				 %
+				 % This has been fixed in MATLAB 7.9 (R2009b) and later versions
+			 end
+
+			 if isstruct(md)
+				 disp('Recovering model object from a previous version');
+				 md = structtomodel(model,md);
+			 end
+		 end% }}}
+		 function temp = template() % {{{
+
+			 %Get default fields
+			 md=model(0);
+			 modelprops=properties('model');
+
+			 %build output
+			 temp=struct();
+			 for i=1:length(modelprops),
+				 temp.(modelprops{i})=md.(modelprops{i});
+			 end
+
+		 end% }}}
+	 end
+	 methods
+		 function md = model(varargin) % {{{1
+
+			 switch nargin
+				 case 0
+
+					 %set default parameters
+					 md=setdefaultparameters(md);
+
+				 case 1
+					 in=varargin{1};
+					 if (isa(in,'model'))
+						 %If single argument of class model, we have a copy constructor. 
+						 md = in;
+					 elseif (isa(in,'numeric') & in==0)
+							 %just requesting model, without default parameters, do nothing.
+					 else
+						 error('model constructor error message: unknown constructor for ''model'' class object');
+					 end 
+
+				 otherwise
+					 error('model constructor error message: 0 of 1 argument only in input.');
+				 end
+		 end
+		 %}}}
+		 function disp(md) % {{{1
+			 disp(sprintf('\n%s = \n',inputname(1)));
+
+			 %name
+			 disp(sprintf('   Name:'));
+			 if isempty(md.name),
+				 disp(sprintf('      N/A'));
+			 else
+				 disp(sprintf('      %s',md.name));
+			 end
+
+			 %notes: md.notes is a cell array of strings
+			 disp(sprintf('   Notes:'));
+			 if isempty(md.notes),
+				 disp(sprintf('      N/A'));
+			 else
+				 if iscell(md.notes),
+					 strings=md.notes;
+					 for i=1:length(strings),
+						 string=char(strings(i));
+						 if i==1,
+							 disp(sprintf('      %s',string));
+						 else
+							 disp(sprintf('      %s',string));
+						 end
+					 end
+				 elseif ischar(md.notes),
+					 disp(sprintf('      %s',md.notes));
+				 else
+					 disp('display error message: ''notes'' for model is neither a cell array of string, nor a string. Cannot display.');
+				 end
+			 end
+
+			 %diverse
+			 disp(sprintf('   Mesh:'));
+			 disp(sprintf('%s%s%s','      Mesh: type ''',inputname(1),'.mesh'' to display'));
+			 disp(sprintf('   Parameters:'));
+			 disp(sprintf('%s%s%s','      Boundary conditions: type ''',inputname(1),'.bc'' to display'));
+			 disp(sprintf('%s%s%s','      Observations: type ''',inputname(1),'.obs'' to display'));
+			 disp(sprintf('%s%s%s','      Materials: type ''',inputname(1),'.mat'' to display'));
+			 disp(sprintf('%s%s%s','      Parameters: type ''',inputname(1),'.par'' to display'));
+			 disp(sprintf('%s%s%s','      ExpPar: type ''',inputname(1),'.exppar'' to display'));
+			 disp(sprintf('   Solution parameters: %s'));
+			 disp(sprintf('%s%s%s','      Qmu: type ''',inputname(1),'.qmu'' to display'));
+			 disp(sprintf('%s%s%s','      FLAIM: type ''',inputname(1),'.flaim'' to display'));
+			 disp(sprintf('%s%s%s','      Diagnostic solution parameters: type ''',inputname(1),'.diagnostic'' to display'));
+			 disp(sprintf('%s%s%s','      Thermal solution parameters: type ''',inputname(1),'.thermal'' to display'));
+			 disp(sprintf('%s%s%s','      Prognostic solution parameters: type ''',inputname(1),'.prognostic'' to display'));
+			 disp(sprintf('%s%s%s','      Transient solution parameters: type ''',inputname(1),'.transient'' to display'));
+			 disp(sprintf('%s%s%s','      Control solution parameters: type ''',inputname(1),'.control'' to display'));
+			 disp(sprintf('   Parallel:'));
+			 disp(sprintf('%s%s%s','      Parallel options: type ''',inputname(1),'.parallel'' to display'));
+			 if(md.numrifts)disp(sprintf('      rifts: %i',md.numrifts));end
+			 disp(sprintf('   Results:'));
+			 disp(sprintf('%s%s%s','      Results: type ''',inputname(1),'.res'' to display'));
+			 if(md.numrifts)disp(sprintf('      rifts: %i',md.numrifts));end
+		 end
+		 %}}}
+		 function md = structtomodel(md,structmd) % {{{
+
+			 if ~isstruct(structmd) error('input model is not a structure'); end
+
+			 %loaded model is a struct, initialize output and recover all fields
+			 md = structtoobj(model,structmd);
+
+			 %Field name change
+			 if isfield(structmd,'drag'), md.drag_coefficient=structmd.drag; end
+			 if isfield(structmd,'p'), md.drag_p=structmd.p; end
+			 if isfield(structmd,'q'), md.drag_q=structmd.p; end
+			 if isfield(structmd,'B'), md.rheology_B=structmd.B; end
+			 if isfield(structmd,'n'), md.rheology_n=structmd.n; end
+			 if isfield(structmd,'melting'), md.basal_melting_rate=structmd.melting; end
+			 if isfield(structmd,'melting_rate'), md.basal_melting_rate=structmd.melting_rate; end
+			 if isfield(structmd,'accumulation'), md.surface_mass_balance=structmd.accumulation; end
+			 if isfield(structmd,'accumulation_rate'), md.surface_mass_balance=structmd.accumulation_rate; end
+			 if isfield(structmd,'numberofgrids'), md.numberofnodes=structmd.numberofgrids; end
+			 if isfield(structmd,'numberofgrids2d'), md.numberofnodes2d=structmd.numberofgrids2d; end
+			 if isfield(structmd,'gridonhutter'), md.nodeonhutter=structmd.gridonhutter; end
+			 if isfield(structmd,'gridonmacayeal'), md.nodeonmacayeal=structmd.gridonmacayeal; end
+			 if isfield(structmd,'gridonpattyn'), md.nodeonpattyn=structmd.gridonpattyn; end
+			 if isfield(structmd,'gridonstokes'), md.nodeonstokes=structmd.gridonstokes; end
+			 if isfield(structmd,'uppergrids'), md.uppernodes=structmd.uppergrids; end
+			 if isfield(structmd,'lowergrids'), md.lowernodes=structmd.lowergrids; end
+			 if isfield(structmd,'gridonbed'), md.nodeonbed=structmd.gridonbed; end
+			 if isfield(structmd,'gridonsurface'), md.nodeonsurface=structmd.gridonsurface; end
+			 if isfield(structmd,'extractedgrids'), md.extractednodes=structmd.extractedgrids; end
+			 if isfield(structmd,'gridoniceshelf'), md.nodeoniceshelf=structmd.gridoniceshelf; end
+			 if isfield(structmd,'gridonicesheet'), md.nodeonicesheet=structmd.gridonicesheet; end
+			 if isfield(structmd,'gridonwater'), md.nodeonwater=structmd.gridonwater; end
+			 if isfield(structmd,'gridonnuna'), md.nodeonnuna=structmd.gridonnuna; end
+			 if isfield(structmd,'gridonboundary'), md.nodeonboundary=structmd.gridonboundary; end
+
+			 %Field changes
+			 if (isfield(structmd,'type') & ischar(structmd.type)), 
+				 if strcmpi(structmd.type,'2d'), md.dim=2; end
+				 if strcmpi(structmd.type,'3d'), md.dim=3; end
+			 end
+			 if isnumeric(md.verbose),
+				 md.verbose=verbose;
+			 end
+			 if isfield(structmd,'spcvelocity'), 
+				 md.spcvx=NaN*ones(md.numberofnodes,1);
+				 md.spcvy=NaN*ones(md.numberofnodes,1);
+				 md.spcvz=NaN*ones(md.numberofnodes,1);
+				 pos=find(structmd.spcvelocity(:,1)); md.spcvx(pos)=structmd.spcvelocity(pos,4); 
+				 pos=find(structmd.spcvelocity(:,2)); md.spcvy(pos)=structmd.spcvelocity(pos,5); 
+				 pos=find(structmd.spcvelocity(:,3)); md.spcvz(pos)=structmd.spcvelocity(pos,6); 
+			 end
+			 if isfield(structmd,'spcvelocity'), 
+				 md.spcvx=NaN*ones(md.numberofnodes,1);
+				 md.spcvy=NaN*ones(md.numberofnodes,1);
+				 md.spcvz=NaN*ones(md.numberofnodes,1);
+				 pos=find(structmd.spcvelocity(:,1)); md.spcvx(pos)=structmd.spcvelocity(pos,4); 
+				 pos=find(structmd.spcvelocity(:,2)); md.spcvy(pos)=structmd.spcvelocity(pos,5); 
+				 pos=find(structmd.spcvelocity(:,3)); md.spcvz(pos)=structmd.spcvelocity(pos,6); 
+			 end
+			 if ismember(structmd.pressureload(end,end),[118 119 120]),
+				 pos=find(structmd.pressureload(:,end)==120); md.pressureload(pos,end)=0;
+				 pos=find(structmd.pressureload(:,end)==118); md.pressureload(pos,end)=1;
+				 pos=find(structmd.pressureload(:,end)==119); md.pressureload(pos,end)=2;
+			 end
+			 if (structmd.elements_type(end,end)>100),
+				 pos=find(structmd.elements_type==59); md.elements_type(pos,end)=0;
+				 pos=find(structmd.elements_type==55); md.elements_type(pos,end)=1;
+				 pos=find(structmd.elements_type==56); md.elements_type(pos,end)=2;
+				 pos=find(structmd.elements_type==60); md.elements_type(pos,end)=3;
+				 pos=find(structmd.elements_type==62); md.elements_type(pos,end)=4;
+				 pos=find(structmd.elements_type==57); md.elements_type(pos,end)=5;
+				 pos=find(structmd.elements_type==58); md.elements_type(pos,end)=6;
+				 pos=find(structmd.elements_type==61); md.elements_type(pos,end)=7;
+			 end
+			 if isnumeric(structmd.rheology_law),
+				 if (structmd.rheology_law==272), md.rheology_law='None';      end
+				 if (structmd.rheology_law==368), md.rheology_law='Paterson';  end
+				 if (structmd.rheology_law==369), md.rheology_law='Arrhenius'; end
+			 end
+			 if isnumeric(structmd.groundingline_migration),
+				 if (structmd.groundingline_migration==272), md.groundingline_migration='None';      end
+				 if (structmd.groundingline_migration==273), md.groundingline_migration='AgressiveMigration';  end
+				 if (structmd.groundingline_migration==274), md.groundingline_migration='SoftMigration'; end
+			 end
+			 if isnumeric(md.control_type),
+				 if (structmd.control_type==143), md.control_type={'DragCoefficient'}; end
+				 if (structmd.control_type==190), md.control_type={'RheologyBbar'}; end
+				 if (structmd.control_type==147), md.control_type={'Dhdt'}; end
+			 end
+			 if ismember(structmd.cm_responses(end,end),[165:170 383 388 389]),
+				 pos=find(structmd.cm_responses==166), md.control_type(pos)=101;
+				 pos=find(structmd.cm_responses==167), md.control_type(pos)=102;
+				 pos=find(structmd.cm_responses==168), md.control_type(pos)=103;
+				 pos=find(structmd.cm_responses==169), md.control_type(pos)=104;
+				 pos=find(structmd.cm_responses==170), md.control_type(pos)=105;
+				 pos=find(structmd.cm_responses==165), md.control_type(pos)=201;
+				 pos=find(structmd.cm_responses==389), md.control_type(pos)=501;
+				 pos=find(structmd.cm_responses==388), md.control_type(pos)=502;
+				 pos=find(structmd.cm_responses==382), md.control_type(pos)=503;
+			 end
+
+			 %New fields
+			 if ~isfield(structmd,'upperelements');
+				 md.upperelements=transpose(1:md.numberofelements)+md.numberofelements2d;
+				 md.upperelements(end-md.numberofelements2d+1:end)=NaN;
+			 end
+			 if ~isfield(structmd,'lowerelements');
+				 md.lowerelements=transpose(1:md.numberofelements)-md.numberofelements2d;
+				 md.lowerelements(1:md.numberofelements2d)=NaN;
+			 end
+			 if ~isfield(structmd,'diagnostic_ref');
+				 md.diagnostic_ref=NaN*ones(md.numberofnodes2d,6);
+			 end
+		 end% }}}
+		 function md = setdefaultparameters(md) % {{{1
+		 %SETDEFAULTPARAMETERS - plug default parameters onto model
+		 %
+		 %   Although the model parameterization should be done in
+		 %   the parameter file, some parameters are initialized here
+		 %   with a default value.
+		 %   These default values can be changed if necessary.
+		 %
+		 %   Usage:
+		 %      md=setdefaultparameters(md);
+
+			 %first, use the defaults provided by the properties definition above. 
+			 fieldnames=fields(md);
+			 for i=1:length(fieldnames),
+				 fieldname=fieldnames{i};
+				 md.(fieldname)=md.(fieldname).default;
+			 end
+
+			 %Materials parameters
+
+			 %ice density (kg/m^3)
+			 md.rho_ice=917;
+
+			 %water density (kg/m^3)
+			 md.rho_water=1023;
+
+			 %ice heat capacity cp (J/kg/K)
+			 md.heatcapacity=2093;
+
+			 %ice latent heat of fusion L (J/kg)
+			 md.latentheat=3.34*10^5;
+
+			 %basal melting rate correction: 
+			 md.groundingline_melting_rate=0; 
+
+			 %ice thermal conductivity lamda (W/m/K)
+			 md.thermalconductivity=2.4;
+
+			 %the melting point of ice at 1 atmosphere of pressure in K
+			 md.meltingpoint=273.15;
+
+			 %the reference temperature for enthalpy model (cf Aschwanden)
+			 md.referencetemperature=223.15;
+
+			 %rate of change of melting point with pressure (K/Pa)
+			 md.beta=9.8*10^-8;
+
+			 %mixed layer (ice-water interface) heat capacity (J/kg/K)
+			 md.mixed_layer_capacity=3974;
+
+			 %thermal exchange velocity (ice-water interface) (m/s)
+			 md.thermal_exchange_velocity=1.00*10^-4;
+
+			 %Physical parameters
+
+			 %acceleration due to gravity (m/s^2)
+			 md.g=9.81;
+
+			 %converstion from year to seconds
+			 md.yts=365*24*3600;
+
+			 %Solver parameters
+
+			 %mechanical residue convergence criterion norm(K(uold)uold - F)/norm(F)
+			 md.eps_res=10^-4; %from test233 in nightly runs
+
+			 %relative convergence criterion ((vel(n-1)-vel(n))/vel(n))
+			 md.eps_rel=0.01;
+
+			 %absolute convergence criterion (max(vel(n-1)-vel(n)) (m/year)
+			 md.eps_abs=10;
+
+			 %maximum of non-linear iterations.
+			 md.max_nonlinear_iterations=100;
+			 
+			 %maximum of steady state iterations
+			 md.max_steadystate_iterations=100;
+
+			 %the connectivity is the avergaded number of nodes linked to a
+			 %given node through an edge. This connectivity is used to initially
+			 %allocate memory to the stiffness matrix. A value of 16 seems to
+			 %give a good memory/time ration. This value can be checked in
+			 %trunk/test/Miscellaneous/runme.m
+			 md.connectivity=25;
+
+			 %lowmem??
+			 md.lowmem=0;
+
+			 %coefficient to update the viscosity between each iteration of
+			 %a diagnostic according to the following formula
+			 %viscosity(n)=viscosity(n)+viscosity_overshoot(viscosity(n)-viscosity(n-1))
+			 md.viscosity_overshoot=0;
+
+			 %parameter used to print temporary results (convergence criterion,
+			 %current step,...)
+			 md.verbose=verbose('solution',true,'qmu',true,'control',true);
+
+			 %Stokes
+			 md.stokesreconditioning=10^13;
+			 md.shelf_dampening=0;
+
+			 %Penalties
+
+			 %the penalty offset is the power used to compute the value
+			 %of the penalty as follows
+			 %kappa=max(stiffness matrix)*10^penalty_offset
+			 md.penalty_offset=3;
+
+			 %in some solutions, it might be needed to stop a run when only
+			 %a few constraints remain unstable. For thermal computation, this
+			 %parameter is often used.
+			 md.penalty_lock=10;
+
+			 %minimum thickness to avoid stiffness singularity, used in
+			 %the parameter file
+			 md.minh=1;
+
+			 %in some cases, it might be needed to stop a run when only
+			 %a few constraints remain unstable. For thermal computation, this
+			 %parameter is often used.
+			 md.min_thermal_constraints=0;
+			 md.min_mechanical_constraints=0;
+
+			 %Transient parameters
+
+			 %time between 2 time steps
+			 md.dt=1/2;
+
+			 %number of time steps = md.ndt / md.dt
+			 md.ndt=10*md.dt;
+
+			 %time adaptation? 
+			 md.time_adapt=0;
+			 md.cfl_coefficient=.5;
+
+			 %Hydrostatic adjustment
+			 md.hydrostatic_adjustment='Absolute';
+			 %the artificial diffusivity is used in prognostic to avoid
+			 %numerical wiggles of the solution.
+			 md.artificial_diffusivity=1;
+
+			 %Discontinuous Galerkin is used in prognostic to avoid
+			 %numerical wiggles of the solution and conserve mass
+			 md.prognostic_DG=0;
+
+			 %Solution activated for transient runs. By default we do a
+			 %full analysis: Diagnostic, Prognostic and Thermal
+			 md.isprognostic=1;
+			 md.isdiagnostic=1;
+			 md.isthermal=1;
+
+			 %Control
+
+			 %parameter to be inferred by control methods (only
+			 %drag and B are supported yet)
+			 md.control_type={'DragCoefficient'};
+
+			 %number of steps in the control methods
+			 md.nsteps=20;
+
+			 %maximum number of iteration in the optimization algorithm for
+			 %each step
+			 md.maxiter=20*ones(md.nsteps,1);
+
+			 %tolerance used by the optimization algorithm
+			 md.tolx=10^-4;
+
+			 %the inversed parameter is updated as follows:
+			 %new_par=old_par + optscal(n)*C*gradient with C in [0 1];
+			 %usually the optscal must be of the order of magnitude of the 
+			 %inversed parameter (10^8 for B, 50 for drag) and can be decreased
+			 %after the first iterations
+			 md.optscal=50*ones(md.nsteps,1);
+
+			 %several responses can be used:
+			 md.cm_responses=101*ones(md.nsteps,1);
+
+			 %cm_jump is used to speed up control method. When
+			 %misfit(1)/misfit(0) < md.cm_jump, we go directly to
+			 %the next step
+			 md.cm_jump=.7*ones(md.nsteps,1); %30 per cent decrement.
+
+			 %stop control solution at the gradient computation and return it? 
+			 md.cm_gradient=0;
+
+			 %eps_cm is a criteria to stop the control methods.
+			 %if J[n]-J[n-1]/J[n] < criteria, the control run stops
+			 %NaN if not applied
+			 md.eps_cm=NaN; %not activated
+
+			 %minimum velocity to avoid the misfit to be singular
+			 md.epsvel=eps;
+
+			 %averaged velocity used to scale the logarithmic Misfit (000 m/an)
+			 md.meanvel=1000/(365*24*3600);
+
+			 %grounding line migration: 
+			 md.groundingline_migration='None';
+
+			 %How often to save results, default is 1 so save every step
+			 md.output_frequency=1;
+
+			 %Parallelisation parameters
+
+			 %cluster set as none for serial
+			 md.cluster=none;
+
+			 %this option can be activated to load automatically the results
+			 %onto the model after a parallel run by waiting for the lock file
+			 %N minutes that is generated once the solution has converged
+			 %0 to desactivate
+			 md.waitonlock=Inf;
+
+			 %hydrology:  from Johnson's 2002 thesis, section 3.5.4			 
+			 md.hydro_n=.02;			 
+			 md.hydro_CR=2;		 
+			 md.hydro_p=2;		 
+			 md.hydro_q=1;		 
+			 md.hydro_kn=0;
+
+			 %set petsc options for different analysis
+			 md.petscoptions=petscoptions;
+			 md.petscoptions=addoptions(md.petscoptions,DiagnosticVertAnalysisEnum,mumpsoptions);
+
+			 %Rheology law: what is the temperature dependence of B with T
+			 %available: none, paterson and arrhenius
+			 md.rheology_law='Paterson';
+
+			 %i/o:
+			 md.io_gather=1;
+		 end
+		 %}}}
+		 function result = subsref(md,index) % {{{1
+
+			 if length(index)==1,
+				 index1=index(1);
+				 if(strcmp(index1.subs,'mesh')), displaymesh(md);return; end
+				 if(strcmp(index1.subs,'bc')), displaybc(md);return; end
+				 if(strcmp(index1.subs,'mat')), displaymaterials(md);return; end
+				 if(strcmp(index1.subs,'par')), displayparameters(md);return; end
+				 if(strcmp(index1.subs,'exppar')), displayexppar(md);return; end
+				 if(strcmp(index1.subs,'res')), displayresults(md);return; end
+				 if(strcmp(index1.subs,'obs')), displayobservations(md);return; end
+				 if(strcmp(index1.subs,'qmu')), displayqmu(md);return; end
+				 if(strcmp(index1.subs,'flaim')), displayflaim(md);return; end
+				 if(strcmp(index1.subs,'diagnostic')), displaydiagnostic(md);return; end
+				 if(strcmp(index1.subs,'prognostic')), displayprognostic(md);return; end
+				 if(strcmp(index1.subs,'thermal')), displaythermal(md);return; end
+				 if(strcmp(index1.subs,'transient')), displaytransient(md);return; end
+				 if(strcmp(index1.subs,'control')), displaycontrol(md);return; end
+				 if(strcmp(index1.subs,'parallel')), displayparallel(md);return; end
+			 end
+
+			 %return built in value
+			 result=builtin('subsref',md,index);
+		 end %}}}
+	 end
+ end
Index: /issm/trunk/src/m/classes/model/modelfield.m
===================================================================
--- /issm/trunk/src/m/classes/model/modelfield.m	(revision 9548)
+++ /issm/trunk/src/m/classes/model/modelfield.m	(revision 9548)
@@ -0,0 +1,29 @@
+%MODELFIELD class definition
+%
+%   Usage:
+%      modelfield(varargin)
+
+classdef modelfield
+	properties (SetAccess=public) 
+		marshall=false;
+		default=0;
+		preprocess='';
+		format='Int';
+		mattype=0;
+	end
+	methods
+		function mf = modelfield(varargin)
+
+			options=pairoptions(varargin{:});
+			for i=1:size(options.list,1),
+				fieldname=options.list{i,1};
+				fieldvalue=options.list{i,2};
+				if ismember(fieldname,properties('modelfield')),
+						mf.(fieldname)=fieldvalue;
+				else
+					disp(['''' fieldname ''' is not a property of modelfield']);
+				end
+			end
+		end
+	end
+end
Index: /issm/trunk/src/m/classes/model/planet.m
===================================================================
--- /issm/trunk/src/m/classes/model/planet.m	(revision 9548)
+++ /issm/trunk/src/m/classes/model/planet.m	(revision 9548)
@@ -0,0 +1,48 @@
+%PLANET class definition
+%
+%   Usage:
+%      md = planet(varargin)
+
+classdef planet < model
+    properties (SetAccess=public) %Planet fields
+		 % {{{1
+		 %Planet specific fields
+		 r=NaN;
+		 theta=NaN;
+		 phi=NaN;
+		 %}}}
+	 end
+	 methods
+		function md=planetmesh(md,varargin) % {{{1
+		%PLANETMESH: build 2d shell mesh
+		%
+		% Usage: md=planetmesh(md,'method','mixed','radius',6378000,'angleresol',1);
+		%        md=planetmesh(md,'method','tria','shape','iso','radius',6378000,'refinement',5);
+		%
+
+		%recover options
+		options=pairoptions(varargin{:});
+
+		method=getfieldvalue(options,'method','mixed');
+		
+		if strcmpi(method,'mixed'),
+			%recover radius and angleresol: 
+			radius=getfieldvalue(options,'radius',6378000); %earth radius as default
+			angleresol=getfieldvalue(options,'angleresol',10); %10 degree resolution
+			
+			%call mixed mesh 
+			md=planetmixedmesh(md,radius,angleresol);
+		else
+			%recover radius, shape and level of refinmenet
+			radius=getfieldvalue(options,'radius',6378000); %earth radius as default
+			refinement=getfieldvalue(options,'refinement',5); %refine 5 times
+			shape=getfieldvalue(options,'shape','ico'); 
+			
+			%call triangular mesh
+			md=planettrimesh(md,shape,radius,refinement);
+		end
+
+		end
+		% }}}
+	 end
+ end
Index: sm/trunk/src/m/classes/modelfield.m
===================================================================
--- /issm/trunk/src/m/classes/modelfield.m	(revision 9547)
+++ 	(revision )
@@ -1,29 +1,0 @@
-%MODELFIELD class definition
-%
-%   Usage:
-%      modelfield(varargin)
-
-classdef modelfield
-	properties (SetAccess=public) 
-		marshall=false;
-		default=0;
-		preprocess='';
-		format='Int';
-		mattype=0;
-	end
-	methods
-		function mf = modelfield(varargin)
-
-			options=pairoptions(varargin{:});
-			for i=1:size(options.list,1),
-				fieldname=options.list{i,1};
-				fieldvalue=options.list{i,2};
-				if ismember(fieldname,properties('modelfield')),
-						mf.(fieldname)=fieldvalue;
-				else
-					disp(['''' fieldname ''' is not a property of modelfield']);
-				end
-			end
-		end
-	end
-end
Index: sm/trunk/src/m/classes/nonlinear_equality_constraint.m
===================================================================
--- /issm/trunk/src/m/classes/nonlinear_equality_constraint.m	(revision 9547)
+++ 	(revision )
@@ -1,189 +1,0 @@
-%
-%  constructor for the nonlinear_equality_constraint class.
-%
-%  [nec]=nonlinear_equality_constraint(varargin)
-%
-%  where the required varargin are:
-%    descriptor    (char, description, '')
-%    target        (double, target value, 0.)
-%  and the optional varargin and defaults are:
-%    scale_type    (char, scaling type, 'none')
-%    scale         (double, scaling factor, 1.)
-%
-%  note that zero arguments constructs a default instance; one
-%  argument of the class copies the instance; and two or more
-%  arguments constructs a new instance from the arguments.
-%
-%  "Copyright 2009, by the California Institute of Technology.
-%  ALL RIGHTS RESERVED. United States Government Sponsorship
-%  acknowledged. Any commercial use must be negotiated with
-%  the Office of Technology Transfer at the California Institute
-%  of Technology.  (J. Schiermeier, NTR 47078)
-%
-%  This software may be subject to U.S. export control laws.
-%  By accepting this  software, the user agrees to comply with
-%  all applicable U.S. export laws and regulations. User has the
-%  responsibility to obtain export licenses, or other export
-%  authority as may be required before exporting such information
-%  to foreign countries or providing access to foreign persons."
-%
-classdef nonlinear_equality_constraint
-    properties
-        descriptor='';
-        target    = 0.;
-        scale_type='none';
-        scale     = 1.;
-    end
-    
-    methods
-        function [nec]=nonlinear_equality_constraint(varargin)
-
-            switch nargin
-
-%  create a default object
-
-                case 0
-
-%  copy the object
-
-                case 1
-                    if isa(varargin{1},'nonlinear_equality_constraint')
-                        nec=varargin{1};
-                    else
-                        error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
-                            inputname(1),class(varargin{1}),'nonlinear_equality_constraint');
-                    end
-
-%  create the object from the input
-
-                otherwise
-                    asizec=num2cell(array_size(varargin{1:min(nargin,4)}));
-                    nec(asizec{:})=nonlinear_equality_constraint;
-                    clear asizec
-                    
-                    if ischar(varargin{1})
-                        varargin{1}=cellstr(varargin{1});
-                    end
-                    for i=1:numel(nec)
-                        if (numel(varargin{1}) > 1)
-                            nec(i).descriptor=varargin{1}{i};
-                        else
-                            nec(i).descriptor=[char(varargin{1}) string_dim(nec,i,'vector')];
-                        end
-                        if (numel(varargin{2}) > 1)
-                            nec(i).target    =varargin{2}(i);
-                        else
-                            nec(i).target    =varargin{2};
-                        end
-                    end
-
-                    if (nargin >= 3)
-                        if ischar(varargin{3})
-                            varargin{3}=cellstr(varargin{3});
-                        end
-                        for i=1:numel(nec)
-                            if (numel(varargin{3}) > 1)
-                                nec(i).scale_type=varargin{3}{i};
-                            else
-                                nec(i).scale_type=char(varargin{3});
-                            end
-                        end
-                        if (nargin >= 4)
-                            for i=1:numel(nec)
-                                if (numel(varargin{4}) > 1)
-                                    nec(i).scale     =varargin{4}(i);
-                                else
-                                    nec(i).scale     =varargin{4};
-                                end
-                            end
-
-                            if (nargin > 4)
-                                warning('objective_function:extra_arg',...
-                                    'Extra arguments for object of class ''%s''.',...
-                                    class(nec));
-                            end
-                        end
-                    end
-            end
-
-        end
-
-        function []=disp(nec)
-
-%  display the object
-
-            disp(sprintf('\n'));
-            for i=1:numel(nec)
-                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
-                    class(nec),inputname(1),string_dim(nec,i)));
-                disp(sprintf('    descriptor: ''%s'''  ,nec(i).descriptor));
-                disp(sprintf('        target: %g'      ,nec(i).target));
-                disp(sprintf('    scale_type: ''%s'''  ,nec(i).scale_type));
-                disp(sprintf('         scale: %g\n'    ,nec(i).scale));
-            end
-
-        end
-
-        function [desc]  =prop_desc(nec,dstr)
-            desc=cell(1,numel(nec));
-            for i=1:numel(nec)
-                if ~isempty(nec(i).descriptor)
-                    desc(i)=cellstr(nec(i).descriptor);
-                elseif ~isempty(inputname(1))
-                    desc(i)=cellstr([inputname(1) string_dim(nec,i,'vector')]);
-                elseif exist('dstr','var')
-                    desc(i)=cellstr([dstr         string_dim(nec,i,'vector')]);
-                else
-                    desc(i)=cellstr(['nec'        string_dim(nec,i,'vector')]);
-                end
-            end
-            desc=allempty(desc);
-        end
-        function [stype] =prop_stype(nec)
-            stype=cell(size(nec));
-            for i=1:numel(nec)
-                stype(i)=cellstr(nec(i).scale_type);
-            end
-            stype=allequal(stype,'none');
-        end
-        function [scale] =prop_scale(nec)
-            scale=zeros(size(nec));
-            for i=1:numel(nec)
-                scale(i)=nec(i).scale;
-            end
-            scale=allequal(scale,1.);
-        end
-        function [weight]=prop_weight(nec)
-            weight=[];
-        end
-        function [lower] =prop_lower(nec)
-            lower=[];
-        end
-        function [upper] =prop_upper(nec)
-            upper=[];
-        end
-        function [target]=prop_target(nec)
-            target=zeros(size(nec));
-            for i=1:numel(nec)
-                target(i)=nec(i).target;
-            end
-            target=allequal(target,0.);
-        end
-    end
-    
-    methods (Static)
-        function [rdesc]=dakota_write(fidi,dresp,rdesc)
-
-%  collect only the responses of the appropriate class
-
-            nec=struc_class(dresp,'nonlinear_equality_constraint');
-
-%  write responses
-
-            [rdesc]=rlist_write(fidi,'nonlinear_equality_constraints','nonlinear_equality',nec,rdesc);
-        end
-
-        function []=dakota_rlev_write(fidi,dresp,params)
-        end
-    end
-end
Index: sm/trunk/src/m/classes/nonlinear_inequality_constraint.m
===================================================================
--- /issm/trunk/src/m/classes/nonlinear_inequality_constraint.m	(revision 9547)
+++ 	(revision )
@@ -1,207 +1,0 @@
-%
-%  constructor for the nonlinear_inequality_constraint class.
-%
-%  [nic]=nonlinear_inequality_constraint(varargin)
-%
-%  where the required varargin are:
-%    descriptor    (char, description, '')
-%    lower         (double, lower bound, -Inf)
-%    upper         (double, upper bound, 0.)
-%  and the optional varargin and defaults are:
-%    scale_type    (char, scaling type, 'none')
-%    scale         (double, scaling factor, 1.)
-%
-%  note that zero arguments constructs a default instance; one
-%  argument of the class copies the instance; and three or more
-%  arguments constructs a new instance from the arguments.
-%
-%  "Copyright 2009, by the California Institute of Technology.
-%  ALL RIGHTS RESERVED. United States Government Sponsorship
-%  acknowledged. Any commercial use must be negotiated with
-%  the Office of Technology Transfer at the California Institute
-%  of Technology.  (J. Schiermeier, NTR 47078)
-%
-%  This software may be subject to U.S. export control laws.
-%  By accepting this  software, the user agrees to comply with
-%  all applicable U.S. export laws and regulations. User has the
-%  responsibility to obtain export licenses, or other export
-%  authority as may be required before exporting such information
-%  to foreign countries or providing access to foreign persons."
-%
-classdef nonlinear_inequality_constraint
-    properties
-        descriptor='';
-        lower     =-Inf;
-        upper     = 0.;
-        scale_type='none';
-        scale     = 1.;
-    end
-    
-    methods
-        function [nic]=nonlinear_inequality_constraint(varargin)
-
-            switch nargin
-
- %  create a default object
-
-                case 0
-
-%  copy the object
-
-                case 1
-                    if isa(varargin{1},'nonlinear_inequality_constraint')
-                        nic=varargin{1};
-                    else
-                        error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
-                            inputname(1),class(varargin{1}),'nonlinear_inequality_constraint');
-                    end
-
-%  not enough arguments
-
-                case 2
-                    error('Construction of ''%s'' class object requires at least %d inputs.',...
-                        'nonlinear_inequality_constraint',3)
-
-%  create the object from the input
-
-                otherwise
-                    asizec=num2cell(array_size(varargin{1:min(nargin,5)}));
-                    nic(asizec{:})=nonlinear_inequality_constraint;
-                    clear asizec
-                    
-                    if ischar(varargin{1})
-                        varargin{1}=cellstr(varargin{1});
-                    end
-                    for i=1:numel(nic)
-                        if (numel(varargin{1}) > 1)
-                            nic(i).descriptor=varargin{1}{i};
-                        else
-                            nic(i).descriptor=[char(varargin{1}) string_dim(nic,i,'vector')];
-                        end
-                        if (numel(varargin{2}) > 1)
-                            nic(i).lower     =varargin{2}(i);
-                        else
-                            nic(i).lower     =varargin{2};
-                        end
-                        if (numel(varargin{3}) > 1)
-                            nic(i).upper     =varargin{3}(i);
-                        else
-                            nic(i).upper     =varargin{3};
-                        end
-                    end
-
-                    if (nargin >= 4)
-                        if ischar(varargin{4})
-                            varargin{4}=cellstr(varargin{4});
-                        end
-                        for i=1:numel(nic)
-                            if (numel(varargin{4}) > 1)
-                                nic(i).scale_type=varargin{4}{i};
-                            else
-                                nic(i).scale_type=char(varargin{4});
-                            end
-                        end
-                        if (nargin >= 5)
-                            for i=1:numel(nic)
-                                if (numel(varargin{5}) > 1)
-                                    nic(i).scale     =varargin{5}(i);
-                                else
-                                    nic(i).scale     =varargin{5};
-                                end
-                            end
-
-                            if (nargin > 5)
-                                warning('objective_function:extra_arg',...
-                                    'Extra arguments for object of class ''%s''.',...
-                                    class(nic));
-                            end
-                        end
-                    end
-            end
-
-        end
-
-        function []=disp(nic)
-
-%  display the object
-
-            disp(sprintf('\n'));
-            for i=1:numel(nic)
-                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
-                    class(nic),inputname(1),string_dim(nic,i)));
-                disp(sprintf('    descriptor: ''%s'''  ,nic(i).descriptor));
-                disp(sprintf('         lower: %g'      ,nic(i).lower));
-                disp(sprintf('         upper: %g'      ,nic(i).upper));
-                disp(sprintf('    scale_type: ''%s'''  ,nic(i).scale_type));
-                disp(sprintf('         scale: %g\n'    ,nic(i).scale));
-            end
-
-        end
-
-        function [desc]  =prop_desc(nic,dstr)
-            desc=cell(1,numel(nic));
-            for i=1:numel(nic)
-                if ~isempty(nic(i).descriptor)
-                    desc(i)=cellstr(nic(i).descriptor);
-                elseif ~isempty(inputname(1))
-                    desc(i)=cellstr([inputname(1) string_dim(nic,i,'vector')]);
-                elseif exist('dstr','var')
-                    desc(i)=cellstr([dstr         string_dim(nic,i,'vector')]);
-                else
-                    desc(i)=cellstr(['nic'        string_dim(nic,i,'vector')]);
-                end
-            end
-            desc=allempty(desc);
-        end
-        function [stype] =prop_stype(nic)
-            stype=cell(size(nic));
-            for i=1:numel(nic)
-                stype(i)=cellstr(nic(i).scale_type);
-            end
-            stype=allequal(stype,'none');
-        end
-        function [scale] =prop_scale(nic)
-            scale=zeros(size(nic));
-            for i=1:numel(nic)
-                scale(i)=nic(i).scale;
-            end
-            scale=allequal(scale,1.);
-        end
-        function [weight]=prop_weight(nic)
-            weight=[];
-        end
-        function [lower] =prop_lower(nic)
-            lower=zeros(size(nic));
-            for i=1:numel(nic)
-                lower(i)=nic(i).lower;
-            end
-            lower=allequal(lower,-Inf);
-        end
-        function [upper] =prop_upper(nic)
-            upper=zeros(size(nic));
-            for i=1:numel(nic)
-                upper(i)=nic(i).upper;
-            end
-            upper=allequal(upper,0.);
-        end
-        function [target]=prop_target(nic)
-            target=[];
-        end
-    end
-    
-    methods (Static)
-        function [rdesc]=dakota_write(fidi,dresp,rdesc)
-
-%  collect only the responses of the appropriate class
-
-            nic=struc_class(dresp,'nonlinear_inequality_constraint');
-
-%  write responses
-
-            [rdesc]=rlist_write(fidi,'nonlinear_inequality_constraints','nonlinear_inequality',nic,rdesc);
-        end
-
-        function []=dakota_rlev_write(fidi,dresp,params)
-        end
-    end
-end
Index: sm/trunk/src/m/classes/normal_uncertain.m
===================================================================
--- /issm/trunk/src/m/classes/normal_uncertain.m	(revision 9547)
+++ 	(revision )
@@ -1,208 +1,0 @@
-%
-%  definition for the normal_uncertain class.
-%
-%  [nuv]=normal_uncertain(varargin)
-%
-%  where the required varargin are:
-%    descriptor    (char, description, '')
-%    mean          (double, mean, NaN)
-%    stddev        (double, standard deviation, NaN)
-%  and the optional varargin and defaults are:
-%    lower         (double, lower bound, -Inf)
-%    upper         (double, upper bound,  Inf)
-%
-%  note that zero arguments constructs a default instance; one
-%  argument of the class copies the instance; and three or more
-%  arguments constructs a new instance from the arguments.
-%
-%  "Copyright 2009, by the California Institute of Technology.
-%  ALL RIGHTS RESERVED. United States Government Sponsorship
-%  acknowledged. Any commercial use must be negotiated with
-%  the Office of Technology Transfer at the California Institute
-%  of Technology.  (J. Schiermeier, NTR 47078)
-%
-%  This software may be subject to U.S. export control laws.
-%  By accepting this  software, the user agrees to comply with
-%  all applicable U.S. export laws and regulations. User has the
-%  responsibility to obtain export licenses, or other export
-%  authority as may be required before exporting such information
-%  to foreign countries or providing access to foreign persons."
-%
-classdef normal_uncertain
-    properties
-        descriptor='';
-        mean      = NaN;
-        stddev    = NaN;
-        lower     =-Inf;
-        upper     = Inf;
-    end
-    
-    methods
-        function [nuv]=normal_uncertain(varargin)
-
-            switch nargin
-
-%  create a default object
-
-                case 0
-
-%  copy the object
-
-                case 1
-                    if isa(varargin{1},'normal_uncertain')
-                        nuv=varargin{1};
-                    else
-                        error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
-                            inputname(1),class(varargin{1}),'normal_uncertain');
-                    end
-
-%  not enough arguments
-
-                case 2
-                    error('Construction of ''%s'' class object requires at least %d inputs.',...
-                        'normal_uncertain',3)
-
-%  create the object from the input
-
-                otherwise
-                    asizec=num2cell(array_size(varargin{1:min(nargin,5)}));
-                    nuv(asizec{:})=normal_uncertain;
-                    clear asizec
-                    
-                    if ischar(varargin{1})
-                        varargin{1}=cellstr(varargin{1});
-                    end
-                    for i=1:numel(nuv)
-                        if (numel(varargin{1}) > 1)
-                            nuv(i).descriptor=varargin{1}{i};
-                        else
-                            if numel(nuv)==1,
-								nuv(i).descriptor=char(varargin{1});
-							else
-								nuv(i).descriptor=[char(varargin{1}) num2str(i)];
-							end
-                        end
-                        if (numel(varargin{2}) > 1)
-                            nuv(i).mean      =varargin{2}(i);
-                        else
-                            nuv(i).mean      =varargin{2};
-                        end
-                        if (numel(varargin{3}) > 1)
-                            nuv(i).stddev    =varargin{3}(i);
-                        else
-                            nuv(i).stddev    =varargin{3};
-                        end
-                    end
-
-                    if (nargin >= 4)
-                        for i=1:numel(nuv)
-                            if (numel(varargin{4}) > 1)
-                                nuv(i).lower     =varargin{4}(i);
-                            else
-                                nuv(i).lower     =varargin{4};
-                            end
-                        end
-                        if (nargin >= 5)
-                            for i=1:numel(nuv)
-                                if (numel(varargin{5}) > 1)
-                                    nuv(i).upper     =varargin{5}(i);
-                                else
-                                    nuv(i).upper     =varargin{5};
-                                end
-                            end
-                            if (nargin > 5)
-                                warning('normal_uncertain:extra_arg',...
-                                    'Extra arguments for object of class ''%s''.',...
-                                    class(nuv));
-                            end
-                        end
-                    end
-            end
-
-        end
-
-        function []=disp(nuv)
-
-%  display the object
-
-            disp(sprintf('\n'));
-            for i=1:numel(nuv)
-                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
-                    class(nuv),inputname(1),string_dim(nuv,i)));
-                disp(sprintf('    descriptor: ''%s'''  ,nuv(i).descriptor));
-                disp(sprintf('          mean: %g'      ,nuv(i).mean));
-                disp(sprintf('        stddev: %g'      ,nuv(i).stddev));
-                disp(sprintf('         lower: %g'      ,nuv(i).lower));
-                disp(sprintf('         upper: %g\n'    ,nuv(i).upper));
-            end
-
-        end
-
-        function [desc]  =prop_desc(nuv,dstr)
-            desc=cell(1,numel(nuv));
-            for i=1:numel(nuv)
-                if ~isempty(nuv(i).descriptor)
-                    desc(i)=cellstr(nuv(i).descriptor);
-                elseif ~isempty(inputname(1))
-                    desc(i)=cellstr([inputname(1) string_dim(nuv,i,'vector')]);
-                elseif exist('dstr','var')
-                    desc(i)=cellstr([dstr         string_dim(nuv,i,'vector')]);
-                else
-                    desc(i)=cellstr(['nuv'        string_dim(nuv,i,'vector')]);
-                end
-            end
-            desc=allempty(desc);
-        end
-        function [initpt]=prop_initpt(nuv)
-            initpt=[];
-        end
-        function [lower] =prop_lower(nuv)
-            lower=zeros(1,numel(nuv));
-            for i=1:numel(nuv)
-                lower(i)=nuv(i).lower;
-            end
-            lower=allequal(lower,-Inf);
-        end
-        function [upper] =prop_upper(nuv)
-            upper=zeros(1,numel(nuv));
-            for i=1:numel(nuv)
-                upper(i)=nuv(i).upper;
-            end
-            upper=allequal(upper, Inf);
-        end
-        function [mean]  =prop_mean(nuv)
-            mean=zeros(1,numel(nuv));
-            for i=1:numel(nuv)
-                mean(i)=nuv(i).mean;
-            end
-        end
-        function [stddev]=prop_stddev(nuv)
-            stddev=zeros(1,numel(nuv));
-            for i=1:numel(nuv)
-                stddev(i)=nuv(i).stddev;
-            end
-        end
-        function [initst]=prop_initst(nuv)
-            initst=[];
-        end
-        function [stype] =prop_stype(nuv)
-            stype={};
-        end
-        function [scale] =prop_scale(nuv)
-            scale=[];
-        end
-    end
-    
-    methods (Static)
-        function []=dakota_write(fidi,dvar)
-
-%  collect only the variables of the appropriate class
-
-            nuv=struc_class(dvar,'normal_uncertain');
-
-%  write variables
-
-            vlist_write(fidi,'normal_uncertain','nuv',nuv);
-        end
-    end
-end
Index: sm/trunk/src/m/classes/objective_function.m
===================================================================
--- /issm/trunk/src/m/classes/objective_function.m	(revision 9547)
+++ 	(revision )
@@ -1,187 +1,0 @@
-%
-%  definition for the objective_function class.
-%
-%  [of]=objective_function(varargin)
-%
-%  where the required varargin are:
-%    descriptor    (char, description, '')
-%  and the optional varargin and defaults are:
-%    scale_type    (char, scaling type, 'none')
-%    scale         (double, scaling factor, 1.)
-%    weight        (double, weighting factor, 1.)
-%
-%  note that zero arguments constructs a default instance; one
-%  argument of the class copies the instance; and one or more
-%  arguments constructs a new instance from the arguments.
-%
-%  "Copyright 2009, by the California Institute of Technology.
-%  ALL RIGHTS RESERVED. United States Government Sponsorship
-%  acknowledged. Any commercial use must be negotiated with
-%  the Office of Technology Transfer at the California Institute
-%  of Technology.  (J. Schiermeier, NTR 47078)
-%
-%  This software may be subject to U.S. export control laws.
-%  By accepting this  software, the user agrees to comply with
-%  all applicable U.S. export laws and regulations. User has the
-%  responsibility to obtain export licenses, or other export
-%  authority as may be required before exporting such information
-%  to foreign countries or providing access to foreign persons."
-%
-classdef objective_function
-    properties
-        descriptor='';
-        scale_type='none';
-        scale     = 1.;
-        weight    = 1.;
-    end
-    
-    methods
-        function [of]=objective_function(varargin)
-
-            switch nargin
-
-%  create a default object
-
-                case 0
-
-%  copy the object or create the object from the input
-
-                otherwise
-                    if  (nargin == 1) && isa(varargin{1},'objective_function')
-                        of=varargin{1};
-                    else
-                        asizec=num2cell(array_size(varargin{1:min(nargin,4)}));
-                        of(asizec{:})=objective_function;
-                        clear asizec
-                    
-                        if ischar(varargin{1})
-                            varargin{1}=cellstr(varargin{1});
-                        end
-                        for i=1:numel(of)
-                            if (numel(varargin{1}) > 1)
-                                of(i).descriptor=varargin{1}{i};
-                            else
-                                of(i).descriptor=[char(varargin{1}) string_dim(of,i,'vector')];
-                            end
-                        end
-
-                        if (nargin >= 2)
-                            if ischar(varargin{2})
-                                varargin{2}=cellstr(varargin{2});
-                            end
-                            for i=1:numel(of)
-                                if (numel(varargin{2}) > 1)
-                                    of(i).scale_type=varargin{2}{i};
-                                else
-                                    of(i).scale_type=char(varargin{2});
-                                end
-                            end
-                            if (nargin >= 3)
-                                for i=1:numel(of)
-                                    if (numel(varargin{3}) > 1)
-                                        of(i).scale     =varargin{3}(i);
-                                    else
-                                        of(i).scale     =varargin{3};
-                                    end
-                                end
-                                if (nargin >= 4)
-                                    for i=1:numel(of)
-                                        if (numel(varargin{4}) > 1)
-                                            of(i).weight    =varargin{4}(i);
-                                        else
-                                            of(i).weight    =varargin{4};
-                                        end
-                                    end
-
-                                    if (nargin > 4)
-                                        warning('objective_function:extra_arg',...
-                                            'Extra arguments for object of class ''%s''.',...
-                                            class(of));
-                                    end
-                                end
-                            end
-                        end
-                    end
-            end
-
-        end
-
-        function []=disp(of)
-
-%  display the object
-
-            disp(sprintf('\n'));
-            for i=1:numel(of)
-                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
-                    class(of),inputname(1),string_dim(of,i)));
-                disp(sprintf('    descriptor: ''%s'''  ,of(i).descriptor));
-                disp(sprintf('    scale_type: ''%s'''  ,of(i).scale_type));
-                disp(sprintf('         scale: %g'      ,of(i).scale));
-                disp(sprintf('        weight: %g\n'    ,of(i).weight));
-            end
-
-        end
-
-        function [desc]  =prop_desc(of,dstr)
-            desc=cell(1,numel(of));
-            for i=1:numel(of)
-                if ~isempty(of(i).descriptor)
-                    desc(i)=cellstr(of(i).descriptor);
-                elseif ~isempty(inputname(1))
-                    desc(i)=cellstr([inputname(1) string_dim(of,i,'vector')]);
-                elseif exist('dstr','var')
-                    desc(i)=cellstr([dstr         string_dim(of,i,'vector')]);
-                else
-                    desc(i)=cellstr(['of'         string_dim(of,i,'vector')]);
-                end
-            end
-            desc=allempty(desc);
-        end
-        function [stype] =prop_stype(of)
-            stype=cell(1,numel(of));
-            for i=1:numel(of)
-                stype(i)=cellstr(of(i).scale_type);
-            end
-            stype=allequal(stype,'none');
-        end
-        function [scale] =prop_scale(of)
-            scale=zeros(1,numel(of));
-            for i=1:numel(of)
-                scale(i)=of(i).scale;
-            end
-            scale=allequal(scale,1.);
-        end
-        function [weight]=prop_weight(of)
-            weight=zeros(1,numel(of));
-            for i=1:numel(of)
-                weight(i)=of(i).weight;
-            end
-            weight=allequal(weight,1.);
-        end
-        function [lower] =prop_lower(of)
-            lower=[];
-        end
-        function [upper] =prop_upper(of)
-            upper=[];
-        end
-        function [target]=prop_target(of)
-            target=[];
-        end
-    end
-    
-    methods (Static)
-        function [rdesc]=dakota_write(fidi,dresp,rdesc)
-
-%  collect only the responses of the appropriate class
-
-            of=struc_class(dresp,'objective_function');
-
-%  write responses
-
-            [rdesc]=rlist_write(fidi,'objective_functions','objective_function',of,rdesc);
-        end
-
-        function []=dakota_rlev_write(fidi,dresp,params)
-        end
-    end
-end
Index: sm/trunk/src/m/classes/planet.m
===================================================================
--- /issm/trunk/src/m/classes/planet.m	(revision 9547)
+++ 	(revision )
@@ -1,48 +1,0 @@
-%PLANET class definition
-%
-%   Usage:
-%      md = planet(varargin)
-
-classdef planet < model
-    properties (SetAccess=public) %Planet fields
-		 % {{{1
-		 %Planet specific fields
-		 r=NaN;
-		 theta=NaN;
-		 phi=NaN;
-		 %}}}
-	 end
-	 methods
-		function md=planetmesh(md,varargin) % {{{1
-		%PLANETMESH: build 2d shell mesh
-		%
-		% Usage: md=planetmesh(md,'method','mixed','radius',6378000,'angleresol',1);
-		%        md=planetmesh(md,'method','tria','shape','iso','radius',6378000,'refinement',5);
-		%
-
-		%recover options
-		options=pairoptions(varargin{:});
-
-		method=getfieldvalue(options,'method','mixed');
-		
-		if strcmpi(method,'mixed'),
-			%recover radius and angleresol: 
-			radius=getfieldvalue(options,'radius',6378000); %earth radius as default
-			angleresol=getfieldvalue(options,'angleresol',10); %10 degree resolution
-			
-			%call mixed mesh 
-			md=planetmixedmesh(md,radius,angleresol);
-		else
-			%recover radius, shape and level of refinmenet
-			radius=getfieldvalue(options,'radius',6378000); %earth radius as default
-			refinement=getfieldvalue(options,'refinement',5); %refine 5 times
-			shape=getfieldvalue(options,'shape','ico'); 
-			
-			%call triangular mesh
-			md=planettrimesh(md,shape,radius,refinement);
-		end
-
-		end
-		% }}}
-	 end
- end
Index: /issm/trunk/src/m/classes/qmu/@dakota_method/dakota_method.m
===================================================================
--- /issm/trunk/src/m/classes/qmu/@dakota_method/dakota_method.m	(revision 9548)
+++ /issm/trunk/src/m/classes/qmu/@dakota_method/dakota_method.m	(revision 9548)
@@ -0,0 +1,872 @@
+%
+%  definition for the dakota_method class.
+%
+%  [dm]=dakota_method(method)
+%
+%  where the required input is:
+%    method       (char, beginning of method name)
+%
+%  and the output properties and defaults are:
+%    method       (char, full method name, '')
+%    type         (char, type of method, '')
+%    variables    (cell array, applicable variable types, {})
+%    lcspec       (cell array, linear constraint specs, {})
+%    responses    (cell array, applicable response types, {})
+%    ghspec       (cell array, gradient and hessian specs, {})
+%    params       (structure, method-dependent parameters, [])
+%
+%  this class is used to guide the writing of a dakota input
+%  file for the specified dakota_method.
+%
+%  note that zero arguments constructs a default instance; one
+%  argument of the class copies the instance; and one argument
+%  with enough characters to match a unique method constructs
+%  a new instance of that method.
+%
+%  "Copyright 2009, by the California Institute of Technology.
+%  ALL RIGHTS RESERVED. United States Government Sponsorship
+%  acknowledged. Any commercial use must be negotiated with
+%  the Office of Technology Transfer at the California Institute
+%  of Technology.  (J. Schiermeier, NTR 47078)
+%
+%  This software may be subject to U.S. export control laws.
+%  By accepting this  software, the user agrees to comply with
+%  all applicable U.S. export laws and regulations. User has the
+%  responsibility to obtain export licenses, or other export
+%  authority as may be required before exporting such information
+%  to foreign countries or providing access to foreign persons."
+%
+classdef dakota_method
+    properties (SetAccess=private)
+        method   ='';
+        type     ='';
+        variables={};
+        lcspec   ={};
+        responses={};
+        ghspec   ={};
+    end
+    properties
+        params   =struct();
+    end
+    
+    methods
+        function [dm]=dakota_method(method)
+
+            switch nargin
+
+%  create a default object
+
+                case 0
+
+%  copy the object or create the object from the input
+
+                case 1
+                    if  (nargin == 1) && isa(method,'dakota_method')
+                        dm=method;
+                    else
+                        mlist={...
+                            'dot_bfgs',...
+                            'dot_frcg',...
+                            'dot_mmfd',...
+                            'dot_slp',...
+                            'dot_sqp',...
+                            'npsol_sqp',...
+                            'conmin_frcg',...
+                            'conmin_mfd',...
+                            'optpp_cg',...
+                            'optpp_q_newton',...
+                            'optpp_fd_newton',...
+                            'optpp_newton',...
+                            'optpp_pds',...
+                            'asynch_pattern_search',...
+                            'coliny_cobyla',...
+                            'coliny_direct',...
+                            'coliny_ea',...
+                            'coliny_pattern_search',...
+                            'coliny_solis_wets',...
+                            'ncsu_direct',...
+                            'surrogate_based_local',...
+                            'surrogate_based_global',...
+                            'moga',...
+                            'soga',...
+                            'nl2sol',...
+                            'nlssol_sqp',...
+                            'optpp_g_newton',...
+                            'nond_sampling',...
+                            'nond_local_reliability',...
+                            'nond_global_reliability',...
+                            'nond_polynomial_chaos',...
+                            'nond_stoch_collocation',...
+                            'nond_evidence',...
+                            'dace',...
+                            'fsu_quasi_mc',...
+                            'fsu_cvt',...
+                            'vector_parameter_study',...
+                            'list_parameter_study',...
+                            'centered_parameter_study',...
+                            'multidim_parameter_study',...
+                            };
+
+                        mlist2={};
+                        for i=1:length(mlist)
+                            if strncmpi(method,mlist{i},length(method))
+                                mlist2(end+1)=mlist(i);
+                            end
+                        end
+
+%  check for a unique match in the list of methods
+
+                        switch length(mlist2)
+                            case 0
+                                error('Unrecognized method: ''%s''.',...
+                                    method);
+                            case 1
+                                dm.method=mlist2{1};
+                            otherwise
+                                error('Non-unique method: ''%s'' matches %s.',...
+                                    method,string_cell(mlist2));
+                        end
+
+%  assign the default values for the method
+
+                        switch dm.method
+                            case {'dot_bfgs',...
+                                  'dot_frcg'}
+                                dm.type     ='dot';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'objective_function'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.convergence_tolerance=false;
+                                dm.params.constraint_tolerance=false;
+                                dm.params.output=false;
+                                dm.params.speculative=false;
+                                dm.params.scaling=false;
+                                dm.params.optimization_type='minimize';
+                            case {'dot_mmfd',...
+                                  'dot_slp',...
+                                  'dot_sqp'}
+                                dm.type     ='dot';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={'linear_inequality_constraint',...
+                                              'linear_equality_constraint'};
+                                dm.responses={'objective_function',...
+                                              'nonlinear_inequality_constraint',...
+                                              'nonlinear_equality_constraint'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.convergence_tolerance=false;
+                                dm.params.constraint_tolerance=false;
+                                dm.params.output=false;
+                                dm.params.speculative=false;
+                                dm.params.scaling=false;
+                                dm.params.optimization_type='minimize';
+
+                            case {'npsol_sqp'}
+                                dm.type     ='npsol';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={'linear_inequality_constraint',...
+                                              'linear_equality_constraint'};
+                                dm.responses={'objective_function',...
+                                              'nonlinear_inequality_constraint',...
+                                              'nonlinear_equality_constraint'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.convergence_tolerance=false;
+                                dm.params.constraint_tolerance=false;
+                                dm.params.output=false;
+                                dm.params.speculative=false;
+                                dm.params.scaling=false;
+                                dm.params.verify_level=-1;
+                                dm.params.function_precision=1.e-10;
+                                dm.params.linesearch_tolerance=0.9;
+
+                            case {'conmin_frcg'}
+                                dm.type     ='conmin';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'objective_function'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.convergence_tolerance=false;
+                                dm.params.constraint_tolerance=false;
+                                dm.params.output=false;
+                                dm.params.speculative=false;
+                                dm.params.scaling=false;
+                            case {'conmin_mfd'}
+                                dm.type     ='conmin';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={'linear_inequality_constraint',...
+                                              'linear_equality_constraint'};
+                                dm.responses={'objective_function',...
+                                              'nonlinear_inequality_constraint',...
+                                              'nonlinear_equality_constraint'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.convergence_tolerance=false;
+                                dm.params.constraint_tolerance=false;
+                                dm.params.output=false;
+                                dm.params.speculative=false;
+                                dm.params.scaling=false;
+
+                            case {'optpp_cg'}
+                                dm.type     ='optpp';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'objective_function'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.convergence_tolerance=false;
+                                dm.params.output=false;
+                                dm.params.speculative=false;
+                                dm.params.scaling=false;
+                                dm.params.max_step=1000.;
+                                dm.params.gradient_tolerance=1.e-4;
+                            case {'optpp_q_newton',...
+                                  'optpp_fd_newton',...
+                                  'optpp_newton'}
+                                dm.type     ='optpp';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={'linear_inequality_constraint',...
+                                              'linear_equality_constraint'};
+                                dm.responses={'objective_function',...
+                                              'nonlinear_inequality_constraint',...
+                                              'nonlinear_equality_constraint'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.convergence_tolerance=false;
+                                dm.params.output=false;
+                                dm.params.speculative=false;
+                                dm.params.scaling=false;
+                                dm.params.value_based_line_search=false;
+                                dm.params.gradient_based_line_search=false;
+                                dm.params.trust_region=false;
+                                dm.params.tr_pds=false;
+                                dm.params.max_step=1000.;
+                                dm.params.gradient_tolerance=1.e-4;
+                                dm.params.merit_function='argaez_tapia';
+                                dm.params.central_path=dm.params.merit_function;
+                                dm.params.steplength_to_boundary=0.99995;
+                                dm.params.centering_parameter=0.2;
+                            case {'optpp_pds'}
+                                dm.type     ='optpp';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'objective_function'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.convergence_tolerance=false;
+                                dm.params.output=false;
+                                dm.params.speculative=false;
+                                dm.params.scaling=false;
+                                dm.params.search_scheme_size=32;
+
+                            case {'asynch_pattern_search'}
+                                dm.type     ='apps';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={'linear_inequality_constraint',...
+                                              'linear_equality_constraint'};
+                                dm.responses={'objective_function',...
+                                              'nonlinear_inequality_constraint',...
+                                              'nonlinear_equality_constraint'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_function_evaluations=false;
+                                dm.params.constraint_tolerance=false;
+                                dm.params.output=false;
+                                dm.params.scaling=false;
+                                dm.params.initial_delta=1.0;
+                                dm.params.threshold_delta=0.01;
+                                dm.params.contraction_factor=0.5;
+                                dm.params.solution_target=false;
+                                dm.params.synchronization='nonblocking';
+                                dm.params.merit_function='merit2_smooth';
+                                dm.params.constraint_penalty=1.0;
+                                dm.params.smoothing_factor=1.0;
+
+                            case {'coliny_cobyla'}
+                                dm.type     ='coliny';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'objective_function',...
+                                              'nonlinear_inequality_constraint',...
+                                              'nonlinear_equality_constraint'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.convergence_tolerance=false;
+                                dm.params.output=false;
+                                dm.params.scaling=false;
+                                dm.params.show_misc_options=false;
+                                dm.params.misc_options={};
+                                dm.params.solution_accuracy=-Inf;
+                                dm.params.initial_delta=[];
+                                dm.params.threshold_delta=[];
+                            case {'coliny_direct'}
+                                dm.type     ='coliny';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'objective_function',...
+                                              'nonlinear_inequality_constraint',...
+                                              'nonlinear_equality_constraint'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.convergence_tolerance=false;
+                                dm.params.output=false;
+                                dm.params.scaling=false;
+                                dm.params.show_misc_options=false;
+                                dm.params.misc_options={};
+                                dm.params.solution_accuracy=-Inf;
+                                dm.params.division='major_dimension';
+                                dm.params.global_balance_parameter=0.0;
+                                dm.params.local_balance_parameter=1.e-8;
+                                dm.params.max_boxsize_limit=0.0;
+                                dm.params.min_boxsize_limit=0.0001;
+                                dm.params.constraint_penalty=1000.0;
+                            case {'coliny_ea'}
+                                dm.type     ='coliny';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'objective_function',...
+                                              'nonlinear_inequality_constraint',...
+                                              'nonlinear_equality_constraint'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.convergence_tolerance=false;
+                                dm.params.output=false;
+                                dm.params.scaling=false;
+                                dm.params.show_misc_options=false;
+                                dm.params.misc_options={};
+                                dm.params.solution_accuracy=-Inf;
+                                dm.params.seed=false;
+                                dm.params.population_size=50;
+                                dm.params.initialization_type='unique_random';
+                                dm.params.fitness_type='linear_rank';
+                                dm.params.replacement_type='elitist';
+                                dm.params.random=[];
+                                dm.params.chc=[];
+                                dm.params.elitist=[];
+                                dm.params.new_solutions_generated='population_size - replacement_size';
+                                dm.params.crossover_type='two_point';
+                                dm.params.crossover_rate=0.8;
+                                dm.params.mutation_type='offset_normal';
+                                dm.params.mutation_scale=0.1;
+                                dm.params.mutation_range=1;
+                                dm.params.dimension_ratio=1.0;
+                                dm.params.mutation_rate=1.0;
+                                dm.params.non_adaptive=false;
+                            case {'coliny_pattern_search'}
+                                dm.type     ='coliny';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'objective_function',...
+                                              'nonlinear_inequality_constraint',...
+                                              'nonlinear_equality_constraint'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.convergence_tolerance=false;
+                                dm.params.output=false;
+                                dm.params.scaling=false;
+                                dm.params.show_misc_options=false;
+                                dm.params.misc_options={};
+                                dm.params.solution_accuracy=-Inf;
+                                dm.params.stochastic=false;
+                                dm.params.seed=false;
+                                dm.params.initial_delta=[];
+                                dm.params.threshold_delta=[];
+                                dm.params.constraint_penalty=1.0;
+                                dm.params.constant_penalty=false;
+                                dm.params.pattern_basis='coordinate';
+                                dm.params.total_pattern_size=false;
+                                dm.params.no_expansion=false;
+                                dm.params.expand_after_success=1;
+                                dm.params.contraction_factor=0.5;
+                                dm.params.synchronization='nonblocking';
+                                dm.params.exploratory_moves='basic_pattern';
+                            case {'coliny_solis_wets'}
+                                dm.type     ='coliny';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'objective_function',...
+                                              'nonlinear_inequality_constraint',...
+                                              'nonlinear_equality_constraint'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.convergence_tolerance=false;
+                                dm.params.output=false;
+                                dm.params.scaling=false;
+                                dm.params.show_misc_options=false;
+                                dm.params.misc_options={};
+                                dm.params.solution_accuracy=-Inf;
+                                dm.params.seed=false;
+                                dm.params.initial_delta=[];
+                                dm.params.threshold_delta=[];
+                                dm.params.no_expansion=false;
+                                dm.params.expand_after_success=5;
+                                dm.params.contract_after_failure=3;
+                                dm.params.contraction_factor=0.5;
+                                dm.params.constraint_penalty=1.0;
+                                dm.params.constant_penalty=false;
+
+                            case {'ncsu_direct'}
+                                dm.type     ='ncsu';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={'linear_inequality_constraint',...
+                                              'linear_equality_constraint'};  %  ?
+                                dm.responses={'objective_function',...
+                                              'nonlinear_inequality_constraint',...
+                                              'nonlinear_equality_constraint'};  %  ?
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.scaling=false;
+                                dm.params.solution_accuracy=0.;
+                                dm.params.min_boxsize_limit=1.e-8;
+                                dm.params.vol_boxsize_limit=1.e-8;
+
+%                             case {'surrogate_based_local',...
+%                                   'surrogate_based_global'}
+
+                            case {'moga'}
+                                dm.type     ='jega';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={'linear_inequality_constraint',...
+                                              'linear_equality_constraint'};
+                                dm.responses={'objective_function',...
+                                              'nonlinear_inequality_constraint',...
+                                              'nonlinear_equality_constraint'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.output=false;
+                                dm.params.scaling=false;
+                                dm.params.seed=false;
+                                dm.params.log_file='JEGAGlobal.log';
+                                dm.params.population_size=50;
+                                dm.params.print_each_pop=false;
+%                               according to documentation, uses method-independent control
+%                               dm.params.output='normal';
+                                dm.params.initialization_type='unique_random';
+                                dm.params.mutation_type='replace_uniform';
+                                dm.params.mutation_scale=0.15;
+                                dm.params.mutation_rate=0.08;
+                                dm.params.replacement_type='';
+                                dm.params.below_limit=6;
+                                dm.params.shrinkage_percentage=0.9;
+                                dm.params.crossover_type='shuffle_random';
+                                dm.params.multi_point_binary=[];
+                                dm.params.multi_point_parameterized_binary=[];
+                                dm.params.multi_point_real=[];
+                                dm.params.shuffle_random=[];
+                                dm.params.num_parents=2;
+                                dm.params.num_offspring=2;
+                                dm.params.crossover_rate=0.8;
+                                dm.params.fitness_type='';
+                                dm.params.niching_type=false;
+                                dm.params.radial=[0.01];
+                                dm.params.distance=[0.01];
+                                dm.params.metric_tracker=false;
+                                dm.params.percent_change=0.1;
+                                dm.params.num_generations=10;
+                                dm.params.postprocessor_type=false;
+                                dm.params.orthogonal_distance=[0.01];
+                            case {'soga'}
+                                dm.type     ='jega';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={'linear_inequality_constraint',...
+                                              'linear_equality_constraint'};
+                                dm.responses={'objective_function',...
+                                              'nonlinear_inequality_constraint',...
+                                              'nonlinear_equality_constraint'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.output=false;
+                                dm.params.scaling=false;
+                                dm.params.seed=false;
+                                dm.params.log_file='JEGAGlobal.log';
+                                dm.params.population_size=50;
+                                dm.params.print_each_pop=false;
+                                dm.params.output='normal';
+                                dm.params.initialization_type='unique_random';
+                                dm.params.mutation_type='replace_uniform';
+                                dm.params.mutation_scale=0.15;
+                                dm.params.mutation_rate=0.08;
+                                dm.params.replacement_type='';
+                                dm.params.below_limit=6;
+                                dm.params.shrinkage_percentage=0.9;
+                                dm.params.crossover_type='shuffle_random';
+                                dm.params.multi_point_binary=[];
+                                dm.params.multi_point_parameterized_binary=[];
+                                dm.params.multi_point_real=[];
+                                dm.params.shuffle_random=[];
+                                dm.params.num_parents=2;
+                                dm.params.num_offspring=2;
+                                dm.params.crossover_rate=0.8;
+                                dm.params.fitness_type='merit_function';
+                                dm.params.constraint_penalty=1.0;
+                                dm.params.replacement_type='';
+                                dm.params.convergence_type=false;
+                                dm.params.num_generations=10;
+                                dm.params.percent_change=0.1;
+
+                            case {'nl2sol'}
+                                dm.type     ='lsq';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'least_squares_term'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.convergence_tolerance=false;
+                                dm.params.output=false;
+                                dm.params.scaling=false;
+                                dm.params.function_precision=1.e-10;
+                                dm.params.absolute_conv_tol=-1.;
+                                dm.params.x_conv_tol=-1.;
+                                dm.params.singular_conv_tol=-1.;
+                                dm.params.singular_radius=-1.;
+                                dm.params.false_conv_tol=-1.;
+                                dm.params.initial_trust_radius=-1.;
+                                dm.params.covariance=0;
+                                dm.params.regression_diagnostics=false;
+                            case {'nlssol_sqp'}
+                                dm.type     ='lsq';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={'linear_inequality_constraint',...
+                                              'linear_equality_constraint'};
+                                dm.responses={'least_squares_term',...
+                                              'nonlinear_inequality_constraint',...
+                                              'nonlinear_equality_constraint'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.convergence_tolerance=false;
+                                dm.params.constraint_tolerance=false;
+                                dm.params.output=false;
+                                dm.params.speculative=false;
+                                dm.params.scaling=false;
+                                dm.params.verify_level=-1;
+                                dm.params.function_precision=1.e-10;
+                                dm.params.linesearch_tolerance=0.9;
+                            case {'optpp_g_newton'}
+                                dm.type     ='lsq';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={'linear_inequality_constraint',...
+                                              'linear_equality_constraint'};
+                                dm.responses={'least_squares_term',...
+                                              'nonlinear_inequality_constraint',...
+                                              'nonlinear_equality_constraint'};
+                                dm.ghspec   ={'grad'};
+                                dm.params.max_iterations=false;
+                                dm.params.max_function_evaluations=false;
+                                dm.params.convergence_tolerance=false;
+                                dm.params.output=false;
+                                dm.params.speculative=false;
+                                dm.params.scaling=false;
+                                dm.params.value_based_line_search=false;
+                                dm.params.gradient_based_line_search=false;
+                                dm.params.trust_region=false;
+                                dm.params.tr_pds=false;
+                                dm.params.max_step=1000.;
+                                dm.params.gradient_tolerance=1.e-4;
+                                dm.params.merit_function='argaez_tapia';
+                                dm.params.central_path=dm.params.merit_function;
+                                dm.params.steplength_to_boundary=0.99995;
+                                dm.params.centering_parameter=0.2;
+
+                            case {'nond_sampling'}
+                                dm.type     ='nond';
+                                dm.variables={'normal_uncertain',...
+                                              'uniform_uncertain',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'response_function'};
+                                dm.ghspec   ={};
+%                               not documented, but apparently works
+                                dm.params.output=false;
+                                dm.params.seed=false;
+                                dm.params.fixed_seed=false;
+                                dm.params.samples=false;
+                                dm.params.sample_type='lhs';
+                                dm.params.all_variables=false;
+                                dm.params.variance_based_decomp=false;
+                                dm.params.previous_samples=0;
+                            case {'nond_local_reliability'}
+                                dm.type     ='nond';
+                                dm.variables={'normal_uncertain',...
+                                              'uniform_uncertain',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'response_function'};
+                                dm.ghspec   ={'grad'};
+%                               not documented, but may work
+                                dm.params.output=false;
+                                dm.params.max_iterations=false;
+                                dm.params.convergence_tolerance=false;
+                                dm.params.mpp_search=false;
+                                dm.params.sqp=false;
+                                dm.params.nip=false;
+                                dm.params.integration='first_order';
+                                dm.params.refinement=false;
+                                dm.params.samples=0;
+                                dm.params.seed=false;
+                            case {'nond_global_reliability'}
+                                dm.type     ='nond';
+                                dm.variables={'normal_uncertain',...
+                                              'uniform_uncertain',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'response_function'};
+                                dm.ghspec   ={'grad'};
+%                               not documented, but may work
+                                dm.params.output=false;
+                                dm.params.x_gaussian_process=false;
+                                dm.params.u_gaussian_process=false;
+                                dm.params.all_variables=false;
+                                dm.params.seed=false;
+                            case {'nond_polynomial_chaos'}
+                                dm.type     ='nond';
+                                dm.variables={'normal_uncertain',...
+                                              'uniform_uncertain',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'response_function'};
+                                dm.ghspec   ={'grad'};
+%                               not documented, but may work
+                                dm.params.output=false;
+                                dm.params.expansion_order=[];
+                                dm.params.expansion_terms=[];
+                                dm.params.quadrature_order=[];
+                                dm.params.sparse_grid_level=[];
+                                dm.params.expansion_samples=[];
+                                dm.params.incremental_lhs=false;
+                                dm.params.collocation_points=[];
+                                dm.params.collocation_ratio=[];
+                                dm.params.reuse_samples=false;
+                                dm.params.expansion_import_file='';
+                                dm.params.seed=false;
+                                dm.params.fixed_seed=false;
+                                dm.params.samples=0;
+                                dm.params.sample_type='lhs';
+                                dm.params.all_variables=false;
+                            case {'nond_stoch_collocation'}
+                                dm.type     ='nond';
+                                dm.variables={'normal_uncertain',...
+                                              'uniform_uncertain',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'response_function'};
+                                dm.ghspec   ={'grad'};
+%                               not documented, but may work
+                                dm.params.output=false;
+                                dm.params.quadrature_order=[];
+                                dm.params.sparse_grid_level=[];
+                                dm.params.seed=false;
+                                dm.params.fixed_seed=false;
+                                dm.params.samples=0;
+                                dm.params.sample_type='lhs';
+                                dm.params.all_variables=false;
+                            case {'nond_evidence'}
+                                dm.type     ='nond';
+                                dm.variables={'normal_uncertain',...
+                                              'uniform_uncertain',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'response_function'};
+                                dm.ghspec   ={'grad'};
+%                               not documented, but may work
+                                dm.params.output=false;
+                                dm.params.seed=false;
+                                dm.params.samples=10000;
+
+                            case {'dace'}
+                                dm.type     ='dace';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'objective_function',...
+                                              'response_function'};
+                                dm.ghspec   ={};
+                                dm.params.grid=false;
+                                dm.params.random=false;
+                                dm.params.oas=false;
+                                dm.params.lhs=false;
+                                dm.params.oa_lhs=false;
+                                dm.params.box_behnken=false;
+                                dm.params.central_composite=false;
+                                dm.params.seed=false;
+                                dm.params.fixed_seed=false;
+                                dm.params.samples=false;
+                                dm.params.symbols=false;
+                                dm.params.quality_metrics=false;
+                                dm.params.variance_based_decomp=false;
+                            case {'fsu_quasi_mc'}
+                                dm.type     ='dace';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'objective_function',...
+                                              'response_function'};
+                                dm.ghspec   ={};
+                                dm.params.halton=false;
+                                dm.params.hammersley=false;
+                                dm.params.samples=0;
+                                dm.params.sequence_start=[0];
+                                dm.params.sequence_leap=[1];
+                                dm.params.prime_base=false;
+                                dm.params.fixed_sequence=false;
+                                dm.params.latinize=false;
+                                dm.params.variance_based_decomp=false;
+                                dm.params.quality_metrics=false;
+                            case {'fsu_cvt'}
+                                dm.type     ='dace';
+                                dm.variables={'continuous_design',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'objective_function',...
+                                              'response_function'};
+                                dm.ghspec   ={};
+                                dm.params.seed=false;
+                                dm.params.fixed_seed=false;
+                                dm.params.samples=0;
+                                dm.params.num_trials=10000;
+                                dm.params.trial_type='random';
+                                dm.params.latinize=false;
+                                dm.params.variance_based_decomp=false;
+                                dm.params.quality_metrics=false;
+
+                            case {'vector_parameter_study'}
+                                dm.type     ='param';
+                                dm.variables={'continuous_design',...
+                                              'normal_uncertain',...
+                                              'uniform_uncertain',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'objective_function',...
+                                              'response_function'};
+                                dm.ghspec   ={};
+                                dm.params.output=false;
+                                dm.params.final_point=[];
+                                dm.params.step_length=[];
+                                dm.params.num_steps=[];
+                                dm.params.step_vector=[];
+                                dm.params.num_steps=[];
+                            case {'list_parameter_study'}
+                                dm.type     ='param';
+                                dm.variables={'continuous_design',...
+                                              'normal_uncertain',...
+                                              'uniform_uncertain',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'objective_function',...
+                                              'response_function'};
+                                dm.ghspec   ={};
+                                dm.params.output=false;
+                                dm.params.list_of_points=[];
+                            case {'centered_parameter_study'}
+                                dm.type     ='param';
+                                dm.variables={'continuous_design',...
+                                              'normal_uncertain',...
+                                              'uniform_uncertain',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'objective_function',...
+                                              'response_function'};
+                                dm.ghspec   ={};
+                                dm.params.output=false;
+                                dm.params.percent_delta=[];
+                                dm.params.deltas_per_variable=[];
+                            case {'multidim_parameter_study'}
+                                dm.type     ='param';
+                                dm.variables={'continuous_design',...
+                                              'normal_uncertain',...
+                                              'uniform_uncertain',...
+                                              'continuous_state'};
+                                dm.lcspec   ={};
+                                dm.responses={'objective_function',...
+                                              'response_function'};
+                                dm.ghspec   ={};
+                                dm.params.output=false;
+                                dm.params.partitions=[];
+
+                            otherwise
+                                error('Unimplemented method: ''%s''.',dm.method);
+                        end
+
+                    end
+                    
+%  if more than one argument, issue warning
+
+                otherwise
+                    warning('dakota_method:extra_arg',...
+                        'Extra arguments for object of class ''%s''.',...
+                        class(dm));
+            end
+
+        end
+
+        function []=disp(dm)
+
+%  display the object
+
+            for i=1:numel(dm)
+                disp(sprintf('\nclass ''%s'' object ''%s%s'' = \n',...
+                    class(dm),inputname(1),string_dim(dm,i)));
+                disp(sprintf('       method: ''%s'''  ,dm(i).method));
+                disp(sprintf('         type: ''%s'''  ,dm(i).type));
+                disp(sprintf('    variables: %s'      ,string_cell(dm(i).variables)));
+                disp(sprintf('       lcspec: %s'      ,string_cell(dm(i).lcspec)));
+                disp(sprintf('    responses: %s'      ,string_cell(dm(i).responses)));
+                disp(sprintf('       ghspec: %s\n'    ,string_cell(dm(i).ghspec)));
+    
+%  display the parameters within the object
+
+                fnames=fieldnames(dm(i).params);
+                maxlen=0;
+                for j=1:numel(fnames)
+                    maxlen=max(maxlen,length(fnames{j}));
+                end
+    
+                for j=1:numel(fnames)
+                    disp(sprintf(['       params.%-' num2str(maxlen+1) 's: %s'],...
+                        fnames{j},any2str(dm(i).params.(fnames{j}))));
+                end
+            end
+
+        end
+    end
+end
+
Index: /issm/trunk/src/m/classes/qmu/@dakota_method/dmeth_params_merge.m
===================================================================
--- /issm/trunk/src/m/classes/qmu/@dakota_method/dmeth_params_merge.m	(revision 9548)
+++ /issm/trunk/src/m/classes/qmu/@dakota_method/dmeth_params_merge.m	(revision 9548)
@@ -0,0 +1,27 @@
+%
+%  merge a structure of parameters into a dakota_method object.
+%
+%  [dm]=dmeth_params_merge(dm,params)
+%
+function [dm]=dmeth_params_merge(dm,params)
+
+if ~isa(dm,'dakota_method')
+    error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
+        inputname(1),class(dm),'dakota_method');
+end
+
+%  loop through each parameter field in the structure
+
+fnames=fieldnames(params);
+
+for i=1:numel(fnames)
+    if isfield(dm.params,fnames{i})
+        dm.params.(fnames{i})=params.(fnames{i});
+    else
+        warning('dmeth_params_merge:unknown_param',...
+            'No parameter ''%s'' for dakota_method ''%s''.',...
+            fnames{i},dm.method);
+    end
+end
+
+end
Index: /issm/trunk/src/m/classes/qmu/@dakota_method/dmeth_params_set.m
===================================================================
--- /issm/trunk/src/m/classes/qmu/@dakota_method/dmeth_params_set.m	(revision 9548)
+++ /issm/trunk/src/m/classes/qmu/@dakota_method/dmeth_params_set.m	(revision 9548)
@@ -0,0 +1,25 @@
+%
+%  set parameters of a dakota_method object.
+%
+%  [dm]=dmeth_params_set(dm,varargin)
+%
+function [dm]=dmeth_params_set(dm,varargin)
+
+if ~isa(dm,'dakota_method')
+    error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
+        inputname(1),class(dm),'dakota_method');
+end
+
+%  loop through each parameter field in the input list
+
+for i=1:2:length(varargin)
+    if isfield(dm.params,varargin{i})
+        dm.params.(varargin{i})=varargin{i+1};
+    else
+        warning('dmeth_params_set:unknown_param',...
+            'No parameter ''%s'' for dakota_method ''%s''.',...
+            varargin{i},dm.method);
+    end
+end
+
+end
Index: /issm/trunk/src/m/classes/qmu/@dakota_method/dmeth_params_write.m
===================================================================
--- /issm/trunk/src/m/classes/qmu/@dakota_method/dmeth_params_write.m	(revision 9548)
+++ /issm/trunk/src/m/classes/qmu/@dakota_method/dmeth_params_write.m	(revision 9548)
@@ -0,0 +1,578 @@
+%
+%  write the parameters from a dakota_method object.
+%
+%  []=dmeth_params_write(dm,fid,sbeg)
+%
+function []=dmeth_params_write(dm,fid,sbeg)
+
+if ~isa(dm,'dakota_method')
+    error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
+        inputname(1),class(dm),'dakota_method');
+end
+
+if ~exist('sbeg','var')
+    sbeg='\t  ';
+end
+
+%  perform some error checking, but leave the rest to dakota.
+%  unfortunately this prevents merely looping through the fields
+%  of the parameters structure.
+
+%  write method-independent controls
+
+% param_write(fid,sbeg,'id_method','                = ','\n',dm.params);
+% param_write(fid,sbeg,'model_pointer','            = ','\n',dm.params);
+
+%  write method-dependent controls
+
+switch dm.type
+    case {'dot'}
+        param_write(fid,sbeg,'max_iterations','           = ','\n',dm.params);
+        param_write(fid,sbeg,'max_function_evaluations',' = ','\n',dm.params);
+        param_write(fid,sbeg,'convergence_tolerance','    = ','\n',dm.params);
+        param_write(fid,sbeg,'constraint_tolerance','     = ','\n',dm.params);
+        param_write(fid,sbeg,'output',' ','\n',dm.params);
+        param_write(fid,sbeg,'speculative','','\n',dm.params);
+        param_write(fid,sbeg,'scaling','','\n',dm.params);
+        switch dm.method
+            case{'dot_bfgs',...
+                 'dot_frcg',...
+                 'dot_mmfd',...
+                 'dot_slp',...
+                 'dot_sqp'}
+                param_write(fid,sbeg,'optimization_type',' = ','\n',dm.params);
+
+            otherwise
+                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
+        end
+        
+    case {'npsol'}
+        param_write(fid,sbeg,'max_iterations','           = ','\n',dm.params);
+        param_write(fid,sbeg,'max_function_evaluations',' = ','\n',dm.params);
+        param_write(fid,sbeg,'convergence_tolerance','    = ','\n',dm.params);
+        param_write(fid,sbeg,'constraint_tolerance','     = ','\n',dm.params);
+        param_write(fid,sbeg,'output',' ','\n',dm.params);
+        param_write(fid,sbeg,'speculative','','\n',dm.params);
+        param_write(fid,sbeg,'scaling','','\n',dm.params);
+        switch dm.method
+            case {'npsol_sqp'}
+                param_write(fid,sbeg,'verify_level','         = ','\n',dm.params);
+                param_write(fid,sbeg,'function_precision','   = ','\n',dm.params);
+                param_write(fid,sbeg,'linesearch_tolerance',' = ','\n',dm.params);
+
+            otherwise
+                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
+        end
+        
+    case {'conmin'}
+        param_write(fid,sbeg,'max_iterations','           = ','\n',dm.params);
+        param_write(fid,sbeg,'max_function_evaluations',' = ','\n',dm.params);
+        param_write(fid,sbeg,'convergence_tolerance','    = ','\n',dm.params);
+        param_write(fid,sbeg,'constraint_tolerance','     = ','\n',dm.params);
+        param_write(fid,sbeg,'output',' ','\n',dm.params);
+        param_write(fid,sbeg,'speculative','','\n',dm.params);
+        param_write(fid,sbeg,'scaling','','\n',dm.params);
+        switch dm.method
+            case {'conmin_frcg',...
+                  'conmin_mfd'}
+
+            otherwise
+                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
+        end
+        
+    case {'optpp'}
+        param_write(fid,sbeg,'max_iterations','           = ','\n',dm.params);
+        param_write(fid,sbeg,'max_function_evaluations',' = ','\n',dm.params);
+        param_write(fid,sbeg,'convergence_tolerance','    = ','\n',dm.params);
+        param_write(fid,sbeg,'output',' ','\n',dm.params);
+        param_write(fid,sbeg,'speculative','','\n',dm.params);
+        param_write(fid,sbeg,'scaling','','\n',dm.params);
+        switch dm.method
+            case {'optpp_cg'}
+                param_write(fid,sbeg,'max_step','           = ','\n',dm.params);
+                param_write(fid,sbeg,'gradient_tolerance',' = ','\n',dm.params);
+
+            case {'optpp_q_newton',...
+                  'optpp_fd_newton',...
+                  'optpp_newton'}
+                if (dm.params.value_based_line_search + ...
+                    dm.params.gradient_based_line_search + ...
+                    dm.params.trust_region + ...
+                    dm.params.tr_pds > 1)
+                    error('''%s'' method must have only one algorithm.',...
+                        dm.method);
+                end
+                param_write(fid,sbeg,'value_based_line_search','','\n',dm.params);
+                param_write(fid,sbeg,'gradient_based_line_search','','\n',dm.params);
+                param_write(fid,sbeg,'trust_region','','\n',dm.params);
+                param_write(fid,sbeg,'tr_pds','','\n',dm.params);
+                param_write(fid,sbeg,'max_step','               = ','\n',dm.params);
+                param_write(fid,sbeg,'gradient_tolerance','     = ','\n',dm.params);
+                param_write(fid,sbeg,'merit_function','         = ','\n',dm.params);
+                param_write(fid,sbeg,'central_path','           = ','\n',dm.params);
+                param_write(fid,sbeg,'steplength_to_boundary',' = ','\n',dm.params);
+                param_write(fid,sbeg,'centering_parameter','    = ','\n',dm.params);
+
+            case {'optpp_pds'}
+                param_write(fid,sbeg,'search_scheme_size',' = ','\n',dm.params);
+
+            otherwise
+                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
+        end
+        
+    case {'apps'}
+        param_write(fid,sbeg,'max_function_evaluations',' = ','\n',dm.params);
+        param_write(fid,sbeg,'constraint_tolerance','     = ','\n',dm.params);
+        param_write(fid,sbeg,'output',' ','\n',dm.params);
+        param_write(fid,sbeg,'scaling','','\n',dm.params);
+        switch dm.method
+            case {'asynch_pattern_search'}
+                param_write(fid,sbeg,'initial_delta','      = ','\n',dm.params);
+                param_write(fid,sbeg,'threshold_delta','    = ','\n',dm.params);
+                param_write(fid,sbeg,'contraction_factor',' = ','\n',dm.params);
+                param_write(fid,sbeg,'solution_target','    = ','\n',dm.params);
+                param_write(fid,sbeg,'synchronization','    = ','\n',dm.params);
+                param_write(fid,sbeg,'merit_function','     = ','\n',dm.params);
+                param_write(fid,sbeg,'constraint_penalty',' = ','\n',dm.params);
+                param_write(fid,sbeg,'smoothing_factor','   = ','\n',dm.params);
+
+            otherwise
+                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
+        end
+        
+    case {'coliny'}
+        param_write(fid,sbeg,'max_iterations','           = ','\n',dm.params);
+        param_write(fid,sbeg,'max_function_evaluations',' = ','\n',dm.params);
+        param_write(fid,sbeg,'convergence_tolerance','    = ','\n',dm.params);
+        param_write(fid,sbeg,'output',' ','\n',dm.params);
+        param_write(fid,sbeg,'scaling','','\n',dm.params);
+
+        param_write(fid,sbeg,'show_misc_options','','\n',dm.params);
+        param_write(fid,sbeg,'misc_options','      = ','\n',dm.params);
+        param_write(fid,sbeg,'solution_accuracy',' = ','\n',dm.params);
+        switch dm.method
+            case {'coliny_cobyla'}
+                param_write(fid,sbeg,'initial_delta','   = ','\n',dm.params);
+                param_write(fid,sbeg,'threshold_delta',' = ','\n',dm.params);
+
+            case {'coliny_direct'}
+                param_write(fid,sbeg,'division','                 = ','\n',dm.params);
+                param_write(fid,sbeg,'global_balance_parameter',' = ','\n',dm.params);
+                param_write(fid,sbeg,'local_balance_parameter','  = ','\n',dm.params);
+                param_write(fid,sbeg,'max_boxsize_limit','        = ','\n',dm.params);
+                param_write(fid,sbeg,'min_boxsize_limit','        = ','\n',dm.params);
+                param_write(fid,sbeg,'constraint_penalty','       = ','\n',dm.params);
+
+            case {'coliny_ea'}
+                param_write(fid,sbeg,'seed','                    = ','\n',dm.params);
+                param_write(fid,sbeg,'population_size','         = ','\n',dm.params);
+                param_write(fid,sbeg,'initialization_type','     = ','\n',dm.params);
+                param_write(fid,sbeg,'fitness_type','            = ','\n',dm.params);
+                param_write(fid,sbeg,'replacement_type','        = ','\n',dm.params);
+                param_write(fid,sbeg,'random','                  = ','\n',dm.params);
+                param_write(fid,sbeg,'chc','                     = ','\n',dm.params);
+                param_write(fid,sbeg,'elitist','                 = ','\n',dm.params);
+                param_write(fid,sbeg,'new_solutions_generated',' = ','\n',dm.params);
+                param_write(fid,sbeg,'crossover_type','          = ','\n',dm.params);
+                param_write(fid,sbeg,'crossover_rate','          = ','\n',dm.params);
+                param_write(fid,sbeg,'mutation_type','           = ','\n',dm.params);
+                param_write(fid,sbeg,'mutation_scale','          = ','\n',dm.params);
+                param_write(fid,sbeg,'mutation_range','          = ','\n',dm.params);
+                param_write(fid,sbeg,'dimension_ratio','         = ','\n',dm.params);
+                param_write(fid,sbeg,'mutation_rate','           = ','\n',dm.params);
+                param_write(fid,sbeg,'non_adaptive','','\n',dm.params);
+
+            case {'coliny_pattern_search'}
+                param_write(fid,sbeg,'stochastic','','\n',dm.params);
+                param_write(fid,sbeg,'seed','                 = ','\n',dm.params);
+                param_write(fid,sbeg,'initial_delta','        = ','\n',dm.params);
+                param_write(fid,sbeg,'threshold_delta','      = ','\n',dm.params);
+                param_write(fid,sbeg,'constraint_penalty','   = ','\n',dm.params);
+                param_write(fid,sbeg,'constant_penalty','','\n',dm.params);
+                param_write(fid,sbeg,'pattern_basis','        = ','\n',dm.params);
+                param_write(fid,sbeg,'total_pattern_size','   = ','\n',dm.params);
+                param_write(fid,sbeg,'no_expansion','','\n',dm.params);
+                param_write(fid,sbeg,'expand_after_success',' = ','\n',dm.params);
+                param_write(fid,sbeg,'contraction_factor','   = ','\n',dm.params);
+                param_write(fid,sbeg,'synchronization','      = ','\n',dm.params);
+                param_write(fid,sbeg,'exploratory_moves','    = ','\n',dm.params);
+
+            case {'coliny_solis_wets'}
+                param_write(fid,sbeg,'seed','                   = ','\n',dm.params);
+                param_write(fid,sbeg,'initial_delta','          = ','\n',dm.params);
+                param_write(fid,sbeg,'threshold_delta','        = ','\n',dm.params);
+                param_write(fid,sbeg,'no_expansion','','\n',dm.params);
+                param_write(fid,sbeg,'expand_after_success','   = ','\n',dm.params);
+                param_write(fid,sbeg,'contract_after_failure',' = ','\n',dm.params);
+                param_write(fid,sbeg,'contraction_factor','     = ','\n',dm.params);
+                param_write(fid,sbeg,'constraint_penalty','     = ','\n',dm.params);
+                param_write(fid,sbeg,'constant_penalty','','\n',dm.params);
+
+            otherwise
+                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
+        end
+        
+    case {'ncsu'}
+        param_write(fid,sbeg,'max_iterations','           = ','\n',dm.params);
+        param_write(fid,sbeg,'max_function_evaluations',' = ','\n',dm.params);
+        param_write(fid,sbeg,'scaling','','\n',dm.params);
+        switch dm.method
+            case {'ncsu_direct'}
+                param_write(fid,sbeg,'solution_accuracy',' = ','\n',dm.params);
+                param_write(fid,sbeg,'min_boxsize_limit',' = ','\n',dm.params);
+                param_write(fid,sbeg,'vol_boxsize_limit',' = ','\n',dm.params);
+
+            otherwise
+                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
+        end
+        
+    case {'jega'}
+        param_write(fid,sbeg,'max_iterations','           = ','\n',dm.params);
+        param_write(fid,sbeg,'max_function_evaluations',' = ','\n',dm.params);
+        param_write(fid,sbeg,'output',' ','\n',dm.params);
+        param_write(fid,sbeg,'scaling','','\n',dm.params);
+
+        param_write(fid,sbeg,'seed','                             = ','\n',dm.params);
+        param_write(fid,sbeg,'log_file','                         = ','\n',dm.params);
+        param_write(fid,sbeg,'population_size','                  = ','\n',dm.params);
+        param_write(fid,sbeg,'print_each_pop','','\n',dm.params);
+        param_write(fid,sbeg,'output','                           = ','\n',dm.params);
+        param_write(fid,sbeg,'initialization_type','              = ','\n',dm.params);
+        param_write(fid,sbeg,'mutation_type','                    = ','\n',dm.params);
+        param_write(fid,sbeg,'mutation_scale','                   = ','\n',dm.params);
+        param_write(fid,sbeg,'mutation_rate','                    = ','\n',dm.params);
+        param_write(fid,sbeg,'replacement_type','                 = ','\n',dm.params);
+        param_write(fid,sbeg,'below_limit','                      = ','\n',dm.params);
+        param_write(fid,sbeg,'shrinkage_percentage','             = ','\n',dm.params);
+        param_write(fid,sbeg,'crossover_type','                   = ','\n',dm.params);
+        param_write(fid,sbeg,'multi_point_binary','               = ','\n',dm.params);
+        param_write(fid,sbeg,'multi_point_parameterized_binary',' = ','\n',dm.params);
+        param_write(fid,sbeg,'multi_point_real','                 = ','\n',dm.params);
+        param_write(fid,sbeg,'shuffle_random','                   = ','\n',dm.params);
+        param_write(fid,sbeg,'num_parents','                      = ','\n',dm.params);
+        param_write(fid,sbeg,'num_offspring','                    = ','\n',dm.params);
+        param_write(fid,sbeg,'crossover_rate','                   = ','\n',dm.params);
+
+        switch dm.method
+            case {'moga'}
+                param_write(fid,sbeg,'fitness_type','        = ','\n',dm.params);
+                param_write(fid,sbeg,'niching_type','        = ','\n',dm.params);
+                if ~isempty(dm.params.radial) && ...
+                   ~isempty(dm.params.distance)
+                    error('''%s'' method must have only one niching distance.',...
+                        dm.method);
+                end
+                param_write(fid,sbeg,'radial','              = ','\n',dm.params);
+                param_write(fid,sbeg,'distance','            = ','\n',dm.params);
+                param_write(fid,sbeg,'metric_tracker','','\n',dm.params);
+                param_write(fid,sbeg,'percent_change','      = ','\n',dm.params);
+                param_write(fid,sbeg,'num_generations','     = ','\n',dm.params);
+                param_write(fid,sbeg,'postprocessor_type','  = ','\n',dm.params);
+                param_write(fid,sbeg,'orthogonal_distance',' = ','\n',dm.params);
+
+            case {'soga'}
+                param_write(fid,sbeg,'fitness_type','       = ','\n',dm.params);
+                param_write(fid,sbeg,'constraint_penalty',' = ','\n',dm.params);
+                param_write(fid,sbeg,'replacement_type','   = ','\n',dm.params);
+                param_write(fid,sbeg,'convergence_type','   = ','\n',dm.params);
+                param_write(fid,sbeg,'num_generations','    = ','\n',dm.params);
+                param_write(fid,sbeg,'percent_change','     = ','\n',dm.params);
+
+            otherwise
+                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
+        end
+        
+    case {'lsq'}
+        switch dm.method
+            case {'nl2sol'}
+                param_write(fid,sbeg,'max_iterations','           = ','\n',dm.params);
+                param_write(fid,sbeg,'max_function_evaluations',' = ','\n',dm.params);
+                param_write(fid,sbeg,'convergence_tolerance','    = ','\n',dm.params);
+                param_write(fid,sbeg,'output',' ','\n',dm.params);
+                param_write(fid,sbeg,'scaling','','\n',dm.params);
+
+                param_write(fid,sbeg,'function_precision','   = ','\n',dm.params);
+                param_write(fid,sbeg,'absolute_conv_tol','    = ','\n',dm.params);
+                param_write(fid,sbeg,'x_conv_tol','           = ','\n',dm.params);
+                param_write(fid,sbeg,'singular_conv_tol','    = ','\n',dm.params);
+                param_write(fid,sbeg,'singular_radius','      = ','\n',dm.params);
+                param_write(fid,sbeg,'false_conv_tol','       = ','\n',dm.params);
+                param_write(fid,sbeg,'initial_trust_radius',' = ','\n',dm.params);
+                param_write(fid,sbeg,'covariance','           = ','\n',dm.params);
+                param_write(fid,sbeg,'regression_diagnostics','','\n',dm.params);
+
+            case {'nlssol_sqp'}
+                param_write(fid,sbeg,'max_iterations','           = ','\n',dm.params);
+                param_write(fid,sbeg,'max_function_evaluations',' = ','\n',dm.params);
+                param_write(fid,sbeg,'convergence_tolerance','    = ','\n',dm.params);
+                param_write(fid,sbeg,'constraint_tolerance','     = ','\n',dm.params);
+                param_write(fid,sbeg,'output',' ','\n',dm.params);
+                param_write(fid,sbeg,'speculative','','\n',dm.params);
+                param_write(fid,sbeg,'scaling','','\n',dm.params);
+
+                param_write(fid,sbeg,'verify_level','         = ','\n',dm.params);
+                param_write(fid,sbeg,'function_precision','   = ','\n',dm.params);
+                param_write(fid,sbeg,'linesearch_tolerance',' = ','\n',dm.params);
+
+            case {'optpp_g_newton'}
+                param_write(fid,sbeg,'max_iterations','           = ','\n',dm.params);
+                param_write(fid,sbeg,'max_function_evaluations',' = ','\n',dm.params);
+                param_write(fid,sbeg,'convergence_tolerance','    = ','\n',dm.params);
+                param_write(fid,sbeg,'output',' ','\n',dm.params);
+                param_write(fid,sbeg,'speculative','','\n',dm.params);
+                param_write(fid,sbeg,'scaling','','\n',dm.params);
+
+                if (dm.params.value_based_line_search + ...
+                    dm.params.gradient_based_line_search + ...
+                    dm.params.trust_region + ...
+                    dm.params.tr_pds > 1)
+                    error('''%s'' method must have only one algorithm.',...
+                        dm.method);
+                end
+                param_write(fid,sbeg,'value_based_line_search','','\n',dm.params);
+                param_write(fid,sbeg,'gradient_based_line_search','','\n',dm.params);
+                param_write(fid,sbeg,'trust_region','','\n',dm.params);
+                param_write(fid,sbeg,'tr_pds','','\n',dm.params);
+                param_write(fid,sbeg,'max_step','               = ','\n',dm.params);
+                param_write(fid,sbeg,'gradient_tolerance','     = ','\n',dm.params);
+                param_write(fid,sbeg,'merit_function','         = ','\n',dm.params);
+                param_write(fid,sbeg,'central_path','           = ','\n',dm.params);
+                param_write(fid,sbeg,'steplength_to_boundary',' = ','\n',dm.params);
+                param_write(fid,sbeg,'centering_parameter','    = ','\n',dm.params);
+
+            otherwise
+                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
+        end
+        
+    case {'nond'}
+        switch dm.method
+            case {'nond_sampling'}
+                param_write(fid,sbeg,'seed','             = ','\n',dm.params);
+                param_write(fid,sbeg,'fixed_seed','','\n',dm.params);
+                param_write(fid,sbeg,'samples','          = ','\n',dm.params);
+                param_write(fid,sbeg,'sample_type','        ','\n',dm.params);
+                param_write(fid,sbeg,'all_variables','','\n',dm.params);
+                param_write(fid,sbeg,'variance_based_decomp','','\n',dm.params);
+                if strcmp(dm.params.sample_type,'incremental_random') || ...
+                   strcmp(dm.params.sample_type,'incremental_lhs'   )
+                    param_write(fid,sbeg,'previous_samples',' = ','\n',dm.params);
+                end
+                param_write(fid,sbeg,'output',' ','\n',dm.params);
+
+            case {'nond_local_reliability'}
+                param_write(fid,sbeg,'max_iterations','           = ','\n',dm.params);
+                param_write(fid,sbeg,'convergence_tolerance','    = ','\n',dm.params);
+
+                param_write(fid,sbeg,'mpp_search','  = ','\n',dm.params);
+                if ischar(dm.params.mpp_search)
+                    if (dm.params.sqp + ...
+                        dm.params.nip > 1)
+                        error('''%s'' method must have only one algorithm.',...
+                            dm.method);
+                    end
+                    param_write(fid,sbeg,'sqp','','\n',dm.params);
+                    param_write(fid,sbeg,'nip','','\n',dm.params);
+                    param_write(fid,sbeg,'integration','   ','\n',dm.params);
+                    param_write(fid,sbeg,'refinement','  = ','\n',dm.params);
+                    if ischar(dm.params.refinement)
+                        param_write(fid,sbeg,'samples','     = ','\n',dm.params);
+                        param_write(fid,sbeg,'seed','        = ','\n',dm.params);
+                    end
+                end
+                param_write(fid,sbeg,'output',' ','\n',dm.params);
+
+            case {'nond_global_reliability'}
+                if (dm.params.x_gaussian_process + ...
+                    dm.params.u_gaussian_process ~= 1)
+                    error('''%s'' method must have one and only one algorithm.',...
+                        dm.method);
+                end
+                param_write(fid,sbeg,'x_gaussian_process','','\n',dm.params);
+                param_write(fid,sbeg,'u_gaussian_process','','\n',dm.params);
+                param_write(fid,sbeg,'all_variables','','\n',dm.params);
+                param_write(fid,sbeg,'seed',' = ','\n',dm.params);
+
+            case {'nond_polynomial_chaos'}
+                param_write(fid,sbeg,'expansion_order','       = ','\n',dm.params);
+                param_write(fid,sbeg,'expansion_terms','       = ','\n',dm.params);
+                param_write(fid,sbeg,'quadrature_order','      = ','\n',dm.params);
+                param_write(fid,sbeg,'sparse_grid_level','     = ','\n',dm.params);
+                param_write(fid,sbeg,'expansion_samples','     = ','\n',dm.params);
+                param_write(fid,sbeg,'incremental_lhs','','\n',dm.params);
+                param_write(fid,sbeg,'collocation_points','    = ','\n',dm.params);
+                param_write(fid,sbeg,'collocation_ratio','     = ','\n',dm.params);
+                param_write(fid,sbeg,'reuse_samples','','\n',dm.params);
+                param_write(fid,sbeg,'expansion_import_file',' = ','\n',dm.params);
+                param_write(fid,sbeg,'seed','                  = ','\n',dm.params);
+                param_write(fid,sbeg,'fixed_seed','','\n',dm.params);
+                param_write(fid,sbeg,'samples','               = ','\n',dm.params);
+                param_write(fid,sbeg,'sample_type','           = ','\n',dm.params);
+                param_write(fid,sbeg,'all_variables','','\n',dm.params);
+
+            case {'nond_stoch_collocation'}
+                param_write(fid,sbeg,'quadrature_order','  = ','\n',dm.params);
+                param_write(fid,sbeg,'sparse_grid_level',' = ','\n',dm.params);
+                param_write(fid,sbeg,'seed','              = ','\n',dm.params);
+                param_write(fid,sbeg,'fixed_seed','','\n',dm.params);
+                param_write(fid,sbeg,'samples','           = ','\n',dm.params);
+                param_write(fid,sbeg,'sample_type','       = ','\n',dm.params);
+                param_write(fid,sbeg,'all_variables','','\n',dm.params);
+
+            case {'nond_evidence'}
+                param_write(fid,sbeg,'seed','    = ','\n',dm.params);
+                param_write(fid,sbeg,'samples',' = ','\n',dm.params);
+
+            otherwise
+                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
+        end
+        
+    case {'dace'}
+        switch dm.method
+            case {'dace'}
+                if (dm.params.grid + ...
+                    dm.params.random + ...
+                    dm.params.oas + ...
+                    dm.params.lhs + ...
+                    dm.params.oa_lhs + ...
+                    dm.params.box_behnken + ...
+                    dm.params.central_composite ~= 1)
+                    error('''%s'' method must have one and only one algorithm.',...
+                        dm.method);
+                end
+                param_write(fid,sbeg,'grid','','\n',dm.params);
+                param_write(fid,sbeg,'random','','\n',dm.params);
+                param_write(fid,sbeg,'oas','','\n',dm.params);
+                param_write(fid,sbeg,'lhs','','\n',dm.params);
+                param_write(fid,sbeg,'oa_lhs','','\n',dm.params);
+                param_write(fid,sbeg,'box_behnken','','\n',dm.params);
+                param_write(fid,sbeg,'central_composite','','\n',dm.params);
+                param_write(fid,sbeg,'seed','    = ','\n',dm.params);
+                param_write(fid,sbeg,'fixed_seed','','\n',dm.params);
+                param_write(fid,sbeg,'samples',' = ','\n',dm.params);
+                param_write(fid,sbeg,'symbols',' = ','\n',dm.params);
+                param_write(fid,sbeg,'quality_metrics','','\n',dm.params);
+                param_write(fid,sbeg,'variance_based_decomp','','\n',dm.params);
+
+            case {'fsu_quasi_mc'}
+                if (dm.params.halton + ...
+                    dm.params.hammersley ~= 1)
+                    error('''%s'' method must have one and only one sequence type.',...
+                        dm.method);
+                end
+                param_write(fid,sbeg,'halton','','\n',dm.params);
+                param_write(fid,sbeg,'hammersley','','\n',dm.params);
+                param_write(fid,sbeg,'samples','        = ','\n',dm.params);
+                param_write(fid,sbeg,'sequence_start',' = ','\n',dm.params);
+                param_write(fid,sbeg,'sequence_leap','  = ','\n',dm.params);
+                param_write(fid,sbeg,'prime_base','     = ','\n',dm.params);
+                param_write(fid,sbeg,'fixed_sequence','','\n',dm.params);
+                param_write(fid,sbeg,'latinize','','\n',dm.params);
+                param_write(fid,sbeg,'variance_based_decomp','','\n',dm.params);
+                param_write(fid,sbeg,'quality_metrics','','\n',dm.params);
+
+            case {'fsu_cvt'}
+                param_write(fid,sbeg,'seed','       = ','\n',dm.params);
+                param_write(fid,sbeg,'fixed_seed','','\n',dm.params);
+                param_write(fid,sbeg,'samples','    = ','\n',dm.params);
+                param_write(fid,sbeg,'num_trials',' = ','\n',dm.params);
+                param_write(fid,sbeg,'trial_type',' = ','\n',dm.params);
+                param_write(fid,sbeg,'latinize','','\n',dm.params);
+                param_write(fid,sbeg,'variance_based_decomp','','\n',dm.params);
+                param_write(fid,sbeg,'quality_metrics','','\n',dm.params);
+
+            otherwise
+                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
+        end
+        
+    case {'param'}
+        param_write(fid,sbeg,'output',' ','\n',dm.params);
+        switch dm.method
+            case {'vector_parameter_study'}
+                if ~xor(isempty(dm.params.final_point), ...
+                        isempty(dm.params.step_vector))
+                    error('''%s'' method must have one and only one specification.',...
+                        dm.method);
+                end
+                if     ~isempty(dm.params.final_point)
+                    param_write(fid,sbeg,'final_point',' = ','\n',dm.params);
+                    param_write(fid,sbeg,'step_length',' = ','\n',dm.params);
+                    param_write(fid,sbeg,'num_steps','   = ','\n',dm.params);
+                elseif ~isempty(dm.params.step_vector)
+                    param_write(fid,sbeg,'step_vector',' = ','\n',dm.params);
+                    param_write(fid,sbeg,'num_steps','   = ','\n',dm.params);
+                end
+
+            case {'list_parameter_study'}
+                param_write(fid,sbeg,'list_of_points',' = ','\n',dm.params);
+
+            case {'centered_parameter_study'}
+                param_write(fid,sbeg,'percent_delta','       = ','\n',dm.params);
+                param_write(fid,sbeg,'deltas_per_variable',' = ','\n',dm.params);
+
+            case {'multidim_parameter_study'}
+                param_write(fid,sbeg,'partitions',' = ','\n',dm.params);
+            
+            otherwise
+                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
+        end
+
+    otherwise
+        error('Unrecognized method type: ''%s''.',dm.type);
+end
+
+end
+
+%%  function to write a structure of parameters
+
+function []=param_struc_write(fidi,sbeg,smid,send,params)
+
+%  loop through each parameter field in the structure
+
+fnames=fieldnames(params);
+
+for i=1:numel(fnames)
+    param_write(fidi,sbeg,fnames{i},smid,send,params);
+end
+
+end
+
+%%  function to write a parameter
+
+function []=param_write(fidi,sbeg,pname,smid,send,params)
+
+%  check for errors
+
+if ~isfield(params,pname)
+    warning('param_write:param_not_found',...
+        'Parameter ''%s'' not found in ''%s''.',...
+        pname,inputname(6));
+    return
+elseif islogical(params.(pname)) && ~params.(pname)
+    return
+elseif isempty(params.(pname))
+    warning('param_write:param_empty',...
+        'Parameter ''%s'' requires input of type ''%s''.',...
+        pname,class(params.(pname)));
+    return
+end
+
+%  construct the parameter string based on type
+
+if     islogical(params.(pname))
+    fprintf(fidi,[sbeg '%s' send],pname);
+elseif isnumeric(params.(pname))
+    fprintf(fidi,[sbeg '%s' smid '%g'],pname,params.(pname)(1));
+    for i=2:numel(params.(pname))
+        fprintf(fidi,[' %g'],params.(pname)(i));
+    end
+    fprintf(fidi,[send]);
+elseif ischar   (params.(pname))
+    fprintf(fidi,[sbeg '%s' smid '%s' send],pname,params.(pname));
+else
+    warning('param_write:param_unrecog',...
+        'Parameter ''%s'' is of unrecognized type ''%s''.',...
+        pname,class(params.(pname)));
+    return
+end
+
+end
Index: /issm/trunk/src/m/classes/qmu/continuous_design.m
===================================================================
--- /issm/trunk/src/m/classes/qmu/continuous_design.m	(revision 9548)
+++ /issm/trunk/src/m/classes/qmu/continuous_design.m	(revision 9548)
@@ -0,0 +1,227 @@
+%
+%  definition for the continuous_design class.
+%
+%  [cdv]=continuous_design(varargin)
+%
+%  where the required varargin are:
+%    descriptor    (char, description, '')
+%    initpt        (double, initial point, 0.)
+%  and the optional varargin and defaults are:
+%    lower         (double, lower bound, -Inf)
+%    upper         (double, upper bound,  Inf)
+%    scale_type    (char, scaling type, 'none')
+%    scale         (double, scaling factor, 1.)
+%
+%  note that zero arguments constructs a default instance; one
+%  argument of the class copies the instance; and two or more
+%  arguments constructs a new instance from the arguments.
+%
+%  "Copyright 2009, by the California Institute of Technology.
+%  ALL RIGHTS RESERVED. United States Government Sponsorship
+%  acknowledged. Any commercial use must be negotiated with
+%  the Office of Technology Transfer at the California Institute
+%  of Technology.  (J. Schiermeier, NTR 47078)
+%
+%  This software may be subject to U.S. export control laws.
+%  By accepting this  software, the user agrees to comply with
+%  all applicable U.S. export laws and regulations. User has the
+%  responsibility to obtain export licenses, or other export
+%  authority as may be required before exporting such information
+%  to foreign countries or providing access to foreign persons."
+%
+classdef continuous_design
+    properties
+        descriptor='';
+        initpt    = 0.;
+        lower     =-Inf;
+        upper     = Inf;
+        scale_type='none';
+        scale     = 1.;
+    end
+    
+    methods
+        function [cdv]=continuous_design(varargin)
+
+            switch nargin
+
+%  create a default object
+
+                case 0
+
+%  copy the object
+
+                case 1
+                    if isa(varargin{1},'continuous_design')
+                        cdv=varargin{1};
+                    else
+                        error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
+                            inputname(1),class(varargin{1}),'continuous_design');
+                    end
+
+%  create the object from the input
+
+                otherwise
+                    asizec=num2cell(array_size(varargin{1:min(nargin,6)}));
+                    cdv(asizec{:})=continuous_design;
+                    clear asizec
+                    
+                    if ischar(varargin{1})
+                        varargin{1}=cellstr(varargin{1});
+                    end
+                    for i=1:numel(cdv)
+                        if (numel(varargin{1}) > 1)
+                            cdv(i).descriptor=varargin{1}{i};
+                        else
+                            cdv(i).descriptor=[char(varargin{1}) string_dim(cdv,i,'vector')];
+                        end
+                    end
+
+                    if (nargin >= 2)
+                        for i=1:numel(cdv)
+                            if (numel(varargin{2}) > 1)
+                                cdv(i).initpt    =varargin{2}(i);
+                            else
+                                cdv(i).initpt    =varargin{2};
+                            end
+                        end
+                        if (nargin >= 3)
+                            for i=1:numel(cdv)
+                                if (numel(varargin{3}) > 1)
+                                    cdv(i).lower     =varargin{3}(i);
+                                else
+                                    cdv(i).lower     =varargin{3};
+                                end
+                            end
+                            if (nargin >= 4)
+                                for i=1:numel(cdv)
+                                    if (numel(varargin{4}) > 1)
+                                        cdv(i).upper     =varargin{4}(i);
+                                    else
+                                        cdv(i).upper     =varargin{4};
+                                    end
+                                end
+                                if (nargin >= 5)
+                                    if ischar(varargin{5})
+                                        varargin{5}=cellstr(varargin{5});
+                                    end
+                                    for i=1:numel(cdv)
+                                        if (numel(varargin{5}) > 1)
+                                            cdv(i).scale_type=varargin{5}{i};
+                                        else
+                                            cdv(i).scale_type=char(varargin{5});
+                                        end
+                                    end
+                                    if (nargin >= 6)
+                                        for i=1:numel(cdv)
+                                            if (numel(varargin{6}) > 1)
+                                                cdv(i).scale     =varargin{6}(i);
+                                            else
+                                                cdv(i).scale     =varargin{6};
+                                            end
+                                        end
+                                        if (nargin > 6)
+                                            warning('continuous_design:extra_arg',...
+                                                'Extra arguments for object of class ''%s''.',...
+                                                class(cdv));
+                                        end
+                                    end
+                                end
+                            end
+                        end
+                    end
+            end
+
+        end
+
+        function []=disp(cdv)
+
+%  display the object
+
+            disp(sprintf('\n'));
+            for i=1:numel(cdv)
+                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
+                    class(cdv),inputname(1),string_dim(cdv,i)));
+                disp(sprintf('    descriptor: ''%s'''  ,cdv(i).descriptor));
+                disp(sprintf('        initpt: %g'      ,cdv(i).initpt));
+                disp(sprintf('         lower: %g'      ,cdv(i).lower));
+                disp(sprintf('         upper: %g'      ,cdv(i).upper));
+                disp(sprintf('    scale_type: ''%s'''  ,cdv(i).scale_type));
+                disp(sprintf('         scale: %g\n'    ,cdv(i).scale));
+            end
+
+        end
+
+        function [desc]  =prop_desc(cdv,dstr)
+            desc=cell(1,numel(cdv));
+            for i=1:numel(cdv)
+                if ~isempty(cdv(i).descriptor)
+                    desc(i)=cellstr(cdv(i).descriptor);
+                elseif ~isempty(inputname(1))
+                    desc(i)=cellstr([inputname(1) string_dim(cdv,i,'vector')]);
+                elseif exist('dstr','var')
+                    desc(i)=cellstr([dstr         string_dim(cdv,i,'vector')]);
+                else
+                    desc(i)=cellstr(['cdv'        string_dim(cdv,i,'vector')]);
+                end
+            end
+            desc=allempty(desc);
+        end
+        function [initpt]=prop_initpt(cdv)
+            initpt=zeros(1,numel(cdv));
+            for i=1:numel(cdv)
+                initpt(i)=cdv(i).initpt;
+            end
+            initpt=allequal(initpt,0.);
+        end
+        function [lower] =prop_lower(cdv)
+            lower=zeros(1,numel(cdv));
+            for i=1:numel(cdv)
+                lower(i)=cdv(i).lower;
+            end
+            lower=allequal(lower,-Inf);
+        end
+        function [upper] =prop_upper(cdv)
+            upper=zeros(1,numel(cdv));
+            for i=1:numel(cdv)
+                upper(i)=cdv(i).upper;
+            end
+            upper=allequal(upper, Inf);
+        end
+        function [mean]  =prop_mean(cdv)
+            mean=[];
+        end
+        function [stddev]=prop_stddev(cdv)
+            stddev=[];
+        end
+        function [initst]=prop_initst(cdv)
+            initst=[];
+        end
+        function [stype] =prop_stype(cdv)
+            stype=cell(1,numel(cdv));
+            for i=1:numel(cdv)
+                stype(i)=cellstr(cdv(i).scale_type);
+            end
+            stype=allequal(stype,'none');
+        end
+        function [scale] =prop_scale(cdv)
+            scale=zeros(1,numel(cdv));
+            for i=1:numel(cdv)
+                scale(i)=cdv(i).scale;
+            end
+            scale=allequal(scale,1.);
+        end
+    end
+    
+    methods (Static)
+        function []=dakota_write(fidi,dvar)
+
+%  collect only the variables of the appropriate class
+
+            cdv=struc_class(dvar,'continuous_design');
+
+%  write variables
+
+            vlist_write(fidi,'continuous_design','cdv',cdv);
+        end
+    end
+end
Index: /issm/trunk/src/m/classes/qmu/continuous_state.m
===================================================================
--- /issm/trunk/src/m/classes/qmu/continuous_state.m	(revision 9548)
+++ /issm/trunk/src/m/classes/qmu/continuous_state.m	(revision 9548)
@@ -0,0 +1,192 @@
+%
+%  definition for the continuous_state class.
+%
+%  [csv]=continuous_state(varargin)
+%
+%  where the required varargin are:
+%    descriptor    (char, description, '')
+%    initst        (double, initial state, 0.)
+%  and the optional varargin and defaults are:
+%    lower         (double, lower bound, -Inf)
+%    upper         (double, upper bound,  Inf)
+%
+%  note that zero arguments constructs a default instance; one
+%  argument of the class copies the instance; and two or more
+%  arguments constructs a new instance from the arguments.
+%
+%  "Copyright 2009, by the California Institute of Technology.
+%  ALL RIGHTS RESERVED. United States Government Sponsorship
+%  acknowledged. Any commercial use must be negotiated with
+%  the Office of Technology Transfer at the California Institute
+%  of Technology.  (J. Schiermeier, NTR 47078)
+%
+%  This software may be subject to U.S. export control laws.
+%  By accepting this  software, the user agrees to comply with
+%  all applicable U.S. export laws and regulations. User has the
+%  responsibility to obtain export licenses, or other export
+%  authority as may be required before exporting such information
+%  to foreign countries or providing access to foreign persons."
+%
+classdef continuous_state
+    properties
+        descriptor='';
+        initst    = 0.;
+        lower     =-Inf;
+        upper     = Inf;
+    end
+    
+    methods
+        function [csv]=continuous_state(varargin)
+
+            switch nargin
+
+%  create a default object
+
+                case 0
+
+%  copy the object
+
+                case 1
+                    if isa(varargin{1},'continuous_state')
+                        csv=varargin{1};
+                    else
+                        error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
+                            inputname(1),class(varargin{1}),'continuous_state');
+                    end
+
+%  create the object from the input
+
+                otherwise
+                    asizec=num2cell(array_size(varargin{1:min(nargin,4)}));
+                    csv(asizec{:})=continuous_state;
+                    clear asizec
+                    
+                    if ischar(varargin{1})
+                        varargin{1}=cellstr(varargin{1});
+                    end
+                    for i=1:numel(csv)
+                        if (numel(varargin{1}) > 1)
+                            csv(i).descriptor=varargin{1}{i};
+                        else
+                            csv(i).descriptor=[char(varargin{1}) string_dim(csv,i,'vector')];
+                        end
+                    end
+
+                    if (nargin >= 2)
+                        for i=1:numel(csv)
+                            if (numel(varargin{2}) > 1)
+                                csv(i).initst    =varargin{2}(i);
+                            else
+                                csv(i).initst    =varargin{2};
+                            end
+                        end
+                        if (nargin >= 3)
+                            for i=1:numel(csv)
+                                if (numel(varargin{3}) > 1)
+                                    csv(i).lower     =varargin{3}(i);
+                                else
+                                    csv(i).lower     =varargin{3};
+                                end
+                            end
+                            if (nargin >= 4)
+                                for i=1:numel(csv)
+                                    if (numel(varargin{4}) > 1)
+                                        csv(i).upper     =varargin{4}(i);
+                                    else
+                                        csv(i).upper     =varargin{4};
+                                    end
+                                end
+                                if (nargin > 4)
+                                    warning('continuous_state:extra_arg',...
+                                        'Extra arguments for object of class ''%s''.',...
+                                        class(csv));
+                                end
+                            end
+                        end
+                    end
+            end
+
+        end
+
+        function []=disp(csv)
+
+%  display the object
+
+            disp(sprintf('\n'));
+            for i=1:numel(csv)
+                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
+                    class(csv),inputname(1),string_dim(csv,i)));
+                disp(sprintf('    descriptor: ''%s'''  ,csv(i).descriptor));
+                disp(sprintf('        initst: %g'      ,csv(i).initst));
+                disp(sprintf('         lower: %g'      ,csv(i).lower));
+                disp(sprintf('         upper: %g\n'    ,csv(i).upper));
+            end
+
+        end
+
+        function [desc]  =prop_desc(csv,dstr)
+            desc=cell(1,numel(csv));
+            for i=1:numel(csv)
+                if ~isempty(csv(i).descriptor)
+                    desc(i)=cellstr(csv(i).descriptor);
+                elseif ~isempty(inputname(1))
+                    desc(i)=cellstr([inputname(1) string_dim(csv,i,'vector')]);
+                elseif exist('dstr','var')
+                    desc(i)=cellstr([dstr         string_dim(csv,i,'vector')]);
+                else
+                    desc(i)=cellstr(['csv'        string_dim(csv,i,'vector')]);
+                end
+            end
+            desc=allempty(desc);
+        end
+        function [initpt]=prop_initpt(csv)
+            initpt=[];
+        end
+        function [lower] =prop_lower(csv)
+            lower=zeros(1,numel(csv));
+            for i=1:numel(csv)
+                lower(i)=csv(i).lower;
+            end
+            lower=allequal(lower,-Inf);
+        end
+        function [upper] =prop_upper(csv)
+            upper=zeros(1,numel(csv));
+            for i=1:numel(csv)
+                upper(i)=csv(i).upper;
+            end
+            upper=allequal(upper, Inf);
+        end
+        function [mean]  =prop_mean(csv)
+            mean=[];
+        end
+        function [stddev]=prop_stddev(csv)
+            stddev=[];
+        end
+        function [initst]=prop_initst(csv)
+            initst=zeros(1,numel(csv));
+            for i=1:numel(csv)
+                initst(i)=csv(i).initst;
+            end
+            initst=allequal(initst,0.);
+        end
+        function [stype] =prop_stype(csv)
+            stype={};
+        end
+        function [scale] =prop_scale(csv)
+            scale=[];
+        end
+    end
+    
+    methods (Static)
+        function []=dakota_write(fidi,dvar)
+
+%  collect only the variables of the appropriate class
+
+            csv=struc_class(dvar,'continuous_state');
+
+%  write variables
+
+            vlist_write(fidi,'continuous_state','csv',csv);
+        end
+    end
+end
Index: /issm/trunk/src/m/classes/qmu/least_squares_term.m
===================================================================
--- /issm/trunk/src/m/classes/qmu/least_squares_term.m	(revision 9548)
+++ /issm/trunk/src/m/classes/qmu/least_squares_term.m	(revision 9548)
@@ -0,0 +1,187 @@
+%
+%  definition for the least_squares_term class.
+%
+%  [lst]=least_squares_term(varargin)
+%
+%  where the required varargin are:
+%    descriptor    (char, description, '')
+%  and the optional varargin and defaults are:
+%    scale_type    (char, scaling type, 'none')
+%    scale         (double, scaling factor, 1.)
+%    weight        (double, weighting factor, 1.)
+%
+%  note that zero arguments constructs a default instance; one
+%  argument of the class copies the instance; and one or more
+%  arguments constructs a new instance from the arguments.
+%
+%  "Copyright 2009, by the California Institute of Technology.
+%  ALL RIGHTS RESERVED. United States Government Sponsorship
+%  acknowledged. Any commercial use must be negotiated with
+%  the Office of Technology Transfer at the California Institute
+%  of Technology.  (J. Schiermeier, NTR 47078)
+%
+%  This software may be subject to U.S. export control laws.
+%  By accepting this  software, the user agrees to comply with
+%  all applicable U.S. export laws and regulations. User has the
+%  responsibility to obtain export licenses, or other export
+%  authority as may be required before exporting such information
+%  to foreign countries or providing access to foreign persons."
+%
+classdef least_squares_term
+    properties
+        descriptor='';
+        scale_type='none';
+        scale     = 1.;
+        weight    = 1.;
+    end
+    
+    methods
+        function [lst]=least_squares_term(varargin)
+
+            switch nargin
+
+%  create a default object
+
+                case 0
+
+%  copy the object or create the object from the input
+
+                otherwise
+                    if  (nargin == 1) && isa(varargin{1},'least_squares_term')
+                        lst=varargin{1};
+                    else
+                        asizec=num2cell(array_size(varargin{1:min(nargin,4)}));
+                        lst(asizec{:})=least_squares_term;
+                        clear asizec
+                    
+                        if ischar(varargin{1})
+                            varargin{1}=cellstr(varargin{1});
+                        end
+                        for i=1:numel(lst)
+                            if (numel(varargin{1}) > 1)
+                                lst(i).descriptor=varargin{1}{i};
+                            else
+                                lst(i).descriptor=[char(varargin{1}) string_dim(lst,i,'vector')];
+                            end
+                        end
+
+                        if (nargin >= 2)
+                            if ischar(varargin{2})
+                                varargin{2}=cellstr(varargin{2});
+                            end
+                            for i=1:numel(lst)
+                                if (numel(varargin{2}) > 1)
+                                    lst(i).scale_type=varargin{2}{i};
+                                else
+                                    lst(i).scale_type=char(varargin{2});
+                                end
+                            end
+                            if (nargin >= 3)
+                                for i=1:numel(lst)
+                                    if (numel(varargin{3}) > 1)
+                                        lst(i).scale     =varargin{3}(i);
+                                    else
+                                        lst(i).scale     =varargin{3};
+                                    end
+                                end
+                                if (nargin >= 4)
+                                    for i=1:numel(lst)
+                                        if (numel(varargin{4}) > 1)
+                                            lst(i).weight    =varargin{4}(i);
+                                        else
+                                            lst(i).weight    =varargin{4};
+                                        end
+                                    end
+
+                                    if (nargin > 4)
+                                        warning('least_squares_term:extra_arg',...
+                                            'Extra arguments for object of class ''%s''.',...
+                                            class(lst));
+                                    end
+                                end
+                            end
+                        end
+                    end
+            end
+
+        end
+
+        function []=disp(lst)
+
+%  display the object
+
+            disp(sprintf('\n'));
+            for i=1:numel(lst)
+                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
+                    class(lst),inputname(1),string_dim(lst,i)));
+                disp(sprintf('    descriptor: ''%s'''  ,lst(i).descriptor));
+                disp(sprintf('    scale_type: ''%s'''  ,lst(i).scale_type));
+                disp(sprintf('         scale: %g'      ,lst(i).scale));
+                disp(sprintf('        weight: %g\n'    ,lst(i).weight));
+            end
+
+        end
+
+        function [desc]  =prop_desc(lst,dstr)
+            desc=cell(1,numel(lst));
+            for i=1:numel(lst)
+                if ~isempty(lst(i).descriptor)
+                    desc(i)=cellstr(lst(i).descriptor);
+                elseif ~isempty(inputname(1))
+                    desc(i)=cellstr([inputname(1) string_dim(lst,i,'vector')]);
+                elseif exist('dstr','var')
+                    desc(i)=cellstr([dstr         string_dim(lst,i,'vector')]);
+                else
+                    desc(i)=cellstr(['lst'        string_dim(lst,i,'vector')]);
+                end
+            end
+            desc=allempty(desc);
+        end
+        function [stype] =prop_stype(lst)
+            stype=cell(1,numel(lst));
+            for i=1:numel(lst)
+                stype(i)=cellstr(lst(i).scale_type);
+            end
+            stype=allequal(stype,'none');
+        end
+        function [scale] =prop_scale(lst)
+            scale=zeros(1,numel(lst));
+            for i=1:numel(lst)
+                scale(i)=lst(i).scale;
+            end
+            scale=allequal(scale,1.);
+        end
+        function [weight]=prop_weight(lst)
+            weight=zeros(1,numel(lst));
+            for i=1:numel(lst)
+                weight(i)=lst(i).weight;
+            end
+            weight=allequal(weight,1.);
+        end
+        function [lower] =prop_lower(lst)
+            lower=[];
+        end
+        function [upper] =prop_upper(lst)
+            upper=[];
+        end
+        function [target]=prop_target(lst)
+            target=[];
+        end
+    end
+    
+    methods (Static)
+        function [rdesc]=dakota_write(fidi,dresp,rdesc)
+
+%  collect only the responses of the appropriate class
+
+            lst=struc_class(dresp,'least_squares_term');
+
+%  write responses
+
+            [rdesc]=rlist_write(fidi,'least_squares_terms','least_squares_term',lst,rdesc);
+        end
+
+        function []=dakota_rlev_write(fidi,dresp,params)
+        end
+    end
+end
Index: /issm/trunk/src/m/classes/qmu/linear_equality_constraint.m
===================================================================
--- /issm/trunk/src/m/classes/qmu/linear_equality_constraint.m	(revision 9548)
+++ /issm/trunk/src/m/classes/qmu/linear_equality_constraint.m	(revision 9548)
@@ -0,0 +1,182 @@
+%
+%  constructor for the linear_equality_constraint class.
+%
+%  [lec]=linear_equality_constraint(varargin)
+%
+%  where the required varargin are:
+%    matrix        (double row, variable coefficients, NaN)
+%    target        (double vector, target values, 0.)
+%  and the optional varargin and defaults are:
+%    scale_type    (char, scaling type, 'none')
+%    scale         (double, scaling factor, 1.)
+%
+%  note that zero arguments constructs a default instance; one
+%  argument of the class copies the instance; and two or more
+%  arguments constructs a new instance from the arguments.
+%
+%  "Copyright 2009, by the California Institute of Technology.
+%  ALL RIGHTS RESERVED. United States Government Sponsorship
+%  acknowledged. Any commercial use must be negotiated with
+%  the Office of Technology Transfer at the California Institute
+%  of Technology.  (J. Schiermeier, NTR 47078)
+%
+%  This software may be subject to U.S. export control laws.
+%  By accepting this  software, the user agrees to comply with
+%  all applicable U.S. export laws and regulations. User has the
+%  responsibility to obtain export licenses, or other export
+%  authority as may be required before exporting such information
+%  to foreign countries or providing access to foreign persons."
+%
+classdef linear_equality_constraint
+    properties
+        matrix    = NaN;
+        target    = 0.;
+        scale_type='none';
+        scale     = 1.;
+    end
+    
+    methods
+        function [lec]=linear_equality_constraint(varargin)
+
+            switch nargin
+
+%  create a default object
+
+                case 0
+
+%  copy the object
+
+                case 1
+                    if isa(varargin{1},'linear_equality_constraint')
+                        lec=varargin{1};
+                    else
+                        error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
+                            inputname(1),class(varargin{1}),'linear_equality_constraint');
+                    end
+
+%  create the object from the input
+
+                otherwise
+                    if     (size(varargin{1},1) == array_numel(varargin{2:min(nargin,4)}) || ...
+                            size(varargin{1},1) == 1)
+                        asizec=num2cell(array_size(varargin{2:min(nargin,4)}));
+                    elseif (array_numel(varargin{2:min(nargin,4)}) == 1)
+                        asizec=num2cell([size(varargin{1},1) 1]);
+                    else
+                        error('Matrix for object of class ''%s'' has inconsistent number of rows.',...
+                              class(lec));
+                    end
+                    lec(asizec{:})=linear_equality_constraint;
+                    clear asizec
+                    
+                    for i=1:numel(lec)
+                        if (size(varargin{1},1) > 1)
+                            lec(i).matrix    =varargin{1}(i,:);
+                        else
+                            lec(i).matrix    =varargin{1};
+                        end
+                    end
+
+                    if (nargin >= 2)
+                        for i=1:numel(lec)
+                            if (numel(varargin{2}) > 1)
+                                lec(i).target    =varargin{2}(i);
+                            else
+                                lec(i).target    =varargin{2};
+                            end
+                        end
+                        if (nargin >= 3)
+                            if ischar(varargin{3})
+                                varargin{3}=cellstr(varargin{3});
+                            end
+                            for i=1:numel(lec)
+                                if (numel(varargin{3}) > 1)
+                                    lec(i).scale_type=varargin{3}{i};
+                                else
+                                    lec(i).scale_type=char(varargin{3});
+                                end
+                            end
+                            if (nargin >= 4)
+                                for i=1:numel(lec)
+                                    if (numel(varargin{4}) > 1)
+                                        lec(i).scale     =varargin{4}(i);
+                                    else
+                                        lec(i).scale     =varargin{4};
+                                    end
+                                end
+
+                                if (nargin > 4)
+                                    warning('linear_equality_constraint:extra_arg',...
+                                        'Extra arguments for object of class ''%s''.',...
+                                        class(lec));
+                                end
+                            end
+                        end
+                    end
+            end
+        end
+
+        function []=disp(lec)
+
+%  display the object
+
+            disp(sprintf('\n'));
+            for i=1:numel(lec)
+                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
+                    class(lec),inputname(1),string_dim(lec,i)));
+                disp(sprintf('        matrix: %s'      ,string_vec(lec(i).matrix)));
+                disp(sprintf('        target: %g'      ,lec(i).target));
+                disp(sprintf('    scale_type: ''%s'''  ,lec(i).scale_type));
+                disp(sprintf('         scale: %g\n'    ,lec(i).scale));
+            end
+
+        end
+
+        function [matrix]=prop_matrix(lec)
+            matrix=zeros(numel(lec),0);
+            for i=1:numel(lec)
+                matrix(i,1:size(lec(i).matrix,2))=lec(i).matrix(1,:);
+            end
+        end
+        function [lower] =prop_lower(lec)
+            lower=[];
+        end
+        function [upper] =prop_upper(lec)
+            upper=[];
+        end
+        function [target]=prop_target(lec)
+            target=zeros(size(lec));
+            for i=1:numel(lec)
+                target(i)=lec(i).target;
+            end
+            target=allequal(target,0.);
+        end
+        function [stype] =prop_stype(lec)
+            stype=cell(size(lec));
+            for i=1:numel(lec)
+                stype(i)=cellstr(lec(i).scale_type);
+            end
+            stype=allequal(stype,'none');
+        end
+        function [scale] =prop_scale(lec)
+            scale=zeros(size(lec));
+            for i=1:numel(lec)
+                scale(i)=lec(i).scale;
+            end
+            scale=allequal(scale,1.);
+        end
+    end
+    
+    methods (Static)
+        function []=dakota_write(fidi,dvar)
+
+%  collect only the variables of the appropriate class
+
+            lec=struc_class(dvar,'linear_equality_constraint');
+
+%  write constraints
+
+            lclist_write(fidi,'linear_equality_constraints','linear_equality',lec);
+        end
+    end
+end
Index: /issm/trunk/src/m/classes/qmu/linear_inequality_constraint.m
===================================================================
--- /issm/trunk/src/m/classes/qmu/linear_inequality_constraint.m	(revision 9548)
+++ /issm/trunk/src/m/classes/qmu/linear_inequality_constraint.m	(revision 9548)
@@ -0,0 +1,205 @@
+%
+%  constructor for the linear_inequality_constraint class.
+%
+%  [lic]=linear_inequality_constraint(varargin)
+%
+%  where the required varargin are:
+%    matrix        (double row, variable coefficients, NaN)
+%    lower         (double vector, lower bounds, -Inf)
+%    upper         (double vector, upper bounds, 0.)
+%  and the optional varargin and defaults are:
+%    scale_type    (char, scaling type, 'none')
+%    scale         (double, scaling factor, 1.)
+%
+%  note that zero arguments constructs a default instance; one
+%  argument of the class copies the instance; and three or more
+%  arguments constructs a new instance from the arguments.
+%
+%  "Copyright 2009, by the California Institute of Technology.
+%  ALL RIGHTS RESERVED. United States Government Sponsorship
+%  acknowledged. Any commercial use must be negotiated with
+%  the Office of Technology Transfer at the California Institute
+%  of Technology.  (J. Schiermeier, NTR 47078)
+%
+%  This software may be subject to U.S. export control laws.
+%  By accepting this  software, the user agrees to comply with
+%  all applicable U.S. export laws and regulations. User has the
+%  responsibility to obtain export licenses, or other export
+%  authority as may be required before exporting such information
+%  to foreign countries or providing access to foreign persons."
+%
+classdef linear_inequality_constraint
+    properties
+        matrix    = NaN;
+        lower     =-Inf;
+        upper     = 0.;
+        scale_type='none';
+        scale     = 1.;
+    end
+    
+    methods
+        function [lic]=linear_inequality_constraint(varargin)
+
+            switch nargin
+
+%  create a default object
+
+                case 0
+
+%  copy the object
+
+                case 1
+                    if isa(varargin{1},'linear_inequality_constraint')
+                        lic=varargin{1};
+                    else
+                        error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
+                            inputname(1),class(varargin{1}),'linear_inequality_constraint');
+                    end
+
+%  not enough arguments
+
+                case 2
+                    error('Construction of ''%s'' class object requires at least %d inputs.',...
+                        'linear_inequality_constraint',3)
+
+%  create the object from the input
+
+                otherwise
+                    if     (size(varargin{1},1) == array_numel(varargin{2:min(nargin,5)}) || ...
+                            size(varargin{1},1) == 1)
+                        asizec=num2cell(array_size(varargin{2:min(nargin,5)}));
+                    elseif (array_numel(varargin{2:min(nargin,5)}) == 1)
+                        asizec=num2cell([size(varargin{1},1) 1]);
+                    else
+                        error('Matrix for object of class ''%s'' has inconsistent number of rows.',...
+                              class(lic));
+                    end
+                    lic(asizec{:})=linear_inequality_constraint;
+                    clear asizec
+                    
+                    for i=1:numel(lic)
+                        if (size(varargin{1},1) > 1)
+                            lic(i).matrix    =varargin{1}(i,:);
+                        else
+                            lic(i).matrix    =varargin{1};
+                        end
+                    end
+
+                    if (nargin >= 2)
+                        for i=1:numel(lic)
+                            if (numel(varargin{2}) > 1)
+                                lic(i).lower     =varargin{2}(i);
+                            else
+                                lic(i).lower     =varargin{2};
+                            end
+                        end
+                        if (nargin >= 3)
+                            for i=1:numel(lic)
+                                if (numel(varargin{3}) > 1)
+                                    lic(i).upper     =varargin{3}(i);
+                                else
+                                    lic(i).upper     =varargin{3};
+                                end
+                            end
+                            if (nargin >= 4)
+                                if ischar(varargin{4})
+                                    varargin{4}=cellstr(varargin{4});
+                                end
+                                for i=1:numel(lic)
+                                    if (numel(varargin{4}) > 1)
+                                        lic(i).scale_type=varargin{4}{i};
+                                    else
+                                        lic(i).scale_type=char(varargin{4});
+                                    end
+                                end
+                                if (nargin >= 5)
+                                    for i=1:numel(lic)
+                                        if (numel(varargin{5}) > 1)
+                                            lic(i).scale     =varargin{5}(i);
+                                        else
+                                            lic(i).scale     =varargin{5};
+                                        end
+                                    end
+
+                                    if (nargin > 5)
+                                        warning('linear_inequality_constraint:extra_arg',...
+                                            'Extra arguments for object of class ''%s''.',...
+                                            class(lic));
+                                    end
+                                end
+                            end
+                        end
+                    end
+            end
+        end
+
+        function []=disp(lic)
+
+%  display the object
+
+            disp(sprintf('\n'));
+            for i=1:numel(lic)
+                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
+                    class(lic),inputname(1),string_dim(lic,i)));
+                disp(sprintf('        matrix: %s'      ,string_vec(lic(i).matrix)));
+                disp(sprintf('         lower: %g'      ,lic(i).lower));
+                disp(sprintf('         upper: %g'      ,lic(i).upper));
+                disp(sprintf('    scale_type: ''%s'''  ,lic(i).scale_type));
+                disp(sprintf('         scale: %g\n'    ,lic(i).scale));
+            end
+
+        end
+
+        function [matrix]=prop_matrix(lic)
+            matrix=zeros(numel(lic),0);
+            for i=1:numel(lic)
+                matrix(i,1:size(lic(i).matrix,2))=lic(i).matrix(1,:);
+            end
+        end
+        function [lower] =prop_lower(lic)
+            lower=zeros(size(lic));
+            for i=1:numel(lic)
+                lower(i)=lic(i).lower;
+            end
+            lower=allequal(lower,-Inf);
+        end
+        function [upper] =prop_upper(lic)
+            upper=zeros(size(lic));
+            for i=1:numel(lic)
+                upper(i)=lic(i).upper;
+            end
+            upper=allequal(upper,0.);
+        end
+        function [target]=prop_target(lic)
+            target=[];
+        end
+        function [stype] =prop_stype(lic)
+            stype=cell(size(lic));
+            for i=1:numel(lic)
+                stype(i)=cellstr(lic(i).scale_type);
+            end
+            stype=allequal(stype,'none');
+        end
+        function [scale] =prop_scale(lic)
+            scale=zeros(size(lic));
+            for i=1:numel(lic)
+                scale(i)=lic(i).scale;
+            end
+            scale=allequal(scale,1.);
+        end
+    end
+    
+    methods (Static)
+        function []=dakota_write(fidi,dvar)
+
+%  collect only the variables of the appropriate class
+
+            lic=struc_class(dvar,'linear_inequality_constraint');
+
+%  write constraints
+
+            lclist_write(fidi,'linear_inequality_constraints','linear_inequality',lic);
+        end
+    end
+end
+
Index: /issm/trunk/src/m/classes/qmu/nonlinear_equality_constraint.m
===================================================================
--- /issm/trunk/src/m/classes/qmu/nonlinear_equality_constraint.m	(revision 9548)
+++ /issm/trunk/src/m/classes/qmu/nonlinear_equality_constraint.m	(revision 9548)
@@ -0,0 +1,189 @@
+%
+%  constructor for the nonlinear_equality_constraint class.
+%
+%  [nec]=nonlinear_equality_constraint(varargin)
+%
+%  where the required varargin are:
+%    descriptor    (char, description, '')
+%    target        (double, target value, 0.)
+%  and the optional varargin and defaults are:
+%    scale_type    (char, scaling type, 'none')
+%    scale         (double, scaling factor, 1.)
+%
+%  note that zero arguments constructs a default instance; one
+%  argument of the class copies the instance; and two or more
+%  arguments constructs a new instance from the arguments.
+%
+%  "Copyright 2009, by the California Institute of Technology.
+%  ALL RIGHTS RESERVED. United States Government Sponsorship
+%  acknowledged. Any commercial use must be negotiated with
+%  the Office of Technology Transfer at the California Institute
+%  of Technology.  (J. Schiermeier, NTR 47078)
+%
+%  This software may be subject to U.S. export control laws.
+%  By accepting this  software, the user agrees to comply with
+%  all applicable U.S. export laws and regulations. User has the
+%  responsibility to obtain export licenses, or other export
+%  authority as may be required before exporting such information
+%  to foreign countries or providing access to foreign persons."
+%
+classdef nonlinear_equality_constraint
+    properties
+        descriptor='';
+        target    = 0.;
+        scale_type='none';
+        scale     = 1.;
+    end
+    
+    methods
+        function [nec]=nonlinear_equality_constraint(varargin)
+
+            switch nargin
+
+%  create a default object
+
+                case 0
+
+%  copy the object
+
+                case 1
+                    if isa(varargin{1},'nonlinear_equality_constraint')
+                        nec=varargin{1};
+                    else
+                        error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
+                            inputname(1),class(varargin{1}),'nonlinear_equality_constraint');
+                    end
+
+%  create the object from the input
+
+                otherwise
+                    asizec=num2cell(array_size(varargin{1:min(nargin,4)}));
+                    nec(asizec{:})=nonlinear_equality_constraint;
+                    clear asizec
+                    
+                    if ischar(varargin{1})
+                        varargin{1}=cellstr(varargin{1});
+                    end
+                    for i=1:numel(nec)
+                        if (numel(varargin{1}) > 1)
+                            nec(i).descriptor=varargin{1}{i};
+                        else
+                            nec(i).descriptor=[char(varargin{1}) string_dim(nec,i,'vector')];
+                        end
+                        if (numel(varargin{2}) > 1)
+                            nec(i).target    =varargin{2}(i);
+                        else
+                            nec(i).target    =varargin{2};
+                        end
+                    end
+
+                    if (nargin >= 3)
+                        if ischar(varargin{3})
+                            varargin{3}=cellstr(varargin{3});
+                        end
+                        for i=1:numel(nec)
+                            if (numel(varargin{3}) > 1)
+                                nec(i).scale_type=varargin{3}{i};
+                            else
+                                nec(i).scale_type=char(varargin{3});
+                            end
+                        end
+                        if (nargin >= 4)
+                            for i=1:numel(nec)
+                                if (numel(varargin{4}) > 1)
+                                    nec(i).scale     =varargin{4}(i);
+                                else
+                                    nec(i).scale     =varargin{4};
+                                end
+                            end
+
+                            if (nargin > 4)
+                                warning('objective_function:extra_arg',...
+                                    'Extra arguments for object of class ''%s''.',...
+                                    class(nec));
+                            end
+                        end
+                    end
+            end
+
+        end
+
+        function []=disp(nec)
+
+%  display the object
+
+            disp(sprintf('\n'));
+            for i=1:numel(nec)
+                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
+                    class(nec),inputname(1),string_dim(nec,i)));
+                disp(sprintf('    descriptor: ''%s'''  ,nec(i).descriptor));
+                disp(sprintf('        target: %g'      ,nec(i).target));
+                disp(sprintf('    scale_type: ''%s'''  ,nec(i).scale_type));
+                disp(sprintf('         scale: %g\n'    ,nec(i).scale));
+            end
+
+        end
+
+        function [desc]  =prop_desc(nec,dstr)
+            desc=cell(1,numel(nec));
+            for i=1:numel(nec)
+                if ~isempty(nec(i).descriptor)
+                    desc(i)=cellstr(nec(i).descriptor);
+                elseif ~isempty(inputname(1))
+                    desc(i)=cellstr([inputname(1) string_dim(nec,i,'vector')]);
+                elseif exist('dstr','var')
+                    desc(i)=cellstr([dstr         string_dim(nec,i,'vector')]);
+                else
+                    desc(i)=cellstr(['nec'        string_dim(nec,i,'vector')]);
+                end
+            end
+            desc=allempty(desc);
+        end
+        function [stype] =prop_stype(nec)
+            stype=cell(size(nec));
+            for i=1:numel(nec)
+                stype(i)=cellstr(nec(i).scale_type);
+            end
+            stype=allequal(stype,'none');
+        end
+        function [scale] =prop_scale(nec)
+            scale=zeros(size(nec));
+            for i=1:numel(nec)
+                scale(i)=nec(i).scale;
+            end
+            scale=allequal(scale,1.);
+        end
+        function [weight]=prop_weight(nec)
+            weight=[];
+        end
+        function [lower] =prop_lower(nec)
+            lower=[];
+        end
+        function [upper] =prop_upper(nec)
+            upper=[];
+        end
+        function [target]=prop_target(nec)
+            target=zeros(size(nec));
+            for i=1:numel(nec)
+                target(i)=nec(i).target;
+            end
+            target=allequal(target,0.);
+        end
+    end
+    
+    methods (Static)
+        function [rdesc]=dakota_write(fidi,dresp,rdesc)
+
+%  collect only the responses of the appropriate class
+
+            nec=struc_class(dresp,'nonlinear_equality_constraint');
+
+%  write responses
+
+            [rdesc]=rlist_write(fidi,'nonlinear_equality_constraints','nonlinear_equality',nec,rdesc);
+        end
+
+        function []=dakota_rlev_write(fidi,dresp,params)
+        end
+    end
+end
Index: /issm/trunk/src/m/classes/qmu/nonlinear_inequality_constraint.m
===================================================================
--- /issm/trunk/src/m/classes/qmu/nonlinear_inequality_constraint.m	(revision 9548)
+++ /issm/trunk/src/m/classes/qmu/nonlinear_inequality_constraint.m	(revision 9548)
@@ -0,0 +1,207 @@
+%
+%  constructor for the nonlinear_inequality_constraint class.
+%
+%  [nic]=nonlinear_inequality_constraint(varargin)
+%
+%  where the required varargin are:
+%    descriptor    (char, description, '')
+%    lower         (double, lower bound, -Inf)
+%    upper         (double, upper bound, 0.)
+%  and the optional varargin and defaults are:
+%    scale_type    (char, scaling type, 'none')
+%    scale         (double, scaling factor, 1.)
+%
+%  note that zero arguments constructs a default instance; one
+%  argument of the class copies the instance; and three or more
+%  arguments constructs a new instance from the arguments.
+%
+%  "Copyright 2009, by the California Institute of Technology.
+%  ALL RIGHTS RESERVED. United States Government Sponsorship
+%  acknowledged. Any commercial use must be negotiated with
+%  the Office of Technology Transfer at the California Institute
+%  of Technology.  (J. Schiermeier, NTR 47078)
+%
+%  This software may be subject to U.S. export control laws.
+%  By accepting this  software, the user agrees to comply with
+%  all applicable U.S. export laws and regulations. User has the
+%  responsibility to obtain export licenses, or other export
+%  authority as may be required before exporting such information
+%  to foreign countries or providing access to foreign persons."
+%
+classdef nonlinear_inequality_constraint
+    properties
+        descriptor='';
+        lower     =-Inf;
+        upper     = 0.;
+        scale_type='none';
+        scale     = 1.;
+    end
+    
+    methods
+        function [nic]=nonlinear_inequality_constraint(varargin)
+
+            switch nargin
+
+ %  create a default object
+
+                case 0
+
+%  copy the object
+
+                case 1
+                    if isa(varargin{1},'nonlinear_inequality_constraint')
+                        nic=varargin{1};
+                    else
+                        error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
+                            inputname(1),class(varargin{1}),'nonlinear_inequality_constraint');
+                    end
+
+%  not enough arguments
+
+                case 2
+                    error('Construction of ''%s'' class object requires at least %d inputs.',...
+                        'nonlinear_inequality_constraint',3)
+
+%  create the object from the input
+
+                otherwise
+                    asizec=num2cell(array_size(varargin{1:min(nargin,5)}));
+                    nic(asizec{:})=nonlinear_inequality_constraint;
+                    clear asizec
+                    
+                    if ischar(varargin{1})
+                        varargin{1}=cellstr(varargin{1});
+                    end
+                    for i=1:numel(nic)
+                        if (numel(varargin{1}) > 1)
+                            nic(i).descriptor=varargin{1}{i};
+                        else
+                            nic(i).descriptor=[char(varargin{1}) string_dim(nic,i,'vector')];
+                        end
+                        if (numel(varargin{2}) > 1)
+                            nic(i).lower     =varargin{2}(i);
+                        else
+                            nic(i).lower     =varargin{2};
+                        end
+                        if (numel(varargin{3}) > 1)
+                            nic(i).upper     =varargin{3}(i);
+                        else
+                            nic(i).upper     =varargin{3};
+                        end
+                    end
+
+                    if (nargin >= 4)
+                        if ischar(varargin{4})
+                            varargin{4}=cellstr(varargin{4});
+                        end
+                        for i=1:numel(nic)
+                            if (numel(varargin{4}) > 1)
+                                nic(i).scale_type=varargin{4}{i};
+                            else
+                                nic(i).scale_type=char(varargin{4});
+                            end
+                        end
+                        if (nargin >= 5)
+                            for i=1:numel(nic)
+                                if (numel(varargin{5}) > 1)
+                                    nic(i).scale     =varargin{5}(i);
+                                else
+                                    nic(i).scale     =varargin{5};
+                                end
+                            end
+
+                            if (nargin > 5)
+                                warning('objective_function:extra_arg',...
+                                    'Extra arguments for object of class ''%s''.',...
+                                    class(nic));
+                            end
+                        end
+                    end
+            end
+
+        end
+
+        function []=disp(nic)
+
+%  display the object
+
+            disp(sprintf('\n'));
+            for i=1:numel(nic)
+                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
+                    class(nic),inputname(1),string_dim(nic,i)));
+                disp(sprintf('    descriptor: ''%s'''  ,nic(i).descriptor));
+                disp(sprintf('         lower: %g'      ,nic(i).lower));
+                disp(sprintf('         upper: %g'      ,nic(i).upper));
+                disp(sprintf('    scale_type: ''%s'''  ,nic(i).scale_type));
+                disp(sprintf('         scale: %g\n'    ,nic(i).scale));
+            end
+
+        end
+
+        function [desc]  =prop_desc(nic,dstr)
+            desc=cell(1,numel(nic));
+            for i=1:numel(nic)
+                if ~isempty(nic(i).descriptor)
+                    desc(i)=cellstr(nic(i).descriptor);
+                elseif ~isempty(inputname(1))
+                    desc(i)=cellstr([inputname(1) string_dim(nic,i,'vector')]);
+                elseif exist('dstr','var')
+                    desc(i)=cellstr([dstr         string_dim(nic,i,'vector')]);
+                else
+                    desc(i)=cellstr(['nic'        string_dim(nic,i,'vector')]);
+                end
+            end
+            desc=allempty(desc);
+        end
+        function [stype] =prop_stype(nic)
+            stype=cell(size(nic));
+            for i=1:numel(nic)
+                stype(i)=cellstr(nic(i).scale_type);
+            end
+            stype=allequal(stype,'none');
+        end
+        function [scale] =prop_scale(nic)
+            scale=zeros(size(nic));
+            for i=1:numel(nic)
+                scale(i)=nic(i).scale;
+            end
+            scale=allequal(scale,1.);
+        end
+        function [weight]=prop_weight(nic)
+            weight=[];
+        end
+        function [lower] =prop_lower(nic)
+            lower=zeros(size(nic));
+            for i=1:numel(nic)
+                lower(i)=nic(i).lower;
+            end
+            lower=allequal(lower,-Inf);
+        end
+        function [upper] =prop_upper(nic)
+            upper=zeros(size(nic));
+            for i=1:numel(nic)
+                upper(i)=nic(i).upper;
+            end
+            upper=allequal(upper,0.);
+        end
+        function [target]=prop_target(nic)
+            target=[];
+        end
+    end
+    
+    methods (Static)
+        function [rdesc]=dakota_write(fidi,dresp,rdesc)
+
+%  collect only the responses of the appropriate class
+
+            nic=struc_class(dresp,'nonlinear_inequality_constraint');
+
+%  write responses
+
+            [rdesc]=rlist_write(fidi,'nonlinear_inequality_constraints','nonlinear_inequality',nic,rdesc);
+        end
+
+        function []=dakota_rlev_write(fidi,dresp,params)
+        end
+    end
+end
Index: /issm/trunk/src/m/classes/qmu/normal_uncertain.m
===================================================================
--- /issm/trunk/src/m/classes/qmu/normal_uncertain.m	(revision 9548)
+++ /issm/trunk/src/m/classes/qmu/normal_uncertain.m	(revision 9548)
@@ -0,0 +1,208 @@
+%
+%  definition for the normal_uncertain class.
+%
+%  [nuv]=normal_uncertain(varargin)
+%
+%  where the required varargin are:
+%    descriptor    (char, description, '')
+%    mean          (double, mean, NaN)
+%    stddev        (double, standard deviation, NaN)
+%  and the optional varargin and defaults are:
+%    lower         (double, lower bound, -Inf)
+%    upper         (double, upper bound,  Inf)
+%
+%  note that zero arguments constructs a default instance; one
+%  argument of the class copies the instance; and three or more
+%  arguments constructs a new instance from the arguments.
+%
+%  "Copyright 2009, by the California Institute of Technology.
+%  ALL RIGHTS RESERVED. United States Government Sponsorship
+%  acknowledged. Any commercial use must be negotiated with
+%  the Office of Technology Transfer at the California Institute
+%  of Technology.  (J. Schiermeier, NTR 47078)
+%
+%  This software may be subject to U.S. export control laws.
+%  By accepting this  software, the user agrees to comply with
+%  all applicable U.S. export laws and regulations. User has the
+%  responsibility to obtain export licenses, or other export
+%  authority as may be required before exporting such information
+%  to foreign countries or providing access to foreign persons."
+%
+classdef normal_uncertain
+    properties
+        descriptor='';
+        mean      = NaN;
+        stddev    = NaN;
+        lower     =-Inf;
+        upper     = Inf;
+    end
+    
+    methods
+        function [nuv]=normal_uncertain(varargin)
+
+            switch nargin
+
+%  create a default object
+
+                case 0
+
+%  copy the object
+
+                case 1
+                    if isa(varargin{1},'normal_uncertain')
+                        nuv=varargin{1};
+                    else
+                        error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
+                            inputname(1),class(varargin{1}),'normal_uncertain');
+                    end
+
+%  not enough arguments
+
+                case 2
+                    error('Construction of ''%s'' class object requires at least %d inputs.',...
+                        'normal_uncertain',3)
+
+%  create the object from the input
+
+                otherwise
+                    asizec=num2cell(array_size(varargin{1:min(nargin,5)}));
+                    nuv(asizec{:})=normal_uncertain;
+                    clear asizec
+                    
+                    if ischar(varargin{1})
+                        varargin{1}=cellstr(varargin{1});
+                    end
+                    for i=1:numel(nuv)
+                        if (numel(varargin{1}) > 1)
+                            nuv(i).descriptor=varargin{1}{i};
+                        else
+                            if numel(nuv)==1,
+								nuv(i).descriptor=char(varargin{1});
+							else
+								nuv(i).descriptor=[char(varargin{1}) num2str(i)];
+							end
+                        end
+                        if (numel(varargin{2}) > 1)
+                            nuv(i).mean      =varargin{2}(i);
+                        else
+                            nuv(i).mean      =varargin{2};
+                        end
+                        if (numel(varargin{3}) > 1)
+                            nuv(i).stddev    =varargin{3}(i);
+                        else
+                            nuv(i).stddev    =varargin{3};
+                        end
+                    end
+
+                    if (nargin >= 4)
+                        for i=1:numel(nuv)
+                            if (numel(varargin{4}) > 1)
+                                nuv(i).lower     =varargin{4}(i);
+                            else
+                                nuv(i).lower     =varargin{4};
+                            end
+                        end
+                        if (nargin >= 5)
+                            for i=1:numel(nuv)
+                                if (numel(varargin{5}) > 1)
+                                    nuv(i).upper     =varargin{5}(i);
+                                else
+                                    nuv(i).upper     =varargin{5};
+                                end
+                            end
+                            if (nargin > 5)
+                                warning('normal_uncertain:extra_arg',...
+                                    'Extra arguments for object of class ''%s''.',...
+                                    class(nuv));
+                            end
+                        end
+                    end
+            end
+
+        end
+
+        function []=disp(nuv)
+
+%  display the object
+
+            disp(sprintf('\n'));
+            for i=1:numel(nuv)
+                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
+                    class(nuv),inputname(1),string_dim(nuv,i)));
+                disp(sprintf('    descriptor: ''%s'''  ,nuv(i).descriptor));
+                disp(sprintf('          mean: %g'      ,nuv(i).mean));
+                disp(sprintf('        stddev: %g'      ,nuv(i).stddev));
+                disp(sprintf('         lower: %g'      ,nuv(i).lower));
+                disp(sprintf('         upper: %g\n'    ,nuv(i).upper));
+            end
+
+        end
+
+        function [desc]  =prop_desc(nuv,dstr)
+            desc=cell(1,numel(nuv));
+            for i=1:numel(nuv)
+                if ~isempty(nuv(i).descriptor)
+                    desc(i)=cellstr(nuv(i).descriptor);
+                elseif ~isempty(inputname(1))
+                    desc(i)=cellstr([inputname(1) string_dim(nuv,i,'vector')]);
+                elseif exist('dstr','var')
+                    desc(i)=cellstr([dstr         string_dim(nuv,i,'vector')]);
+                else
+                    desc(i)=cellstr(['nuv'        string_dim(nuv,i,'vector')]);
+                end
+            end
+            desc=allempty(desc);
+        end
+        function [initpt]=prop_initpt(nuv)
+            initpt=[];
+        end
+        function [lower] =prop_lower(nuv)
+            lower=zeros(1,numel(nuv));
+            for i=1:numel(nuv)
+                lower(i)=nuv(i).lower;
+            end
+            lower=allequal(lower,-Inf);
+        end
+        function [upper] =prop_upper(nuv)
+            upper=zeros(1,numel(nuv));
+            for i=1:numel(nuv)
+                upper(i)=nuv(i).upper;
+            end
+            upper=allequal(upper, Inf);
+        end
+        function [mean]  =prop_mean(nuv)
+            mean=zeros(1,numel(nuv));
+            for i=1:numel(nuv)
+                mean(i)=nuv(i).mean;
+            end
+        end
+        function [stddev]=prop_stddev(nuv)
+            stddev=zeros(1,numel(nuv));
+            for i=1:numel(nuv)
+                stddev(i)=nuv(i).stddev;
+            end
+        end
+        function [initst]=prop_initst(nuv)
+            initst=[];
+        end
+        function [stype] =prop_stype(nuv)
+            stype={};
+        end
+        function [scale] =prop_scale(nuv)
+            scale=[];
+        end
+    end
+    
+    methods (Static)
+        function []=dakota_write(fidi,dvar)
+
+%  collect only the variables of the appropriate class
+
+            nuv=struc_class(dvar,'normal_uncertain');
+
+%  write variables
+
+            vlist_write(fidi,'normal_uncertain','nuv',nuv);
+        end
+    end
+end
Index: /issm/trunk/src/m/classes/qmu/objective_function.m
===================================================================
--- /issm/trunk/src/m/classes/qmu/objective_function.m	(revision 9548)
+++ /issm/trunk/src/m/classes/qmu/objective_function.m	(revision 9548)
@@ -0,0 +1,187 @@
+%
+%  definition for the objective_function class.
+%
+%  [of]=objective_function(varargin)
+%
+%  where the required varargin are:
+%    descriptor    (char, description, '')
+%  and the optional varargin and defaults are:
+%    scale_type    (char, scaling type, 'none')
+%    scale         (double, scaling factor, 1.)
+%    weight        (double, weighting factor, 1.)
+%
+%  note that zero arguments constructs a default instance; one
+%  argument of the class copies the instance; and one or more
+%  arguments constructs a new instance from the arguments.
+%
+%  "Copyright 2009, by the California Institute of Technology.
+%  ALL RIGHTS RESERVED. United States Government Sponsorship
+%  acknowledged. Any commercial use must be negotiated with
+%  the Office of Technology Transfer at the California Institute
+%  of Technology.  (J. Schiermeier, NTR 47078)
+%
+%  This software may be subject to U.S. export control laws.
+%  By accepting this  software, the user agrees to comply with
+%  all applicable U.S. export laws and regulations. User has the
+%  responsibility to obtain export licenses, or other export
+%  authority as may be required before exporting such information
+%  to foreign countries or providing access to foreign persons."
+%
+classdef objective_function
+    properties
+        descriptor='';
+        scale_type='none';
+        scale     = 1.;
+        weight    = 1.;
+    end
+    
+    methods
+        function [of]=objective_function(varargin)
+
+            switch nargin
+
+%  create a default object
+
+                case 0
+
+%  copy the object or create the object from the input
+
+                otherwise
+                    if  (nargin == 1) && isa(varargin{1},'objective_function')
+                        of=varargin{1};
+                    else
+                        asizec=num2cell(array_size(varargin{1:min(nargin,4)}));
+                        of(asizec{:})=objective_function;
+                        clear asizec
+                    
+                        if ischar(varargin{1})
+                            varargin{1}=cellstr(varargin{1});
+                        end
+                        for i=1:numel(of)
+                            if (numel(varargin{1}) > 1)
+                                of(i).descriptor=varargin{1}{i};
+                            else
+                                of(i).descriptor=[char(varargin{1}) string_dim(of,i,'vector')];
+                            end
+                        end
+
+                        if (nargin >= 2)
+                            if ischar(varargin{2})
+                                varargin{2}=cellstr(varargin{2});
+                            end
+                            for i=1:numel(of)
+                                if (numel(varargin{2}) > 1)
+                                    of(i).scale_type=varargin{2}{i};
+                                else
+                                    of(i).scale_type=char(varargin{2});
+                                end
+                            end
+                            if (nargin >= 3)
+                                for i=1:numel(of)
+                                    if (numel(varargin{3}) > 1)
+                                        of(i).scale     =varargin{3}(i);
+                                    else
+                                        of(i).scale     =varargin{3};
+                                    end
+                                end
+                                if (nargin >= 4)
+                                    for i=1:numel(of)
+                                        if (numel(varargin{4}) > 1)
+                                            of(i).weight    =varargin{4}(i);
+                                        else
+                                            of(i).weight    =varargin{4};
+                                        end
+                                    end
+
+                                    if (nargin > 4)
+                                        warning('objective_function:extra_arg',...
+                                            'Extra arguments for object of class ''%s''.',...
+                                            class(of));
+                                    end
+                                end
+                            end
+                        end
+                    end
+            end
+
+        end
+
+        function []=disp(of)
+
+%  display the object
+
+            disp(sprintf('\n'));
+            for i=1:numel(of)
+                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
+                    class(of),inputname(1),string_dim(of,i)));
+                disp(sprintf('    descriptor: ''%s'''  ,of(i).descriptor));
+                disp(sprintf('    scale_type: ''%s'''  ,of(i).scale_type));
+                disp(sprintf('         scale: %g'      ,of(i).scale));
+                disp(sprintf('        weight: %g\n'    ,of(i).weight));
+            end
+
+        end
+
+        function [desc]  =prop_desc(of,dstr)
+            desc=cell(1,numel(of));
+            for i=1:numel(of)
+                if ~isempty(of(i).descriptor)
+                    desc(i)=cellstr(of(i).descriptor);
+                elseif ~isempty(inputname(1))
+                    desc(i)=cellstr([inputname(1) string_dim(of,i,'vector')]);
+                elseif exist('dstr','var')
+                    desc(i)=cellstr([dstr         string_dim(of,i,'vector')]);
+                else
+                    desc(i)=cellstr(['of'         string_dim(of,i,'vector')]);
+                end
+            end
+            desc=allempty(desc);
+        end
+        function [stype] =prop_stype(of)
+            stype=cell(1,numel(of));
+            for i=1:numel(of)
+                stype(i)=cellstr(of(i).scale_type);
+            end
+            stype=allequal(stype,'none');
+        end
+        function [scale] =prop_scale(of)
+            scale=zeros(1,numel(of));
+            for i=1:numel(of)
+                scale(i)=of(i).scale;
+            end
+            scale=allequal(scale,1.);
+        end
+        function [weight]=prop_weight(of)
+            weight=zeros(1,numel(of));
+            for i=1:numel(of)
+                weight(i)=of(i).weight;
+            end
+            weight=allequal(weight,1.);
+        end
+        function [lower] =prop_lower(of)
+            lower=[];
+        end
+        function [upper] =prop_upper(of)
+            upper=[];
+        end
+        function [target]=prop_target(of)
+            target=[];
+        end
+    end
+    
+    methods (Static)
+        function [rdesc]=dakota_write(fidi,dresp,rdesc)
+
+%  collect only the responses of the appropriate class
+
+            of=struc_class(dresp,'objective_function');
+
+%  write responses
+
+            [rdesc]=rlist_write(fidi,'objective_functions','objective_function',of,rdesc);
+        end
+
+        function []=dakota_rlev_write(fidi,dresp,params)
+        end
+    end
+end
Index: /issm/trunk/src/m/classes/qmu/response_function.m
===================================================================
--- /issm/trunk/src/m/classes/qmu/response_function.m	(revision 9548)
+++ /issm/trunk/src/m/classes/qmu/response_function.m	(revision 9548)
@@ -0,0 +1,192 @@
+%
+%  definition for the response_function class.
+%
+%  [rf]=response_function(varargin)
+%
+%  where the required varargin are:
+%    descriptor    (char, description, '')
+%  and the optional varargin and defaults are:
+%    respl         (double vector, response levels, [])
+%    probl         (double vector, probability levels, [])
+%    rell          (double vector, reliability levels, [])
+%    grell         (double vector, gen. reliability levels, [])
+%
+%  note that zero arguments constructs a default instance; one
+%  argument of the class copies the instance; and one or more
+%  arguments constructs a new instance from the arguments.
+%
+%  "Copyright 2009, by the California Institute of Technology.
+%  ALL RIGHTS RESERVED. United States Government Sponsorship
+%  acknowledged. Any commercial use must be negotiated with
+%  the Office of Technology Transfer at the California Institute
+%  of Technology.  (J. Schiermeier, NTR 47078)
+%
+%  This software may be subject to U.S. export control laws.
+%  By accepting this  software, the user agrees to comply with
+%  all applicable U.S. export laws and regulations. User has the
+%  responsibility to obtain export licenses, or other export
+%  authority as may be required before exporting such information
+%  to foreign countries or providing access to foreign persons."
+%
+classdef response_function
+    properties
+        descriptor='';
+        respl     =[];
+        probl     =[];
+        rell      =[];
+        grell     =[];
+    end
+    
+    methods
+        function [rf]=response_function(varargin)
+
+            switch nargin
+
+%  create a default object
+
+                case 0
+
+%  copy the object or create the object from the input
+
+                otherwise
+                    if  (nargin == 1) && isa(varargin{1},'response_function')
+                        rf=varargin{1};
+                    else
+                        asizec=num2cell(array_size(varargin{1:min(nargin,1)}));
+                        rf(asizec{:})=response_function;
+                        clear asizec
+                    
+                        if ischar(varargin{1})
+                            varargin{1}=cellstr(varargin{1});
+                        end
+                        for i=1:numel(rf)
+                            if (numel(varargin{1}) > 1)
+                                rf(i).descriptor=varargin{1}{i};
+                            else
+                                rf(i).descriptor=[char(varargin{1}) string_dim(rf,i,'vector')];
+                            end
+                        end
+
+                        if (nargin >= 2)
+                            for i=1:numel(rf)
+                                rf(i).respl     =varargin{2};
+                            end
+                            if (nargin >= 3)
+                                for i=1:numel(rf)
+                                    rf(i).probl     =varargin{3};
+                                end
+                                if (nargin >= 4)
+                                    for i=1:numel(rf)
+                                        rf(i).rell      =varargin{4};
+                                    end
+                                    if (nargin >= 5)
+                                        for i=1:numel(rf)
+                                            rf(i).grell     =varargin{5};
+                                        end
+
+                                        if (nargin > 5)
+                                            warning('response_function:extra_arg',...
+                                                'Extra arguments for object of class ''%s''.',...
+                                                class(rf));
+                                        end
+                                    end
+                                end
+                            end
+                        end
+                    end
+            end
+
+        end
+
+        function []=disp(rf)
+
+        %  display the object
+
+            disp(sprintf('\n'));
+            for i=1:numel(rf)
+                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
+                    class(rf),inputname(1),string_dim(rf,i)));
+                disp(sprintf('    descriptor: ''%s'''  ,rf(i).descriptor));
+                disp(sprintf('         respl: %s'      ,string_vec(rf(i).respl)));
+                disp(sprintf('         probl: %s'      ,string_vec(rf(i).probl)));
+                disp(sprintf('          rell: %s'      ,string_vec(rf(i).rell)));
+                disp(sprintf('         grell: %s\n'    ,string_vec(rf(i).grell)));
+            end
+
+        end
+
+        function [desc]  =prop_desc(rf,dstr)
+            desc=cell(1,numel(rf));
+            for i=1:numel(rf)
+                if ~isempty(rf(i).descriptor)
+                    desc(i)=cellstr(rf(i).descriptor);
+                elseif ~isempty(inputname(1))
+                    desc(i)=cellstr([inputname(1) string_dim(rf,i,'vector')]);
+                elseif exist('dstr','var')
+                    desc(i)=cellstr([dstr         string_dim(rf,i,'vector')]);
+                else
+                    desc(i)=cellstr(['rf'         string_dim(rf,i,'vector')]);
+                end
+            end
+            desc=allempty(desc);
+        end
+        function [stype] =prop_stype(rf)
+            stype={};
+        end
+        function [scale] =prop_scale(rf)
+            scale=[];
+        end
+        function [weight]=prop_weight(rf)
+            weight=[];
+        end
+        function [lower] =prop_lower(rf)
+            lower=[];
+        end
+        function [upper] =prop_upper(rf)
+            upper=[];
+        end
+        function [target]=prop_target(rf)
+            target=[];
+        end
+        function [respl,probl,rell,grell]=prop_levels(rf)
+            respl=cell(1,numel(rf));
+            probl=cell(1,numel(rf));
+            rell =cell(1,numel(rf));
+            grell=cell(1,numel(rf));
+            for i=1:numel(rf)
+                respl(i)={rf(i).respl};
+                probl(i)={rf(i).probl};
+                rell (i)={rf(i).rell};
+                grell(i)={rf(i).grell};
+            end
+            respl=allempty(respl);
+            probl=allempty(probl);
+            rell =allempty(rell);
+            grell=allempty(grell);
+        end
+    end
+    
+    methods (Static)
+        function [rdesc]=dakota_write(fidi,dresp,rdesc)
+
+%  collect only the responses of the appropriate class
+
+            rf=struc_class(dresp,'response_function');
+
+%  write responses
+
+            [rdesc]=rlist_write(fidi,'response_functions','response_function',rf,rdesc);
+        end
+        
+        function []=dakota_rlev_write(fidi,dresp,params)
+
+%  collect only the responses of the appropriate class
+
+            rf=struc_class(dresp,'response_function');
+
+%  write response levels
+
+            rlev_write(fidi,rf,params);
+        end
+    end
+end
Index: /issm/trunk/src/m/classes/qmu/uniform_uncertain.m
===================================================================
--- /issm/trunk/src/m/classes/qmu/uniform_uncertain.m	(revision 9548)
+++ /issm/trunk/src/m/classes/qmu/uniform_uncertain.m	(revision 9548)
@@ -0,0 +1,167 @@
+%
+%  definition for the uniform_uncertain class.
+%
+%  [uuv]=uniform_uncertain(varargin)
+%
+%  where the required varargin are:
+%    descriptor    (char, description, '')
+%    lower         (double, lower bound, -Inf)
+%    upper         (double, upper bound,  Inf)
+%
+%  note that zero arguments constructs a default instance; one
+%  argument of the class copies the instance; and three or more
+%  arguments constructs a new instance from the arguments.
+%
+%  "Copyright 2009, by the California Institute of Technology.
+%  ALL RIGHTS RESERVED. United States Government Sponsorship
+%  acknowledged. Any commercial use must be negotiated with
+%  the Office of Technology Transfer at the California Institute
+%  of Technology.  (J. Schiermeier, NTR 47078)
+%
+%  This software may be subject to U.S. export control laws.
+%  By accepting this  software, the user agrees to comply with
+%  all applicable U.S. export laws and regulations. User has the
+%  responsibility to obtain export licenses, or other export
+%  authority as may be required before exporting such information
+%  to foreign countries or providing access to foreign persons."
+%
+classdef uniform_uncertain
+    properties
+        descriptor='';
+        lower     =-Inf;
+        upper     = Inf;
+    end
+    
+    methods
+        function [uuv]=uniform_uncertain(varargin)
+
+            switch nargin
+
+%  create a default object
+
+                case 0
+
+%  copy the object
+
+                case 1
+                    if isa(varargin{1},'uniform_uncertain')
+                        uuv=varargin{1};
+                    else
+                        error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
+                            inputname(1),class(varargin{1}),'uniform_uncertain');
+                    end
+
+%  not enough arguments
+
+                case 2
+                    error('Construction of ''%s'' class object requires at least %d inputs.',...
+                        'uniform_uncertain',3)
+
+%  create the object from the input
+
+                otherwise
+                    asizec=num2cell(array_size(varargin{1:min(nargin,3)}));
+                    uuv(asizec{:})=uniform_uncertain;
+                    clear asizec
+                    
+                    if ischar(varargin{1})
+                        varargin{1}=cellstr(varargin{1});
+                    end
+                    for i=1:numel(uuv)
+                        if (numel(varargin{1}) > 1)
+                            uuv(i).descriptor=varargin{1}{i};
+                        else
+                            uuv(i).descriptor=[char(varargin{1}) string_dim(uuv,i,'vector')];
+                        end
+                        if (numel(varargin{2}) > 1)
+                            uuv(i).lower     =varargin{2}(i);
+                        else
+                            uuv(i).lower     =varargin{2};
+                        end
+                        if (numel(varargin{3}) > 1)
+                            uuv(i).upper     =varargin{3}(i);
+                        else
+                            uuv(i).upper     =varargin{3};
+                        end
+                    end
+            end
+
+        end
+
+        function []=disp(uuv)
+
+%  display the object
+
+            disp(sprintf('\n'));
+            for i=1:numel(uuv)
+                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
+                    class(uuv),inputname(1),string_dim(uuv,i)));
+                disp(sprintf('    descriptor: ''%s'''  ,uuv(i).descriptor));
+                disp(sprintf('         lower: %g'      ,uuv(i).lower));
+                disp(sprintf('         upper: %g\n'    ,uuv(i).upper));
+            end
+
+        end
+
+        function [desc]  =prop_desc(uuv,dstr)
+            desc=cell(1,numel(uuv));
+            for i=1:numel(uuv)
+                if ~isempty(uuv(i).descriptor)
+                    desc(i)=cellstr(uuv(i).descriptor);
+                elseif ~isempty(inputname(1))
+                    desc(i)=cellstr([inputname(1) string_dim(uuv,i,'vector')]);
+                elseif exist('dstr','var')
+                    desc(i)=cellstr([dstr         string_dim(uuv,i,'vector')]);
+                else
+                    desc(i)=cellstr(['uuv'        string_dim(uuv,i,'vector')]);
+                end
+            end
+            desc=allempty(desc);
+        end
+        function [initpt]=prop_initpt(uuv)
+            initpt=[];
+        end
+        function [lower] =prop_lower(uuv)
+            lower=zeros(1,numel(uuv));
+            for i=1:numel(uuv)
+                lower(i)=uuv(i).lower;
+            end
+            lower=allequal(lower,-Inf);
+        end
+        function [upper] =prop_upper(uuv)
+            upper=zeros(1,numel(uuv));
+            for i=1:numel(uuv)
+                upper(i)=uuv(i).upper;
+            end
+            upper=allequal(upper, Inf);
+        end
+        function [mean]  =prop_mean(uuv)
+            mean=[];
+        end
+        function [stddev]=prop_stddev(uuv)
+            stddev=[];
+        end
+        function [initst]=prop_initst(uuv)
+            initst=[];
+        end
+        function [stype] =prop_stype(uuv)
+            stype={};
+        end
+        function [scale] =prop_scale(uuv)
+            scale=[];
+        end
+    end
+    
+    methods (Static)
+        function []=dakota_write(fidi,dvar)
+
+%  collect only the variables of the appropriate class
+
+            uuv=struc_class(dvar,'uniform_uncertain');
+
+%  write variables
+
+            vlist_write(fidi,'uniform_uncertain','uuv',uuv);
+        end
+    end
+end
Index: sm/trunk/src/m/classes/response_function.m
===================================================================
--- /issm/trunk/src/m/classes/response_function.m	(revision 9547)
+++ 	(revision )
@@ -1,192 +1,0 @@
-%
-%  definition for the response_function class.
-%
-%  [rf]=response_function(varargin)
-%
-%  where the required varargin are:
-%    descriptor    (char, description, '')
-%  and the optional varargin and defaults are:
-%    respl         (double vector, response levels, [])
-%    probl         (double vector, probability levels, [])
-%    rell          (double vector, reliability levels, [])
-%    grell         (double vector, gen. reliability levels, [])
-%
-%  note that zero arguments constructs a default instance; one
-%  argument of the class copies the instance; and one or more
-%  arguments constructs a new instance from the arguments.
-%
-%  "Copyright 2009, by the California Institute of Technology.
-%  ALL RIGHTS RESERVED. United States Government Sponsorship
-%  acknowledged. Any commercial use must be negotiated with
-%  the Office of Technology Transfer at the California Institute
-%  of Technology.  (J. Schiermeier, NTR 47078)
-%
-%  This software may be subject to U.S. export control laws.
-%  By accepting this  software, the user agrees to comply with
-%  all applicable U.S. export laws and regulations. User has the
-%  responsibility to obtain export licenses, or other export
-%  authority as may be required before exporting such information
-%  to foreign countries or providing access to foreign persons."
-%
-classdef response_function
-    properties
-        descriptor='';
-        respl     =[];
-        probl     =[];
-        rell      =[];
-        grell     =[];
-    end
-    
-    methods
-        function [rf]=response_function(varargin)
-
-            switch nargin
-
-%  create a default object
-
-                case 0
-
-%  copy the object or create the object from the input
-
-                otherwise
-                    if  (nargin == 1) && isa(varargin{1},'response_function')
-                        rf=varargin{1};
-                    else
-                        asizec=num2cell(array_size(varargin{1:min(nargin,1)}));
-                        rf(asizec{:})=response_function;
-                        clear asizec
-                    
-                        if ischar(varargin{1})
-                            varargin{1}=cellstr(varargin{1});
-                        end
-                        for i=1:numel(rf)
-                            if (numel(varargin{1}) > 1)
-                                rf(i).descriptor=varargin{1}{i};
-                            else
-                                rf(i).descriptor=[char(varargin{1}) string_dim(rf,i,'vector')];
-                            end
-                        end
-
-                        if (nargin >= 2)
-                            for i=1:numel(rf)
-                                rf(i).respl     =varargin{2};
-                            end
-                            if (nargin >= 3)
-                                for i=1:numel(rf)
-                                    rf(i).probl     =varargin{3};
-                                end
-                                if (nargin >= 4)
-                                    for i=1:numel(rf)
-                                        rf(i).rell      =varargin{4};
-                                    end
-                                    if (nargin >= 5)
-                                        for i=1:numel(rf)
-                                            rf(i).grell     =varargin{5};
-                                        end
-
-                                        if (nargin > 5)
-                                            warning('response_function:extra_arg',...
-                                                'Extra arguments for object of class ''%s''.',...
-                                                class(rf));
-                                        end
-                                    end
-                                end
-                            end
-                        end
-                    end
-            end
-
-        end
-
-        function []=disp(rf)
-
-        %  display the object
-
-            disp(sprintf('\n'));
-            for i=1:numel(rf)
-                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
-                    class(rf),inputname(1),string_dim(rf,i)));
-                disp(sprintf('    descriptor: ''%s'''  ,rf(i).descriptor));
-                disp(sprintf('         respl: %s'      ,string_vec(rf(i).respl)));
-                disp(sprintf('         probl: %s'      ,string_vec(rf(i).probl)));
-                disp(sprintf('          rell: %s'      ,string_vec(rf(i).rell)));
-                disp(sprintf('         grell: %s\n'    ,string_vec(rf(i).grell)));
-            end
-
-        end
-
-        function [desc]  =prop_desc(rf,dstr)
-            desc=cell(1,numel(rf));
-            for i=1:numel(rf)
-                if ~isempty(rf(i).descriptor)
-                    desc(i)=cellstr(rf(i).descriptor);
-                elseif ~isempty(inputname(1))
-                    desc(i)=cellstr([inputname(1) string_dim(rf,i,'vector')]);
-                elseif exist('dstr','var')
-                    desc(i)=cellstr([dstr         string_dim(rf,i,'vector')]);
-                else
-                    desc(i)=cellstr(['rf'         string_dim(rf,i,'vector')]);
-                end
-            end
-            desc=allempty(desc);
-        end
-        function [stype] =prop_stype(rf)
-            stype={};
-        end
-        function [scale] =prop_scale(rf)
-            scale=[];
-        end
-        function [weight]=prop_weight(rf)
-            weight=[];
-        end
-        function [lower] =prop_lower(rf)
-            lower=[];
-        end
-        function [upper] =prop_upper(rf)
-            upper=[];
-        end
-        function [target]=prop_target(rf)
-            target=[];
-        end
-        function [respl,probl,rell,grell]=prop_levels(rf)
-            respl=cell(1,numel(rf));
-            probl=cell(1,numel(rf));
-            rell =cell(1,numel(rf));
-            grell=cell(1,numel(rf));
-            for i=1:numel(rf)
-                respl(i)={rf(i).respl};
-                probl(i)={rf(i).probl};
-                rell (i)={rf(i).rell};
-                grell(i)={rf(i).grell};
-            end
-            respl=allempty(respl);
-            probl=allempty(probl);
-            rell =allempty(rell);
-            grell=allempty(grell);
-        end
-    end
-    
-    methods (Static)
-        function [rdesc]=dakota_write(fidi,dresp,rdesc)
-
-%  collect only the responses of the appropriate class
-
-            rf=struc_class(dresp,'response_function');
-
-%  write responses
-
-            [rdesc]=rlist_write(fidi,'response_functions','response_function',rf,rdesc);
-        end
-        
-        function []=dakota_rlev_write(fidi,dresp,params)
-
-%  collect only the responses of the appropriate class
-
-            rf=struc_class(dresp,'response_function');
-
-%  write response levels
-
-            rlev_write(fidi,rf,params);
-        end
-    end
-end
Index: sm/trunk/src/m/classes/uniform_uncertain.m
===================================================================
--- /issm/trunk/src/m/classes/uniform_uncertain.m	(revision 9547)
+++ 	(revision )
@@ -1,167 +1,0 @@
-%
-%  definition for the uniform_uncertain class.
-%
-%  [uuv]=uniform_uncertain(varargin)
-%
-%  where the required varargin are:
-%    descriptor    (char, description, '')
-%    lower         (double, lower bound, -Inf)
-%    upper         (double, upper bound,  Inf)
-%
-%  note that zero arguments constructs a default instance; one
-%  argument of the class copies the instance; and three or more
-%  arguments constructs a new instance from the arguments.
-%
-%  "Copyright 2009, by the California Institute of Technology.
-%  ALL RIGHTS RESERVED. United States Government Sponsorship
-%  acknowledged. Any commercial use must be negotiated with
-%  the Office of Technology Transfer at the California Institute
-%  of Technology.  (J. Schiermeier, NTR 47078)
-%
-%  This software may be subject to U.S. export control laws.
-%  By accepting this  software, the user agrees to comply with
-%  all applicable U.S. export laws and regulations. User has the
-%  responsibility to obtain export licenses, or other export
-%  authority as may be required before exporting such information
-%  to foreign countries or providing access to foreign persons."
-%
-classdef uniform_uncertain
-    properties
-        descriptor='';
-        lower     =-Inf;
-        upper     = Inf;
-    end
-    
-    methods
-        function [uuv]=uniform_uncertain(varargin)
-
-            switch nargin
-
-%  create a default object
-
-                case 0
-
-%  copy the object
-
-                case 1
-                    if isa(varargin{1},'uniform_uncertain')
-                        uuv=varargin{1};
-                    else
-                        error('Object ''%s'' is a ''%s'' class object, not ''%s''.',...
-                            inputname(1),class(varargin{1}),'uniform_uncertain');
-                    end
-
-%  not enough arguments
-
-                case 2
-                    error('Construction of ''%s'' class object requires at least %d inputs.',...
-                        'uniform_uncertain',3)
-
-%  create the object from the input
-
-                otherwise
-                    asizec=num2cell(array_size(varargin{1:min(nargin,3)}));
-                    uuv(asizec{:})=uniform_uncertain;
-                    clear asizec
-                    
-                    if ischar(varargin{1})
-                        varargin{1}=cellstr(varargin{1});
-                    end
-                    for i=1:numel(uuv)
-                        if (numel(varargin{1}) > 1)
-                            uuv(i).descriptor=varargin{1}{i};
-                        else
-                            uuv(i).descriptor=[char(varargin{1}) string_dim(uuv,i,'vector')];
-                        end
-                        if (numel(varargin{2}) > 1)
-                            uuv(i).lower     =varargin{2}(i);
-                        else
-                            uuv(i).lower     =varargin{2};
-                        end
-                        if (numel(varargin{3}) > 1)
-                            uuv(i).upper     =varargin{3}(i);
-                        else
-                            uuv(i).upper     =varargin{3};
-                        end
-                    end
-            end
-
-        end
-
-        function []=disp(uuv)
-
-%  display the object
-
-            disp(sprintf('\n'));
-            for i=1:numel(uuv)
-                disp(sprintf('class ''%s'' object ''%s%s'' = \n',...
-                    class(uuv),inputname(1),string_dim(uuv,i)));
-                disp(sprintf('    descriptor: ''%s'''  ,uuv(i).descriptor));
-                disp(sprintf('         lower: %g'      ,uuv(i).lower));
-                disp(sprintf('         upper: %g\n'    ,uuv(i).upper));
-            end
-
-        end
-
-        function [desc]  =prop_desc(uuv,dstr)
-            desc=cell(1,numel(uuv));
-            for i=1:numel(uuv)
-                if ~isempty(uuv(i).descriptor)
-                    desc(i)=cellstr(uuv(i).descriptor);
-                elseif ~isempty(inputname(1))
-                    desc(i)=cellstr([inputname(1) string_dim(uuv,i,'vector')]);
-                elseif exist('dstr','var')
-                    desc(i)=cellstr([dstr         string_dim(uuv,i,'vector')]);
-                else
-                    desc(i)=cellstr(['uuv'        string_dim(uuv,i,'vector')]);
-                end
-            end
-            desc=allempty(desc);
-        end
-        function [initpt]=prop_initpt(uuv)
-            initpt=[];
-        end
-        function [lower] =prop_lower(uuv)
-            lower=zeros(1,numel(uuv));
-            for i=1:numel(uuv)
-                lower(i)=uuv(i).lower;
-            end
-            lower=allequal(lower,-Inf);
-        end
-        function [upper] =prop_upper(uuv)
-            upper=zeros(1,numel(uuv));
-            for i=1:numel(uuv)
-                upper(i)=uuv(i).upper;
-            end
-            upper=allequal(upper, Inf);
-        end
-        function [mean]  =prop_mean(uuv)
-            mean=[];
-        end
-        function [stddev]=prop_stddev(uuv)
-            stddev=[];
-        end
-        function [initst]=prop_initst(uuv)
-            initst=[];
-        end
-        function [stype] =prop_stype(uuv)
-            stype={};
-        end
-        function [scale] =prop_scale(uuv)
-            scale=[];
-        end
-    end
-    
-    methods (Static)
-        function []=dakota_write(fidi,dvar)
-
-%  collect only the variables of the appropriate class
-
-            uuv=struc_class(dvar,'uniform_uncertain');
-
-%  write variables
-
-            vlist_write(fidi,'uniform_uncertain','uuv',uuv);
-        end
-    end
-end
