Skip to content

Conversation

@wilfonba
Copy link
Collaborator

@wilfonba wilfonba commented Feb 5, 2025

Description

This PR fixes a bug in the smoothing function for spherical patches that was identified during IGR development. The smoothing was only being applied inside the nominal radius of the patch, resulting in a grid level discontinuity. The old code generates the following IC
old
Which shows smoothing only on the sphere's interior and a discontinuity on the outer surface. The new code generates the following IC
new
which shows smoothing on both sides of the nominal radius of the patch. The smoothing coefficient for both ICs is identical.

Fixes #(issue) [optional]

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Scope

  • This PR comprises a set of related changes with a common goal

@wilfonba wilfonba requested a review from a team as a code owner February 5, 2025 19:45
@wilfonba
Copy link
Collaborator Author

wilfonba commented Feb 5, 2025

@haochey Says this is likely an issue for some other patches as well and he's going to resolve it in this PR.

@codecov
Copy link

codecov bot commented Feb 5, 2025

Codecov Report

Attention: Patch coverage is 17.24138% with 24 lines in your changes missing coverage. Please review.

Project coverage is 43.94%. Comparing base (131b41e) to head (12edf88).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/pre_process/m_patches.fpp 14.81% 22 Missing and 1 partial ⚠️
src/pre_process/m_initial_condition.fpp 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #798      +/-   ##
==========================================
+ Coverage   43.74%   43.94%   +0.19%     
==========================================
  Files          65       65              
  Lines       19039    19039              
  Branches     2332     2329       -3     
==========================================
+ Hits         8328     8366      +38     
+ Misses       9303     9262      -41     
- Partials     1408     1411       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sbryngelson
Copy link
Member

@haochey let me know when this is ready

@sbryngelson
Copy link
Member

Glad to merge but it's now failing a bunch of tests?

@haochey
Copy link
Contributor

haochey commented Feb 8, 2025

Yeah, I will fix this today.

@haochey haochey requested a review from a team as a code owner February 9, 2025 02:04
@haochey
Copy link
Contributor

haochey commented Feb 9, 2025

@sbryngelson This should be ready to merge.

The cuboid patch was not properly initialized for IBM so it breaks all the tests. I updated the 8 golden files for cuboid IBMs with the fix on initialization.

The smooth functions for cylinder and sphere are fixed. They are the only two patches with this issue.

@sbryngelson sbryngelson merged commit f785c7b into MFlowCode:master Feb 9, 2025
28 checks passed
@wilfonba wilfonba deleted the Fix-Sphere-Smoothing branch April 19, 2025 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants