1 | #Test Name: 79NorthCMBalThic2dCG
|
---|
2 | import numpy
|
---|
3 | from model import *
|
---|
4 | from MatlabFuncs import *
|
---|
5 | from triangle import *
|
---|
6 | from setmask import *
|
---|
7 | from parameterize import *
|
---|
8 | from setflowequation import *
|
---|
9 | from solve import *
|
---|
10 |
|
---|
11 | md=triangle(model(),'../Exp/79North.exp',10000.)
|
---|
12 | md=setmask(md,'../Exp/79NorthShelf.exp','')
|
---|
13 | md=parameterize(md,'../Par/79North.py')
|
---|
14 | md=setflowequation(md,'SSA','all')
|
---|
15 |
|
---|
16 | #control parameters
|
---|
17 | md.inversion.nsteps=2
|
---|
18 | md.masstransport.stabilization=1
|
---|
19 | md.inversion.iscontrol=1
|
---|
20 | md.inversion.control_parameters=['BalancethicknessThickeningRate']
|
---|
21 | md.inversion.thickness_obs=md.geometry.thickness
|
---|
22 | md.inversion.min_parameters=-50.*numpy.ones((md.mesh.numberofvertices,1))
|
---|
23 | md.inversion.max_parameters=50.*numpy.ones((md.mesh.numberofvertices,1))
|
---|
24 | md.inversion.cost_functions=[201]
|
---|
25 | md.inversion.cost_functions_coefficients=numpy.ones((md.mesh.numberofvertices,1))
|
---|
26 | md.inversion.gradient_scaling=10./md.constants.yts*numpy.ones((md.inversion.nsteps,1))
|
---|
27 | md.inversion.maxiter_per_step=4*numpy.ones((md.inversion.nsteps,1))
|
---|
28 | md.inversion.step_threshold=0.99*numpy.ones((md.inversion.nsteps,1))
|
---|
29 |
|
---|
30 | md.cluster=generic('name',oshostname(),'np',3)
|
---|
31 | md=solve(md,'Balancethickness')
|
---|
32 |
|
---|
33 | #Fields and tolerances to track changes
|
---|
34 | field_names =['Gradient','Misfits','BalancethicknessThickeningRate','Thickness']
|
---|
35 | field_tolerances=[1e-12,1e-12,1e-12,1e-12,1e-12,1e-12]
|
---|
36 | field_values=[\
|
---|
37 | md.results.BalancethicknessSolution.Gradient1,\
|
---|
38 | md.results.BalancethicknessSolution.J,\
|
---|
39 | md.results.BalancethicknessSolution.BalancethicknessThickeningRate,\
|
---|
40 | md.results.BalancethicknessSolution.Thickness
|
---|
41 | ]
|
---|