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

Refactor vof curvature l2 projection #1336

Merged
merged 12 commits into from
Nov 6, 2024

Conversation

AmishgaAlphonius
Copy link
Collaborator

@AmishgaAlphonius AmishgaAlphonius commented Nov 1, 2024

Description

Following PR #1318, this one refactors the curvature projection to be assembled and solved through the VOF subequations interface. Assembly of the matrix and right-hand side for both VOFSubequations (phase fraction gradient and curvature projection) are now done in the same loop without the WorkStream method, as they are pretty simple to assemble.

Testing

The unit test dedicated to the interface has been updated.
Visual inspection of data was done with the rising bubble case using paraview.

Checklist (will be removed when merged)

See this page for more information about the pull request process.

Code related list:

  • All in-code documentation related to this PR is up to date (Doxygen format)
  • Copyright headers are present and up to date
  • Lethe documentation is up to date
  • The branch is rebased onto master
  • Code is indented with indent-all and .prm files (examples and tests) with prm-indent
  • If parameters are modified, the tests and the documentation of examples are up to date
  • Changelog (CHANGELOG.md) is up to date if the refactor affects the user experience or the codebase

Pull request related list:

  • No other PR is open related to this refactoring
  • Labels are applied
  • There are at least 2 reviewers (or 1 if small feature) excluding the responsible for the merge
  • If this PR closes an issue or is related to a project, it is linked in the "Projects" or "Development" section
  • If any future works is planed, an issue is opened
  • The PR description is cleaned and ready for merge

@AmishgaAlphonius AmishgaAlphonius self-assigned this Nov 1, 2024
@AmishgaAlphonius AmishgaAlphonius force-pushed the refactor-vof-curvature-l2-projection branch from 3ad07fe to 194618c Compare November 1, 2024 12:48
@AmishgaAlphonius AmishgaAlphonius added Ready for review Refactoring This PR is only refactoring or clean up labels Nov 1, 2024
@AmishgaAlphonius AmishgaAlphonius marked this pull request as ready for review November 1, 2024 12:53
Copy link
Contributor

@blaisb blaisb left a comment

Choose a reason for hiding this comment

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

Last few changes, quasi nothing. Very good work.

@@ -11,15 +11,19 @@

using namespace dealii;


/**
* @brief IDs associated to the different subequations solved in Lethe.
*/
enum VOFSubequationsID : unsigned int
Copy link
Contributor

Choose a reason for hiding this comment

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

can you make this an enum class or it needs to be an enum?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No there is no particular reason to leave it as an enum, I've switched it to an enum class :)

Comment on lines 199 to +201
subequation_string = "VOF phase fraction gradient L2 projection";
else if (subequation_id == VOFSubequationsID::curvature_projection)
subequation_string = "VOF curvature L2 projection";
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the subequation string used for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To print on the terminal, when it is verbose. It is used in the setup_dofs() and solve_linear_system_and_update_solution() methods in VOFLinearSubequationsSolver
image

source/solvers/vof.cc Show resolved Hide resolved
source/solvers/vof_curvature_projection.cc Outdated Show resolved Hide resolved
source/solvers/vof_curvature_projection.cc Outdated Show resolved Hide resolved
source/solvers/vof_curvature_projection.cc Show resolved Hide resolved
source/solvers/vof_phase_gradient_projection.cc Outdated Show resolved Hide resolved
source/solvers/vof_phase_gradient_projection.cc Outdated Show resolved Hide resolved
@AmishgaAlphonius AmishgaAlphonius force-pushed the refactor-vof-curvature-l2-projection branch from e389fda to 13ef98a Compare November 4, 2024 19:00
Copy link
Collaborator

@oguevremont oguevremont left a comment

Choose a reason for hiding this comment

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

Looks good!

include/solvers/vof_curvature_projection.h Outdated Show resolved Hide resolved
Copy link
Collaborator

@hepap hepap left a comment

Choose a reason for hiding this comment

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

Not a lot of comments! I like this new interface a lot!

include/solvers/vof_curvature_projection.h Outdated Show resolved Hide resolved
@blaisb blaisb merged commit e5dec42 into master Nov 6, 2024
11 checks passed
@blaisb blaisb deleted the refactor-vof-curvature-l2-projection branch November 6, 2024 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for review Rebased Refactoring This PR is only refactoring or clean up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants