source: issm/trunk-jpl/test/NightlyRun/test235.m@ 25005

Last change on this file since 25005 was 25005, checked in by Eric.Larour, 5 years ago

CHG: updating tests to not rely on md.qmu.vpartition and md.qmu.epartition.

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