-
Notifications
You must be signed in to change notification settings - Fork 1
Flow solver is now almost fully refactored and optimised #61
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
since this function is no longer used
removed comments and code I intend to deprecate
removed comments and code I intend to deprecate
…ive_impl_part also refactored second_projection.divergence_nodes. this commit removes more unnecessary code and make everything consistent with mem as an input argument
not all operators will be used, but might be worth keeping for future sake
but this appears to be really slow, as the stencil is never cached.
this seems to be substantially faster as it can be cached
and reflective of the current directory structure
fixed minor bug with set_boundary on rho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors and optimises crucial bottlenecks in the flow solver while restructuring the codebase for improved clarity and maintenance. Key changes include removal of legacy functions, renaming and consolidation of timestep and flux routines, and updating module dependencies from mpv to npf.
- Removed the obsolete synchronise_variables function in the EOS module.
- Renamed functions and updated boundary handling across CFD, advection, and data assimilation modules.
- Updated test and documentation references to reflect the new module structure.
Reviewed Changes
Copilot reviewed 61 out of 61 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/pybella/flow_solver/physics/eos.py | Removed unused legacy functions. |
src/pybella/flow_solver/physics/cfl.py | Updated function calls and parameter formatting for clarity. |
src/pybella/flow_solver/numerics/implicit_euler.py | New implementations with a potential issue in 3D system preparation. |
src/pybella/flow_solver/numerics/explicit_euler.py | Refactored explicit Euler step with minor style updates. |
src/pybella/flow_solver/numerics/explicit_advection/* | Renamed and restructured advection flux and recovery functions. |
src/pybella/flow_solver/discretisation/time_update.py | Adapted to use new npf variables and updated boundary calls. |
src/pybella/data_assimilation/* | Updated dependency references to use the new boundary modules. |
docs/* | Updated API and documentation to match module refactorings. |
Comments suppressed due to low confidence (2)
src/pybella/flow_solver/numerics/explicit_advection/compute_advection.py:8
- [nitpick] The function name 'strange_splitting' is ambiguous and does not clearly describe its behavior. Consider renaming it to a more descriptive name, such as 'advect' or 'explicit_splitting', to improve code clarity.
def strange_splitting(mem, ud, dt, odd, label, writer=None):
src/pybella/flow_solver/numerics/implicit_euler.py:219
- In _prepare_3d_system, diag_inv is explicitly set to None, which may indicate a missing preconditioner for the 3D case. Please verify whether a computed diag_inv is required to ensure the solver's correctness.
diag_inv = None # TODO: Verify if this should be computed for 3D
Some stragglers have not yet been touched, see #57. But all crucial bottleneck functions have been refactored and optimised. The codebase has also been extensively restructured. This PR will prepare the stage for the plans in roadmap #60.