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

User-defined near null space #80

Open
fverdugo opened this issue May 27, 2021 · 3 comments
Open

User-defined near null space #80

fverdugo opened this issue May 27, 2021 · 3 comments

Comments

@fverdugo
Copy link

Hi! First, let me congratulate you for this package, I have been using it and it performs very well! It's faster than PETSc GAMG in many cases according to my experience.

I am wondering if it is possible to pass a user-defined near null space to the SA-AMG routines. This is important e.g. in linear elasticity and other vector-valued problems.

By looking at this line

it looks like the near null space is hardcoded to be a vector of ones. Thus, I guess that the answer to my question is NO at the moment.

I would like to know if somebody is working on this feature. If not, I can try to address it myself and file a PR.

@ranjanan
Copy link
Collaborator

ranjanan commented May 28, 2021

Thank you for your kind words and for using the package!

Yes, I can have definitely have that be an optional argument with default as ones(T,n). Feel free to send a PR. It should be a quick change. I'll merge as soon as tests pass. Thank you!

@fverdugo
Copy link
Author

Yes, I can have definitely have that be an optional argument with default as ones(T,n). Feel free to send a PR. It should be a quick change.

Perhaps this is not sufficient. In general, the near null space can have several vectors, so size(B,2) can be > 1. I don't know if the code will support the case when B is a matrix. I'll try once I have some time.

@learning-chip
Copy link

learning-chip commented Dec 31, 2021

Came across the same issue. Note that pyamg.aggregation.smoothed_aggregation_solver allows near-nullspace candidates B of shape (N, K). As long as the SA setup logic follows PyAMG, passing a 2-D matrix B should be fine.

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