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
MeshGenerator::addMeshSubgenerator() api #17458
Conversation
These names can be any mesh generator in the input file, they're not mesh filenames.
If we don't assume that the index names and the mesh ptr vectors are the same size, then we can have subclasses that add additional mesh ptr entries from other sources. This is useful for a test subclass I'm adding.
The modified test will instantiate "subgenerators" itself instead of getting them from earlier in the input file.
Template parameter packs are neat. More importantly, template parameter packs let us pass arbitrary parameters to set in the internals of another helper function.
Hopefully this is something like what the ANL folks had in mind for idaholab#17184
This turns several lines of slightly tricky code into 4 lines of arguably self-documenting code, so I'm fairly happy with it.
Make subgenerator name base unique Co-authored-by: Logan Harbour <loganhharbour@gmail.com>
Thanks to @loganharbour for catching this
This overload is a little trickier to use but is more in line with some other MOOSE APIs.
This lets users be a little less picky about how they construct their InputParameters without us hitting a failure at generate() time.
This way, if we ever add any more subtle parameters like _moose_app that ought to be set from within addMeshSubgenerator() itself, we'll catch the error in this test rather than in any user codes making use of the InputParameters-accepting overload.
62283ca
to
2208e32
Compare
Job Precheck on 2208e32 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:
|
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.
All of the objects placed within the test
directory and not the framework
directory are objects that are meant for testing only. For this reason, they are all
This is a test object only Co-authored-by: Logan Harbour <loganhharbour@gmail.com>
Or a requirement that @loganharbour and I were both happy enough with, at least.
Logan is insistant that test objects should be clearly labeled as such. Which makes sense, so I nominate him to fix the *other* 291 classes in test/src/*/ that don't have "Test" in the name.
Job Documentation on c7213e2 wanted to post the following: View the site here This comment will be updated on new commits. |
This makes the adding of "subgenerators" from a user-defined MeshGenerator subclass into a much easier-to-learn and more self-documenting process.
Resolves #17184