Implement a HippoInterface class to streamline access to core underlying OpenFOAM and Hippo objects - #125
Open
mattfalcone1997 wants to merge 5 commits into
Conversation
mattfalcone1997
marked this pull request as ready for review
June 29, 2026 14:33
k-collie
reviewed
Jul 17, 2026
| #include "InputParameters.h" | ||
| #include "MooseObject.h" | ||
| #include <fvMesh.H> | ||
| #include <string> |
Collaborator
There was a problem hiding this comment.
I think we can drop this include.
| class FoamProblem; | ||
| class FoamMesh; | ||
|
|
||
| class HippoInterface |
Collaborator
There was a problem hiding this comment.
Would be good to add a doc comment.
Comment on lines
-32
to
-38
| auto foam_problem = dynamic_cast<FoamProblem *>(_problem.get()); | ||
|
|
||
| // Adding BCs using [FoamBC] syntax | ||
| if (_current_task == "add_foam_bc") | ||
| { | ||
| if (!foam_problem) | ||
| mooseError("FoamBCs system can only be used with FoamProblem."); |
Collaborator
There was a problem hiding this comment.
Is this check done somewhere else now? I think it is useful
| class HippoInterface | ||
| { | ||
| public: | ||
| HippoInterface(const MooseObject * moose_object); |
Collaborator
There was a problem hiding this comment.
Can this be a const reference?
| class FoamProblem; | ||
| class FoamMesh; | ||
|
|
||
| class HippoInterface |
Collaborator
There was a problem hiding this comment.
I think it could be nicer for client code to compose this class rather than inherit it - I'd generally lean to composition over inheritance where possible.
If we stick with inheritance then I think it should be at least protected rather than public.
Similarly I'd be wary of calling it an "interface" - interfaces generally aren't allowed member variables.
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.
Summary
Creates a
HippoInterfacebase class that stores references to the underlying OpenFOAM objects such asfvMeshFoam::TimeFoamProblemWe should consider adding other Hippo/OpenFOAM objects here.
Related Issue
Resolves #117
Checklist