Skip to content

Add a first test case for reservoir coupling #5893

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

Merged
merged 4 commits into from
Mar 13, 2025

Conversation

hakonhagland
Copy link
Contributor

Builds on #5620.

@hakonhagland hakonhagland marked this pull request as draft January 17, 2025 08:34
@hakonhagland hakonhagland force-pushed the tstep_test2 branch 2 times, most recently from a347e13 to e555c94 Compare January 18, 2025 20:07
@hakonhagland
Copy link
Contributor Author

jenkins build this please

@hakonhagland
Copy link
Contributor Author

jenkins build this please

@hakonhagland hakonhagland marked this pull request as ready for review January 21, 2025 14:40
@hakonhagland hakonhagland requested a review from blattms January 21, 2025 14:40
Copy link
Member

@blattms blattms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great.
Just some very minor nitpicks.

rc_master.resizeNextReportDates(2);
}

void setSlaveData(int slave_number, double slave_start_date, double report_time_step_size)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename this to make clear what is set?

@hakonhagland
Copy link
Contributor Author

@blattms Thanks for the review. I have added two commits to address the comments.

@hakonhagland
Copy link
Contributor Author

jenkins build this please

Comment on lines 160 to 164
// Sets the slave start date and the next report time offset for the given slave number
// NOTE: The method name is kept short as setSlaveDate() instead of a longer descriptive name
// like setSlaveStartDateAndNextReportTimeOffset() because the method is called multiple times
// in the test cases and the shorter name makes the test cases more readable.
void setSlaveData(int slave_number, double slave_start_date, double report_time_step_size)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kind of disagree. The reason that I asked for a name change is such that fellow developers do not need to take a look at the documentation to understand what is going on. IMHO a short name that does not reveal anything does not make code more readable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make a struct, document the struct members, pass an instance of that struct, everybody wins.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason that I asked for a name change is such that fellow developers do not need to take a look at the documentation to understand what is going on.

@blattms In general I would agree, but in this case the function is called multiple times and the long name could become distracting (reducing readability).

@hakonhagland
Copy link
Contributor Author

jenkins build this please

@blattms
Copy link
Member

blattms commented Mar 13, 2025

Thanks. Yes that is a long function name.

@blattms blattms merged commit bf52e20 into OPM:master Mar 13, 2025
1 check passed
@bska
Copy link
Member

bska commented Mar 13, 2025

This breaks the post-commit build. Please fix immediately or back out the PR.

@akva2
Copy link
Member

akva2 commented Mar 13, 2025

i'm on it

@akva2 akva2 mentioned this pull request Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants