[19049] | 1 | #Test Name: PigCMDragSteaSSA3d
|
---|
[13662] | 2 | from model import *
|
---|
[21759] | 3 | from socket import gethostname
|
---|
[13662] | 4 | from triangle import *
|
---|
| 5 | from setmask import *
|
---|
| 6 | from parameterize import *
|
---|
| 7 | from setflowequation import *
|
---|
| 8 | from solve import *
|
---|
| 9 |
|
---|
[21759] | 10 |
|
---|
[13662] | 11 | md=triangle(model(),'../Exp/Pig.exp',30000.)
|
---|
| 12 | md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
|
---|
| 13 | md=parameterize(md,'../Par/Pig.py')
|
---|
[13672] | 14 | md.extrude(3,1.)
|
---|
[15565] | 15 | md=setflowequation(md,'SSA','all')
|
---|
[13662] | 16 |
|
---|
| 17 | # control parameters
|
---|
| 18 | md.inversion.iscontrol=1
|
---|
| 19 | md.inversion.control_parameters=['FrictionCoefficient']
|
---|
[21759] | 20 | md.inversion.min_parameters=1.*np.ones((md.mesh.numberofvertices))
|
---|
| 21 | md.inversion.max_parameters=200.*np.ones((md.mesh.numberofvertices))
|
---|
[13662] | 22 | md.inversion.nsteps=2
|
---|
[16307] | 23 | md.inversion.cost_functions=[103,501]
|
---|
[21759] | 24 | md.inversion.cost_functions_coefficients=np.ones((md.mesh.numberofvertices,2))
|
---|
[13662] | 25 | md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
|
---|
[21759] | 26 | md.inversion.gradient_scaling=3.*np.ones((md.inversion.nsteps))
|
---|
| 27 | md.inversion.maxiter_per_step=2.*np.ones((md.inversion.nsteps))
|
---|
| 28 | md.inversion.step_threshold=0.99*np.ones((md.inversion.nsteps))
|
---|
[13662] | 29 | md.inversion.vx_obs=md.initialization.vx
|
---|
| 30 | md.inversion.vy_obs=md.initialization.vy
|
---|
[13663] | 31 | md.timestepping.time_step=0.
|
---|
[13662] | 32 |
|
---|
| 33 | md.thermal.penalty_lock=5
|
---|
[21759] | 34 | md.cluster=generic('name',gethostname(),'np',3)
|
---|
[21056] | 35 | md=solve(md,'Steadystate')
|
---|
[13662] | 36 |
|
---|
| 37 | # Fields and tolerances to track changes
|
---|
[18068] | 38 | field_names =['Gradient','Misfits','FrictionCoefficient','Pressure','Vel','Vx','Vy','Vz','Temperature','BasalforcingsGroundediceMeltingRate']
|
---|
[19797] | 39 | field_tolerances=[5e-08,4e-10,1e-10,1e-10,3e-6,4e-6,3.4e-6,3e-6,2e-6,2e-06]
|
---|
[13662] | 40 | field_values=[\
|
---|
[13967] | 41 | md.results.SteadystateSolution.Gradient1,\
|
---|
| 42 | md.results.SteadystateSolution.J,\
|
---|
| 43 | md.results.SteadystateSolution.FrictionCoefficient,\
|
---|
| 44 | md.results.SteadystateSolution.Pressure,\
|
---|
| 45 | md.results.SteadystateSolution.Vel,\
|
---|
| 46 | md.results.SteadystateSolution.Vx,\
|
---|
| 47 | md.results.SteadystateSolution.Vy,\
|
---|
| 48 | md.results.SteadystateSolution.Vz,\
|
---|
| 49 | md.results.SteadystateSolution.Temperature,\
|
---|
[18068] | 50 | md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate
|
---|
[13662] | 51 | ]
|
---|