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