mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
mostly eliminate Eigen in the FIP and VFP code
this code mostly used the Eigen vectors as arrays anyway, so let's use `std::vector`. also, this patch only "mostly eliminates" Eigen from from these parts of the code because the source files of the VFP code still use AutoDiffBlock; Unfortunately this cannot easily be changed because `flow_legacy` depends on these methods. (`flow_ebos` does not use the incriminating methods.)
This commit is contained in:
@@ -2243,7 +2243,7 @@ typedef Eigen::Array<double,
|
||||
|
||||
|
||||
template <class Grid, class WellModel, class Implementation>
|
||||
std::vector<V>
|
||||
std::vector<std::vector<double> >
|
||||
BlackoilModelBase<Grid, WellModel, Implementation>::
|
||||
computeFluidInPlace(const ReservoirState& x,
|
||||
const std::vector<int>& fipnum)
|
||||
@@ -2282,7 +2282,10 @@ typedef Eigen::Array<double,
|
||||
|
||||
// For a parallel run this is just a local maximum and needs to be updated later
|
||||
int dims = *std::max_element(fipnum.begin(), fipnum.end());
|
||||
std::vector<V> values(dims, V::Zero(7));
|
||||
std::vector<std::vector<double> > values(dims);
|
||||
for (int i=0; i < dims; ++i) {
|
||||
values[i].resize(7, 0.0);
|
||||
}
|
||||
|
||||
const V hydrocarbon = saturation[Oil].value() + saturation[Gas].value();
|
||||
V hcpv;
|
||||
@@ -2356,7 +2359,11 @@ typedef Eigen::Array<double,
|
||||
auto comm = pinfo.communicator();
|
||||
// Compute the global dims value and resize values accordingly.
|
||||
dims = comm.max(dims);
|
||||
values.resize(dims, V::Zero(7));
|
||||
values.resize(dims);
|
||||
for (int i=0; i < dims; ++i) {
|
||||
values[i].resize(7);
|
||||
std::fill(values[i].begin(), values[i].end(), 0.0);
|
||||
}
|
||||
|
||||
//Accumulate phases for each region
|
||||
for (int phase = 0; phase < maxnp; ++phase) {
|
||||
|
||||
Reference in New Issue
Block a user