Simon:
I am solving an elasticity BVP where a nonlinear system must be solved at each
time step. To speed up my assembly, I am currently testing the
SUNDIALS::KINSOL wrapper in dealii version 9.4.0.
The main logic is happening during
// call to KINSol
588 status = KINSol(kinsol_mem, solution, data.strategy, u_scale, f_scale);
589 AssertKINSOL <https://nam10.safelinks.protection.outlook.com/?
url=https%3A%2F%2Fwww.dealii.org%2F9.4.0%2Fdoxygen%2Fdeal.II%2Fkinsol_8h.html%23a0b815dfbfd8c5c49a64af965acdf5330&data=05%7C02%7CWolfgang.Bangerth%40colostate.edu%7C911376c5e6e64a419e3808dd84ab7dda%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638812594279314310%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=bcUWydLH%2B8MwJ%2FqPyi4fpX%2FWZHBZhddK%2F%2F8N9LctL4c%3D&reserved=0>(status);
where the AssertKINSOL translates into an Assert(code>=0, ExcKINSOLError),
which is optimized away in release mode. [...]
My questions are:
1. What are the reasons why the ExcKINSOLError is defined using Assert rather
than AssertThrow?
2. What can be done instead to catch the above errors?
(Of course, there is the option to compute the residual after the solve call,
but I was hoping for a cheaper solution, ideally letting Kinsol itself decide
if the nonlinear solve was successful.)
This code has been rewritten a couple of years ago, and I think that it now
does exactly what you want it to do:
https://github.com/dealii/dealii/blob/master/source/sundials/kinsol.cc#L522-L567
This assumes that you have a way in your callbacks to throw an exception. This
is also documented here:
https://dealii.org/developer/doxygen/deal.II/DEALGlossary.html#GlossUserProvidedCallBack
Or perhaps I misunderstand? Do you have a situation where your callbacks do
what they are expected to do, but KINSOL still creates an error for legitimate
reasons?
Best
W.
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/dealii/08d866e0-0ced-4e11-9de1-2498b1d2592b%40colostate.edu.