Changeset 23290
- Timestamp:
- 09/15/18 19:56:48 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/NightlyRun/test3015.m
r21925 r23290 15 15 %setup autodiff parameters 16 16 index=1; %this is the scalar component we are checking against 17 md.autodiff.independents={... 18 independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices,'fos_forward_index',index) 17 18 if IssmConfig('_HAVE_CODIPACK_') 19 md.autodiff.independents={... 20 independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices) 21 }; 22 md.autodiff.dependents={... 23 dependent('name','IceVolume','type','scalar','fos_reverse_index',index)... 24 }; 25 md.autodiff.driver='fos_reverse'; 26 else 27 md.autodiff.independents={... 28 independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices,'fos_forward_index',index) 19 29 }; 20 30 21 md.autodiff.dependents={... 22 dependent('name','IceVolume','type','scalar')... 23 }; 24 md.autodiff.driver='fos_forward'; 31 md.autodiff.dependents={... 32 dependent('name','IceVolume','type','scalar')... 33 }; 34 md.autodiff.driver='fos_forward'; 35 end 25 36 26 37 %parameters for the step-wise derivative … … 70 81 md=solve(md,'Masstransport'); 71 82 %retrieve directly 72 dVdh_ad=md.results.MasstransportSolution.AutodiffJacobian; 83 if IssmConfig('_HAVE_CODIPACK_') 84 dVdh_ad=md.results.MasstransportSolution.AutodiffJacobian(index); 85 else 86 dVdh_ad=md.results.MasstransportSolution.AutodiffJacobian; 87 end 73 88 74 disp(sprintf('dV/dh: analytical: %16.16g\n using ad olc:%16.16g\n',dVdh_an,dVdh_ad));89 disp(sprintf('dV/dh: analytical: %16.16g\n using ad: %16.16g\n',dVdh_an,dVdh_ad)); 75 90 76 91 %Fields and tolerances to track changes
Note:
See TracChangeset
for help on using the changeset viewer.