source: issm/oecreview/Archive/20545-21336/ISSM-21033-21034.diff@ 21337

Last change on this file since 21337 was 21337, checked in by Mathieu Morlighem, 8 years ago

CHG: added Archive/20545-21336

File size: 10.2 KB
  • ../trunk-jpl/test/NightlyRun/test250.m

     
     1%Test Name: SquareShelfTranForceNeg2dDakotaSampLinearPart
     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
     24md.qmu.numberofpartitions=md.mesh.numberofvertices;
     25md=partitioner(md,'package','linear');
     26md.qmu.partition=md.qmu.partition-1;
     27
     28%variables
     29md.qmu.variables.surface_mass_balance=normal_uncertain('scaled_SmbMassBalance',1,0.1);
     30
     31%responses
     32md.qmu.responses.MaxVel=response_function('MaxVel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
     33md.qmu.responses.IceVolume=response_function('IceVolume',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
     34md.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]);
     35md.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]);
     36md.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]);
     37md.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]);
     38md.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]);
     39md.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]);
     40
     41%mass flux profiles
     42md.qmu.mass_flux_profiles={'../Exp/MassFlux1.exp','../Exp/MassFlux2.exp','../Exp/MassFlux3.exp','../Exp/MassFlux4.exp','../Exp/MassFlux5.exp','../Exp/MassFlux6.exp'};
     43md.qmu.mass_flux_profile_directory=pwd;
     44
     45%%  nond_sampling study
     46md.qmu.method=dakota_method('nond_samp');
     47md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),'seed',1234,'samples',20,'sample_type','lhs');
     48dver=textscan(IssmConfig('_DAKOTA_VERSION_'),'%[0123456789].%[0123456789].%[0123456789]');
     49if ((str2num(dver{1}{1})==4 && str2num(dver{2}{1})>2) || str2num(dver{1}{1})>4)
     50        md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),'rng','rnum2');
     51end
     52
     53%parameters
     54md.qmu.params.direct=true;
     55md.qmu.params.analysis_components='';
     56md.qmu.params.interval_type='forward';
     57md.qmu.params.tabular_graphics_data=true;
     58md.qmu.isdakota=1;
     59
     60if version>=6,
     61        md.qmu.params.analysis_driver='matlab';
     62        md.qmu.params.evaluation_scheduling='master';
     63        md.qmu.params.processors_per_evaluation=2;
     64else
     65        md.qmu.params.analysis_driver='stressbalance';
     66        md.qmu.params.evaluation_concurrency=1;
     67end
     68
     69
     70md.stressbalance.reltol=10^-5; %tighten for qmu analyses
     71md.transient.requested_outputs={'IceVolume'};
     72
     73%solve
     74md=solve(md,TransientSolutionEnum(),'overwrite','y');
     75md.qmu.results=md.results.dakota;
     76
     77%Fields and tolerances to track changes
     78md.results.dakota.moments=[];
     79for i=1:8,
     80        md.results.dakota.moments=[md.results.dakota.moments md.results.dakota.dresp_out(i).mean];
     81end
     82for i=1:8,
     83        md.results.dakota.moments=[md.results.dakota.moments md.results.dakota.dresp_out(i).stddev];
     84end
     85field_names     ={'moments'};
     86field_tolerances={1e-6};
     87field_values={...
     88         md.results.dakota.moments,...
     89        };
  • ../trunk-jpl/test/NightlyRun/test251.m

     
     1%Test Name: SquareShelfTranForceNeg2dDakotaLocalLinearPart
     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
     24md.qmu.numberofpartitions=md.mesh.numberofvertices;
     25md=partitioner(md,'package','linear');
     26md.qmu.partition=md.qmu.partition-1;
     27
     28%variables
     29md.qmu.variables.surface_mass_balance=normal_uncertain('scaled_SmbMassBalance',1,100);
     30
     31%responses
     32md.qmu.responses.MaxVel=response_function('MaxVel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
     33md.qmu.responses.IceVolume=response_function('IceVolume',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
     34md.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]);
     35md.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]);
     36md.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]);
     37md.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]);
     38md.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]);
     39md.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]);
     40
     41%mass flux profiles
     42md.qmu.mass_flux_profiles={'../Exp/MassFlux1.exp','../Exp/MassFlux2.exp','../Exp/MassFlux3.exp','../Exp/MassFlux4.exp','../Exp/MassFlux5.exp','../Exp/MassFlux6.exp'};
     43md.qmu.mass_flux_profile_directory=pwd;
     44
     45%method
     46md.qmu.method     =dakota_method('nond_l');
     47
     48%parameters
     49md.qmu.params.direct=true;
     50md.qmu.params.analysis_components='';
     51md.qmu.params.interval_type='forward';
     52md.qmu.params.fd_gradient_step_size='0.1';
     53md.qmu.isdakota=1;
     54
     55if version>=6,
     56        md.qmu.params.analysis_driver='matlab';
     57        md.qmu.params.evaluation_scheduling='master';
     58        md.qmu.params.processors_per_evaluation=2;
     59else
     60        md.qmu.params.analysis_driver='stressbalance';
     61        md.qmu.params.evaluation_concurrency=1;
     62end
     63
     64
     65md.stressbalance.reltol=10^-5; %tighten for qmu analyses
     66md.transient.requested_outputs={'IceVolume'};
     67
     68%solve
     69md=solve(md,TransientSolutionEnum(),'overwrite','y');
     70md.qmu.results=md.results.dakota;
     71
     72%Fields and tolerances to track changes
     73md.results.dakota.moments=[];
     74for i=1:8,
     75        md.results.dakota.moments=[md.results.dakota.moments md.results.dakota.dresp_out(i).mean];
     76end
     77for i=1:8,
     78        md.results.dakota.moments=[md.results.dakota.moments md.results.dakota.dresp_out(i).stddev];
     79end
     80field_names     ={'moments'};
     81field_tolerances={1e-6};
     82field_values={...
     83         md.results.dakota.moments,...
     84        };
  • ../trunk-jpl/test/NightlyRun/test440.m

     
     1%Test Name: SquareSheetShelfDakotaScaledResponseLinearPart
     2md=triangle(model(),'../Exp/Square.exp',200000.);
     3md=setmask(md,'../Exp/SquareShelf.exp','');
     4md=parameterize(md,'../Par/SquareSheetShelf.par');
     5md=setflowequation(md,'SSA','all');
     6md.cluster=generic('name',oshostname(),'np',3);
     7
     8%partitioning
     9md.qmu.numberofpartitions=md.mesh.numberofvertices;
     10md=partitioner(md,'package','linear');
     11md.qmu.partition=md.qmu.partition-1;
     12md.qmu.isdakota=1;
     13
     14%Dakota options
     15
     16%dakota version
     17version=IssmConfig('_DAKOTA_VERSION_'); version=version(1:3); version=str2num(version);
     18
     19%variables
     20md.qmu.variables.rho_ice=normal_uncertain('MaterialsRhoIce',md.materials.rho_ice,0.01);
     21
     22%responses
     23md.qmu.responses.MaxVel=response_function('scaled_Thickness',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
     24
     25%method
     26md.qmu.method     =dakota_method('nond_l');
     27
     28%parameters
     29md.qmu.params.direct=true;
     30md.qmu.params.interval_type='forward';
     31
     32if version>=6,
     33        md.qmu.params.analysis_driver='matlab';
     34        md.qmu.params.evaluation_scheduling='master';
     35        md.qmu.params.processors_per_evaluation=2;
     36else
     37        md.qmu.params.analysis_driver='stressbalance';
     38        md.qmu.params.evaluation_concurrency=1;
     39end
     40
     41
     42
     43%imperative!
     44md.stressbalance.reltol=10^-5; %tighten for qmu analysese
     45
     46%solve
     47md=solve(md,StressbalanceSolutionEnum(),'overwrite','y');
     48md.qmu.results=md.results.dakota;
     49
     50%test on thickness
     51h=zeros(md.qmu.numberofpartitions,1);
     52for i=1:md.qmu.numberofpartitions,
     53        h(i)=md.qmu.results.dresp_out(i).mean;
     54end
     55
     56%project onto grid
     57thickness=h(md.qmu.partition+1);
     58
     59%Fields and tolerances to track changes
     60field_names     ={'Thickness'};
     61field_tolerances={1e-10};
     62field_values={thickness};
Note: See TracBrowser for help on using the repository browser.