Add method SegmentState::size()

This commit is contained in:
Joakim Hove
2021-06-01 15:43:45 +02:00
parent 19ba223c2a
commit f7b1f90c12
3 changed files with 8 additions and 0 deletions

View File

@@ -55,6 +55,11 @@ bool SegmentState::empty() const {
return this->rates.empty();
}
std::size_t SegmentState::size() const {
return this->pressure.size();
}
void SegmentState::scale_pressure(double bhp) {
if (this->empty())
throw std::logic_error("Tried to pressure scale empty SegmentState");