diff --git a/dumux/assembly/fclocalassembler.hh b/dumux/assembly/fclocalassembler.hh index 10a9ce1408b5f0437e99082dfdf96fc87ec2cc8a..43e4309c32cca5397c6da074c6a3935f14a01e95 100644 --- a/dumux/assembly/fclocalassembler.hh +++ b/dumux/assembly/fclocalassembler.hh @@ -403,7 +403,7 @@ public: static const NumericEpsilon<Scalar, numEq> eps_{this->asImp_().problem().paramGroup()}; static const int numDiffMethod = getParamFromGroup<int>(this->asImp_().problem().paramGroup(), "Assembly.NumericDifferenceMethod"); NumericDifferentiation::partialDerivative(evalResiduals, otherElemSol[scvJ.localDofIndex()][pvIdx], partialDerivs, origResiduals, - eps_(otherElemSol[scvJ.localDofIndex()][pvIdx], pvIdx), numDiffMethod); + eps_(otherElemSol[scvJ.localDofIndex()][pvIdx], pvIdx), numDiffMethod); const auto updateJacobian = [&]() { @@ -417,54 +417,15 @@ public: } }; - using GeometryHelper = typename std::decay_t<decltype(fvGeometry.gridGeometry())>::GeometryHelper; - using LocalIntersectionMapper = typename std::decay_t<decltype(fvGeometry.gridGeometry())>::LocalIntersectionMapper; - LocalIntersectionMapper localIsMapper; - - const bool isParallel = fvGeometry.gridGeometry().gridView().comm().size() > 1; - if (isParallel) - localIsMapper.update(fvGeometry.gridGeometry().gridView(), element); - if (element.partitionType() == Dune::InteriorEntity) updateJacobian(); else { const auto localIdxI = scvI.indexInElement(); - const auto localIdxJ = scvJ.indexInElement(); - - const auto& facetI = GeometryHelper::facet(localIsMapper.refToRealIdx(localIdxI), element); - // add contribution of opposite scv lying within the overlap/ghost zone - if (facetI.partitionType() == Dune::BorderEntity && - (localIdxJ == GeometryHelper::localOppositeIdx(localIdxI) || scvJ.dofIndex() == scvI.dofIndex())) - updateJacobian(); - } + const auto& facetI = element.template subEntity <1> (localIdxI); - if (isParallel && element.partitionType() == Dune::InteriorEntity) - { - const auto localIdxI = scvI.indexInElement(); - const auto& facetI = GeometryHelper::facet(localIsMapper.refToRealIdx(localIdxI), element); if (facetI.partitionType() == Dune::BorderEntity) - { - for (const auto& scvf : scvfs(fvGeometry, scvI)) - { - if (scvf.isFrontal() || scvf.boundary()) - continue; - - // parallel scvs TODO drawing - if (scvf.outsideScvIdx() == scvJ.index()) - updateJacobian(); - else - { - // normal scvs - const auto& orthogonalScvf = fvGeometry.lateralOrthogonalScvf(scvf); - if (orthogonalScvf.boundary()) - continue; - - if (orthogonalScvf.insideScvIdx() == scvJ.index() || orthogonalScvf.outsideScvIdx() == scvJ.index()) - updateJacobian(); - } - } - } + updateJacobian(); } // restore the original state of the scv's volume variables