1 | #module imports
|
---|
2 | from fielddisplay import fielddisplay
|
---|
3 |
|
---|
4 | class diagnostic:
|
---|
5 | #properties
|
---|
6 | def __init__(self):
|
---|
7 | # {{{ Properties
|
---|
8 | self.spcvx = float('NaN')
|
---|
9 | self.spcvy = float('NaN')
|
---|
10 | self.spcvz = float('NaN')
|
---|
11 | self.restol = 0
|
---|
12 | self.reltol = 0
|
---|
13 | self.abstol = 0
|
---|
14 | self.isnewton = 0
|
---|
15 | self.stokesreconditioning = 0
|
---|
16 | self.viscosity_overshoot = 0
|
---|
17 | self.icefront = float('NaN')
|
---|
18 | self.maxiter = 0
|
---|
19 | self.shelf_dampening = 0
|
---|
20 | self.vertex_pairing = float('NaN')
|
---|
21 | self.penalty_factor = float('NaN')
|
---|
22 | self.rift_penalty_lock = float('NaN')
|
---|
23 | self.rift_penalty_threshold = 0
|
---|
24 | self.referential = float('NaN')
|
---|
25 | self.requested_outputs = float('NaN')
|
---|
26 | #}}}
|
---|
27 | def __repr__(obj):
|
---|
28 | # {{{ Display
|
---|
29 |
|
---|
30 |
|
---|
31 | string='\n Diagnostic solution parameters:'
|
---|
32 | string="%s\n\n%s"%(string,' Convergence criteria:')
|
---|
33 |
|
---|
34 | string="%s\n%s"%(string,fielddisplay(obj,'restol','mechanical equilibrium residual convergence criterion'))
|
---|
35 | string="%s\n%s"%(string,fielddisplay(obj,'reltol','velocity relative convergence criterion, NaN -> not applied'))
|
---|
36 | string="%s\n%s"%(string,fielddisplay(obj,'abstol','velocity absolute convergence criterion, NaN -> not applied'))
|
---|
37 | string="%s\n%s"%(string,fielddisplay(obj,'isnewton','Apply Newton''s method instead of a Picard fixed point method'))
|
---|
38 | string="%s\n%s"%(string,fielddisplay(obj,'maxiter','maximum number of nonlinear iterations'))
|
---|
39 | string="%s\n%s"%(string,fielddisplay(obj,'viscosity_overshoot','over-shooting constant new=new+C*(new-old)'))
|
---|
40 |
|
---|
41 | string="%s\n%s"%(string,' boundary conditions:')
|
---|
42 |
|
---|
43 | string="%s\n%s"%(string,fielddisplay(obj,'spcvx','x-axis velocity constraint (NaN means no constraint)'))
|
---|
44 | string="%s\n%s"%(string,fielddisplay(obj,'spcvy','y-axis velocity constraint (NaN means no constraint)'))
|
---|
45 | string="%s\n%s"%(string,fielddisplay(obj,'spcvz','z-axis velocity constraint (NaN means no constraint)'))
|
---|
46 | string="%s\n%s"%(string,fielddisplay(obj,'icefront','segments on ice front list (last column 0-> Air, 1-> Water, 2->Ice'))
|
---|
47 |
|
---|
48 | string="%s\n%s"%(string,' Rift options:')
|
---|
49 | string="%s\n%s"%(string,fielddisplay(obj,'rift_penalty_threshold','threshold for instability of mechanical constraints'))
|
---|
50 | string="%s\n%s"%(string,fielddisplay(obj,'rift_penalty_lock','number of iterations before rift penalties are locked'))
|
---|
51 |
|
---|
52 | string="%s\n%s"%(string,' Penalty options:')
|
---|
53 | string="%s\n%s"%(string,fielddisplay(obj,'penalty_factor','offset used by penalties: penalty = Kmax*10^offset'))
|
---|
54 | string="%s\n%s"%(string,fielddisplay(obj,'vertex_pairing','pairs of vertices that are penalized'))
|
---|
55 |
|
---|
56 | string="%s\n%s"%(string,' Other:')
|
---|
57 | string="%s\n%s"%(string,fielddisplay(obj,'shelf_dampening','use dampening for floating ice ? Only for Stokes model'))
|
---|
58 | string="%s\n%s"%(string,fielddisplay(obj,'stokesreconditioning','multiplier for incompressibility equation. Only for Stokes model'))
|
---|
59 | string="%s\n%s"%(string,fielddisplay(obj,'referential','local referential'))
|
---|
60 | string="%s\n%s"%(string,fielddisplay(obj,'requested_outputs','additional outputs requested'))
|
---|
61 |
|
---|
62 | return string
|
---|
63 | #}}}
|
---|