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

Generic solver where F0 and F1 can be set by the user #217

Open
bknight1 opened this issue Jul 31, 2024 · 5 comments
Open

Generic solver where F0 and F1 can be set by the user #217

bknight1 opened this issue Jul 31, 2024 · 5 comments

Comments

@bknight1
Copy link
Member

Is your feature request related to a problem? Please describe.
Allow F0 and F1 to be set in a generic solver. This would allow users to create their own solvers for various problems.

Describe the solution you'd like
Allow F0 and F1 to be set up by the user. Maybe in the generic solver, happy to hear other ideas

Describe alternatives you've considered
Currently have to copy the constitutive model, modify the flux term for F1 and then insert terms in the f variable for F0. This works currently but might not in the future. Would be better to have F0 and F1 terms settable in a generic solver.

This would help with the benchmark scripts for the lithostatic pressure solver, the diffusion-only models I'm working on and various other equations people are implementing.

Additional context
Happy to implement

@julesghub
Copy link
Member

An advanced user feature but worth it says I

@bknight1
Copy link
Member Author

bknight1 commented Aug 1, 2024

We already have the SNES_Scalar and SNES_Vector classes in the cython solvers file. Shall the generic solver inherit from these classes and just have F0 and F1 setters? Or is there a better approach?

The SNES_Scalar and SNES_Vector code also looks very similar. Is it worth re-writing a generic class that can handle both?

@julesghub
Copy link
Member

Starting work on this now.... will change the setters on the generic class for F0 & F1.

It would be nice to combine SNES_Scalar & SNES_Vector once the setters rewrite is done.

@lmoresi
Copy link
Member

lmoresi commented Aug 29, 2024

@julesghub - are we there yet ?
@bknight1 - is he there yet ?

@bknight1
Copy link
Member Author

Still a WIP, Julian has cleaned up the code in preparation but hasn't written the generic class yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants