1 | function md=steadystate(md);
|
---|
2 | %STEADYSTATE - compute the velocity and temperature field of a model in steady state.
|
---|
3 | %
|
---|
4 | % Usage:
|
---|
5 | % md=steadystate(md)
|
---|
6 | %
|
---|
7 |
|
---|
8 | %timing
|
---|
9 | t1=clock;
|
---|
10 |
|
---|
11 | numanalyses=8;
|
---|
12 | analyses=[DiagnosticHorizAnalysisEnum;DiagnosticVertAnalysisEnum;DiagnosticStokesAnalysisEnum;DiagnosticHutterAnalysisEnum;SurfaceSlopeAnalysisEnum;BedSlopeAnalysisEnum;ThermalAnalysisEnum;MeltingAnalysisEnum];
|
---|
13 | solution_type=SteadyStateSolutionEnum;
|
---|
14 |
|
---|
15 | displaystring(md.verbose,'%s',['create finite element model']);
|
---|
16 | femmodel=NewFemModel(md,solution_type,analyses,numanalyses);
|
---|
17 |
|
---|
18 | %retrieve parameters
|
---|
19 | verbose=femmodel.parameters.Verbose;
|
---|
20 | qmu_analysis=femmodel.parameters.QmuAnalysis;
|
---|
21 | control_analysis=femmodel.parameters.ControlAnalysis;
|
---|
22 |
|
---|
23 | %compute solution
|
---|
24 | if ~qmu_analysis,
|
---|
25 | if ~control_analysis,
|
---|
26 |
|
---|
27 | displaystring(verbose,'%s',['call computational core']);
|
---|
28 | femmodel=steadystate_core(femmodel);
|
---|
29 |
|
---|
30 | else,
|
---|
31 |
|
---|
32 | displaystring(verbose,'%s',['call computational core']);
|
---|
33 | femmodel=control_core(femmodel);
|
---|
34 |
|
---|
35 | end
|
---|
36 |
|
---|
37 | displaystring(verbose,'%s',['write results']);
|
---|
38 | results=OutputResults(femmodel.elements, femmodel.nodes , femmodel.vertices , femmodel.loads , femmodel.materials, femmodel.parameters, femmodel.results);
|
---|
39 | md.results.(EnumAsString(solution_type))=ProcessPatch(results);
|
---|
40 |
|
---|
41 | else
|
---|
42 | %launch dakota driver for diagnostic core solution
|
---|
43 | Qmu(femmodel);
|
---|
44 | end
|
---|
45 |
|
---|
46 | %stop timing
|
---|
47 | t2=clock;
|
---|
48 | displaystring(md.verbose,'\n%s\n',['solution converged in ' num2str(etime(t2,t1)) ' seconds']);
|
---|