<div>My code genius (2D/3D unstructured nonlinear solver for semiconductor simulation ) use adol-c for quite a long time. This AD tool is implemented by c++ operator overloading. Using an AD tool makes the development of Jacobian much much easier than handwriting. AD tool usually runs 2x slower than handwriting code, but build the Jacobian matrix is usually not a bottleneck for large scale nonlinear problems. <br> <br></div><div>You can find some information and source code here. <br>https://github.com/cogenda/Genius-TCAD-Open<br>The AD tool is just a head file include/math/adolc.h (stable) and its improved version include/math/adsmt.h (not fully tested).<br> <br><br>BTW,implement AD by operator overloading is also possible in python. <br></div><div> </div><blockquote style="padding-left:5px;margin-left:5px;border-left:#a0c6e5 2px solid;margin-right:0px"><br>Dear developers,<br><br>I need to evaluate Jacobian matrix using an AD tool. I read from the Petsc manual that it can only work with structured grid via DMMG interface. Is there a possible way to use it for unstructured grid and set it for KSP structure?<br>
<br>Thanks,<br>BehZad<br>
</blockquote><span ></span>