Skip to content
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

Facilitate UDA for WSEGVALV item 4 #3684

Merged
merged 4 commits into from
Oct 17, 2023
Merged

Facilitate UDA for WSEGVALV item 4 #3684

merged 4 commits into from
Oct 17, 2023

Conversation

vkip
Copy link
Member

@vkip vkip commented Sep 15, 2023

No description provided.

@bska
Copy link
Member

bska commented Sep 15, 2023

I guess this begins to address Issue #3493? If so, that's very welcome.

@vkip
Copy link
Member Author

vkip commented Sep 15, 2023

I guess this begins to address Issue #3493? If so, that's very welcome.

I wasn't aware of the issue, but yes - intention is to address exactly this.

@bska
Copy link
Member

bska commented Sep 15, 2023

I guess this begins to address Issue #3493? If so, that's very welcome.

I wasn't aware of the issue, but yes - intention is to address exactly this.

Cool! Please don't hesitate to ask if/when you get to the part concerning representing these values in the restart file.

@vkip
Copy link
Member Author

vkip commented Sep 15, 2023

I guess this begins to address Issue #3493? If so, that's very welcome.

I wasn't aware of the issue, but yes - intention is to address exactly this.

Cool! Please don't hesitate to ask if/when you get to the part concerning representing these values in the restart file.

Thanks, I definitely need input on that - will reach out next week.

@vkip vkip force-pushed the wsegvalv_uda_item4 branch from aff059a to bf7aa6a Compare September 21, 2023 11:07
@vkip vkip force-pushed the wsegvalv_uda_item4 branch from bf7aa6a to cadbcda Compare September 21, 2023 11:24
Copy link
Member

@bska bska left a comment

Choose a reason for hiding this comment

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

I think this looks good, except for a possible refinement using the mutable keyword instead.

Comment on lines 137 to 168
double Valve::conCrossArea() const {
return m_con_cross_area;
double Valve::conCrossArea(const std::optional<const ValveUDAEval>& uda_eval_optional) {
m_con_cross_area_value = uda_eval_optional.has_value() ?
uda_eval_optional.value().value(m_con_cross_area, m_udq_default) :
m_con_cross_area.getSI();
Copy link
Member

Choose a reason for hiding this comment

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

Maybe instead of making the member function be non-const we can mark the m_con_cross_area data member be mutable instead? That way we can still call conCrossArea() on a const Valve object and we might not have to provide read/write access to the Valve and segment set objects.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, that's much better, thanks. Will update.

@vkip vkip marked this pull request as ready for review October 16, 2023 08:14
@bska
Copy link
Member

bska commented Oct 17, 2023

jenkins build this please

Copy link
Member

@bska bska left a comment

Choose a reason for hiding this comment

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

Thank you for the updates. This looks good to me now and I'll merge into master.

@bska bska merged commit 2d33b52 into OPM:master Oct 17, 2023
@vkip vkip deleted the wsegvalv_uda_item4 branch October 17, 2023 16:22
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.

2 participants