| 1 | function md=surfaceslope(md); | 
|---|
| 2 | %SURFACESLOPE - compute the surface slope of a model | 
|---|
| 3 | % | 
|---|
| 4 | %   Usage: | 
|---|
| 5 | %      md=surfaceslope(md) | 
|---|
| 6 | % | 
|---|
| 7 | %timing | 
|---|
| 8 | t1=clock; | 
|---|
| 9 |  | 
|---|
| 10 | numanalyses=1; | 
|---|
| 11 | analyses=[SurfaceSlopeAnalysisEnum]; | 
|---|
| 12 | solution_type=SurfaceSlopeSolutionEnum; | 
|---|
| 13 |  | 
|---|
| 14 | displaystring(md.verbose,'%s',['create finite element model']); | 
|---|
| 15 | femmodel=NewFemModel(md,solution_type,analyses,numanalyses); | 
|---|
| 16 |  | 
|---|
| 17 | %retrieve parameters | 
|---|
| 18 | verbose=femmodel.parameters.Verbose; | 
|---|
| 19 | qmu_analysis=femmodel.parameters.QmuAnalysis; | 
|---|
| 20 |  | 
|---|
| 21 | %compute solution | 
|---|
| 22 | if ~qmu_analysis, | 
|---|
| 23 | displaystring(verbose,'%s',['call computational core']); | 
|---|
| 24 | femmodel=surfaceslope_core(femmodel); | 
|---|
| 25 |  | 
|---|
| 26 | displaystring(verbose,'%s',['write results']); | 
|---|
| 27 | results=OutputResults(femmodel.elements, femmodel.nodes , femmodel.vertices , femmodel.loads , femmodel.materials, femmodel.parameters, femmodel.results); | 
|---|
| 28 | md.results.(EnumAsString(solution_type))=ProcessPatch(results); | 
|---|
| 29 |  | 
|---|
| 30 | else | 
|---|
| 31 | %launch dakota driver for diagnostic core solution | 
|---|
| 32 | Qmu(femmodel,femmodel.parameters); | 
|---|
| 33 | end | 
|---|
| 34 |  | 
|---|
| 35 | %stop timing | 
|---|
| 36 | t2=clock; | 
|---|
| 37 | displaystring(md.verbose,'\n%s\n',['solution converged in ' num2str(etime(t2,t1)) ' seconds']); | 
|---|