mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
make initializeConnection similar in aquifer classes
This commit is contained in:
parent
5f844bc3a4
commit
4cdb3e85c0
@ -168,9 +168,10 @@ protected:
|
|||||||
|
|
||||||
if (faceDirection == this->connections_[idx].face_dir) {
|
if (faceDirection == this->connections_[idx].face_dir) {
|
||||||
this->faceArea_connected_[idx] = this->getFaceArea(intersection, idx);
|
this->faceArea_connected_[idx] = this->getFaceArea(intersection, idx);
|
||||||
denom_face_areas += (this->connections_[idx].influx_mult * this->faceArea_connected_.at(idx));
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
denom_face_areas += (this->connections_[idx].influx_mult * this->faceArea_connected_.at(idx));
|
||||||
}
|
}
|
||||||
|
|
||||||
const double eps_sqrt = std::sqrt(std::numeric_limits<double>::epsilon());
|
const double eps_sqrt = std::sqrt(std::numeric_limits<double>::epsilon());
|
||||||
|
@ -129,49 +129,45 @@ protected:
|
|||||||
if( idx < 0)
|
if( idx < 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!this->connections_[idx].influx_coeff.first) { // influx_coeff is defaulted
|
auto isIt = gridView.ibegin(elem);
|
||||||
auto isIt = gridView.ibegin(elem);
|
const auto& isEndIt = gridView.iend(elem);
|
||||||
const auto& isEndIt = gridView.iend(elem);
|
for (; isIt != isEndIt; ++ isIt) {
|
||||||
for (; isIt != isEndIt; ++ isIt) {
|
// store intersection, this might be costly
|
||||||
// store intersection, this might be costly
|
const auto& intersection = *isIt;
|
||||||
const auto& intersection = *isIt;
|
|
||||||
|
|
||||||
// only deal with grid boundaries
|
// only deal with grid boundaries
|
||||||
if (!intersection.boundary())
|
if (!intersection.boundary())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int insideFaceIdx = intersection.indexInInside();
|
int insideFaceIdx = intersection.indexInInside();
|
||||||
switch (insideFaceIdx) {
|
switch (insideFaceIdx) {
|
||||||
case 0:
|
case 0:
|
||||||
faceDirection = Opm::FaceDir::XMinus;
|
faceDirection = Opm::FaceDir::XMinus;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
faceDirection = Opm::FaceDir::XPlus;
|
faceDirection = Opm::FaceDir::XPlus;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
faceDirection = Opm::FaceDir::YMinus;
|
faceDirection = Opm::FaceDir::YMinus;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
faceDirection = Opm::FaceDir::YPlus;
|
faceDirection = Opm::FaceDir::YPlus;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
faceDirection = Opm::FaceDir::ZMinus;
|
faceDirection = Opm::FaceDir::ZMinus;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
faceDirection = Opm::FaceDir::ZPlus;
|
faceDirection = Opm::FaceDir::ZPlus;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
OPM_THROW(Opm::NumericalIssue,
|
OPM_THROW(Opm::NumericalIssue,
|
||||||
"Initialization of Aquifer Fetkovich problem. Make sure faceTag is correctly defined"); }
|
"Initialization of Aquifer Fetkovich problem. Make sure faceTag is correctly defined"); }
|
||||||
|
|
||||||
|
|
||||||
if (faceDirection == this->connections_[idx].face_dir) {
|
if (faceDirection == this->connections_[idx].face_dir) {
|
||||||
this->faceArea_connected_[idx] = this->getFaceArea(intersection, idx);
|
this->faceArea_connected_[idx] = this->getFaceArea(intersection, idx);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
this->faceArea_connected_.at(idx) = this->connections_[idx].influx_coeff.second;
|
|
||||||
}
|
}
|
||||||
denom_face_areas += (this->connections_[idx].influx_mult * this->faceArea_connected_.at(idx));
|
denom_face_areas += (this->connections_[idx].influx_mult * this->faceArea_connected_.at(idx));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user