Merge pull request #2384 from akva2/use_compressed_perm

use compressed properties setting up permeabilities
This commit is contained in:
Bård Skaflestad 2020-03-02 11:56:13 -06:00 committed by GitHub
commit c3f127afa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -759,22 +759,25 @@ private:
// over several processes.)
const auto& fp = vanguard_.eclState().fieldProps();
if (fp.has_double("PERMX")) {
const std::vector<double>& permxData = fp.get_global_double("PERMX");
const std::vector<double>& permxData = fp.get_double("PERMX");
std::vector<double> permyData(permxData);
std::vector<double> permyData;
if (fp.has_double("PERMY"))
permyData = fp.get_global_double("PERMY");
permyData = fp.get_double("PERMY");
else
permyData = permxData;
std::vector<double> permzData(permxData);
std::vector<double> permzData;
if (fp.has_double("PERMZ"))
permzData = fp.get_global_double("PERMZ");
permzData = fp.get_double("PERMZ");
else
permzData = permxData;
for (size_t dofIdx = 0; dofIdx < numElem; ++ dofIdx) {
unsigned cartesianElemIdx = vanguard_.cartesianIndex(dofIdx);
permeability_[dofIdx] = 0.0;
permeability_[dofIdx][0][0] = permxData[cartesianElemIdx];
permeability_[dofIdx][1][1] = permyData[cartesianElemIdx];
permeability_[dofIdx][2][2] = permzData[cartesianElemIdx];
permeability_[dofIdx][0][0] = permxData[dofIdx];
permeability_[dofIdx][1][1] = permyData[dofIdx];
permeability_[dofIdx][2][2] = permzData[dofIdx];
}
// for now we don't care about non-diagonal entries