Skip to content

Commit

Permalink
Update docstring for response_meters_per_second.
Browse files Browse the repository at this point in the history
Update docstring for response_meters_per_second to discuss how function
handles the excess_water_meters parameter.
  • Loading branch information
robertbartel authored and hellkite500 committed Jul 30, 2020
1 parent 2f94198 commit aa9852a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
10 changes: 8 additions & 2 deletions models/kernels/reservoir/Reservoir.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,16 @@ class Reservoir

/**
* @brief Function to update the reservoir storage in meters and return a response in meters per second to
* an influx and timestep.
* an influx and time step.
*
* Note that the function also takes a reference parameter for holding the amount of excess water for the reservoir
* beyond its maximum storage after accounting for the input amount. All calls to this function will initialize this
* parameter, without accounting for any previous value, so any usage should ensure the passed reference does not
* contain a value that is still needed but not stored elsewhere.
*
* @param in_flux_meters_per_second influx in meters per second
* @param delta_time_seconds delta time in seconds
* @param excess_water_meters excess water in meters
* @param excess_water_meters Reference to an amount of excess water in meters, after considering input and max storage.
* @return sum_of_outlet_velocities_meters_per_second sum of the outlet velocities in meters per second
*/
double response_meters_per_second(double in_flux_meters_per_second, int delta_time_seconds,
Expand Down
7 changes: 6 additions & 1 deletion src/models/kernels/reservoir/Reservoir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,14 @@ Reservoir::Reservoir(double minimum_storage_meters, double maximum_storage_meter
* @brief Function to update the reservoir storage in meters and return a response in meters per second to
* an influx and time step.
*
* Note that the function also takes a reference parameter for holding the amount of excess water for the reservoir
* beyond its maximum storage after accounting for the input amount. All calls to this function will initialize this
* parameter, without accounting for any previous value, so any usage should ensure the passed reference does not
* contain a value that is still needed but not stored elsewhere.
*
* @param in_flux_meters_per_second influx in meters per second
* @param delta_time_seconds delta time in seconds
* @param excess_water_meters excess water in meters
* @param excess_water_meters Reference to an amount of excess water in meters, after considering input and max storage.
* @return sum_of_outlet_velocities_meters_per_second sum of the outlet velocities in meters per second
*/
double Reservoir::response_meters_per_second(double in_flux_meters_per_second, int delta_time_seconds,
Expand Down

0 comments on commit aa9852a

Please sign in to comment.