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

Compositional well #4334

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Compositional well #4334

wants to merge 2 commits into from

Conversation

GitPaean
Copy link
Member

No description provided.

@GitPaean
Copy link
Member Author

jenkins build this please

Comment on lines 503 to 504
// injection streams for compostional STREAM injection using WINJGAS
std::unordered_map<std::string, std::vector<double>> inj_streams;
Copy link
Member

Choose a reason for hiding this comment

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

Please use map_member<>. It really is the primary solution to this problem.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure. I went back and forth on this and thanks for the suggestion. I will do that.

not very familiar with the design here. Will you explain a little bit what is the difference here for future record?

Copy link
Member

Choose a reason for hiding this comment

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

not very familiar with the design here. Will you explain a little bit what is the difference here for future record?

Sure. The point is that map_member<K,V> is more or less a map<K, shared_ptr<V>> with some additional logic on top. This enables sharing data between ScheduleState objects at different report steps if there is no intervening keyword to add/change the data.

Copy link
Member Author

Choose a reason for hiding this comment

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

The design looks like V needs to be a struct containing name() , which is the key .

Copy link
Member Author

Choose a reason for hiding this comment

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

Is it okay that I add a member function

void update(const K& key, std::shared_ptr<T> value);

or you think it will break the design.

Copy link
Member Author

@GitPaean GitPaean Nov 12, 2024

Choose a reason for hiding this comment

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

It looks it might work, but it will be on draft mode for some while until we figure out how things work in the opm-simulators. I will check what Jenkins think about it.

If it does not work later, I will make a StreamComposition struct to make it the same with Well or Group to following the design style.

@GitPaean
Copy link
Member Author

jenkins build this please

@GitPaean GitPaean force-pushed the compositional_well branch 3 times, most recently from b14f594 to 3311e2c Compare November 21, 2024 09:16
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