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

Update _FM_utils.py #744

Merged
merged 3 commits into from
Nov 19, 2024
Merged

Update _FM_utils.py #744

merged 3 commits into from
Nov 19, 2024

Conversation

abja-dhi
Copy link
Contributor

@abja-dhi abja-dhi commented Nov 6, 2024

Updated the initial part of the function _get_node_centered_data in _FM_utils.py that finds the elements connected to each node using csr_matrix function from scipy.sparse. This method works much faster than the previous one. The connectivity matrix is generated using _create_node_element_matrix function.

Updated the part that elements connected to each node are defined using csr_matrix function from scipy.sparse. This method works much faster than the previous one.
ruff extension in VS Code is used to format the code
@ecomodeller
Copy link
Member

@mohm-dhi I believe you are the original author of _get_node_centered_data can I ask you to take a look at @abja-dhi improved implementation? 🙏

@mohm-dhi
Copy link
Collaborator

mohm-dhi commented Nov 19, 2024

It is basically doing the same thing but in a more efficient way.

@ecomodeller ecomodeller merged commit b441e98 into DHI:main Nov 19, 2024
7 checks passed
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.

3 participants