[petsc-users] TSAdjoint not working correctly when using TSThetaSetEndpoint(true)

Salazar De Troya, Miguel salazardetro1 at llnl.gov
Tue Jun 2 14:36:10 CDT 2020


Hello,

I am attaching a simple example that uses TSAdjoint to calculate the sensitivity of a 1 degree of freedom ODE. When using theta methods, it returns the right sensitivity as given by the analytical solution. When I set `ts.setThetaEndpoint(True)`, it does not work. Is there a theoretical reason why? I was using this option because using the options

ts.setType(ts.Type.THETA)
ts.setTheta(0.5)
ts.setThetaEndpoint(True)

is equivalent to using ts.Type.CN

Thanks
Miguel

Miguel A. Salazar de Troya
Postdoctoral Researcher, Lawrence Livermore National Laboratory
B141
Rm: 1085-5
Ph: 1(925) 422-6411
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200602/52f1ecf9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: petsc_question_2.py
Type: text/x-python-script
Size: 5451 bytes
Desc: petsc_question_2.py
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200602/52f1ecf9/attachment-0001.bin>


More information about the petsc-users mailing list