Last change
on this file since 1185 was 1185, checked in by Mathieu Morlighem, 16 years ago |
moved u_g to inputs in control methods
|
File size:
817 bytes
|
Rev | Line | |
---|
[1184] | 1 | function J =objectivefunctionC(search_scalar,m,inputs,p_g,grad_g,n,analysis_type,sub_analysis_type);
|
---|
[1] | 2 |
|
---|
| 3 | %recover some parameters
|
---|
| 4 | optscal=m.parameters.optscal(n);
|
---|
| 5 | fit=m.parameters.fit(n);
|
---|
| 6 | control_type=m.parameters.control_type;
|
---|
| 7 |
|
---|
| 8 | %Update along gradient using scalar supplied by fmincon optimization routine
|
---|
| 9 | parameter=p_g+search_scalar*optscal*grad_g;
|
---|
| 10 |
|
---|
| 11 | %Plug parameter into inputs
|
---|
[1046] | 12 | inputs=add(inputs,m.parameters.control_type,parameter,'doublevec',1,m.parameters.numberofnodes);
|
---|
[1] | 13 |
|
---|
| 14 | %Run diagnostic with updated parameters.
|
---|
[465] | 15 | u_g=diagnostic_core_nonlinear(m,inputs,analysis_type,sub_analysis_type);
|
---|
[1185] | 16 | inputs=add(inputs,'velocity',u_g,'doublevec',2,m.parameters.numberofnodes);
|
---|
[1] | 17 |
|
---|
| 18 | %Compute misfit for this velocity field.
|
---|
[1185] | 19 | J=Misfit(m.elements,m.nodes,m.loads,m.materials,m.parameters,inputs,analysis_type,sub_analysis_type);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.