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

Raises a warning if remeshing fails due to wrong Gmsh file #283

Merged
merged 4 commits into from
Aug 10, 2023

Conversation

sblauth
Copy link
Owner

@sblauth sblauth commented Aug 10, 2023

With this PR, an exception is raised in the function cashocs.io.write_out_mesh (which is used for remeshing), if the currently loaded mesh (in python) and the one defined in the Gmsh file are not compatible.

The code only checks, if the number of vertices is identical. We could, in the future, also check for the number of cells. But this is more complicated and most of the time also not needed.

Closes #253

@sblauth sblauth added the development Development-related matters label Aug 10, 2023
@sblauth sblauth self-assigned this Aug 10, 2023
@sblauth sblauth enabled auto-merge August 10, 2023 08:02
cashocs/io/mesh.py Fixed Show fixed Hide fixed
@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Merging #283 (770432a) into main (7c7be4a) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #283      +/-   ##
==========================================
+ Coverage   92.89%   92.90%   +0.02%     
==========================================
  Files          84       84              
  Lines        6522     6538      +16     
==========================================
+ Hits         6058     6074      +16     
  Misses        464      464              
Files Changed Coverage Δ
cashocs/io/mesh.py 94.20% <100.00%> (+0.49%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sblauth sblauth merged commit 63c4307 into main Aug 10, 2023
22 checks passed
@sblauth sblauth deleted the development/remeshing_warning branch August 10, 2023 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Development-related matters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Development] Raise a better exception when remeshing fails
1 participant