Changeset 25604
- Timestamp:
- 09/28/20 17:31:51 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/branches/trunk-larour-SLPS2020/test/NightlyRun/test2006.m
r25595 r25604 3 3 %mesh earth: 4 4 md=model; 5 md.cluster=generic('name',oshostname(),'np', 5);5 md.cluster=generic('name',oshostname(),'np',10); 6 6 md.mesh=gmshplanet('radius',6.371012*10^3,'resolution',700.); %700 km resolution mesh 7 7 … … 55 55 56 56 %Miscellaneous 57 md.miscellaneous.name='test200 5';57 md.miscellaneous.name='test2006'; 58 58 59 59 %Solution parameters … … 118 118 md.qmu.variables.surfaceload=qmuvar.surfaceload; 119 119 120 locations=[1 5 10 15 20]; 120 121 %responses % {{{ 121 122 md.qmu.responses.sealevel1=response_function('descriptor','Outputdefinition1'); 123 md.qmu.responses.sealevel2=response_function('descriptor','Outputdefinition2'); 124 md.qmu.responses.sealevel3=response_function('descriptor','Outputdefinition3'); 125 md.qmu.responses.sealevel4=response_function('descriptor','Outputdefinition4'); 126 md.qmu.responses.sealevel5=response_function('descriptor','Outputdefinition5'); 127 122 128 %output definitions: 123 md.outputdefinition.definitions={nodalvalue('name','SNode','definitionstring','Outputdefinition1', ... 124 'model_string','Sealevel','node',1)}; %Pick vertex index at 1. 129 for i=1:length(locations), 130 ind=locations(i); 131 if i==1, 132 md.outputdefinition.definitions={nodalvalue('name','SNode','definitionstring','Outputdefinition1', ... 133 'model_string','Sealevel','node',ind)}; 134 else 135 md.outputdefinition.definitions{end+1}=nodalvalue('name','SNode','definitionstring',['Outputdefinition' num2str(i)], ... 136 'model_string','Sealevel','node',ind); 137 end 138 end 125 139 % }}} 126 140 %algorithm: % {{{ … … 142 156 md.verbose=verbose(0); md.verbose.qmu=1; 143 157 % }}} 158 %qmu statistics %{{{ 159 md.qmu.statistics.nfiles_per_directory=2; 160 md.qmu.statistics.ndirectories=5; 161 162 md.qmu.statistics.method(1).name='Histogram'; 163 md.qmu.statistics.method(1).fields={'Sealevel','BslrIce'}; 164 md.qmu.statistics.method(1).steps=1:10; 165 md.qmu.statistics.method(1).nbins=20; 166 167 md.qmu.statistics.method(2).name='MeanVariance'; 168 md.qmu.statistics.method(2).fields={'Sealevel','BslrIce'}; 169 md.qmu.statistics.method(2).steps=[1:10]; 170 171 md.qmu.statistics.method(3).name='SampleSeries'; 172 md.qmu.statistics.method(3).fields={'Sealevel','BslrIce'}; 173 md.qmu.statistics.method(3).steps=[1:10]; 174 md.qmu.statistics.method(3).indices=locations; 175 %}}} 144 176 145 177 %run transient dakota solution: 178 mds=solve(md,'Transient'); 179 180 %run without statistics computations: 181 md.qmu.statistics.method(1).name='None'; 146 182 md=solve(md,'Transient'); 147 183 148 %sealevel mean and standard deviation: 149 Smean=md.results.dakota.dresp_out.mean; 150 Sstd=md.results.dakota.dresp_out.stddev; 184 %compare statistics with our own here: 185 svalues=mds.results.StatisticsSolution(end).SealevelSamples; %all values at locations. 186 187 dvalues=zeros(md.qmu.method.params.samples,length(locations)); 188 for i=1:md.qmu.method.params.samples, 189 dvalues(i,:)=md.results.dakota.modelresults{i}.TransientSolution(end).Sealevel(locations); 190 end 191 192 samplesnorm=norm(dvalues-svalues,'fro'); 151 193 152 194 %Fields and tolerances to track changes 153 field_names={'Sealevel Mean','Sealevel Standard Deviation'}; 154 field_tolerances={1e-13,1e-13}; 155 field_values={Smean,Sstd}; 156 195 field_names={'Samples Norm'}; 196 field_tolerances={1e-13}; 197 field_values={samplesnorm};
Note:
See TracChangeset
for help on using the changeset viewer.