mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-04 13:36:57 -06:00
fix issue when BCPROP is not set initially
This commit is contained in:
parent
c3de02f18f
commit
72de9d3a9b
@ -467,7 +467,9 @@ public:
|
||||
const IntensiveQuantities& insideIntQuants,
|
||||
unsigned globalSpaceIdx)
|
||||
{
|
||||
if (bdyInfo.type == BCType::RATE) {
|
||||
if (bdyInfo.type == BCType::NONE) {
|
||||
bdyFlux = 0.0;
|
||||
} else if (bdyInfo.type == BCType::RATE) {
|
||||
computeBoundaryFluxRate(bdyFlux, bdyInfo);
|
||||
} else if (bdyInfo.type == BCType::FREE || bdyInfo.type == BCType::DIRICHLET) {
|
||||
computeBoundaryFluxFree(problem, bdyFlux, bdyInfo, insideIntQuants, globalSpaceIdx);
|
||||
|
@ -466,16 +466,19 @@ private:
|
||||
}
|
||||
}
|
||||
neighborInfo_.appendRow(loc_nbinfo.begin(), loc_nbinfo.end());
|
||||
for (unsigned bfIndex = 0; bfIndex < stencil.numBoundaryFaces(); ++bfIndex) {
|
||||
const auto& bf = stencil.boundaryFace(bfIndex);
|
||||
const int dir_id = bf.dirId();
|
||||
const auto [type, massrateAD] = problem_().boundaryCondition(myIdx, dir_id);
|
||||
// Strip the unnecessary (and zero anyway) derivatives off massrate.
|
||||
VectorBlock massrate(0.0);
|
||||
for (size_t ii = 0; ii < massrate.size(); ++ii) {
|
||||
massrate[ii] = massrateAD[ii].value();
|
||||
}
|
||||
if (type != BCType::NONE) {
|
||||
if (problem_().nonTrivialBoundaryConditions()) {
|
||||
for (unsigned bfIndex = 0; bfIndex < stencil.numBoundaryFaces(); ++bfIndex) {
|
||||
const auto& bf = stencil.boundaryFace(bfIndex);
|
||||
const int dir_id = bf.dirId();
|
||||
// not for NNCs
|
||||
if (dir_id < 0)
|
||||
continue;
|
||||
const auto [type, massrateAD] = problem_().boundaryCondition(myIdx, dir_id);
|
||||
// Strip the unnecessary (and zero anyway) derivatives off massrate.
|
||||
VectorBlock massrate(0.0);
|
||||
for (size_t ii = 0; ii < massrate.size(); ++ii) {
|
||||
massrate[ii] = massrateAD[ii].value();
|
||||
}
|
||||
const auto& exFluidState = problem_().boundaryFluidState(myIdx, dir_id);
|
||||
BoundaryConditionData bcdata{type,
|
||||
massrate,
|
||||
|
Loading…
Reference in New Issue
Block a user