-
Notifications
You must be signed in to change notification settings - Fork 63
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
Layer and DomainLayer Formulation Management #752
Conversation
include/core/DomainLayer.hpp
Outdated
* @brief Run one simulation timestep for this model associated with the domain | ||
*/ | ||
void update_models() override{ | ||
formulation->get_response(output_time_index, simulation_time.get_output_interval_seconds()); |
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.
Its for sure worth noting here and in the constructor description a DomainLayer
's relationship with NextGen's concept of a nexus.
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.
addressed in 291900e
} | ||
|
||
/** | ||
* @brief Determins if the layer has a valid configured formulation |
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.
Typo 'Determines'
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.
fixed in 88f3d23
construct_formulation_from_config(simulation_time_config, | ||
"layer-"+std::to_string(layer_desc.id), | ||
layer.formulation, | ||
output_stream |
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.
This is duplicated from formulation
initialized just above on line 104
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.
removed duplicate in 581e8e5
…an entire hydrofabric domain
…side catchment models
c8433af
to
291900e
Compare
9b05fc8
to
cbc73a1
Compare
Would be beneficial to have this merged before #744 is ready for review/merge. After talking with @donaldwj about the netcdf semantics, we are going to tie those to the |
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.
Just a few typos, but once those are fixed it looks good to me.
Co-authored-by: Justin Singh-M. - NOAA <[email protected]>
Supporting model layers which don't have a 1-1
model -> catchment
association requires additional configuration and management. This PR addresses 3 key components for supporting model layers.Additions
DomainLayer
subclass of theLayer
abstractionngen::config::Layer
for parsing layer configurationsFormulation_Manager
attribute and functions for managing "Domain Layer" formulations.Removals
Changes
Formulation_Manager
using thengen::config::Layer
structuremain
inNgen.cpp
to support creation ofDomainLayer
s andTesting
Todos
A couple of TODO's and FIXME's are noted in the code. The FIXME particularly in the case of parsing Layer configurations with invalid configurations should likely be addressed before merging. This should likely throw aFIXME addressed in 88f3d23std::runtime
error as used in some other config parsing when required missing keys are not found. I'll try to get this added ASAP while the other components are being reviewed.Need to add some unit test code as well.
Checklist
Target Environment support