I am currently working on aerodynamic shape optimization using ngsolve v6.2.1906 and am very new to ngsolve/netgen. For the gradient calculation, I move a point (by a small amount) and then afterwards adapt all the mesh points accordingly and reconstruct the solution to see the effect on e.g. drag. I am currently doing this using finite difference. However, I would like to do this with the autodiff datatype or with complex step method in order to have more accurate calculations. To do this I need to be able to change the mesh points from double to complex/autodiff datatype. Is there a way to do this, e.g. during the time the mesh is read from a file? Or afterwards? I already tried a bunch of stuff to change it on the go but could not find a solution yet.
I know that gradient calculation is possible in ngsolve v6.2.2202, but it seems that our code is not working with this version. Nevertheless, our code is written in C++ and I could not find any examples implementing a similar problem as in the documentation (Interactive NGSolve Tutorial — NGS-Py 6.2.2302 documentation) in C++. Does anybody by any chance knows C+±examples, possibly be very basic, to have a look at?
Thank you very much in advance!