Saving and retrieving solution vectors for adjoint based optimization

43 views
Skip to first unread message

Praveen C

unread,
Jun 15, 2019, 10:05:19 AM6/15/19
to Deal. II Googlegroup
Dear all
I am doing an adjoint based optimization for which I solve a forward problem and an adjoint. I need to save the forward solution at different time instants and read it back to compute a gradient. What methods are available to do this in deal.II ?
Thanks
praveen

Wolfgang Bangerth

unread,
Jun 17, 2019, 2:05:18 PM6/17/19
to dea...@googlegroups.com

> I am doing an adjoint based optimization for which I solve a forward problem and an adjoint. I need to save the forward solution at different time instants and read it back to compute a gradient. What methods are available to do this in deal.II ?

The various vector classes have functions that can just dump the state of the
vector into a file (the 'block_write/read()' functions), or you can serialize
the whole vector via the serialization framework. (There is no tutorial
program for serialization, but you can find examples of how this works in the
tests/serialization/ directory).

Alternatively, there is also the SwappableVector class that could help in your
case.

Best
W.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Reply all
Reply to author
Forward
0 new messages