Can dolfin-adjoint calculate the gradient of the cost with respect to mesh points?

Asked by Kuan Lee

Is it possible to calculate the cost with respect to changes in the shape of the domain?
For instance, if I define some shape function that alters the points on the mesh using some parameter, P.
Can I then get dolfin-adjoint to calculate dJ/dP?

Question information

Language:
English Edit question
Status:
Solved
For:
dolfin-adjoint Edit question
Assignee:
No assignee Edit question
Solved by:
Simon Funke
Solved:
Last query:
Last reply:
Revision history for this message
Simon Funke (simon-funke) said :
#1

Hi Kuan,

No, dolfin-adjoint currently has no direct way of calculating the shape gradient.

However, you can use shape differential calculus to compute these sensitivities efficiently (and doing so involves computing the adjoint which you can do with dolfin-adjoint).

Below are two references for you to get started on shape differential calculus:

KG van der Zee, Introduction to Shape Differential Calculus
http://goo.gl/7o0Myz

S. Schmidt, Efficient Large Scale Aerodynamic Design Based on Shape Calculus
http://ra.uni-trier.de/~schmidt/publications/thesis.pdf

Hope this helps,

Simon

Revision history for this message
Kuan Lee (kuan133) said :
#2

Hi Simon,

Thanks you for the links.

I have looked through the references, and from my understanding (which may be incorrect), it seems that the shape calculus is a 'post processing' step which requires the calculated solution of the forward and adjoint states, along with some other curvature information.

How do I output the adjoint states of the simulation?
Can this be done through the dolfin-adjoint API?

Thanks.

Revision history for this message
Best Simon Funke (simon-funke) said :
#3

Your understanding is correct.

You have access to the adjoint solution with the function:

dolfin_adjoint.compute_adjoint(functional, forget=True, ignore=[])

I think there are some example / tests that use it.

Revision history for this message
Kuan Lee (kuan133) said :
#4

Thanks Simon Funke, that solved my question.