mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move allocation of Extbo data into ExtboContainer
This commit is contained in:
parent
336a99a226
commit
14e7289059
@ -25,6 +25,20 @@
|
||||
|
||||
namespace Opm {
|
||||
|
||||
template<class Scalar>
|
||||
void ExtboContainer<Scalar>::
|
||||
allocate(const unsigned bufferSize)
|
||||
{
|
||||
X_volume_.resize(bufferSize, 0.0);
|
||||
Y_volume_.resize(bufferSize, 0.0);
|
||||
Z_fraction_.resize(bufferSize, 0.0);
|
||||
mFracOil_.resize(bufferSize, 0.0);
|
||||
mFracGas_.resize(bufferSize, 0.0);
|
||||
mFracCo2_.resize(bufferSize, 0.0);
|
||||
|
||||
allocated_ = true;
|
||||
}
|
||||
|
||||
template class ExtboContainer<double>;
|
||||
|
||||
#if FLOW_INSTANTIATE_FLOAT
|
||||
|
@ -36,6 +36,12 @@ class ExtboContainer
|
||||
using ScalarBuffer = std::vector<Scalar>;
|
||||
|
||||
public:
|
||||
void allocate(const unsigned bufferSize);
|
||||
|
||||
bool allocated() const
|
||||
{ return allocated_; }
|
||||
|
||||
bool allocated_ = false;
|
||||
ScalarBuffer X_volume_;
|
||||
ScalarBuffer Y_volume_;
|
||||
ScalarBuffer Z_fraction_;
|
||||
|
@ -1025,12 +1025,7 @@ doAllocBuffers(const unsigned bufferSize,
|
||||
}
|
||||
|
||||
if (enableExtbo_) {
|
||||
extboC_.X_volume_.resize(bufferSize, 0.0);
|
||||
extboC_.Y_volume_.resize(bufferSize, 0.0);
|
||||
extboC_.Z_fraction_.resize(bufferSize, 0.0);
|
||||
extboC_.mFracOil_.resize(bufferSize, 0.0);
|
||||
extboC_.mFracGas_.resize(bufferSize, 0.0);
|
||||
extboC_.mFracCo2_.resize(bufferSize, 0.0);
|
||||
extboC_.allocate(bufferSize);
|
||||
}
|
||||
|
||||
if (enableMICP_) {
|
||||
|
Loading…
Reference in New Issue
Block a user