modflow6
modflow6 copied to clipboard
feat: configure supported models at build time
A potential approach for #1491
- Configure supported models & exchanges at build time via meson options
- Move model sources to independent folders for easier filtering
- Move model/exg creation to new modules, generated from templates with
fypp
- rename ConnectionBuilder -> ConnectionFactory, move to top level, generate from template
- rename SimulationCreate -> Simulation
- Generate IDM files with meson
- use
configure_file()
before compiling - definition files still created with
dfn2f90.py
, moved tosrc/IDM
- model input file and consolidated selector file generated with
fypp
insrc/
- generic framework files still in
src/Utilities/IDM
-
dfn2f90.py
accepts input DFNs via config file, defaultutils/idmloader/dfns.txt
-
dfn2f90.py
accepts an output directory path - rename files, modules and routines for basename templating
- consistent DFN & IDM file naming
- remove indices from file names
- use
Considerations
- Template processing is also possible with pure python if not worth adding
fypp
- To keep support for make/MSVS,
configure_file()
is used instead ofgenerator()
and IDM/templated files are still under version control. Developers not using meson can generate code manually before build time, like is currently done for IDM - If support for make/MSVS is ever dropped and meson becomes the standard build tool, could switch to
generator()
, preprocess at build time and remove generated files from versioning, but debugging may become trickier