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.
Sorry for all of this unsolicited code, but I'm working with MrHyDE and would really like the ability to tap into is as a library and use it with external UQ tooling that I work on. Some reasons:
input.yaml
and change it using Python/Julia/etc every time I want to change one particular parameter of the model), that's massively wasteful. In particular, that would require MrHyDE to construct and load a mesh at every iteration. If I'm running MCMC or something on a simpler PDE, the meshing could easily compare with (if not dominate) the cost of solving the actual problem.This PR is more-or-less a fully-functional proof of concept, as any external library would need pretty detailed knowledge of the workings of MrHyDE. The idea is that, if this is merged, I'd go back in and instrument some kind of
externalInterface.hpp
or something, which would basically emulate the functionality indriver.cpp
but wrap a bunch of the managers in a big object and allow you to change the object in "easier" ways. In particular, at least to get started, it would have:At least at first, I wouldn't bother interfacing with the UQ/optimization managers, because that would be a little too onerous. While I may be myopic, this would cover 80-90% of any use-cases for the library: allow external tools to access results to run custom postprocessing that would be out-of-scope for MrHyDE.
Notes on the PR:
mrhyde
executable in any way (to my knowledge)MrHyDE_BUILD_SHARED_LIBS
, which turns on/off the building of the shared libraryfind_package(MrHyDE REQUIRED)
andtarget_link_libraries(<target_name> MrHyDE::mrhyde_lib)
with, e.g.,cmake -DMrHyDE_ROOT=<path_to_install_prefix>
include
statements within the configuration). This is necessary for external linkage.MrHyDE
(hence the ability to turn it off), but it works with the default configuration.mrhyde
binary, and once for the library). I'm not sure if there's a good way to consolidate those. Advice is appreciatedI'm open to any thoughts/advice/changes!