| 1 | %Test Name: SquareShelfTranForceNeg2dDakotaLocal
|
|---|
| 2 | md=triangle(model(),'../Exp/Square.exp',180000.);
|
|---|
| 3 | md=setmask(md,'all','');
|
|---|
| 4 | md=parameterize(md,'../Par/SquareShelf.par');
|
|---|
| 5 | md=setflowequation(md,'SSA','all');
|
|---|
| 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 |
|
|---|
| 15 | md.surfaceforcings.mass_balance= smb;
|
|---|
| 16 | md.surfaceforcings.mass_balance(end+1,:)=[1.5 3];
|
|---|
| 17 | md.transient.isthermal=0;
|
|---|
| 18 | %Dakota options
|
|---|
| 19 |
|
|---|
| 20 | %partitioning
|
|---|
| 21 | md.qmu.numberofpartitions=20;
|
|---|
| 22 | md=partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on');
|
|---|
| 23 | md.qmu.partition=md.qmu.partition-1;
|
|---|
| 24 |
|
|---|
| 25 | %variables
|
|---|
| 26 | md.qmu.variables.surface_mass_balance=normal_uncertain('scaled_SurfaceforcingsMassBalance',1,100);
|
|---|
| 27 |
|
|---|
| 28 | %responses
|
|---|
| 29 | md.qmu.responses.MaxVel=response_function('MaxVel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
|---|
| 30 | md.qmu.responses.IceVolume=response_function('IceVolume',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
|---|
| 31 | md.qmu.responses.MassFlux1=response_function('indexed_MassFlux_1',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
|---|
| 32 | md.qmu.responses.MassFlux2=response_function('indexed_MassFlux_2',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
|---|
| 33 | md.qmu.responses.MassFlux3=response_function('indexed_MassFlux_3',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
|---|
| 34 | md.qmu.responses.MassFlux4=response_function('indexed_MassFlux_4',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
|---|
| 35 | md.qmu.responses.MassFlux5=response_function('indexed_MassFlux_5',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
|---|
| 36 | md.qmu.responses.massFlux6=response_function('indexed_MassFlux_6',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
|---|
| 37 |
|
|---|
| 38 | %mass flux profiles
|
|---|
| 39 | md.qmu.mass_flux_profiles={'../Exp/MassFlux1.exp','../Exp/MassFlux2.exp','../Exp/MassFlux3.exp','../Exp/MassFlux4.exp','../Exp/MassFlux5.exp','../Exp/MassFlux6.exp'};
|
|---|
| 40 | md.qmu.mass_flux_profile_directory=pwd;
|
|---|
| 41 |
|
|---|
| 42 | %method
|
|---|
| 43 | md.qmu.method =dakota_method('nond_l');
|
|---|
| 44 |
|
|---|
| 45 | %parameters
|
|---|
| 46 | md.qmu.params.direct=true;
|
|---|
| 47 | md.qmu.params.analysis_driver='';
|
|---|
| 48 | md.qmu.params.analysis_components='';
|
|---|
| 49 | md.qmu.params.evaluation_concurrency=1;
|
|---|
| 50 | md.qmu.params.interval_type='forward';
|
|---|
| 51 | md.qmu.params.fd_gradient_step_size='0.1';
|
|---|
| 52 | md.qmu.isdakota=1;
|
|---|
| 53 |
|
|---|
| 54 | md.stressbalance.reltol=10^-5; %tighten for qmu analyses
|
|---|
| 55 | md.transient.requested_outputs={'IceVolume'};
|
|---|
| 56 |
|
|---|
| 57 | %solve
|
|---|
| 58 | md=solve(md,TransientSolutionEnum(),'overwrite','y');
|
|---|
| 59 | md.qmu.results=md.results.dakota;
|
|---|
| 60 |
|
|---|
| 61 | %Fields and tolerances to track changes
|
|---|
| 62 | md.results.dakota.moments=[];
|
|---|
| 63 | for i=1:8,
|
|---|
| 64 | md.results.dakota.moments=[md.results.dakota.moments md.results.dakota.dresp_out(i).mean];
|
|---|
| 65 | end
|
|---|
| 66 | for i=1:8,
|
|---|
| 67 | md.results.dakota.moments=[md.results.dakota.moments md.results.dakota.dresp_out(i).stddev];
|
|---|
| 68 | end
|
|---|
| 69 | field_names ={'moments'};
|
|---|
| 70 | field_tolerances={1e-11};
|
|---|
| 71 | field_values={...
|
|---|
| 72 | md.results.dakota.moments,...
|
|---|
| 73 | };
|
|---|