Address review comments.

This commit is contained in:
Atgeirr Flø Rasmussen 2022-09-29 09:26:43 +02:00
parent 7981fb92e0
commit 66e5da9709
2 changed files with 3 additions and 3 deletions

View File

@ -428,7 +428,7 @@ public:
} else if (bdyInfo.type == BCType::FREE) {
computeBoundaryFluxFree(problem, bdyFlux, bdyInfo, insideIntQuants, globalSpaceIdx, timeIdx);
} else {
throw std::logic_error("Unknown boundary condition type in computeBoundaryFlux().");
throw std::logic_error("Unknown boundary condition type " + std::to_string(static_cast<int>(bdyInfo.type)) + " in computeBoundaryFlux()." );
}
}

View File

@ -344,13 +344,13 @@ private:
}
}
neighborInfo_.appendRow(loc_nbinfo.begin(), loc_nbinfo.end());
for (size_t bfIndex = 0; bfIndex < stencil.numBoundaryFaces(); ++bfIndex) {
for (unsigned bfIndex = 0; bfIndex < stencil.numBoundaryFaces(); ++bfIndex) {
const auto& bf = stencil.boundaryFace(bfIndex);
const int dir_id = bf.dirId();
const auto [free, massrateAD] = problem_().boundaryCondition(myIdx, dir_id);
// Strip the unnecessary (and zero anyway) derivatives off massrate.
VectorBlock massrate(0.0);
for (int ii = 0; ii < massrate.size(); ++ii) {
for (size_t ii = 0; ii < massrate.size(); ++ii) {
massrate[ii] = massrateAD[ii].value();
}
const bool nonzero_massrate = massrate != VectorBlock(0.0);