Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Mesh Datatype and Shape differentiation

More
2 years 2 weeks ago #4341 by frederik
Dear all,

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 ( docu.ngsolve.org/latest/i-tutorials/inde...opology-optimization ) 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!
Time to create page: 0.138 seconds