1 | md=mesh(model,'../Exp/Square.exp',200000);
|
---|
2 | md=geography(md,'','');
|
---|
3 | md=parameterize(md,'../Par/SquareSheetConstrained.par');
|
---|
4 | md=extrude(md,3,1);
|
---|
5 | md=setelementstype(md,'macayeal','all');
|
---|
6 |
|
---|
7 | %control parameters
|
---|
8 | md.control_analysis=1;
|
---|
9 | md.control_type=DragCoefficientEnum();
|
---|
10 | md.cm_min=1*ones(md.numberofgrids,1);
|
---|
11 | md.cm_max=200*ones(md.numberofgrids,1);
|
---|
12 | md.nsteps=2;
|
---|
13 | md.cm_responses=SurfaceLogVelMisfitEnum()*ones(md.nsteps,1);
|
---|
14 | md.weights=ones(md.numberofgrids,1);
|
---|
15 | md.optscal=3*ones(md.nsteps,1);
|
---|
16 | md.maxiter=2*ones(md.nsteps,1);
|
---|
17 | md.cm_jump=0.3*ones(md.nsteps,1);
|
---|
18 | md.cm_noisedmp=2*10^-7;
|
---|
19 | md.vx_obs=md.vx; md.vy_obs=md.vy;
|
---|
20 |
|
---|
21 | md.cluster=none;
|
---|
22 | md=solve(md,DiagnosticSolutionEnum);
|
---|
23 |
|
---|
24 | %Fields and tolerances to track changes
|
---|
25 | field_names ={'Gradient' 'Misfits' 'DragCoefficient' 'Pressure' 'Vel' 'Vx' 'Vy'};
|
---|
26 | field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
|
---|
27 | field_values={...
|
---|
28 | PatchToVec(md.results.DiagnosticSolution.Gradient1),...
|
---|
29 | md.results.DiagnosticSolution.J,...
|
---|
30 | PatchToVec(md.results.DiagnosticSolution.DragCoefficient),...
|
---|
31 | PatchToVec(md.results.DiagnosticSolution.Pressure),...
|
---|
32 | PatchToVec(md.results.DiagnosticSolution.Vel),...
|
---|
33 | PatchToVec(md.results.DiagnosticSolution.Vx),...
|
---|
34 | PatchToVec(md.results.DiagnosticSolution.Vy)
|
---|
35 | };
|
---|