source: issm/trunk-jpl/src/m/classes/steadystate.js@ 19787

Last change on this file since 19787 was 19787, checked in by Eric.Larour, 9 years ago

CHG: implemented ismodelselfconsistent routine and all corresponding checkconsistency
routines in the main model classes. Implemented embryo of i/o routines to start marshalling
model. Implemented issm.js and compilation of main issm module to run ISSM in javascript.

File size: 1.3 KB
Line 
1//STEADYSTATE class definition
2//
3// Usage:
4// steadystate=new steadystate();
5
6function steadystate (){
7 //methods
8 this.setdefaultparameters = function(){// {{{
9
10 //maximum of steady state iterations
11 this.maxiter=100;
12
13 //Relative tolerance for the steadystate convertgence
14 this.reltol=0.01;
15
16 //default output
17 this.requested_outputs=['default'];
18
19
20 }// }}}
21 this.disp= function(){// {{{
22
23 console.log(sprintf(' steadystate solution parameters:'));
24
25 fielddisplay(this,'reltol','relative tolerance criterion');
26 fielddisplay(this,'maxiter','maximum number of iterations');
27 fielddisplay(this,'requested_outputs','additional requested outputs');
28
29 }// }}}
30 this.checkconsistency = function(md,solution,analyses) {// {{{
31
32 //Early return
33 if (solution!=SteadystateSolutionEnum()) return;
34
35 if (md.timestepping.time_step!=0){
36 md.checkmessage('for a steadystate computation, timestepping.time_step must be zero.');
37 }
38 checkfield(md,'fieldname','steadystate.requested_outputs','stringrow',1);
39
40 if (isNaN(md.stressbalance.reltol)){
41 md.checkmessage('for a steadystate computation, stressbalance.reltol (relative convergence criterion) must be defined!');
42 }
43 } // }}}
44 //properties
45 // {{{
46
47 this.reltol = 0;
48 this.maxiter = 0;
49 this.requested_outputs = [];
50
51 this.setdefaultparameters();
52 //}}}
53}
Note: See TracBrowser for help on using the repository browser.