Skip to content

Add solvers to src code #22

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

janmirco
Copy link
Contributor

@janmirco janmirco commented Apr 2, 2025

Colleagues of mine and I started using your project to tackle problems in nonlinear solid mechanics. Firstly, thank you for your work! Without your project, I did not see any way of using FEniCSx for my research. This stems from the approach we use for our material models.

Unfortunately, I am not well-versed in the implementations of dolfinx, ufl.ExternalOperator, and FEMExternalOperator. This commit simply copies solvers.py to the source directory and adds necessary imports in __init__.py. I am aware that this might not be the best approach. My intention was to make sure that installing dolfinx-external-operator enables users to directly use code from solvers.py. At least on my end, this works flawlessly.

I am using FEniCSx 0.9 with conda. My setup:

dolfinx-external-operator 0.10.0.dev0              pypi_0    pypi
fenics-basix              0.9.0           py313h867a91d_2    conda-forge
fenics-basix-nanobind-abi 0.2.1.13             h6c05e69_2    conda-forge
fenics-dolfinx            0.9.0         py313h041dec1_108    conda-forge
fenics-ffcx               0.9.0              pyh2e48890_0    conda-forge
fenics-libbasix           0.9.0                h7cb7ce6_2    conda-forge
fenics-libdolfinx         0.9.0              hb85e8c2_108    conda-forge
fenics-ufcx               0.9.0                hb7f7608_0    conda-forge
fenics-ufl                2024.2.0           pyhd8ed1ab_1    conda-forge

@janmirco
Copy link
Contributor Author

janmirco commented Apr 3, 2025

I just noticed that this pull request also includes the commit of pull request #21. Sorry for that. Let me know if you want me to remove #21 and clean up this pull request's description.

@a-latyshev
Copy link
Owner

Hi @janmirco,

Excuse me for the late reply.

Thank you for contributing to the project!

It is a good idea to move the freshly developed solvers to the sources. I'd drop the LinearProblem since it's not used anymore.

As for versioning, please let's discuss it in the corresponding PR and discard these changes here.

@a-latyshev
Copy link
Owner

Dear @janmirco

Regarding the future update of the interface for Newton solvers in dolfinx (PR: FEniCS/dolfinx#3648), I think we will update dolfinx-external-operators accordingly. That's why I suggest leaving the source "clean", since Newton solvers are not the main focus of this extension.

I will close this PR.

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

Successfully merging this pull request may close these issues.

2 participants