Add relaxation factors#436
Draft
HendriceH wants to merge 4 commits into
Draft
Conversation
|
Thank you for your PR, here are some useful tips:
|
b541fa5 to
9f55397
Compare
greole
reviewed
Apr 26, 2026
| namespace detail | ||
| { | ||
| template<typename VectorType, typename IndexType> | ||
| struct RelaxationCache |
Contributor
There was a problem hiding this comment.
Needs a docstring what ithe purpose is.
Comment on lines
+118
to
+122
| template<typename ValueType> | ||
| KOKKOS_INLINE_FUNCTION ValueType componentMultiply(const ValueType& lhs, const ValueType& rhs) | ||
| { | ||
| return lhs * rhs; | ||
| } |
Contributor
There was a problem hiding this comment.
I think we already have this?
| std::unordered_map<std::string, scalar> fields; | ||
| }; | ||
|
|
||
| inline const RelaxationCache& relaxationCache(const Dictionary& fvSolution) |
Contributor
There was a problem hiding this comment.
Needs a docstring what this function does.
| ); | ||
| } | ||
|
|
||
| template<typename ValueType> |
| } | ||
|
|
||
| template<typename ValueType> | ||
| void addBoundaryContributions(la::LinearSystem<ValueType>& ls) |
Contributor
There was a problem hiding this comment.
Can we pull this out into a separate PR?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
If we get performance improvements from kernel fusion or other stuff things. They will be more pronounced in a PIMPLE setup which solves the momentum and turbulence equation more often. The only missing piece for a neoPimpleFoam implementation are relaxation factors. This PR does a draft implementation of the functionality quickly added to dsl/solver.hpp
A neoPimpleFoam solver is implemented in https://github.com/exasim-project/NeoFOAM/pull/204
Status:
Reference
The reference concept is the following
with the helper: