[19049] | 1 | %Test Name: SquareShelfTranForceNeg2dDakotaLocal
|
---|
[13670] | 2 | md=triangle(model(),'../Exp/Square.exp',180000.);
|
---|
[11018] | 3 | md=setmask(md,'all','');
|
---|
| 4 | md=parameterize(md,'../Par/SquareShelf.par');
|
---|
[15565] | 5 | md=setflowequation(md,'SSA','all');
|
---|
[11018] | 6 | md.cluster=generic('name',oshostname(),'np',3);
|
---|
| 7 |
|
---|
| 8 | md.timestepping.time_step=1;
|
---|
| 9 | md.settings.output_frequency=1;
|
---|
| 10 | md.timestepping.final_time=4;
|
---|
| 11 |
|
---|
| 12 | smb = ones(md.mesh.numberofvertices,1)*3.6;
|
---|
| 13 | smb=[ smb smb*-1 ];
|
---|
| 14 |
|
---|
[19527] | 15 | md.smb.mass_balance= smb;
|
---|
| 16 | md.smb.mass_balance(end+1,:)=[1.5 3];
|
---|
[11018] | 17 | md.transient.isthermal=0;
|
---|
| 18 | %Dakota options
|
---|
| 19 |
|
---|
[19658] | 20 | %dakota version
|
---|
| 21 | version=IssmConfig('_DAKOTA_VERSION_'); version=version(1:3); version=str2num(version);
|
---|
| 22 |
|
---|
[11018] | 23 | %partitioning
|
---|
[25005] | 24 | npart=20;
|
---|
| 25 | partition=partitioner(md,'package','chaco','npart',npart,'weighting','on')-1;
|
---|
[11018] | 26 |
|
---|
| 27 | %variables
|
---|
[24836] | 28 | md.qmu.variables.surface_mass_balance=normal_uncertain('descriptor','scaled_SmbMassBalance',...
|
---|
[25005] | 29 | 'mean',ones(npart,1),...
|
---|
| 30 | 'stddev',100*ones(npart,1),...
|
---|
| 31 | 'partition',partition);
|
---|
[11018] | 32 |
|
---|
| 33 | %responses
|
---|
[24839] | 34 | md.qmu.responses.MaxVel=response_function('descriptor','MaxVel');
|
---|
| 35 | md.qmu.responses.IceVolume=response_function('descriptor','IceVolume');
|
---|
| 36 | md.qmu.responses.MassFlux1=response_function('descriptor','indexed_MassFlux_1');
|
---|
| 37 | md.qmu.responses.MassFlux2=response_function('descriptor','indexed_MassFlux_2');
|
---|
| 38 | md.qmu.responses.MassFlux3=response_function('descriptor','indexed_MassFlux_3');
|
---|
| 39 | md.qmu.responses.MassFlux4=response_function('descriptor','indexed_MassFlux_4');
|
---|
| 40 | md.qmu.responses.MassFlux5=response_function('descriptor','indexed_MassFlux_5');
|
---|
| 41 | md.qmu.responses.massFlux6=response_function('descriptor','indexed_MassFlux_6');
|
---|
[11018] | 42 |
|
---|
| 43 | %mass flux profiles
|
---|
| 44 | md.qmu.mass_flux_profiles={'../Exp/MassFlux1.exp','../Exp/MassFlux2.exp','../Exp/MassFlux3.exp','../Exp/MassFlux4.exp','../Exp/MassFlux5.exp','../Exp/MassFlux6.exp'};
|
---|
| 45 | md.qmu.mass_flux_profile_directory=pwd;
|
---|
| 46 |
|
---|
| 47 | %method
|
---|
| 48 | md.qmu.method =dakota_method('nond_l');
|
---|
| 49 |
|
---|
| 50 | %parameters
|
---|
| 51 | md.qmu.params.direct=true;
|
---|
| 52 | md.qmu.params.analysis_components='';
|
---|
| 53 | md.qmu.params.interval_type='forward';
|
---|
| 54 | md.qmu.params.fd_gradient_step_size='0.1';
|
---|
| 55 | md.qmu.isdakota=1;
|
---|
| 56 |
|
---|
[19658] | 57 | if version>=6,
|
---|
| 58 | md.qmu.params.analysis_driver='matlab';
|
---|
| 59 | md.qmu.params.evaluation_scheduling='master';
|
---|
| 60 | md.qmu.params.processors_per_evaluation=2;
|
---|
| 61 | else
|
---|
| 62 | md.qmu.params.analysis_driver='stressbalance';
|
---|
| 63 | md.qmu.params.evaluation_concurrency=1;
|
---|
| 64 | end
|
---|
| 65 |
|
---|
| 66 |
|
---|
[15771] | 67 | md.stressbalance.reltol=10^-5; %tighten for qmu analyses
|
---|
[16363] | 68 | md.transient.requested_outputs={'IceVolume'};
|
---|
[11018] | 69 |
|
---|
| 70 | %solve
|
---|
[21056] | 71 | md=solve(md,'Transient','overwrite','y');
|
---|
[13021] | 72 | md.qmu.results=md.results.dakota;
|
---|
[11018] | 73 |
|
---|
| 74 | %Fields and tolerances to track changes
|
---|
[14270] | 75 | md.results.dakota.moments=[];
|
---|
[11018] | 76 | for i=1:8,
|
---|
[14270] | 77 | md.results.dakota.moments=[md.results.dakota.moments md.results.dakota.dresp_out(i).mean];
|
---|
[11018] | 78 | end
|
---|
| 79 | for i=1:8,
|
---|
[14270] | 80 | md.results.dakota.moments=[md.results.dakota.moments md.results.dakota.dresp_out(i).stddev];
|
---|
[11018] | 81 | end
|
---|
[14270] | 82 | field_names ={'moments'};
|
---|
[21037] | 83 | field_tolerances={1e-11};
|
---|
[11018] | 84 | field_values={...
|
---|
[14270] | 85 | md.results.dakota.moments,...
|
---|
[11018] | 86 | };
|
---|