[3354] | 1 | function md=prognostic2(md)
|
---|
| 2 | %PROGNOSITC2 - prognostic2 solution sequence.
|
---|
| 3 | %
|
---|
| 4 | % Usage:
|
---|
| 5 | % md=prognostic2(md)
|
---|
| 6 |
|
---|
| 7 | %timing
|
---|
| 8 | t1=clock;
|
---|
| 9 |
|
---|
| 10 | %Build all models requested for diagnostic simulation
|
---|
| 11 | models.analysis_type=Prognostic2AnalysisEnum; %needed for processresults
|
---|
| 12 |
|
---|
| 13 | displaystring(md.verbose,'%s',['reading prognostic2 model data']);
|
---|
| 14 | md.analysis_type=Prognostic2AnalysisEnum; models.p=CreateFemModel(md);
|
---|
| 15 | error('STOP here');
|
---|
| 16 |
|
---|
| 17 | % figure out number of dof: just for information purposes.
|
---|
| 18 | md.dof=modelsize(models);
|
---|
| 19 |
|
---|
| 20 | %initialize inputs
|
---|
| 21 | displaystring(md.verbose,'\n%s',['setup inputs...']);
|
---|
| 22 | inputs=inputlist;
|
---|
| 23 | inputs=add(inputs,'velocity',models.p.parameters.u_g,'doublevec',3,models.p.parameters.numberofnodes);
|
---|
| 24 | inputs=add(inputs,'thickness',models.p.parameters.h_g,'doublevec',1,models.p.parameters.numberofnodes);
|
---|
| 25 | inputs=add(inputs,'melting',models.p.parameters.m_g,'doublevec',1,models.p.parameters.numberofnodes);
|
---|
| 26 | inputs=add(inputs,'accumulation',models.p.parameters.a_g,'doublevec',1,models.p.parameters.numberofnodes);
|
---|
| 27 | inputs=add(inputs,'dt',models.p.parameters.dt*models.p.parameters.yts,'double');
|
---|
| 28 |
|
---|
| 29 | displaystring(md.verbose,'\n%s',['call computational core:']);
|
---|
| 30 | results=prognostic2_core(models,inputs,PrognosticAnalysisEnum(),NoneAnalysisEnum());
|
---|
| 31 |
|
---|
| 32 | displaystring(md.verbose,'\n%s',['load results...']);
|
---|
| 33 | if ~isstruct(md.results), md.results=struct(); end
|
---|
| 34 | md.results.prognostic2=processresults(models, results);
|
---|
| 35 |
|
---|
| 36 | %stop timing
|
---|
| 37 | t2=clock;
|
---|
| 38 | displaystring(md.verbose,'\n%s\n',['solution converged in ' num2str(etime(t2,t1)) ' seconds']);
|
---|