Index: /issm/trunk/src/m/solutions/dakota/examples/dakota_rosenbrock_2d.m
===================================================================
--- /issm/trunk/src/m/solutions/dakota/examples/dakota_rosenbrock_2d.m	(revision 3113)
+++ /issm/trunk/src/m/solutions/dakota/examples/dakota_rosenbrock_2d.m	(revision 3113)
@@ -0,0 +1,60 @@
+%
+%  multi-dimensional parameter study for rosenbrock case
+%  (see Users4.2.pdf, Sec. 2.4.1)
+%
+%  "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."
+%
+
+function [dout,ddat]=dakota_rosenbrock_2d()
+
+%  define dakota variables as continuous design
+%  (may use set 1 or set 2 of variables, but not both)
+dvar(1).cdv(1)=continuous_design('x1',0,-2,2);
+dvar(1).cdv(2)=continuous_design('x2',0,-2,2);
+dvar(2).x1=continuous_design('',0,-2,2);
+dvar(2).x2=continuous_design('',0,-2,2);
+
+%  define dakota response as objective function
+%  (may use set 1 or set 2 of responses, but not both)
+dresp(1).of=objective_function('f');
+dresp(2).f=objective_function('');
+
+%  define dakota method and specify method-dependent parameters
+dmeth=dakota_method('multidim');
+dmeth=dmeth_params_set(dmeth,'partitions',[8 8]);
+
+%  specify method-independent parameters
+%  (dakota_in_params does not need to be called, but provides a template)
+dparams=dakota_in_params([]);
+dparams.direct=true;
+dparams.analysis_driver='rosenbrock';
+dparams.tabular_graphics_data=true;
+dparams.tabular_graphics_file='dakota_rosenbrock_2d.dat';
+
+%  write out dakota input file
+dakota_in_write(dmeth,dvar(2),dresp(2),dparams,'dakota_rosenbrock_2d.in')
+
+%  execute dakota
+!dakota -i dakota_rosenbrock_2d.in -o dakota_rosenbrock_2d.out
+
+%  read dakota output and tabular data files
+%  (output file for parameter studies has no interesting info)
+[method,dout]=dakota_out_parse('dakota_rosenbrock_2d.out');
+[~     ,ddat]=dakota_out_parse('dakota_rosenbrock_2d.dat');
+
+%  perform any desired plotting
+plot_rvsv_surf(ddat,{'x1','x2'},ddat,{'f'})
+
+end
+
Index: /issm/trunk/src/m/solutions/dakota/examples/dakota_rosenbrock_ls.m
===================================================================
--- /issm/trunk/src/m/solutions/dakota/examples/dakota_rosenbrock_ls.m	(revision 3113)
+++ /issm/trunk/src/m/solutions/dakota/examples/dakota_rosenbrock_ls.m	(revision 3113)
@@ -0,0 +1,58 @@
+%
+%  least squares study for rosenbrock case
+%  (see Users4.2.pdf, Sec. 2.4.1)
+%
+%  "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."
+%
+
+function [dout,ddat]=dakota_rosenbrock_ls()
+
+%  define dakota variables as continuous design
+dvar.x1=continuous_design('',-1.2,-2,2);
+dvar.x2=continuous_design('', 1.0,-2,2);
+
+%  define dakota response as least-squares terms
+dresp.f1sq=least_squares_term('');
+dresp.f2sq=least_squares_term('');
+
+%  define dakota method and specify method-dependent parameters
+dmeth=dakota_method('nl2sol');
+dmeth=dmeth_params_set(dmeth,'max_iterations',100,...
+                             'convergence_tolerance',1.e-4);
+
+%  specify method-independent parameters
+%  (dakota_in_params does not need to be called, but provides a template)
+dparams=dakota_in_params([]);
+dparams.direct=true;
+dparams.analysis_driver='rosenbrock';
+dparams.tabular_graphics_data=true;
+dparams.tabular_graphics_file='dakota_rosenbrock_ls.dat';
+dparams.analytic_gradients=true;
+
+%  write out dakota input file
+dakota_in_write(dmeth,dvar,dresp,dparams,'dakota_rosenbrock_ls.in')
+
+%  execute dakota
+!dakota -i dakota_rosenbrock_ls.in -o dakota_rosenbrock_ls.out
+
+%  read dakota output and tabular data files
+%  (output file for parameter studies has no interesting info)
+[method,dout]=dakota_out_parse('dakota_rosenbrock_ls.out');
+[~     ,ddat]=dakota_out_parse('dakota_rosenbrock_ls.dat');
+
+%  perform any desired plotting
+% plot_rvsv_surf(ddat,{'x1','x2'},ddat,{'f'})
+
+end
+
Index: /issm/trunk/src/m/solutions/dakota/examples/dakota_rosenbrock_nond.m
===================================================================
--- /issm/trunk/src/m/solutions/dakota/examples/dakota_rosenbrock_nond.m	(revision 3113)
+++ /issm/trunk/src/m/solutions/dakota/examples/dakota_rosenbrock_nond.m	(revision 3113)
@@ -0,0 +1,70 @@
+%
+%  monte carlo sampling for rosenbrock case
+%  (see Users4.2.pdf, Sec. 2.4.9)
+%
+%  "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."
+%
+
+function [dout,ddat,scm,pcm,srcm,prcm]=dakota_rosenbrock_nond()
+
+%  define dakota variables as uniform uncertain
+%  (may use set 1 or set 2 of variables, but not both)
+dvar(1).uuv(1)=uniform_uncertain('x1',-2,2);
+dvar(1).uuv(2)=uniform_uncertain('x2',-2,2);
+dvar(2).x1=uniform_uncertain('',-2,2);
+dvar(2).x2=uniform_uncertain('',-2,2);
+
+%  define dakota response as response function
+%  (may use set 1 or set 2 of responses, but not both)
+dresp(1).rf=response_function('f',[100]);
+dresp(2).f=response_function('',[100]);
+
+%  define dakota method and specify method-dependent parameters
+dmeth=dakota_method('nond_samp');
+dmeth=dmeth_params_set(dmeth,'samples',200,...
+                             'seed',17,...
+                             'sample_type','random');
+
+%  specify method-independent parameters
+%  (dakota_in_params does not need to be called, but provides a template)
+dparams=dakota_in_params([]);
+dparams.direct=true;
+dparams.analysis_driver='rosenbrock';
+dparams.tabular_graphics_data=true;
+dparams.tabular_graphics_file='dakota_rosenbrock_nond.dat';
+
+%  write out dakota input file
+dakota_in_write(dmeth,dvar(2),dresp(2),dparams,'dakota_rosenbrock_nond.in')
+
+%  execute dakota
+!dakota -i dakota_rosenbrock_nond.in -o dakota_rosenbrock_nond.out
+
+%  read dakota output and tabular data files
+[method,dout,scm,pcm,srcm,prcm]=dakota_out_parse('dakota_rosenbrock_nond.out');
+[~     ,ddat                  ]=dakota_out_parse('dakota_rosenbrock_nond.dat');
+
+%  perform any desired plotting
+plot_boxplot(ddat,{'f'})
+plot_normplot(ddat,{'f'})
+plot_sampdist_bars(ddat,{'f'})
+plot_normdist_bars(ddat,{'f'})
+plot_hist_norm(ddat,{'f'})
+plot_hist_norm(ddat,{'f'},'hmin',0,'hmax',200)
+plot_hist_norm_ci(ddat,{'f'})
+plot_hist_norm_ci(ddat,{'f'},'ciplt','line','cdfplt','off','ymin1',0,'ymax1',0.15)
+plot_prob_bars(dout,{'f'})
+plot_rlev_bars_ci(ddat,{'f'},'xtlrot',90)
+
+end
+
Index: /issm/trunk/src/m/solutions/dakota/examples/dakota_rosenbrock_vector.m
===================================================================
--- /issm/trunk/src/m/solutions/dakota/examples/dakota_rosenbrock_vector.m	(revision 3113)
+++ /issm/trunk/src/m/solutions/dakota/examples/dakota_rosenbrock_vector.m	(revision 3113)
@@ -0,0 +1,64 @@
+%
+%  vector parameter study for rosenbrock case
+%  (see Users4.2.pdf, Sec. 2.4.2)
+%
+%  "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."
+%
+
+function [dout,ddat]=dakota_rosenbrock_vector()
+
+%  define dakota variables as continuous design
+%  (may use set 1 or set 2 of variables, but not both)
+dvar(1).cdv(1)=continuous_design('x1',-0.3);
+dvar(1).cdv(2)=continuous_design('x2', 0.2);
+dvar(2).x1=continuous_design('',-0.3);
+dvar(2).x2=continuous_design('', 0.2);
+
+%  define dakota response as objective function
+%  (may use set 1 or set 2 of responses, but not both)
+dresp(1).of=objective_function('f');
+dresp(2).f=objective_function('');
+
+%  define dakota method and specify method-dependent parameters
+dmeth=dakota_method('vector');
+%  (ref. manual says step_length is required, but user's doesn't)
+dmeth=dmeth_params_set(dmeth,'final_point',[1.1 1.3],...
+                             'num_steps',10);
+
+%  specify method-independent parameters
+%  (dakota_in_params does not need to be called, but provides a template)
+dparams=dakota_in_params([]);
+dparams.direct=true;
+dparams.analysis_driver='rosenbrock';
+dparams.tabular_graphics_data=true;
+dparams.tabular_graphics_file='dakota_rosenbrock_vector.dat';
+
+%  write out dakota input file
+dakota_in_write(dmeth,dvar(2),dresp(2),dparams,'dakota_rosenbrock_vector.in')
+
+%  execute dakota
+!dakota -i dakota_rosenbrock_vector.in -o dakota_rosenbrock_vector.out
+
+%  read dakota output and tabular data files
+%  (output file for parameter studies has no interesting info)
+[method,dout]=dakota_out_parse('dakota_rosenbrock_vector.out');
+[~     ,ddat]=dakota_out_parse('dakota_rosenbrock_vector.dat');
+clear dum
+
+%  perform any desired plotting
+plot_rvsv_line(ddat,{'x1','x2'},ddat,{'f'})
+plot_rvsv_line(ddat,{'x1','x2'},ddat,{'f'},'nplotr',1,'nplotc',2)
+
+end
+
