Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(utils): add normalization option for to_cvfd to add hanging nodes#2547

Merged
jdhughes-dev merged 4 commits into
modflowpy:developfrom
jdhughes-dev:cvfd-normalize
Jul 24, 2025
Merged

feat(utils): add normalization option for to_cvfd to add hanging nodes#2547
jdhughes-dev merged 4 commits into
modflowpy:developfrom
jdhughes-dev:cvfd-normalize

Conversation

@jdhughes-dev

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented Jul 20, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.9%. Comparing base (556c088) to head (09ef87e).
Report is 18 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##           develop    #2547     +/-   ##
==========================================
+ Coverage     55.5%    55.9%   +0.4%     
==========================================
  Files          644      641      -3     
  Lines       124135   123882    -253     
==========================================
+ Hits         68947    69346    +399     
+ Misses       55188    54536    -652     
Files with missing lines Coverage Δ
flopy/utils/cvfdutil.py 84.0% <100.0%> (+1.5%) ⬆️

... and 75 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread flopy/utils/cvfdutil.py Outdated
array of x, y vertices
normalize : bool
normalize the coordinates when looking for hanging nodes. Normalization may be
needed in cases where vertices are in real world coordinates and have large

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

presumably to avoid precision loss. does one ever want no normalization with large coord values? just wondering if a parameter is needed or if it could be turned on for values above a threshold

This comment was marked as spam.

@jdhughes-dev jdhughes-dev Jul 22, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@wpbonelli I don't have a good idea of what threhold would be good do you? Although there is a cost for normalizing maybe it should always be done. What do you think?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We made a similar fix in PRT not long ago and always normalize, but this has made me wonder whether we should set a threshold there too. Not sure about an exact threshold value but I assume we pref accuracy over speed. I can try and find some precedents to follow

@modflowpy modflowpy deleted a comment from howanmunjea746 Jul 21, 2025

@christianlangevin christianlangevin left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is a nice addition and should improve the reliability of this calculation. Unless there is a straightforward way to determine a threshold, seems like normalizing should always be done. As we discussed, could allow someone to shut it off for better performance if normalization is not needed.

@jdhughes-dev jdhughes-dev merged commit caa6100 into modflowpy:develop Jul 24, 2025
20 checks passed
@jdhughes-dev jdhughes-dev deleted the cvfd-normalize branch August 5, 2025 13:45
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.

4 participants