Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KINSOL: allow for custom setup #15677

Merged
merged 1 commit into from Jul 8, 2023
Merged

Conversation

sebproell
Copy link
Contributor

This functionality is already available in ARKODE and is now introduced equivalently to KINSOL. I modified test kinsol_05 to test this functionality.

source/sundials/kinsol.cc Outdated Show resolved Hide resolved
Copy link
Member

@bangerth bangerth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's nice!

Out of curiosity, what is it that you're trying to customize?

include/deal.II/sundials/kinsol.h Outdated Show resolved Hide resolved
*
* @code
* ode.custom_setup = [&](void *arkode_mem) {
* KINSetErrFile(arkode_mem, errfile);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also show the code to set up errfile?

Separately, is arkode_mem really a void * or does ARKode use an actual type for that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internally they likely use a custom type for that but to users this type is always erased. When calling KINCreate we are only handed a void* and are supposed to hand it back to all "member functions". It's a C Library 🤷

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, yes :-)

include/deal.II/sundials/kinsol.h Outdated Show resolved Hide resolved
include/deal.II/sundials/kinsol.h Show resolved Hide resolved
source/sundials/kinsol.cc Outdated Show resolved Hide resolved
tests/sundials/kinsol_05.cc Outdated Show resolved Hide resolved
@tamiko
Copy link
Member

tamiko commented Jul 7, 2023

/rebuild

@bangerth bangerth merged commit 035a30a into dealii:master Jul 8, 2023
15 checks passed
@sebproell sebproell deleted the kinsol-custom-setup branch July 8, 2023 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants