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
Preliminaries for NS component wrapping #23974
Conversation
@GiudGiud @lindsayad Before going further, I wanted to get your thoughts on my last commit, as it sets up the code-sharing strategy between the NS actions and components. In particular, can you review the overall inheritance strategy and see if it makes sense, or if there's something better to use? I started out trying an interface class and multiple inheritance (e.g., I ended up making a base class template Some ugliness to note (not sure if there is alternative): lots of |
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.
i think this is really smart.
Since you are templating everything, you ll probably want to instantiate it in the same file, as you cant instantiate it from elsewhere unless you put all the action code in a header.
This means NS needs to pull in THM.
The true test will be making the component of course.
Job Documentation on 9ebb777 wanted to post the following: View the site here This comment will be updated on new commits. |
Templates confuse the hell out of me, so I don't claim to understand any of this, but I thought that we can get away with splitting the declaration and the implementation, as long as we do the explicit instantiation thing:
It does at least work for the action. I'm not sure what would be different in this respect for the component.
Are you saying this because there will be the explicit instantiation with the component class? I was wondering about this. I wonder if I can split the implementation code into multiple files, with one file in THM, for example, so that we don't have NS requiring THM. Otherwise, if both of the modules depended on one another, it would seem to imply that they just need to be merged, but we should probably avoid this if possible.
Yeah, I'm guessing there will still be tricky things to overcome, but I should be able to find solutions. |
I don't think we should re-order the NS-THM dependency just so we can put the template code in the .C file instead of the .h I also like what you've done here @joshuahansel ! |
Can we include the C file in the component in addition to the h file? |
I'm confused. How is re-ordering the NS-THM dependency allowing the template code to be in a .C file? I was thinking that any time that there was an explicit instantiation of a non-NS class, it would require THM, regardless of whether in a .h file or .C file. I put the implementation in the .C file because I thought I got that for free since I have the explicit instantiation there (but I don't really understand). I'll try the idea of having the component explicit instantiation code in THM somehow. |
Yeah you're right. |
cb15069
to
730b913
Compare
Ok, check out my latest push. I moved the explicit instantiation for Action into its own .C file (and had to move the non-explicit implementation into the .h file). I tried with the component too ( |
I like what you've done with it @joshuahansel
It would be a circular library dependency. That doesn't work in computer science |
I don't see the component here. and it compiled and ran? |
I haven't pushed it yet - I was keeping it on a separate branch.
I used the same structure as you see for Everything is compiling and running so far (just have the new component inheriting from |
730b913
to
4db9578
Compare
Ok, just pushed up everything I have so far. I think it should be close now. I made a test using two instances of the new component. I still need to add the relevant relationship manager for the component. I need to better acquaint myself with the system and figure out how to do this in the THM setting. |
4db9578
to
5c60d4c
Compare
@GiudGiud Any idea why my |
The boundary must not be present locally |
Yeah, do you know how this might be fixed? Mesh generators like |
no most mesh generators do not work on distributed meshes. Boundary are even trickier for domain decomposition. Renaming should have been fine though. It s probably just a zealous check for the boundary existing on every process. Just add a reduction on a "found" boolean and it will work |
Thanks, it looks like the IDs get gathered, but not the names. I'll see what I can do. |
5c60d4c
to
d235765
Compare
@joshuahansel I'm going to unsubscribe for now. Please mention me when this is ready for review |
d235765
to
5eda4cc
Compare
@lindsayad I'm stuck with the distributed mesh failure on the new test. To summarize:
|
Going to unsubscribe for now. Please mention me when you want my attention here again 😄 |
4b27377
to
a0dd7ac
Compare
Job Coverage on 9ebb777 wanted to post the following: Framework coverage
Modules coverageNavier stokes
Thermal hydraulics
Full coverage reportsReports
Warnings
This comment will be updated on new commits. |
FlowComponentNS uses this. Refs idaholab#23794
a0dd7ac
to
37c3d98
Compare
Job Precheck on 37c3d98 wanted to post the following: Your code requires style changes. A patch was auto generated and copied here
Alternatively, with your repository up to date and in the top level of your repository:
|
37c3d98
to
5424f1c
Compare
@lindsayad @GiudGiud This is ready for review. |
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.
looks good
modules/thermal_hydraulics/test/tests/components/flow_component_ns/tests
Outdated
Show resolved
Hide resolved
Co-authored-by: Guillaume Giudicelli <guillaume.giudicelli@gmail.com>
@GiudGiud I think your comments should be addressed now. @lindsayad do you want to review as well? |
This PR takes steps towards #23794.
I'm putting this up now, even though it's incomplete, because I want to discuss the overall design/strategy. This PR currently:
MooseMesh::getBlocksDimension()
to get the dimension of a list of subdomains.CombinerGenerator
to preserve block and boundary names of secondary meshes (not really related, but happened to be needed for testing the above)BlockRestricable::blocksDimension()
(which pretty much calls the newMooseMesh::getBlocksDimension()
)NSFVAction
NSFVAction