diff --git a/dumux/common/intersectionmapper.hh b/dumux/common/intersectionmapper.hh index 5deddd1016bbf37b5e93495464f8c4d0fc0e4abf..761f21e1c8d0361da116b4a2df9b3bfa4827c109 100644 --- a/dumux/common/intersectionmapper.hh +++ b/dumux/common/intersectionmapper.hh @@ -61,16 +61,16 @@ public: { ElementIterator eIt = gridView_.template begin<0>(); - int faceIdx = 0; + int fIdx = 0; IntersectionIterator isEndIt = gridView_.iend(*eIt); for (IntersectionIterator isIt = gridView_.ibegin(*eIt); isIt != isEndIt; ++isIt) { int idxInInside = isIt->indexInInside(); - standardLocalIdxMap_[idxInInside] = faceIdx; + standardLocalIdxMap_[idxInInside] = fIdx; - faceIdx++; + fIdx++; } } @@ -84,45 +84,45 @@ public: return elementMapper_.map(element); } - int map(int elemIdx, int faceIdx) + int map(int elemIdx, int fIdx) { - return intersectionMapGlobal_[elemIdx][faceIdx]; + return intersectionMapGlobal_[elemIdx][fIdx]; } - int map(int elemIdx, int faceIdx) const + int map(int elemIdx, int fIdx) const { - return (intersectionMapGlobal_[elemIdx].find(faceIdx))->second;//use find() for const function! + return (intersectionMapGlobal_[elemIdx].find(fIdx))->second;//use find() for const function! } - int map(const Element& element, int faceIdx) + int map(const Element& element, int fIdx) { - return intersectionMapGlobal_[map(element)][faceIdx]; + return intersectionMapGlobal_[map(element)][fIdx]; } - int map(const Element& element, int faceIdx) const + int map(const Element& element, int fIdx) const { - return intersectionMapGlobal_[map(element)].find(faceIdx)->second;//use find() for const function! + return intersectionMapGlobal_[map(element)].find(fIdx)->second;//use find() for const function! } - int maplocal(int elemIdx, int faceIdx) + int maplocal(int elemIdx, int fIdx) { - return intersectionMapLocal_[elemIdx][faceIdx]; + return intersectionMapLocal_[elemIdx][fIdx]; } - int maplocal(int elemIdx, int faceIdx) const + int maplocal(int elemIdx, int fIdx) const { - return (intersectionMapLocal_[elemIdx].find(faceIdx))->second;//use find() for const function! + return (intersectionMapLocal_[elemIdx].find(fIdx))->second;//use find() for const function! } - int maplocal(const Element& element, int faceIdx) + int maplocal(const Element& element, int fIdx) { - return intersectionMapLocal_[map(element)][faceIdx]; + return intersectionMapLocal_[map(element)][fIdx]; } - int maplocal(const Element& element, int faceIdx) const + int maplocal(const Element& element, int fIdx) const { - return (intersectionMapLocal_[map(element)].find(faceIdx))->second;//use find() for const function! + return (intersectionMapLocal_[map(element)].find(fIdx))->second;//use find() for const function! } // return number intersections @@ -155,15 +155,15 @@ public: { int globalIdx = map(*eIt); - int faceIdx = 0; + int fIdx = 0; // run through all intersections with neighbors IntersectionIterator isEndIt = gridView_.iend(*eIt); for (IntersectionIterator isIt = gridView_.ibegin(*eIt); isIt != isEndIt; ++isIt) { int indexInInside = isIt->indexInInside(); - intersectionMapLocal_[globalIdx][faceIdx] = indexInInside; + intersectionMapLocal_[globalIdx][fIdx] = indexInInside; - faceIdx++; + fIdx++; } } @@ -172,7 +172,7 @@ public: { int globalIdx = map(*eIt); - int faceIdx = 0; + int fIdx = 0; // run through all intersections with neighbors IntersectionIterator isEndIt = gridView_.iend(*eIt); for (IntersectionIterator isIt = gridView_.ibegin(*eIt); isIt != isEndIt; ++isIt) @@ -206,17 +206,17 @@ public: } } - intersectionMapGlobal_[globalIdx][faceIdx] = globalIntersectionIdx; + intersectionMapGlobal_[globalIdx][fIdx] = globalIntersectionIdx; intersectionMapGlobal_[globalIdxNeighbor][faceIdxNeighbor] = globalIntersectionIdx; globalIntersectionIdx ++; } } else { - intersectionMapGlobal_[globalIdx][faceIdx] = globalIntersectionIdx; + intersectionMapGlobal_[globalIdx][fIdx] = globalIntersectionIdx; globalIntersectionIdx ++; } - faceIdx++; + fIdx++; } } size_ = globalIntersectionIdx; diff --git a/dumux/decoupled/1p/diffusion/fv/fvvelocity1p.hh b/dumux/decoupled/1p/diffusion/fv/fvvelocity1p.hh index bb8ab19b8acf24527ebd0c8b4efe7dfff7f61e70..711c731897b8cc868a497a8097b4d0d3c403160c 100644 --- a/dumux/decoupled/1p/diffusion/fv/fvvelocity1p.hh +++ b/dumux/decoupled/1p/diffusion/fv/fvvelocity1p.hh @@ -153,9 +153,9 @@ public: for (int dimIdx = 0; dimIdx < dim; dimIdx++) { refVelocity[dimIdx] = -flux[dim - 1 - dimIdx]; - for (int faceIdx = 0; faceIdx < dim + 1; faceIdx++) + for (int fIdx = 0; fIdx < dim + 1; fIdx++) { - refVelocity[dimIdx] += flux[faceIdx]/(dim + 1); + refVelocity[dimIdx] += flux[fIdx]/(dim + 1); } } } diff --git a/dumux/decoupled/1p/fluxdata1p.hh b/dumux/decoupled/1p/fluxdata1p.hh index fa33f93a850fee6b00d67d0a4a27ff7d7b1a7a7a..6c5acec5bd4bc14f71ec0bef946563bdba6202f0 100644 --- a/dumux/decoupled/1p/fluxdata1p.hh +++ b/dumux/decoupled/1p/fluxdata1p.hh @@ -61,11 +61,11 @@ public: //! Constructs a FluxData1P object FluxData1P() { - for (int faceIdx = 0; faceIdx < 2*dim; faceIdx++) + for (int fIdx = 0; fIdx < 2*dim; fIdx++) { - velocity_[faceIdx] = DimVector(0.0); - potential_[faceIdx] = 0.0; - velocityMarker_[faceIdx] = false; + velocity_[fIdx] = DimVector(0.0); + potential_[fIdx] = 0.0; + velocityMarker_[fIdx] = false; } } diff --git a/dumux/decoupled/2p/diffusion/fv/fvvelocity2p.hh b/dumux/decoupled/2p/diffusion/fv/fvvelocity2p.hh index e881fa6ca8a17fb1ec7e00cea44e179dbf52f57c..a8ef06742d986ee595c33104815d7e7f66228921 100644 --- a/dumux/decoupled/2p/diffusion/fv/fvvelocity2p.hh +++ b/dumux/decoupled/2p/diffusion/fv/fvvelocity2p.hh @@ -228,9 +228,9 @@ public: for (int dimIdx = 0; dimIdx < dim; dimIdx++) { refVelocity[dimIdx] = -fluxW[dim - 1 - dimIdx]; - for (int faceIdx = 0; faceIdx < dim + 1; faceIdx++) + for (int fIdx = 0; fIdx < dim + 1; fIdx++) { - refVelocity[dimIdx] += fluxW[faceIdx]/(dim + 1); + refVelocity[dimIdx] += fluxW[fIdx]/(dim + 1); } } } @@ -265,9 +265,9 @@ public: for (int dimIdx = 0; dimIdx < dim; dimIdx++) { refVelocity[dimIdx] = -fluxNw[dim - 1 - dimIdx]; - for (int faceIdx = 0; faceIdx < dim + 1; faceIdx++) + for (int fIdx = 0; fIdx < dim + 1; fIdx++) { - refVelocity[dimIdx] += fluxNw[faceIdx]/(dim + 1); + refVelocity[dimIdx] += fluxNw[fIdx]/(dim + 1); } } } diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2p.hh index 6da5c55b3b58d63088360d4fe3c944bfa0ccfb65..a9f289c89401589fe8673214225e60faec2635f6 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2p.hh @@ -1683,9 +1683,9 @@ void FvMpfaL2dPressure2p<TypeTag>::assemble() for (int elemIdx = 0; elemIdx < 2 * dim; elemIdx++) { bool isOutside = false; - for (int faceIdx = 0; faceIdx < dim; faceIdx++) + for (int fIdx = 0; fIdx < dim; fIdx++) { - int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, faceIdx); + int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, fIdx); if (interactionVolume.isOutsideFace(intVolFaceIdx)) { isOutside = true; @@ -1731,16 +1731,16 @@ void FvMpfaL2dPressure2p<TypeTag>::assemble() pc += gravityDiff; //minus because of gravity definition! - for (int faceIdx = 0; faceIdx < dim; faceIdx++) + for (int fIdx = 0; fIdx < dim; fIdx++) { - int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, faceIdx); + int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, fIdx); if (interactionVolume.isBoundaryFace(intVolFaceIdx)) { if (interactionVolume.getBoundaryType(intVolFaceIdx).isDirichlet(pressEqIdx)) { - int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, faceIdx); + int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx); const ReferenceElement& referenceElement = ReferenceElements::general( elementPointer->geometry().type()); @@ -1754,7 +1754,7 @@ void FvMpfaL2dPressure2p<TypeTag>::assemble() DimVector unitDistVec(distVec); unitDistVec /= dist; - Scalar faceArea = interactionVolume.getFaceArea(elemIdx, faceIdx); + Scalar faceArea = interactionVolume.getFaceArea(elemIdx, fIdx); // get pc and lambda at the boundary Scalar satWBound = cellData.saturation(wPhaseIdx); diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2padaptive.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2padaptive.hh index e0766cf07e81142103b84dcf7a727dd8dbbe914e..215bb171cfc2e759a1ee5d7a03632cd7f955a40d 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2padaptive.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2padaptive.hh @@ -2379,9 +2379,9 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::assemble() for (int elemIdx = 0; elemIdx < 2 * dim; elemIdx++) { bool isOutside = false; - for (int faceIdx = 0; faceIdx < dim; faceIdx++) + for (int fIdx = 0; fIdx < dim; fIdx++) { - int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, faceIdx); + int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, fIdx); if (interactionVolume.isOutsideFace(intVolFaceIdx)) { isOutside = true; @@ -2427,16 +2427,16 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::assemble() pc += gravityDiff; //minus because of gravity definition! - for (int faceIdx = 0; faceIdx < dim; faceIdx++) + for (int fIdx = 0; fIdx < dim; fIdx++) { - int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, faceIdx); + int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, fIdx); if (interactionVolume.isBoundaryFace(intVolFaceIdx)) { if (interactionVolume.getBoundaryType(intVolFaceIdx).isDirichlet(pressEqIdx)) { - int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, faceIdx); + int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx); const ReferenceElement& referenceElement = ReferenceElements::general( elementPointer->geometry().type()); @@ -2450,7 +2450,7 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::assemble() DimVector unitDistVec(distVec); unitDistVec /= dist; - Scalar faceArea = interactionVolume.getFaceArea(elemIdx, faceIdx); + Scalar faceArea = interactionVolume.getFaceArea(elemIdx, fIdx); // get pc and lambda at the boundary Scalar satWBound = cellData.saturation(wPhaseIdx); diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2p.hh index b891bff5569776e8aa0b30babafc033d71d4b788..11df7ec82bef0eddf858ab6b374f3c9326c7e1ac 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2p.hh @@ -256,9 +256,9 @@ void FvMpfaL2dPressureVelocity2p<TypeTag>::calculateVelocity() for (int elemIdx = 0; elemIdx < 2 * dim; elemIdx++) { bool isOutside = false; - for (int faceIdx = 0; faceIdx < dim; faceIdx++) + for (int fIdx = 0; fIdx < dim; fIdx++) { - int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, faceIdx); + int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, fIdx); if (interactionVolume.isOutsideFace(intVolFaceIdx)) { isOutside = true; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2padaptive.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2padaptive.hh index c2e8c2434073ab12678bd48a554bbdcfc1ea190e..434b247b3328067c7d3cd436caf78f0e4beb5d92 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2padaptive.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2padaptive.hh @@ -293,9 +293,9 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity() for (int elemIdx = 0; elemIdx < 2 * dim; elemIdx++) { bool isOutside = false; - for (int faceIdx = 0; faceIdx < dim; faceIdx++) + for (int fIdx = 0; fIdx < dim; fIdx++) { - int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, faceIdx); + int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, fIdx); if (interactionVolume.isOutsideFace(intVolFaceIdx)) { isOutside = true; @@ -350,10 +350,10 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity(const Inter int indexInInside = intersection.indexInInside(); int indexInOutside = intersection.indexInOutside(); - int faceIdx = indexInInside; + int fIdx = indexInInside; if (levelI < levelJ) - faceIdx = indexInOutside; + fIdx = indexInOutside; std::vector<CellData> cellDataTemp(0); @@ -373,7 +373,7 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity(const Inter for (int vIdx = 0; vIdx < numVertices; vIdx++) { - int localVertIdx = referenceElement.subEntity(faceIdx, dim - 1, vIdx, dim); + int localVertIdx = referenceElement.subEntity(fIdx, dim - 1, vIdx, dim); int vIdxGlobal = 0; if (levelI >= levelJ) diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dvelocity2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dvelocity2p.hh index bd6dd28717a027a54254cf2329962c33a4a8895a..373f5646ed07174841420e38163678369ba010a5 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dvelocity2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dvelocity2p.hh @@ -747,15 +747,15 @@ void FvMpfaL2dVelocity2p<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In Dune::FieldVector < Scalar, numPhases > lambda(cellData.mobility(wPhaseIdx)); lambda[nPhaseIdx] = cellData.mobility(nPhaseIdx); - for (int faceIdx = 0; faceIdx < dim; faceIdx++) + for (int fIdx = 0; fIdx < dim; fIdx++) { - int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, faceIdx); + int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, fIdx); if (interactionVolume.isBoundaryFace(intVolFaceIdx)) { if (interactionVolume.getBoundaryType(intVolFaceIdx).isDirichlet(pressureEqIdx)) { - int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, faceIdx); + int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx); const ReferenceElement& referenceElement = ReferenceElements::general( elementPointer->geometry().type()); @@ -865,7 +865,7 @@ void FvMpfaL2dVelocity2p<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In } else if (interactionVolume.getBoundaryType(intVolFaceIdx).isNeumann(pressureEqIdx)) { - int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, faceIdx); + int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx); const ReferenceElement& referenceElement = ReferenceElements::general( elementPointer->geometry().type()); @@ -888,9 +888,9 @@ void FvMpfaL2dVelocity2p<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In DimVector velocityW(unitDistVec); DimVector velocityNw(unitDistVec); - velocityW *= boundValues[wPhaseIdx] / (2 * interactionVolume.getFaceArea(elemIdx, faceIdx)); + velocityW *= boundValues[wPhaseIdx] / (2 * interactionVolume.getFaceArea(elemIdx, fIdx)); velocityNw *= boundValues[nPhaseIdx] - / (2 * interactionVolume.getFaceArea(elemIdx, faceIdx)); + / (2 * interactionVolume.getFaceArea(elemIdx, fIdx)); //store potentials for further calculations (saturation, ...) cellData.fluxData().addUpwindPotential(wPhaseIdx, boundaryFaceIdx, boundValues[wPhaseIdx]); diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dinteractionvolumecontainer.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dinteractionvolumecontainer.hh index 2b4695928470657b566b31bad34f94194ccea47c..cf282c11d0e4666019db6914ded84f346ba311b7 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dinteractionvolumecontainer.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dinteractionvolumecontainer.hh @@ -281,13 +281,13 @@ public: } protected: - void addRealFluxFaceArea_(Scalar faceArea, int globalIdx, int faceIdx) + void addRealFluxFaceArea_(Scalar faceArea, int globalIdx, int fIdx) { - realFluxFaceArea_[globalIdx][faceIdx][fluxFaceArea] += faceArea; + realFluxFaceArea_[globalIdx][fIdx][fluxFaceArea] += faceArea; } - void addRealFaceArea_(Scalar faceArea, int globalIdx, int faceIdx) + void addRealFaceArea_(Scalar faceArea, int globalIdx, int fIdx) { - realFluxFaceArea_[globalIdx][faceIdx][realFaceArea] += faceArea; + realFluxFaceArea_[globalIdx][fIdx][realFaceArea] += faceArea; } Problem& problem_; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dinteractionvolumecontaineradaptive.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dinteractionvolumecontaineradaptive.hh index eb3d3f6dbb16d33d75284dd06bf8b2e8c7db6002..323b7b95248a6cb9b3b55e462ed24796550e1e41 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dinteractionvolumecontaineradaptive.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dinteractionvolumecontaineradaptive.hh @@ -107,9 +107,9 @@ public: * have to be updated in an implicit treatment of the transport equation, it is necessary to get * the complete set of vertices on a face: 4 corners + all hanging nodes. */ - std::set<int>& faceVerticeIndices(int eIdxGlobal, int faceIdx) + std::set<int>& faceVerticeIndices(int eIdxGlobal, int fIdx) { - return faceVertices_[eIdxGlobal][faceIdx]; + return faceVertices_[eIdxGlobal][fIdx]; } //! Constructs a FvMpfaL3dInteractionVolumeContainerAdaptive object @@ -674,9 +674,9 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeHangingNodeInter { for (int j = 0; j < 4; j++) { - int faceIdx = IndexTranslator::getFaceIndexFromElements(elemIdxOld[i], elemIdxOld[j]); - if (faceIdx >= 0) - zeroFaceIdxVec.insert(faceIdx); + int fIdx = IndexTranslator::getFaceIndexFromElements(elemIdxOld[i], elemIdxOld[j]); + if (fIdx >= 0) + zeroFaceIdxVec.insert(fIdx); } } @@ -1431,9 +1431,9 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeHangingNodeInter { for (int j = 0; j < 6; j++) { - int faceIdx = IndexTranslator::getFaceIndexFromElements(elemIdxOld[i], elemIdxOld[j]); - if (faceIdx >= 0) - zeroFaceIdxVec.insert(faceIdx); + int fIdx = IndexTranslator::getFaceIndexFromElements(elemIdxOld[i], elemIdxOld[j]); + if (fIdx >= 0) + zeroFaceIdxVec.insert(fIdx); } } diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh index db1b1c6238d6314cc85e8b6126eff656ad9a1d1a..ded8ef9aefa297011a64c1f93ec973e368c6ad44 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh @@ -2269,9 +2269,9 @@ void FvMpfaL3dPressure2p<TypeTag>::assembleBoundaryInteractionVolume(Interaction continue; } bool isOutside = false; - for (int faceIdx = 0; faceIdx < dim; faceIdx++) + for (int fIdx = 0; fIdx < dim; fIdx++) { - int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, faceIdx); + int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, fIdx); if (interactionVolume.isOutsideFace(intVolFaceIdx)) { isOutside = true; @@ -2319,21 +2319,21 @@ void FvMpfaL3dPressure2p<TypeTag>::assembleBoundaryInteractionVolume(Interaction pc += gravityDiff; //minus because of gravity definition! - for (int faceIdx = 0; faceIdx < dim; faceIdx++) + for (int fIdx = 0; fIdx < dim; fIdx++) { - int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, faceIdx); + int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, fIdx); if (interactionVolume.isBoundaryFace(intVolFaceIdx)) { if (interactionVolume.getBoundaryType(intVolFaceIdx).isDirichlet(pressureEqIdx)) { - const GlobalPosition& globalPosFace = interactionVolume.getFacePosition(elemIdx, faceIdx); + const GlobalPosition& globalPosFace = interactionVolume.getFacePosition(elemIdx, fIdx); DimVector distVec(globalPosFace - globalPos); Scalar dist = distVec.two_norm(); - DimVector& normal = interactionVolume.getNormal(elemIdx, faceIdx); + DimVector& normal = interactionVolume.getNormal(elemIdx, fIdx); - Scalar faceArea = interactionVolume.getFaceArea(elemIdx, faceIdx); + Scalar faceArea = interactionVolume.getFaceArea(elemIdx, fIdx); // get pc and lambda at the boundary Scalar satWBound = cellData.saturation(wPhaseIdx); diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressurevelocity2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressurevelocity2p.hh index 232a4dba4c99c6bee259f61edcd05d1b6d25465f..99f56c519b23f148de73b15d1a552ac3ccfff2a2 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressurevelocity2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressurevelocity2p.hh @@ -257,9 +257,9 @@ void FvMpfaL3dPressureVelocity2p<TypeTag>::calculateVelocity() continue; } bool isOutside = false; - for (int faceIdx = 0; faceIdx < dim; faceIdx++) + for (int fIdx = 0; fIdx < dim; fIdx++) { - int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, faceIdx); + int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, fIdx); if (interactionVolume.isOutsideFace(intVolFaceIdx)) { isOutside = true; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressurevelocity2padaptive.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressurevelocity2padaptive.hh index 5bebaee54da2ad71b44865b706e36259f265dded..fddfca68c9812e71e4fa60f3fafd5914e9bb2eca 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressurevelocity2padaptive.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressurevelocity2padaptive.hh @@ -267,9 +267,9 @@ void FvMpfaL3dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity() continue; } bool isOutside = false; - for (int faceIdx = 0; faceIdx < dim; faceIdx++) + for (int fIdx = 0; fIdx < dim; fIdx++) { - int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, faceIdx); + int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, fIdx); if (interactionVolume.isOutsideFace(intVolFaceIdx)) { isOutside = true; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dvelocity2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dvelocity2p.hh index c835fd6e4cc29b8a3f9fafe805e8ee9e67654f10..abbbb2acc7b5e54e243cde5cf8e38aa94ad493d0 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dvelocity2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dvelocity2p.hh @@ -158,7 +158,7 @@ public: CellData & cellData1, CellData & cellData2, CellData & cellData3, CellData & cellData4, CellData & cellData5, CellData & cellData6, CellData & cellData7, CellData & cellData8, InteractionVolumeContainer& interactionVolumes, - TransmissibilityCalculator& transmissibilityCalculator, int faceIdx = -1); + TransmissibilityCalculator& transmissibilityCalculator, int fIdx = -1); void calculateBoundaryInteractionVolumeVelocity(InteractionVolume& interactionVolume, CellData& cellData, int elemIdx); @@ -296,14 +296,14 @@ private: * \param cellData8 <tt>CellData</tt> object of an IMPES model for sub-volume 8 * \param interactionVolumes Container including the interaction volume information for the complete grid * \param transmissibilityCalculator Object including the methods for calculating the transmissibilities - * \param faceIdx Index of the flux face for which the velocity has to be calculated. If no face index is given, <tt>faceIdx</tt> = -1 + * \param fIdx Index of the flux face for which the velocity has to be calculated. If no face index is given, <tt>fIdx</tt> = -1 * and velocities for all flux faces in the interaction volume are calculated! */ template<class TypeTag> void FvMpfaL3dVelocity2p<TypeTag>::calculateInnerInteractionVolumeVelocity(InteractionVolume& interactionVolume, CellData & cellData1, CellData & cellData2, CellData & cellData3, CellData & cellData4, CellData & cellData5, CellData & cellData6, CellData & cellData7, CellData & cellData8, - InteractionVolumeContainer& interactionVolumes, TransmissibilityCalculator& transmissibilityCalculator, int faceIdx) + InteractionVolumeContainer& interactionVolumes, TransmissibilityCalculator& transmissibilityCalculator, int fIdx) { ElementPointer& elementPointer1 = interactionVolume.getSubVolumeElement(0); ElementPointer& elementPointer2 = interactionVolume.getSubVolumeElement(1); @@ -462,7 +462,7 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateInnerInteractionVolumeVelocity(Inter Dune::FieldVector<Scalar, 2 * dim - dim + 1> u(0); TransmissibilityType T(0); - if (faceIdx < 0 || faceIdx == 0) + if (fIdx < 0 || fIdx == 0) { // calculate the flux through the subvolumeface 1 (subVolumeFaceIdx = 0) int caseL = transmissibilityCalculator.transmissibility(T, interactionVolume, lambda, 0, 1, 2, 3, @@ -558,7 +558,7 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateInnerInteractionVolumeVelocity(Inter } } - if (faceIdx < 0 || faceIdx == 1) + if (fIdx < 0 || fIdx == 1) { // calculate the flux through the subvolumeface 2 (subVolumeFaceIdx = 1) int caseL = transmissibilityCalculator.transmissibility(T, interactionVolume, lambda, 1, 3, 0, 2, 5, @@ -654,7 +654,7 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateInnerInteractionVolumeVelocity(Inter } } - if (faceIdx < 0 || faceIdx == 2) + if (fIdx < 0 || fIdx == 2) { // calculate the flux through the subvolumeface 3 (subVolumeFaceIdx = 2) int caseL = transmissibilityCalculator.transmissibility(T, interactionVolume, lambda, 3, 2, 1, 0, 7, @@ -750,7 +750,7 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateInnerInteractionVolumeVelocity(Inter } } - if (faceIdx < 0 || faceIdx == 3) + if (fIdx < 0 || fIdx == 3) { // calculate the flux through the subvolumeface 4 (subVolumeFaceIdx = 3) int caseL = transmissibilityCalculator.transmissibility(T, interactionVolume, lambda, 2, 0, 3, 1, 6, @@ -846,7 +846,7 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateInnerInteractionVolumeVelocity(Inter } } - if (faceIdx < 0 || faceIdx == 4) + if (fIdx < 0 || fIdx == 4) { // calculate the flux through the subvolumeface 5 (subVolumeFaceIdx = 4) int caseL = transmissibilityCalculator.transmissibility(T, interactionVolume, lambda, 5, 4, 7, 6, 1, @@ -942,7 +942,7 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateInnerInteractionVolumeVelocity(Inter } } - if (faceIdx < 0 || faceIdx == 5) + if (fIdx < 0 || fIdx == 5) { // calculate the flux through the subvolumeface 6 (subVolumeFaceIdx = 5) int caseL = transmissibilityCalculator.transmissibility(T, interactionVolume, lambda, 7, 5, 6, 4, 3, @@ -1038,7 +1038,7 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateInnerInteractionVolumeVelocity(Inter } } - if (faceIdx < 0 || faceIdx == 6) + if (fIdx < 0 || fIdx == 6) { // calculate the flux through the subvolumeface 7 (subVolumeFaceIdx = 6) int caseL = transmissibilityCalculator.transmissibility(T, interactionVolume, lambda, 6, 7, 4, 5, 2, @@ -1134,7 +1134,7 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateInnerInteractionVolumeVelocity(Inter } } - if (faceIdx < 0 || faceIdx == 7) + if (fIdx < 0 || fIdx == 7) { // calculate the flux through the subvolumeface 8 (subVolumeFaceIdx = 7) int caseL = transmissibilityCalculator.transmissibility(T, interactionVolume, lambda, 4, 6, 5, 7, 0, @@ -1230,7 +1230,7 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateInnerInteractionVolumeVelocity(Inter } } - if (faceIdx < 0 || faceIdx == 8) + if (fIdx < 0 || fIdx == 8) { // calculate the flux through the subvolumeface 9 (subVolumeFaceIdx = 8) int caseL = transmissibilityCalculator.transmissibility(T, interactionVolume, lambda, 4, 0, 6, 2, 5, @@ -1326,7 +1326,7 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateInnerInteractionVolumeVelocity(Inter } } - if (faceIdx < 0 || faceIdx == 9) + if (fIdx < 0 || fIdx == 9) { // calculate the flux through the subvolumeface 10 (subVolumeFaceIdx = 9) int caseL = transmissibilityCalculator.transmissibility(T, interactionVolume, lambda, 1, 5, 3, 7, 0, @@ -1422,7 +1422,7 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateInnerInteractionVolumeVelocity(Inter } } - if (faceIdx < 0 || faceIdx == 10) + if (fIdx < 0 || fIdx == 10) { // calculate the flux through the subvolumeface 11 (subVolumeFaceIdx = 10) int caseL = transmissibilityCalculator.transmissibility(T, interactionVolume, lambda, 7, 3, 5, 1, 6, @@ -1518,7 +1518,7 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateInnerInteractionVolumeVelocity(Inter } } - if (faceIdx < 0 || faceIdx == 11) + if (fIdx < 0 || fIdx == 11) { // calculate the flux through the subvolumeface 12 (subVolumeFaceIdx = 11) int caseL = transmissibilityCalculator.transmissibility(T, interactionVolume, lambda, 2, 6, 0, 4, 3, @@ -1941,21 +1941,21 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In Scalar potW = cellData.potential(wPhaseIdx); Scalar potNw = cellData.potential(nPhaseIdx); - for (int faceIdx = 0; faceIdx < dim; faceIdx++) + for (int fIdx = 0; fIdx < dim; fIdx++) { - int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, faceIdx); + int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, fIdx); if (interactionVolume.isBoundaryFace(intVolFaceIdx)) { if (interactionVolume.getBoundaryType(intVolFaceIdx).isDirichlet(pressureEqIdx)) { - int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, faceIdx); + int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx); - const GlobalPosition& globalPosFace = interactionVolume.getFacePosition(elemIdx, faceIdx); + const GlobalPosition& globalPosFace = interactionVolume.getFacePosition(elemIdx, fIdx); DimVector distVec(globalPosFace - globalPos); Scalar dist = distVec.two_norm(); - DimVector& normal = interactionVolume.getNormal(elemIdx, faceIdx); + DimVector& normal = interactionVolume.getNormal(elemIdx, fIdx); // get pc and lambda at the boundary Scalar satWBound = cellData.saturation(wPhaseIdx); @@ -2049,9 +2049,9 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In } else if (interactionVolume.getBoundaryType(intVolFaceIdx).isNeumann(pressureEqIdx)) { - int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, faceIdx); + int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx); - DimVector& normal = interactionVolume.getNormal(elemIdx, faceIdx); + DimVector& normal = interactionVolume.getNormal(elemIdx, fIdx); // get neumann boundary value PrimaryVariables boundValues(interactionVolume.getNeumannValues(intVolFaceIdx)); @@ -2062,9 +2062,9 @@ void FvMpfaL3dVelocity2p<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In DimVector velocityW(normal); DimVector velocityNw(normal); - velocityW *= boundValues[wPhaseIdx] / (4.0*interactionVolume.getFaceArea(elemIdx, faceIdx)); + velocityW *= boundValues[wPhaseIdx] / (4.0*interactionVolume.getFaceArea(elemIdx, fIdx)); velocityNw *= boundValues[nPhaseIdx] - / (4.0*interactionVolume.getFaceArea(elemIdx, faceIdx)); + / (4.0*interactionVolume.getFaceArea(elemIdx, fIdx)); //store potentials for further calculations (saturation, ...) cellData.fluxData().addUpwindPotential(wPhaseIdx, boundaryFaceIdx, boundValues[wPhaseIdx]); diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dvelocity2padaptive.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dvelocity2padaptive.hh index 8738e150092527fdceba87f169be7866b3ff200b..b97904f4f821cf0fd229c46c86e04299ab4f5751 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dvelocity2padaptive.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dvelocity2padaptive.hh @@ -164,7 +164,7 @@ public: //calculate velocities for flux faces of a hanging node interaction volume void calculateHangingNodeInteractionVolumeVelocity(InteractionVolume& interactionVolume, CellData & cellData1, CellData & cellData2, CellData & cellData3, CellData & cellData4, - CellData & cellData5, CellData & cellData6, CellData & cellData7, CellData & cellData8, int faceIdx = -1); + CellData & cellData5, CellData & cellData6, CellData & cellData7, CellData & cellData8, int fIdx = -1); //!Initializes the velocity model void initialize() @@ -217,13 +217,13 @@ private: * \param cellData6 <tt>CellData</tt> object of an IMPES model for sub-volume 6 * \param cellData7 <tt>CellData</tt> object of an IMPES model for sub-volume 7 * \param cellData8 <tt>CellData</tt> object of an IMPES model for sub-volume 8 - * \param faceIdx Index of the flux face for which the velocity has to be calculated. If no face index is given, <tt>faceIdx</tt> = -1 + * \param fIdx Index of the flux face for which the velocity has to be calculated. If no face index is given, <tt>fIdx</tt> = -1 * and velocities for all flux faces in the interaction volume are calculated! */ template<class TypeTag> void FvMpfaL3dVelocity2pAdaptive<TypeTag>::calculateHangingNodeInteractionVolumeVelocity(InteractionVolume& interactionVolume, CellData & cellData1, CellData & cellData2, CellData & cellData3, CellData & cellData4, - CellData & cellData5, CellData & cellData6, CellData & cellData7, CellData & cellData8, int faceIdx) + CellData & cellData5, CellData & cellData6, CellData & cellData7, CellData & cellData8, int fIdx) { ElementPointer& elementPointer1 = interactionVolume.getSubVolumeElement(0); ElementPointer& elementPointer2 = interactionVolume.getSubVolumeElement(1); @@ -388,7 +388,7 @@ void FvMpfaL3dVelocity2pAdaptive<TypeTag>::calculateHangingNodeInteractionVolume - if (faceIdx < 0 || faceIdx == 0) + if (fIdx < 0 || fIdx == 0) { // calculate the flux through the subvolumeface 1 (subVolumeFaceIdx = 0) int caseL = transmissibilityCalculator_().transmissibility(T, interactionVolume, lambda, 0, 1, 2, 3, @@ -484,7 +484,7 @@ void FvMpfaL3dVelocity2pAdaptive<TypeTag>::calculateHangingNodeInteractionVolume } } - if (faceIdx < 0 || faceIdx == 1) + if (fIdx < 0 || fIdx == 1) { // calculate the flux through the subvolumeface 2 (subVolumeFaceIdx = 1) T = 0; @@ -595,7 +595,7 @@ void FvMpfaL3dVelocity2pAdaptive<TypeTag>::calculateHangingNodeInteractionVolume } } - if (faceIdx < 0 || faceIdx == 2) + if (fIdx < 0 || fIdx == 2) { // calculate the flux through the subvolumeface 3 (subVolumeFaceIdx = 2) T = 0; @@ -697,7 +697,7 @@ void FvMpfaL3dVelocity2pAdaptive<TypeTag>::calculateHangingNodeInteractionVolume } } - if (faceIdx < 0 || faceIdx == 3) + if (fIdx < 0 || fIdx == 3) { // calculate the flux through the subvolumeface 4 (subVolumeFaceIdx = 3) T = 0; @@ -808,7 +808,7 @@ void FvMpfaL3dVelocity2pAdaptive<TypeTag>::calculateHangingNodeInteractionVolume } } - if (faceIdx < 0 || faceIdx == 4) + if (fIdx < 0 || fIdx == 4) { // calculate the flux through the subvolumeface 5 (subVolumeFaceIdx = 4) @@ -973,7 +973,7 @@ void FvMpfaL3dVelocity2pAdaptive<TypeTag>::calculateHangingNodeInteractionVolume } } - if (faceIdx < 0 || faceIdx == 5) + if (fIdx < 0 || fIdx == 5) { // calculate the flux through the subvolumeface 6 (subVolumeFaceIdx = 5) T = 0; @@ -1152,7 +1152,7 @@ void FvMpfaL3dVelocity2pAdaptive<TypeTag>::calculateHangingNodeInteractionVolume } } - if (faceIdx < 0 || faceIdx == 6) + if (fIdx < 0 || fIdx == 6) { // calculate the flux through the subvolumeface 7 (subVolumeFaceIdx = 6) T = 0; @@ -1316,7 +1316,7 @@ void FvMpfaL3dVelocity2pAdaptive<TypeTag>::calculateHangingNodeInteractionVolume } } - if (faceIdx < 0 || faceIdx == 7) + if (fIdx < 0 || fIdx == 7) { // calculate the flux through the subvolumeface 8 (subVolumeFaceIdx = 7) T = 0; @@ -1499,7 +1499,7 @@ void FvMpfaL3dVelocity2pAdaptive<TypeTag>::calculateHangingNodeInteractionVolume } } - if (faceIdx < 0 || faceIdx == 8) + if (fIdx < 0 || fIdx == 8) { // calculate the flux through the subvolumeface 9 (subVolumeFaceIdx = 8) T = 0; @@ -1627,7 +1627,7 @@ void FvMpfaL3dVelocity2pAdaptive<TypeTag>::calculateHangingNodeInteractionVolume } } - if (faceIdx < 0 || faceIdx == 9) + if (fIdx < 0 || fIdx == 9) { // calculate the flux through the subvolumeface 10 (subVolumeFaceIdx = 9) T = 0; @@ -1755,7 +1755,7 @@ void FvMpfaL3dVelocity2pAdaptive<TypeTag>::calculateHangingNodeInteractionVolume } } - if (faceIdx < 0 || faceIdx == 10) + if (fIdx < 0 || fIdx == 10) { // calculate the flux through the subvolumeface 11 (subVolumeFaceIdx = 10) T = 0; @@ -1890,7 +1890,7 @@ void FvMpfaL3dVelocity2pAdaptive<TypeTag>::calculateHangingNodeInteractionVolume } } - if (faceIdx < 0 || faceIdx == 11) + if (fIdx < 0 || fIdx == 11) { // calculate the flux through the subvolumeface 12 (subVolumeFaceIdx = 11) T = 0; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressure2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressure2p.hh index 8588f180902845438ec25548dfb15cf8ec4c26de..14cdc0a4c37c2e14a76c8a6766e58c47fc54525b 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressure2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressure2p.hh @@ -1762,9 +1762,9 @@ void FvMpfaO2dPressure2p<TypeTag>::assemble() for (int elemIdx = 0; elemIdx < 2 * dim; elemIdx++) { bool isOutside = false; - for (int faceIdx = 0; faceIdx < dim; faceIdx++) + for (int fIdx = 0; fIdx < dim; fIdx++) { - int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, faceIdx); + int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, fIdx); if (interactionVolume.isOutsideFace(intVolFaceIdx)) { isOutside = true; @@ -1812,16 +1812,16 @@ void FvMpfaO2dPressure2p<TypeTag>::assemble() pc += gravityDiff; //minus because of gravity definition! - for (int faceIdx = 0; faceIdx < dim; faceIdx++) + for (int fIdx = 0; fIdx < dim; fIdx++) { - int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, faceIdx); + int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, fIdx); if (interactionVolume.isBoundaryFace(intVolFaceIdx)) { if (interactionVolume.getBoundaryType(intVolFaceIdx).isDirichlet(pressEqIdx)) { - int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, faceIdx); + int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx); const ReferenceElement& referenceElement = ReferenceElements::general( elementPointer->geometry().type()); @@ -1835,7 +1835,7 @@ void FvMpfaO2dPressure2p<TypeTag>::assemble() DimVector unitDistVec(distVec); unitDistVec /= dist; - Scalar faceArea = interactionVolume.getFaceArea(elemIdx, faceIdx); + Scalar faceArea = interactionVolume.getFaceArea(elemIdx, fIdx); // get pc and lambda at the boundary Scalar satWBound = cellData.saturation(wPhaseIdx); diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressurevelocity2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressurevelocity2p.hh index c5a50f7cb24ddb276dca25248245d25d8cefef80..00e7630dbbbba216f30b6a2f69f58ddfad9528b4 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressurevelocity2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressurevelocity2p.hh @@ -257,9 +257,9 @@ void FvMpfaO2dPressureVelocity2p<TypeTag>::calculateVelocity() for (int elemIdx = 0; elemIdx < 2 * dim; elemIdx++) { bool isOutside = false; - for (int faceIdx = 0; faceIdx < dim; faceIdx++) + for (int fIdx = 0; fIdx < dim; fIdx++) { - int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, faceIdx); + int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, fIdx); if (interactionVolume.isOutsideFace(intVolFaceIdx)) { isOutside = true; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dvelocity2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dvelocity2p.hh index 7fdecd634a95ff68455d14b2dca96cbb08fcdd79..061afbf8ea306bf7641d62302dc39635a58cf261 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dvelocity2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dvelocity2p.hh @@ -585,15 +585,15 @@ void FvMpfaO2dVelocity2P<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In Dune::FieldVector < Scalar, numPhases > lambda(cellData.mobility(wPhaseIdx)); lambda[nPhaseIdx] = cellData.mobility(nPhaseIdx); - for (int faceIdx = 0; faceIdx < dim; faceIdx++) + for (int fIdx = 0; fIdx < dim; fIdx++) { - int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, faceIdx); + int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, fIdx); if (interactionVolume.isBoundaryFace(intVolFaceIdx)) { if (interactionVolume.getBoundaryType(intVolFaceIdx).isDirichlet(pressureEqIdx)) { - int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, faceIdx); + int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx); const ReferenceElement& referenceElement = ReferenceElements::general( elementPointer->geometry().type()); @@ -703,7 +703,7 @@ void FvMpfaO2dVelocity2P<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In } else if (interactionVolume.getBoundaryType(intVolFaceIdx).isNeumann(pressureEqIdx)) { - int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, faceIdx); + int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx); const ReferenceElement& referenceElement = ReferenceElements::general( elementPointer->geometry().type()); @@ -726,9 +726,9 @@ void FvMpfaO2dVelocity2P<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In DimVector velocityW(unitDistVec); DimVector velocityNw(unitDistVec); - velocityW *= boundValues[wPhaseIdx] / (2 * interactionVolume.getFaceArea(elemIdx, faceIdx)); + velocityW *= boundValues[wPhaseIdx] / (2 * interactionVolume.getFaceArea(elemIdx, fIdx)); velocityNw *= boundValues[nPhaseIdx] - / (2 * interactionVolume.getFaceArea(elemIdx, faceIdx)); + / (2 * interactionVolume.getFaceArea(elemIdx, fIdx)); //store potentials for further calculations (saturation, ...) cellData.fluxData().addUpwindPotential(wPhaseIdx, boundaryFaceIdx, boundValues[wPhaseIdx]); diff --git a/dumux/decoupled/2p/diffusion/mimetic/croperator2padaptive.hh b/dumux/decoupled/2p/diffusion/mimetic/croperator2padaptive.hh index c8b01979558555a3b78f8c77073451a83fb4c3fd..3ae028adc0364fe353fa444033078f9b4d534b0e 100644 --- a/dumux/decoupled/2p/diffusion/mimetic/croperator2padaptive.hh +++ b/dumux/decoupled/2p/diffusion/mimetic/croperator2padaptive.hh @@ -199,9 +199,9 @@ void CROperatorAssemblerTwoPAdaptive<TypeTag>::updateMatrix() for (int elemIdx = 0; elemIdx < numElem; elemIdx++) { int numFaces = intersectionMapper_.size(elemIdx); - for (int faceIdx = 0; faceIdx < numFaces; faceIdx++) + for (int fIdx = 0; fIdx < numFaces; fIdx++) { - int faceIdxGlobal = intersectionMapper_.map(elemIdx, faceIdx); + int faceIdxGlobal = intersectionMapper_.map(elemIdx, fIdx); if (!visited[faceIdxGlobal]) { A_.incrementrowsize(faceIdxGlobal); @@ -224,16 +224,16 @@ void CROperatorAssemblerTwoPAdaptive<TypeTag>::updateMatrix() for (int elemIdx = 0; elemIdx < numElem; elemIdx++) { int numFaces = intersectionMapper_.size(elemIdx); - for (int faceIdx = 0; faceIdx < numFaces; faceIdx++) + for (int fIdx = 0; fIdx < numFaces; fIdx++) { - int faceIdxGlobalI = intersectionMapper_.map(elemIdx, faceIdx); + int faceIdxGlobalI = intersectionMapper_.map(elemIdx, fIdx); if (!visited[faceIdxGlobalI]) { A_.addindex(faceIdxGlobalI,faceIdxGlobalI); visited[faceIdxGlobalI] = true; } for (int k = 0; k < numFaces; k++) - if (k != faceIdx) { + if (k != fIdx) { int faceIdxGlobalJ = intersectionMapper_.map(elemIdx, k); A_.addindex(faceIdxGlobalI, faceIdxGlobalJ); } diff --git a/dumux/decoupled/2p/diffusion/mimetic/mimetic2p.hh b/dumux/decoupled/2p/diffusion/mimetic/mimetic2p.hh index 664514be2717fb18c041f8b3dda862c2252c6757..4eb32e3fce84281459683f33d21db5aa974db7ea 100644 --- a/dumux/decoupled/2p/diffusion/mimetic/mimetic2p.hh +++ b/dumux/decoupled/2p/diffusion/mimetic/mimetic2p.hh @@ -295,7 +295,7 @@ public: vel[i] += W_[globalIdx][i][j]*faceVol[j]*(press - pressTrace[j]); } - void constructVelocity(const Element& element, int faceIdx, Scalar& vel, + void constructVelocity(const Element& element, int fIdx, Scalar& vel, Dune::FieldVector<Scalar,2*dim>& pressTrace, Scalar press) { int globalIdx = problem_.variables().index(element); @@ -309,7 +309,7 @@ public: vel = 0; for (int j = 0; j < 2*dim; j++) - vel += W_[globalIdx][faceIdx][j]*faceVol[j]*(press - pressTrace[j]); + vel += W_[globalIdx][fIdx][j]*faceVol[j]*(press - pressTrace[j]); } void computeReconstructionMatrices(const Element& element, diff --git a/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh b/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh index 86d12253fa33be818f16b5098f6ad8c8f0150512..99a91f9a7f208be00934fe9bf277c96d6cc618ed 100644 --- a/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh +++ b/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh @@ -310,9 +310,9 @@ public: for (int dimIdx = 0; dimIdx < dim; dimIdx++) { refVelocity[dimIdx] = -fluxW[dim - 1 - dimIdx]; - for (int faceIdx = 0; faceIdx < dim + 1; faceIdx++) + for (int fIdx = 0; fIdx < dim + 1; fIdx++) { - refVelocity[dimIdx] += fluxW[faceIdx]/(dim + 1); + refVelocity[dimIdx] += fluxW[fIdx]/(dim + 1); } } } @@ -345,9 +345,9 @@ public: for (int dimIdx = 0; dimIdx < dim; dimIdx++) { refVelocity[dimIdx] = -fluxNw[dim - 1 - dimIdx]; - for (int faceIdx = 0; faceIdx < dim + 1; faceIdx++) + for (int fIdx = 0; fIdx < dim + 1; fIdx++) { - refVelocity[dimIdx] += fluxNw[faceIdx]/(dim + 1); + refVelocity[dimIdx] += fluxNw[fIdx]/(dim + 1); } } } diff --git a/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2padaptive.hh b/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2padaptive.hh index 4cb5df8efffbc7ffbc0e27ccfbbcf094acf321bf..6072f8bbfbdd512be5a2c01c732a36f474a7dbb7 100644 --- a/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2padaptive.hh +++ b/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2padaptive.hh @@ -322,9 +322,9 @@ public: for (int dimIdx = 0; dimIdx < dim; dimIdx++) { refVelocity[dimIdx] = -fluxW[dim - 1 - dimIdx]; - for (int faceIdx = 0; faceIdx < dim + 1; faceIdx++) + for (int fIdx = 0; fIdx < dim + 1; fIdx++) { - refVelocity[dimIdx] += fluxW[faceIdx]/(dim + 1); + refVelocity[dimIdx] += fluxW[fIdx]/(dim + 1); } } } @@ -357,9 +357,9 @@ public: for (int dimIdx = 0; dimIdx < dim; dimIdx++) { refVelocity[dimIdx] = -fluxNw[dim - 1 - dimIdx]; - for (int faceIdx = 0; faceIdx < dim + 1; faceIdx++) + for (int fIdx = 0; fIdx < dim + 1; fIdx++) { - refVelocity[dimIdx] += fluxNw[faceIdx]/(dim + 1); + refVelocity[dimIdx] += fluxNw[fIdx]/(dim + 1); } } } diff --git a/dumux/decoupled/2p/fluxdata2p.hh b/dumux/decoupled/2p/fluxdata2p.hh index c018879a16903b5ac8be758ebcbd1d6e3e4e16b1..10a1ae6c31ccd67c5fed657b3d7e5c586adf089e 100644 --- a/dumux/decoupled/2p/fluxdata2p.hh +++ b/dumux/decoupled/2p/fluxdata2p.hh @@ -73,15 +73,15 @@ public: //! Constructs a FluxData2P object FluxData2P() { - for (int faceIdx = 0; faceIdx < 2*dim; faceIdx++) + for (int fIdx = 0; fIdx < 2*dim; fIdx++) { for (int phaseIdx = 0; phaseIdx < numPhases; phaseIdx++) { - velocity_[phaseIdx][faceIdx] = DimVector(0.0); + velocity_[phaseIdx][fIdx] = DimVector(0.0); - upwindPotential_[faceIdx][phaseIdx] = 0.0; + upwindPotential_[fIdx][phaseIdx] = 0.0; } - velocityMarker_[faceIdx] = false; + velocityMarker_[fIdx] = false; } } diff --git a/dumux/decoupled/2p/impes/gridadaptionindicator2plocalflux.hh b/dumux/decoupled/2p/impes/gridadaptionindicator2plocalflux.hh index dbe8be91433e41917ad04b14049904927b5983eb..4919606b6e670a3d48ba350ac394f7c17e459cc6 100644 --- a/dumux/decoupled/2p/impes/gridadaptionindicator2plocalflux.hh +++ b/dumux/decoupled/2p/impes/gridadaptionindicator2plocalflux.hh @@ -346,9 +346,9 @@ public: for (int dimIdx = 0; dimIdx < dim; dimIdx++) { refVelocity[dimIdx] = -flux[dim - 1 - dimIdx]; - for (int faceIdx = 0; faceIdx < dim + 1; faceIdx++) + for (int fIdx = 0; fIdx < dim + 1; fIdx++) { - refVelocity[dimIdx] += flux[faceIdx]/(dim + 1); + refVelocity[dimIdx] += flux[fIdx]/(dim + 1); } } } diff --git a/dumux/decoupled/2p2c/fv3dpressure2p2cadaptive.hh b/dumux/decoupled/2p2c/fv3dpressure2p2cadaptive.hh index a6b100bfe8197546b74018c2663d4c108e0f76e0..54db9b6000ef3ab740750960ae10fb2ab9c17793 100644 --- a/dumux/decoupled/2p2c/fv3dpressure2p2cadaptive.hh +++ b/dumux/decoupled/2p2c/fv3dpressure2p2cadaptive.hh @@ -1768,7 +1768,7 @@ int FV3dPressure2P2CAdaptive<TypeTag>::computeTransmissibilities(const Intersect if(hangingNodeType != InteractionVolume::fourSmallCellsFace) { diagonal.push_back(problem().variables().index(*vPtrSmall)); - // a) take interaction volume and determine faceIdx + // a) take interaction volume and determine fIdx if(hangingNodeType == InteractionVolume::noHangingNode) { //TODO determine current localIdxLarge!!!! diff --git a/dumux/decoupled/2p2c/fvpressurecompositional.hh b/dumux/decoupled/2p2c/fvpressurecompositional.hh index 7797f5e59e4fecc4aa7b6e632c3ef14be0e88624..43acc95cb30fa160aa34efff1d9ff0be35e05c55 100644 --- a/dumux/decoupled/2p2c/fvpressurecompositional.hh +++ b/dumux/decoupled/2p2c/fvpressurecompositional.hh @@ -275,12 +275,12 @@ public: (*faceUpwindW)[i] = 0; (*faceUpwindN)[i] = 0; // run thorugh all local face idx and collect upwind information - for(int faceIdx = 0; faceIdx<cellData.fluxData().size(); faceIdx++) + for(int fIdx = 0; fIdx<cellData.fluxData().size(); fIdx++) { - if(cellData.isUpwindCell(faceIdx, contiWEqIdx)) - (*faceUpwindW)[i] += pow(10,static_cast<double>(3-faceIdx)); - if(cellData.isUpwindCell(faceIdx, contiNEqIdx)) - (*faceUpwindN)[i] += pow(10,static_cast<double>(3-faceIdx)); + if(cellData.isUpwindCell(fIdx, contiWEqIdx)) + (*faceUpwindW)[i] += pow(10,static_cast<double>(3-fIdx)); + if(cellData.isUpwindCell(fIdx, contiNEqIdx)) + (*faceUpwindN)[i] += pow(10,static_cast<double>(3-fIdx)); } } // writer.attachCellData(*nun, "phase mass fraction n-phase"); diff --git a/dumux/decoupled/common/fv/mpfa/mpfalinteractionvolume3d.hh b/dumux/decoupled/common/fv/mpfa/mpfalinteractionvolume3d.hh index c98eeceb3f510534f0e778a1840cfe741c094a86..e2ba9e6a6a3fc9c3a494096a12381c3e5264f060 100644 --- a/dumux/decoupled/common/fv/mpfa/mpfalinteractionvolume3d.hh +++ b/dumux/decoupled/common/fv/mpfa/mpfalinteractionvolume3d.hh @@ -218,11 +218,11 @@ public: //! Store the position of a flux face /*! * \param pos Position of face center - * \param faceIdx The interaction volume face index + * \param fIdx The interaction volume face index */ - void setFacePosition(const DimVector& pos, int faceIdx) + void setFacePosition(const DimVector& pos, int fIdx) { - facePos_[faceIdx] = pos; + facePos_[fIdx] = pos; } //! Store the center of the edges @@ -238,11 +238,11 @@ public: //! Store the flux face areas /*! * \param faceArea The flux face area - * \param faceIdx The interaction volume face index + * \param fIdx The interaction volume face index */ - void setFaceArea(Scalar faceArea, int faceIdx) + void setFaceArea(Scalar faceArea, int fIdx) { - faceArea_[faceIdx] = faceArea; + faceArea_[fIdx] = faceArea; } //! Store the normals @@ -537,13 +537,13 @@ public: //! The position of the face center /*! - * \param faceIdx The local face index in the interaction volume + * \param fIdx The local face index in the interaction volume * * \return Position of face center */ - DimVector& getFacePosition(int faceIdx) + DimVector& getFacePosition(int fIdx) { - return facePos_[faceIdx]; + return facePos_[fIdx]; } //! The position of the edge center @@ -559,13 +559,13 @@ public: //! The interaction volume flux face area /*! - * \param faceIdx The local face index in the interaction volume + * \param fIdx The local face index in the interaction volume * * \return Area of the flux face */ - Scalar& getFaceArea(int faceIdx) + Scalar& getFaceArea(int fIdx) { - return faceArea_[faceIdx]; + return faceArea_[fIdx]; } //! Print the stored interaction volume data diff --git a/dumux/decoupled/common/fv/mpfa/mpfalinteractionvolume3dadaptive.hh b/dumux/decoupled/common/fv/mpfa/mpfalinteractionvolume3dadaptive.hh index 3ed6e99d60797cb600d82298fe8aba2c254b7076..28055fc65cde4f6ed7d940f968ff55ab59703ad8 100644 --- a/dumux/decoupled/common/fv/mpfa/mpfalinteractionvolume3dadaptive.hh +++ b/dumux/decoupled/common/fv/mpfa/mpfalinteractionvolume3dadaptive.hh @@ -54,14 +54,14 @@ public: return newElemIdxFromOldFaceIdxto0_[zeroFaceIdx][elementIdx]; } - static int getOldFaceIdxFromNewIdxto0(int zeroFaceIdx, int faceIdx) + static int getOldFaceIdxFromNewIdxto0(int zeroFaceIdx, int fIdx) { - return oldFaceIdxFromNewIdxto0_[zeroFaceIdx][faceIdx]; + return oldFaceIdxFromNewIdxto0_[zeroFaceIdx][fIdx]; } - static int getNewFaceIdxFromOldIdxto0(int zeroFaceIdx, int faceIdx) + static int getNewFaceIdxFromOldIdxto0(int zeroFaceIdx, int fIdx) { - return newFaceIdxFromOldIdxto0_[zeroFaceIdx][faceIdx]; + return newFaceIdxFromOldIdxto0_[zeroFaceIdx][fIdx]; } static int getOldEdgeIdxFromNewFaceIdxto0(int zeroFaceIdx, int edgeIdx) diff --git a/dumux/freeflow/stokes/stokesfluxvariables.hh b/dumux/freeflow/stokes/stokesfluxvariables.hh index 145c1009f4fd2b7eea53271b04ac8e2469b891d3..0473b78de0628ec1240fc452b307a2cb6736f444 100644 --- a/dumux/freeflow/stokes/stokesfluxvariables.hh +++ b/dumux/freeflow/stokes/stokesfluxvariables.hh @@ -66,10 +66,10 @@ public: StokesFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, - const int faceIdx, + const int fIdx, const ElementVolumeVariables &elemVolVars, const bool onBoundary = false) - : fvGeometry_(fvGeometry), onBoundary_(onBoundary), faceIdx_(faceIdx) + : fvGeometry_(fvGeometry), onBoundary_(onBoundary), faceIdx_(fIdx) { calculateValues_(problem, element, elemVolVars); determineUpwindDirection_(elemVolVars); diff --git a/dumux/freeflow/stokes/stokeslocalresidual.hh b/dumux/freeflow/stokes/stokeslocalresidual.hh index 2cf320e77af4b1ba82a98c76eb668d741d788d05..08fa87aee614af6a89af7a1afd50bbb94d980eeb 100644 --- a/dumux/freeflow/stokes/stokeslocalresidual.hh +++ b/dumux/freeflow/stokes/stokeslocalresidual.hh @@ -142,17 +142,17 @@ protected: * the diffusive fluxes are computed. * * \param flux The flux over the SCV (sub-control-volume) face - * \param faceIdx The index of the SCV face (may also be a boundary face) + * \param fIdx The index of the SCV face (may also be a boundary face) * \param onBoundary Indicates, if the flux is evaluated on a boundary face. If it is true, * the created fluxVars object contains boundary variables evaluated at the IP of the * boundary face */ - void computeFlux(PrimaryVariables &flux, const int faceIdx, const bool onBoundary=false) const + void computeFlux(PrimaryVariables &flux, const int fIdx, const bool onBoundary=false) const { const FluxVariables fluxVars(this->problem_(), this->element_(), this->fvGeometry_(), - faceIdx, + fIdx, this->curVolVars_(), onBoundary); flux = 0.0; @@ -370,19 +370,19 @@ protected: continue; // assemble the boundary for all vertices of the current face - const int faceIdx = isIt->indexInInside(); - const int numFaceVertices = refElement.size(faceIdx, 1, dim); + const int fIdx = isIt->indexInInside(); + const int numFaceVertices = refElement.size(fIdx, 1, dim); // loop over the single vertices on the current face for (int faceVertIdx = 0; faceVertIdx < numFaceVertices; ++faceVertIdx) { // only evaluate, if we consider the same face vertex as in the outer // loop over the element vertices - if (refElement.subEntity(faceIdx, 1, faceVertIdx, dim) + if (refElement.subEntity(fIdx, 1, faceVertIdx, dim) != scvIdx) continue; - const int boundaryFaceIdx = this->fvGeometry_().boundaryFaceIndex(faceIdx, faceVertIdx); + const int boundaryFaceIdx = this->fvGeometry_().boundaryFaceIndex(fIdx, faceVertIdx); const FluxVariables boundaryVars(this->problem_(), this->element_(), this->fvGeometry_(), @@ -606,16 +606,16 @@ protected: if (stabilizationAlpha_ != 0) { // loop over the edges of the element - for (int faceIdx = 0; faceIdx < this->fvGeometry_().numScvf; faceIdx++) + for (int fIdx = 0; fIdx < this->fvGeometry_().numScvf; fIdx++) { const FluxVariables fluxVars(this->problem_(), this->element_(), this->fvGeometry_(), - faceIdx, + fIdx, this->curVolVars_()); - const int i = this->fvGeometry_().subContVolFace[faceIdx].i; - const int j = this->fvGeometry_().subContVolFace[faceIdx].j; + const int i = this->fvGeometry_().subContVolFace[fIdx].i; + const int j = this->fvGeometry_().subContVolFace[fIdx].j; if (i != scvIdx && j != scvIdx) continue; @@ -623,7 +623,7 @@ protected: const Scalar alphaH2 = stabilizationAlpha_* fluxVars.averageSCVVolume(); Scalar stabilizationTerm = fluxVars.pressureGrad() * - this->fvGeometry_().subContVolFace[faceIdx].normal; + this->fvGeometry_().subContVolFace[fIdx].normal; stabilizationTerm *= alphaH2; diff --git a/dumux/freeflow/stokesnc/stokesncfluxvariables.hh b/dumux/freeflow/stokesnc/stokesncfluxvariables.hh index b0cf479d80cb1f2420b3e5286e55e64a06b5b5e8..2e1762586fbf780375e3aa8475d35d4c65fdc041 100644 --- a/dumux/freeflow/stokesnc/stokesncfluxvariables.hh +++ b/dumux/freeflow/stokesnc/stokesncfluxvariables.hh @@ -75,10 +75,10 @@ public: StokesncFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, - const int faceIdx, + const int fIdx, const ElementVolumeVariables &elemVolVars, const bool onBoundary = false) - : ParentType(problem, element, fvGeometry, faceIdx, elemVolVars, onBoundary) + : ParentType(problem, element, fvGeometry, fIdx, elemVolVars, onBoundary) { calculateValues_(problem, element, elemVolVars); } diff --git a/dumux/freeflow/stokesncni/stokesncnifluxvariables.hh b/dumux/freeflow/stokesncni/stokesncnifluxvariables.hh index 5a5a8da5f989ff0612f9f1c21442249bd409a4f3..34dc9192b0ecca7bae7401bdceb3e81a8fc44994 100644 --- a/dumux/freeflow/stokesncni/stokesncnifluxvariables.hh +++ b/dumux/freeflow/stokesncni/stokesncnifluxvariables.hh @@ -69,10 +69,10 @@ public: StokesncniFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, - const int faceIdx, + const int fIdx, const ElementVolumeVariables &elemVolVars, const bool onBoundary = false) - : ParentType(problem, element, fvGeometry, faceIdx, elemVolVars, onBoundary) + : ParentType(problem, element, fvGeometry, fIdx, elemVolVars, onBoundary) { calculateValues_(problem, element, elemVolVars); } diff --git a/dumux/geomechanics/el1p2c/el1p2celementvolumevariables.hh b/dumux/geomechanics/el1p2c/el1p2celementvolumevariables.hh index 214aa7d66137e1b54a7a510528bee1297a2215fc..63d8329e381277b0ded60fa281896a91f81c2885 100644 --- a/dumux/geomechanics/el1p2c/el1p2celementvolumevariables.hh +++ b/dumux/geomechanics/el1p2c/el1p2celementvolumevariables.hh @@ -116,13 +116,13 @@ public: (*this)[scvIdx].divU = 0.0; numContributingFaces[scvIdx] = 0.0; } - for (int faceIdx = 0; faceIdx < fvGeometry.numScvf; faceIdx++) + for (int fIdx = 0; fIdx < fvGeometry.numScvf; fIdx++) { // evaluate the gradients at the IPs for each subcontrol volume face FluxVariables fluxVars(problem, element, fvGeometry, - faceIdx, + fIdx, *this); numContributingFaces[fluxVars.face().i] += 1; diff --git a/dumux/geomechanics/el1p2c/el1p2cfluxvariables.hh b/dumux/geomechanics/el1p2c/el1p2cfluxvariables.hh index f896b10f65c654469c05163fdc41e5d73408b422..f63352f585f3b1d332f7a38b46634cafcedf59d3 100644 --- a/dumux/geomechanics/el1p2c/el1p2cfluxvariables.hh +++ b/dumux/geomechanics/el1p2c/el1p2cfluxvariables.hh @@ -84,7 +84,7 @@ namespace Dumux * \param problem The problem * \param element The finite element * \param fvGeometry The finite-volume geometry in the fully implicit scheme - * \param faceIdx The local index of the SCV (sub-control-volume) face + * \param fIdx The local index of the SCV (sub-control-volume) face * \param elemVolVars The volume variables of the current element * \param onBoundary A boolean variable to specify whether the flux variables * are calculated for interior SCV faces or boundary faces, default=false @@ -92,12 +92,12 @@ namespace Dumux ElOnePTwoCFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, - int faceIdx, + int fIdx, const ElementVolumeVariables &elemVolVars, const bool onBoundary = false) - : ElasticBase(problem, element, fvGeometry, faceIdx, elemVolVars), - OnePTwoCBase(problem, element, fvGeometry, faceIdx, elemVolVars), - fvGeometry_(fvGeometry), faceIdx_(faceIdx), onBoundary_(onBoundary) + : ElasticBase(problem, element, fvGeometry, fIdx, elemVolVars), + OnePTwoCBase(problem, element, fvGeometry, fIdx, elemVolVars), + fvGeometry_(fvGeometry), faceIdx_(fIdx), onBoundary_(onBoundary) { dU_ = Scalar(0); dGradP_ = Scalar(0); diff --git a/dumux/geomechanics/el1p2c/el1p2clocalresidual.hh b/dumux/geomechanics/el1p2c/el1p2clocalresidual.hh index 4e0fdb0a2a8935e313d1cb2ba4d7045a71c2247c..1cfddda6d776523b5f76b8df21f3320c16adf4b9 100644 --- a/dumux/geomechanics/el1p2c/el1p2clocalresidual.hh +++ b/dumux/geomechanics/el1p2c/el1p2clocalresidual.hh @@ -132,22 +132,22 @@ namespace Dumux * volume. * * \param flux The flux over the SCV (sub-control-volume) face for each component - * \param faceIdx The index of the considered face of the sub control volume + * \param fIdx The index of the considered face of the sub control volume * \param onBoundary A boolean variable to specify whether the flux variables * are calculated for interior SCV faces or boundary faces, default=false */ - void computeFlux(PrimaryVariables &flux, int faceIdx, const bool onBoundary=false) const + void computeFlux(PrimaryVariables &flux, int fIdx, const bool onBoundary=false) const { flux = 0; FluxVariables fluxVars(this->problem_(), this->element_(), this->fvGeometry_(), - faceIdx, + fIdx, this->curVolVars_()); this->computeAdvectiveFlux(flux, fluxVars); this->computeDiffusiveFlux(flux, fluxVars); - this->computeStresses(flux, fluxVars, faceIdx); + this->computeStresses(flux, fluxVars, fIdx); } /*! @@ -306,14 +306,14 @@ namespace Dumux * pressure in the solid fluid mixture. * \param stress The stress over the sub-control-volume face for each component * \param fluxVars The variables at the current sub-control-volume face - * \param faceIdx The index of the current sub-control-volume face + * \param fIdx The index of the current sub-control-volume face */ void computeStresses(PrimaryVariables &stress, - const FluxVariables &fluxVars, const int faceIdx) const + const FluxVariables &fluxVars, const int fIdx) const { DimMatrix pressure(0.0), sigma(0.0); // the normal vector corresponding to the current sub-control-volume face - const DimVector &normal(this->fvGeometry_().subContVolFace[faceIdx].normal); + const DimVector &normal(this->fvGeometry_().subContVolFace[fIdx].normal); // the pressure term of the momentum balance for (int i = 0; i < dim; ++i) diff --git a/dumux/geomechanics/el1p2c/el1p2cmodel.hh b/dumux/geomechanics/el1p2c/el1p2cmodel.hh index 8be6716d7fff353cfc7e1a69f0cc0563c04c6e5b..aaa10897cd569c0b962dd64638459e757f088504 100644 --- a/dumux/geomechanics/el1p2c/el1p2cmodel.hh +++ b/dumux/geomechanics/el1p2c/el1p2cmodel.hh @@ -309,12 +309,12 @@ public: tmpEffPoro = Scalar(0); // loop over all scv-faces of the cell - for (int faceIdx = 0; faceIdx < fvGeometry.numScvf; faceIdx++) { + for (int fIdx = 0; fIdx < fvGeometry.numScvf; fIdx++) { //prepare the flux calculations (set up and prepare geometry, FE gradients) FluxVariables fluxVars(this->problem_(), *eIt, fvGeometry, - faceIdx, + fIdx, elemVolVars); // divide by number of scv-faces and sum up edge values diff --git a/dumux/geomechanics/el2p/el2pbasemodel.hh b/dumux/geomechanics/el2p/el2pbasemodel.hh index a54accc6b08c12f3c57273cfc465d5fd41e4b357..33598e127e9193c448c83e392930f9c3e2bf132d 100644 --- a/dumux/geomechanics/el2p/el2pbasemodel.hh +++ b/dumux/geomechanics/el2p/el2pbasemodel.hh @@ -969,13 +969,13 @@ protected: { // add all vertices on the intersection to the set of // boundary vertices - int faceIdx = isIt->indexInInside(); - int numFaceVerts = refElement.size(faceIdx, 1, dim); + int fIdx = isIt->indexInInside(); + int numFaceVerts = refElement.size(fIdx, 1, dim); for (int faceVertIdx = 0; faceVertIdx < numFaceVerts; ++faceVertIdx) { - int elemVertIdx = refElement.subEntity(faceIdx, + int elemVertIdx = refElement.subEntity(fIdx, 1, faceVertIdx, dim); diff --git a/dumux/geomechanics/el2p/el2pfluxvariables.hh b/dumux/geomechanics/el2p/el2pfluxvariables.hh index cabb677ad6b57fedc42d7df7713967061127fb6c..bced9283d55c17766b81feb89388d957c5c13688 100644 --- a/dumux/geomechanics/el2p/el2pfluxvariables.hh +++ b/dumux/geomechanics/el2p/el2pfluxvariables.hh @@ -90,7 +90,7 @@ NEW_PROP_TAG(SpatialParams); * \param problem The problem * \param element The finite element * \param fvGeometry The finite-volume geometry in the fully implicit scheme - * \param faceIdx The local index of the SCV (sub-control-volume) face + * \param fIdx The local index of the SCV (sub-control-volume) face * \param elemVolVars The volume variables of the current element * \param onBoundary A boolean variable to specify whether the flux variables * are calculated for interior SCV faces or boundary faces, default=false @@ -98,11 +98,11 @@ NEW_PROP_TAG(SpatialParams); ElTwoPFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, - int faceIdx, + int fIdx, const ElementVolumeVariables &elemVolVars, const bool onBoundary = false) - : TwoPBase(problem, element, fvGeometry, faceIdx, elemVolVars), - fvGeometry_(fvGeometry), faceIdx_(faceIdx) + : TwoPBase(problem, element, fvGeometry, fIdx, elemVolVars), + fvGeometry_(fvGeometry), faceIdx_(fIdx) { dU_ = Scalar(0); timeDerivUNormal_ = Scalar(0); diff --git a/dumux/geomechanics/el2p/el2plocaloperator.hh b/dumux/geomechanics/el2p/el2plocaloperator.hh index 69e89bcb5794cfae1ac6b09c98533033bf5cda54..d9d2d148d6cc42d06b53646001dfca7bcf8cdae4 100644 --- a/dumux/geomechanics/el2p/el2plocaloperator.hh +++ b/dumux/geomechanics/el2p/el2plocaloperator.hh @@ -386,7 +386,7 @@ public: const Dune::QuadratureRule<DF,dim-1>& rule = Dune::QuadratureRules<DF,dim-1>::rule(gtface,qorder); // get face index of this intersection - int faceIdx = isIt->indexInInside(); + int fIdx = isIt->indexInInside(); // get dimension of face const int dimIs = Dune::PDELab::IntersectionGeometry<Intersection>::Entity::Geometry::dimension; @@ -460,14 +460,14 @@ public: if (codim==0) continue; // iterate over number of degrees of freedom with the given codim which are attached to the current intersection face - for (int j = 0; j < refElement.size(faceIdx,1,codim); j++) + for (int j = 0; j < refElement.size(fIdx,1,codim); j++) { // check if degree of freedom is located on a vertex of the current intersection (boundary face) if (displacementLFS.child(0).finiteElement().localCoefficients().localKey(i).subEntity() == - refElement.subEntity(faceIdx,1,j,codim)) + refElement.subEntity(fIdx,1,j,codim)) { // get local coordinate for this degree of freedom // this doesn't work: DimVector local = isIt->geometryInInside().global(face_refElement.position(j,codim-1)); - DimVector local = refElement.template geometry<1>(faceIdx).global(face_refElement.position(j, codim-1)); + DimVector local = refElement.template geometry<1>(fIdx).global(face_refElement.position(j, codim-1)); GlobalPosition globalPos = eg.geometry().global(local); diff --git a/dumux/geomechanics/el2p/el2plocalresidual.hh b/dumux/geomechanics/el2p/el2plocalresidual.hh index 6d4b53bdff064e93da0a6af47467ee4e1bc3645c..c1400c2ab20967ce314686383205e88fde646507 100644 --- a/dumux/geomechanics/el2p/el2plocalresidual.hh +++ b/dumux/geomechanics/el2p/el2plocalresidual.hh @@ -118,18 +118,18 @@ public: * volume. * * \param flux The flux over the SCV (sub-control-volume) face for each phase - * \param faceIdx The index of the SCV face + * \param fIdx The index of the SCV face * \param onBoundary A boolean variable to specify whether the flux variables * are calculated for interior SCV faces or boundary faces, default=false */ - void computeFlux(PrimaryVariables &flux, int faceIdx, + void computeFlux(PrimaryVariables &flux, int fIdx, const bool onBoundary = false) const { //TODO: delete this if not required // adapts the effective porosity node-wise for evaluation of derivatives. // At the moment computeFlux is called before computeStorage so effPorosity in // computeStorage should also be correct. -// if (faceIdx == 0) +// if (fIdx == 0) // { // int numScv = this->element_().template count<dim> (); // @@ -200,7 +200,7 @@ public: // } FluxVariables fluxVars(this->problem_(), this->element_(), - this->fvGeometry_(), faceIdx, this->curVolVars_()); + this->fvGeometry_(), fIdx, this->curVolVars_()); flux = 0; this->computeAdvectiveFlux(flux, fluxVars); diff --git a/dumux/geomechanics/elastic/elasticfluxvariables.hh b/dumux/geomechanics/elastic/elasticfluxvariables.hh index a2f92e5405dc0cb45a1f552f470ec4cefde1be89..82e33989e0c9cabce11fd40a49647d7cbd8bdd25 100644 --- a/dumux/geomechanics/elastic/elasticfluxvariables.hh +++ b/dumux/geomechanics/elastic/elasticfluxvariables.hh @@ -74,7 +74,7 @@ public: * \param problem The problem * \param element The finite element * \param fvGeometry The finite-volume geometry in the fully implicit scheme - * \param faceIdx The local index of the SCV (sub-control-volume) face + * \param fIdx The local index of the SCV (sub-control-volume) face * \param elemVolVars The volume variables of the current element * \param onBoundary A boolean variable to specify whether the flux variables * are calculated for interior SCV faces or boundary faces, default=false @@ -82,10 +82,10 @@ public: ElasticFluxVariablesBase(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, - int faceIdx, + int fIdx, const ElementVolumeVariables &elemVolVars, const bool onBoundary = false) - : fvElemGeom_(fvGeometry), faceIdx_(faceIdx), onBoundary_(onBoundary) + : fvElemGeom_(fvGeometry), faceIdx_(fIdx), onBoundary_(onBoundary) { gradU_ = Scalar(0); gradUTransposed_ = Scalar(0); diff --git a/dumux/geomechanics/elastic/elasticlocalresidual.hh b/dumux/geomechanics/elastic/elasticlocalresidual.hh index 91f0a8f2040e214c20b5d44657fe01c4983f2add..ef940c55196a3a93b16c56c3032b272334911d8e 100644 --- a/dumux/geomechanics/elastic/elasticlocalresidual.hh +++ b/dumux/geomechanics/elastic/elasticlocalresidual.hh @@ -77,22 +77,22 @@ public: * volume. * * \param flux The stress over the SCV (sub-control-volume) face - * \param faceIdx The index of the considered face of the sub control volume + * \param fIdx The index of the considered face of the sub control volume * \param onBoundary A boolean variable to specify whether the flux variables * are calculated for interior SCV faces or boundary faces, default=false */ - void computeFlux(PrimaryVariables &flux, const int faceIdx, const bool onBoundary=false) const + void computeFlux(PrimaryVariables &flux, const int fIdx, const bool onBoundary=false) const { flux = 0; FluxVariables fluxVars(this->problem_(), this->element_(), this->fvGeometry_(), - faceIdx, + fIdx, this->curVolVars_(), onBoundary); // get normal vector of current face - const DimVector &normal(this->fvGeometry_().subContVolFace[faceIdx].normal); + const DimVector &normal(this->fvGeometry_().subContVolFace[fIdx].normal); DimVector tmp(0.0); // multiply stress tensor with normal vector of current face diff --git a/dumux/geomechanics/elastic/elasticmodel.hh b/dumux/geomechanics/elastic/elasticmodel.hh index d67539221bc686cd84cebfa72a87ef74cbca8d9d..362a6ef3bcd5459179f825e14dc4816b8c7377bc 100644 --- a/dumux/geomechanics/elastic/elasticmodel.hh +++ b/dumux/geomechanics/elastic/elasticmodel.hh @@ -161,14 +161,14 @@ public: false /* isOldSol? */); // loop over the faces - for (int faceIdx = 0; faceIdx < fvGeometry.numScvf; faceIdx++) + for (int fIdx = 0; fIdx < fvGeometry.numScvf; fIdx++) { stress = 0.0; //prepare the flux calculations (set up and prepare geometry, FE gradients) FluxVariables fluxVars(this->problem_(), *eIt, fvGeometry, - faceIdx, + fIdx, elemVolVars); stress = fluxVars.sigma(); diff --git a/dumux/implicit/1p/1plocalresidual.hh b/dumux/implicit/1p/1plocalresidual.hh index 034ce348c7ef732e75e8fe24d402b557aafe14cf..d46dc5c3b26700d48ca1a06f4207c896e8e90dc1 100644 --- a/dumux/implicit/1p/1plocalresidual.hh +++ b/dumux/implicit/1p/1plocalresidual.hh @@ -96,16 +96,16 @@ public: * volume. * * \param flux The flux over the SCV (sub-control-volume) face - * \param faceIdx The index of the SCV face + * \param fIdx The index of the SCV face * \param onBoundary A boolean variable to specify whether the flux variables * are calculated for interior SCV faces or boundary faces, default=false */ - void computeFlux(PrimaryVariables &flux, const int faceIdx, const bool onBoundary=false) const + void computeFlux(PrimaryVariables &flux, const int fIdx, const bool onBoundary=false) const { FluxVariables fluxVars(this->problem_(), this->element_(), this->fvGeometry_(), - faceIdx, + fIdx, this->curVolVars_(), onBoundary); diff --git a/dumux/implicit/1p2c/1p2cfluxvariables.hh b/dumux/implicit/1p2c/1p2cfluxvariables.hh index c997cbcf2ecff603168ba52786d1708b9503da97..d2c53ce290fe9097b8512db89cdfdd6005a65719 100644 --- a/dumux/implicit/1p2c/1p2cfluxvariables.hh +++ b/dumux/implicit/1p2c/1p2cfluxvariables.hh @@ -92,10 +92,10 @@ public: OnePTwoCFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, - const int faceIdx, + const int fIdx, const ElementVolumeVariables &elemVolVars, const bool onBoundary = false) - : fvGeometry_(fvGeometry), faceIdx_(faceIdx), onBoundary_(onBoundary) + : fvGeometry_(fvGeometry), faceIdx_(fIdx), onBoundary_(onBoundary) { mobilityUpwindWeight_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Implicit, MobilityUpwindWeight); diff --git a/dumux/implicit/1p2c/1p2clocalresidual.hh b/dumux/implicit/1p2c/1p2clocalresidual.hh index 700f6c460ea12218064d12e312dcd6ce9bc668bf..dfbff19b1191366b715d004ffff8df147077efce 100644 --- a/dumux/implicit/1p2c/1p2clocalresidual.hh +++ b/dumux/implicit/1p2c/1p2clocalresidual.hh @@ -134,17 +134,17 @@ public: * volume. * * \param flux The flux over the SCV (sub-control-volume) face for each component - * \param faceIdx The index of the considered face of the sub control volume + * \param fIdx The index of the considered face of the sub control volume * \param onBoundary A boolean variable to specify whether the flux variables * are calculated for interior SCV faces or boundary faces, default=false */ - void computeFlux(PrimaryVariables &flux, const int faceIdx, const bool onBoundary=false) const + void computeFlux(PrimaryVariables &flux, const int fIdx, const bool onBoundary=false) const { flux = 0; FluxVariables fluxVars(this->problem_(), this->element_(), this->fvGeometry_(), - faceIdx, + fIdx, this->curVolVars_(), onBoundary); diff --git a/dumux/implicit/2p/2plocalresidual.hh b/dumux/implicit/2p/2plocalresidual.hh index 9382cdceb1b1cc1a531df52bd83fedcbdd426eb2..bc2e522b63f38fb7e128399a8bea384e2f37c963 100644 --- a/dumux/implicit/2p/2plocalresidual.hh +++ b/dumux/implicit/2p/2plocalresidual.hh @@ -108,15 +108,15 @@ public: * over a face of a sub-control volume. * * \param flux The flux over the sub-control-volume face for each component - * \param faceIdx The index of the sub-control-volume face + * \param fIdx The index of the sub-control-volume face * \param onBoundary Evaluate flux at inner sub-control-volume face or on a boundary face */ - void computeFlux(PrimaryVariables &flux, int faceIdx, const bool onBoundary=false) const + void computeFlux(PrimaryVariables &flux, int fIdx, const bool onBoundary=false) const { FluxVariables fluxVars(this->problem_(), this->element_(), this->fvGeometry_(), - faceIdx, + fIdx, this->curVolVars_(), onBoundary); flux = 0; diff --git a/dumux/implicit/2p2c/2p2cfluxvariables.hh b/dumux/implicit/2p2c/2p2cfluxvariables.hh index 727526af522558609c17ae22aeaa9826f81bd729..8f0487eb253fbb6fa1b1250beeb1917d30ca6846 100644 --- a/dumux/implicit/2p2c/2p2cfluxvariables.hh +++ b/dumux/implicit/2p2c/2p2cfluxvariables.hh @@ -79,17 +79,17 @@ class TwoPTwoCFluxVariables : public GET_PROP_TYPE(TypeTag, BaseFluxVariables) * \param problem The problem * \param element The finite element * \param fvGeometry The finite-volume geometry in the fully implicit scheme - * \param faceIdx The local index of the sub-control-volume face + * \param fIdx The local index of the sub-control-volume face * \param elemVolVars The volume variables of the current element * \param onBoundary Evaluate flux at inner sub-control-volume face or on a boundary face */ TwoPTwoCFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, - const int faceIdx, + const int fIdx, const ElementVolumeVariables &elemVolVars, const bool onBoundary = false) - : BaseFluxVariables(problem, element, fvGeometry, faceIdx, elemVolVars, onBoundary) + : BaseFluxVariables(problem, element, fvGeometry, fIdx, elemVolVars, onBoundary) { for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { density_[phaseIdx] = Scalar(0); diff --git a/dumux/implicit/2p2c/2p2clocalresidual.hh b/dumux/implicit/2p2c/2p2clocalresidual.hh index 711b401aceda80ccd7af5d56ba8a474fd5a3a2e5..02175be3276cd0097da8312e46eb791a8740a5a6 100644 --- a/dumux/implicit/2p2c/2p2clocalresidual.hh +++ b/dumux/implicit/2p2c/2p2clocalresidual.hh @@ -190,15 +190,15 @@ class TwoPTwoCLocalResidual: public GET_PROP_TYPE(TypeTag, BaseLocalResidual) * over a face of a sub-control volume. * * \param flux The flux over the sub-control-volume face for each component - * \param faceIdx The index of the sub-control-volume face + * \param fIdx The index of the sub-control-volume face * \param onBoundary Evaluate flux at inner sub-control-volume face or on a boundary face */ - void computeFlux(PrimaryVariables &flux, const int faceIdx, bool onBoundary=false) const + void computeFlux(PrimaryVariables &flux, const int fIdx, bool onBoundary=false) const { FluxVariables fluxVars(this->problem_(), this->element_(), this->fvGeometry_(), - faceIdx, + fIdx, this->curVolVars_(), onBoundary); diff --git a/dumux/implicit/2pdfm/2pdfmfluxvariables.hh b/dumux/implicit/2pdfm/2pdfmfluxvariables.hh index 2917668d149411054ced33f190605bd131555de4..e5476d9b039437b9ec6f5141d570f59334b03f2f 100644 --- a/dumux/implicit/2pdfm/2pdfmfluxvariables.hh +++ b/dumux/implicit/2pdfm/2pdfmfluxvariables.hh @@ -70,7 +70,7 @@ public: * \param problem The problem * \param element The finite element * \param fvGeometry The finite-volume geometry in the fully implicit scheme - * \param faceIdx The local index of the SCV (sub-control-volume) face + * \param fIdx The local index of the SCV (sub-control-volume) face * \param elemVolVars The volume variables of the current element * \param onBoundary A boolean variable to specify whether the flux variables * are calculated for interior SCV faces or boundary faces, default=false @@ -78,11 +78,11 @@ public: TwoPDFMFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, - int faceIdx, + int fIdx, const ElementVolumeVariables &elemVolVars, const bool onBoundary = false) - : ImplicitDarcyFluxVariables<TypeTag>(problem, element, fvGeometry, faceIdx, elemVolVars, onBoundary), - fvGeometry_(fvGeometry), faceIdx_(faceIdx), onBoundary_(onBoundary) + : ImplicitDarcyFluxVariables<TypeTag>(problem, element, fvGeometry, fIdx, elemVolVars, onBoundary), + fvGeometry_(fvGeometry), faceIdx_(fIdx), onBoundary_(onBoundary) { faceSCV_ = &this->face(); @@ -91,8 +91,8 @@ public: potentialGradFracture_[phaseIdx] = 0.0; } - calculateGradientsInFractures_(problem, element, elemVolVars, faceIdx); - calculateVelocitiesFracture_(problem, element, elemVolVars, faceIdx); + calculateGradientsInFractures_(problem, element, elemVolVars, fIdx); + calculateVelocitiesFracture_(problem, element, elemVolVars, fIdx); }; public: @@ -102,15 +102,15 @@ public: * \param problem The problem * \param element The finite element * \param elemVolVars The volume variables of the current element - * \param faceIdx The local index of the SCV (sub-control-volume) face + * \param fIdx The local index of the SCV (sub-control-volume) face */ void calculateVelocitiesFracture_(const Problem &problem, const Element &element, const ElementVolumeVariables &elemVolVars, - int faceIdx) + int fIdx) { - isFracture_ = problem.spatialParams().isEdgeFracture(element, faceIdx); - fractureWidth_ = problem.spatialParams().fractureWidth(element, faceIdx); + isFracture_ = problem.spatialParams().isEdgeFracture(element, fIdx); + fractureWidth_ = problem.spatialParams().fractureWidth(element, fIdx); Scalar KFracture, KFi, KFj; //permeabilities of the fracture if (isFracture_) @@ -186,12 +186,12 @@ private: * \param problem The problem * \param element The finite element * \param elemVolVars The volume variables of the current element - * \param faceIdx The local index of the SCV (sub-control-volume) face + * \param fIdx The local index of the SCV (sub-control-volume) face */ void calculateGradientsInFractures_(const Problem &problem, const Element &element, const ElementVolumeVariables &elemVolVars, - int faceIdx) + int fIdx) { // calculate gradients, loop over adjacent vertices for (unsigned int idx = 0; idx < this->face().numFap; idx++) @@ -205,7 +205,7 @@ private: const GlobalPosition localIdx_i = element.geometry().corner(i); const GlobalPosition localIdx_j = element.geometry().corner(j); - isFracture_ = problem.spatialParams().isEdgeFracture(element, faceIdx); + isFracture_ = problem.spatialParams().isEdgeFracture(element, fIdx); if (isFracture_) { diff --git a/dumux/implicit/2pdfm/2pdfmlocalresidual.hh b/dumux/implicit/2pdfm/2pdfmlocalresidual.hh index 9454274a41ba3c7364fafedd55262888ea996a4b..00306707b9a281a15a4c098b3017b8c7f6700bf0 100644 --- a/dumux/implicit/2pdfm/2pdfmlocalresidual.hh +++ b/dumux/implicit/2pdfm/2pdfmlocalresidual.hh @@ -136,16 +136,16 @@ public: Scalar vol; //subcontrol volume FVElementGeometry fvelem = this->fvGeometry_(); vol = fvelem.subContVol[scvIdx].volume; - for (int faceIdx=0; faceIdx<refElement.size(1); faceIdx++) + for (int fIdx=0; fIdx<refElement.size(1); fIdx++) { - SCVFace face = fvelem.subContVolFace[faceIdx]; + SCVFace face = fvelem.subContVolFace[fIdx]; int i=face.i; int j=face.j; - if (this->problem_().spatialParams().isEdgeFracture(elem, faceIdx) + if (this->problem_().spatialParams().isEdgeFracture(elem, fIdx) && (i == scvIdx || j == scvIdx)) { - Scalar fracture_width = this->problem_().spatialParams().fractureWidth(elem, faceIdx); + Scalar fracture_width = this->problem_().spatialParams().fractureWidth(elem, fIdx); const GlobalPosition global_i = elem.geometry().corner(i); const GlobalPosition global_j = elem.geometry().corner(j); @@ -213,16 +213,16 @@ public: * volume. * * \param flux The flux over the SCV (sub-control-volume) face for each phase - * \param faceIdx The index of the SCV face + * \param fIdx The index of the SCV face * \param onBoundary A boolean variable to specify whether the flux variables * are calculated for interior SCV faces or boundary faces, default=false */ - void computeFlux(PrimaryVariables &flux, int faceIdx, const bool onBoundary=false) const + void computeFlux(PrimaryVariables &flux, int fIdx, const bool onBoundary=false) const { FluxVariables fluxVars(this->problem_(), this->element_(), this->fvGeometry_(), - faceIdx, + fIdx, this->curVolVars_(), onBoundary); flux = 0; diff --git a/dumux/implicit/2pdfm/2pdfmvolumevariables.hh b/dumux/implicit/2pdfm/2pdfmvolumevariables.hh index 59086ddf241b40f2af415249eefd160f0d474dda..908bc7daa5775299b8d8eae313a099305b831862 100644 --- a/dumux/implicit/2pdfm/2pdfmvolumevariables.hh +++ b/dumux/implicit/2pdfm/2pdfmvolumevariables.hh @@ -261,13 +261,13 @@ public: Dune::GeometryType geomType = element.geometry().type(); const ReferenceElement &refElement = ReferenceElements::general(geomType); - for (int faceIdx=0; faceIdx<refElement.size(1); faceIdx++) + for (int fIdx=0; fIdx<refElement.size(1); fIdx++) { - SCVFace face = fvGeometry.subContVolFace[faceIdx]; + SCVFace face = fvGeometry.subContVolFace[fIdx]; int i=face.i; int j=face.j; - if (problem.spatialParams().isEdgeFracture(element, faceIdx) + if (problem.spatialParams().isEdgeFracture(element, fIdx) && (i == scvIdx || j == scvIdx)) { Scalar fracture_width = problem.spatialParams().fractureWidth(); diff --git a/dumux/implicit/3p/3plocalresidual.hh b/dumux/implicit/3p/3plocalresidual.hh index b82d4c3a148ad5e68cfbcd4e6ff93a7a0518ae3d..4497a650f8480d6cea783dc0d31abcd7348430c7 100644 --- a/dumux/implicit/3p/3plocalresidual.hh +++ b/dumux/implicit/3p/3plocalresidual.hh @@ -98,16 +98,16 @@ public: * over a face of a sub-control volume. * * \param flux The flux over the SCV (sub-control-volume) face for each component - * \param faceIdx The index of the SCV face + * \param fIdx The index of the SCV face * \param onBoundary A boolean variable to specify whether the flux variables * are calculated for interior SCV faces or boundary faces, default=false */ - void computeFlux(PrimaryVariables &flux, const int faceIdx, const bool onBoundary=false) const + void computeFlux(PrimaryVariables &flux, const int fIdx, const bool onBoundary=false) const { FluxVariables fluxVars(this->problem_(), this->element_(), this->fvGeometry_(), - faceIdx, + fIdx, this->curVolVars_(), onBoundary); diff --git a/dumux/implicit/3p3c/3p3cfluxvariables.hh b/dumux/implicit/3p3c/3p3cfluxvariables.hh index fd3f7d4dd091a4894c27fbac42c5237bd30e7e4a..b6b848feadd80596c8ea662e342d3316330bd7b7 100644 --- a/dumux/implicit/3p3c/3p3cfluxvariables.hh +++ b/dumux/implicit/3p3c/3p3cfluxvariables.hh @@ -87,17 +87,17 @@ public: * \param problem The problem * \param element The finite element * \param fvGeometry The finite-volume geometry in the fully implicit scheme - * \param faceIdx The local index of the SCV (sub-control-volume) face + * \param fIdx The local index of the SCV (sub-control-volume) face * \param elemVolVars The volume variables of the current element * \param onBoundary Evaluate flux at inner sub-control-volume face or on a boundary face */ ThreePThreeCFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, - const int faceIdx, + const int fIdx, const ElementVolumeVariables &elemVolVars, const bool onBoundary = false) - : BaseFluxVariables(problem, element, fvGeometry, faceIdx, elemVolVars, onBoundary) + : BaseFluxVariables(problem, element, fvGeometry, fIdx, elemVolVars, onBoundary) { for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { density_[phaseIdx] = Scalar(0); diff --git a/dumux/implicit/3p3c/3p3clocalresidual.hh b/dumux/implicit/3p3c/3p3clocalresidual.hh index e904736eef9d204a1f48cc9e7a64741f6a9c8993..93c59dc6b3194f56ed1513ce847a11674e52fae9 100644 --- a/dumux/implicit/3p3c/3p3clocalresidual.hh +++ b/dumux/implicit/3p3c/3p3clocalresidual.hh @@ -113,16 +113,16 @@ public: * over a face of a sub-control volume. * * \param flux The flux over the SCV (sub-control-volume) face for each component - * \param faceIdx The index of the SCV face + * \param fIdx The index of the SCV face * \param onBoundary A boolean variable to specify whether the flux variables * are calculated for interior SCV faces or boundary faces, default=false */ - void computeFlux(PrimaryVariables &flux, const int faceIdx, const bool onBoundary=false) const + void computeFlux(PrimaryVariables &flux, const int fIdx, const bool onBoundary=false) const { FluxVariables fluxVars(this->problem_(), this->element_(), this->fvGeometry_(), - faceIdx, + fIdx, this->curVolVars_(), onBoundary); diff --git a/dumux/implicit/box/boxfvelementgeometry.hh b/dumux/implicit/box/boxfvelementgeometry.hh index c04cbe78d99200a9a434e53eebdcbbad535ece82..589e6f84e9684d2474227218b7b183efa88b227c 100644 --- a/dumux/implicit/box/boxfvelementgeometry.hh +++ b/dumux/implicit/box/boxfvelementgeometry.hh @@ -464,7 +464,7 @@ class BoxFVElementGeometry } } - void getEdgeIndices(int numVertices, int faceIdx, int vIdx, int& leftEdge, int& rightEdge) + void getEdgeIndices(int numVertices, int fIdx, int vIdx, int& leftEdge, int& rightEdge) { static const int faceAndVertexToLeftEdgeTet[4][4] = { { 0, 0, 2, -1}, @@ -525,20 +525,20 @@ class BoxFVElementGeometry switch (numVertices) { case 4: - leftEdge = faceAndVertexToLeftEdgeTet[faceIdx][vIdx]; - rightEdge = faceAndVertexToRightEdgeTet[faceIdx][vIdx]; + leftEdge = faceAndVertexToLeftEdgeTet[fIdx][vIdx]; + rightEdge = faceAndVertexToRightEdgeTet[fIdx][vIdx]; break; case 5: - leftEdge = faceAndVertexToLeftEdgePyramid[faceIdx][vIdx]; - rightEdge = faceAndVertexToRightEdgePyramid[faceIdx][vIdx]; + leftEdge = faceAndVertexToLeftEdgePyramid[fIdx][vIdx]; + rightEdge = faceAndVertexToRightEdgePyramid[fIdx][vIdx]; break; case 6: - leftEdge = faceAndVertexToLeftEdgePrism[faceIdx][vIdx]; - rightEdge = faceAndVertexToRightEdgePrism[faceIdx][vIdx]; + leftEdge = faceAndVertexToLeftEdgePrism[fIdx][vIdx]; + rightEdge = faceAndVertexToRightEdgePrism[fIdx][vIdx]; break; case 8: - leftEdge = faceAndVertexToLeftEdgeHex[faceIdx][vIdx]; - rightEdge = faceAndVertexToRightEdgeHex[faceIdx][vIdx]; + leftEdge = faceAndVertexToLeftEdgeHex[fIdx][vIdx]; + rightEdge = faceAndVertexToRightEdgeHex[fIdx][vIdx]; break; default: DUNE_THROW(Dune::NotImplemented, "BoxFVElementGeometry :: getFaceIndices for numVertices = " << numVertices); @@ -547,9 +547,9 @@ class BoxFVElementGeometry } public: - int boundaryFaceIndex(const int faceIdx, const int vertInFace) const + int boundaryFaceIndex(const int fIdx, const int vertInFace) const { - return (faceIdx*maxCOS + vertInFace); + return (fIdx*maxCOS + vertInFace); } struct SubControlVolume //! FV intersected with element @@ -629,8 +629,8 @@ public: // faces: int elementFaces = (dim<3)?0:referenceElement.size(1); GlobalPosition *faceCoordinates = new GlobalPosition[elementFaces]; - for (int faceIdx = 0; faceIdx < elementFaces; faceIdx++) { - faceCoordinates[faceIdx] = geometry.global(referenceElement.position(faceIdx, 1)); + for (int fIdx = 0; fIdx < elementFaces; fIdx++) { + faceCoordinates[fIdx] = geometry.global(referenceElement.position(fIdx, 1)); } // fill sub control volume data use specialization for this @@ -741,12 +741,12 @@ public: for (IntersectionIterator isIt = gridView.ibegin(element); isIt != isEndIt; ++isIt) if (isIt->boundary()) { - int faceIdx = isIt->indexInInside(); - int numVerticesOfFace = referenceElement.size(faceIdx, 1, dim); + int fIdx = isIt->indexInInside(); + int numVerticesOfFace = referenceElement.size(fIdx, 1, dim); for (int vertInFace = 0; vertInFace < numVerticesOfFace; vertInFace++) { - int vertInElement = referenceElement.subEntity(faceIdx, 1, vertInFace, dim); - int bfIdx = boundaryFaceIndex(faceIdx, vertInFace); + int vertInElement = referenceElement.subEntity(fIdx, 1, vertInFace, dim); + int bfIdx = boundaryFaceIndex(fIdx, vertInFace); subContVol[vertInElement].inner = false; switch ((short) dim) { case 1: @@ -755,21 +755,21 @@ public: break; case 2: boundaryFace[bfIdx].ipLocal = referenceElement.position(vertInElement, dim) - + referenceElement.position(faceIdx, 1); + + referenceElement.position(fIdx, 1); boundaryFace[bfIdx].ipLocal *= 0.5; boundaryFace[bfIdx].area = 0.5*isIt->geometry().volume(); break; case 3: int leftEdge; int rightEdge; - getEdgeIndices(numScv, faceIdx, vertInElement, leftEdge, rightEdge); + getEdgeIndices(numScv, fIdx, vertInElement, leftEdge, rightEdge); boundaryFace[bfIdx].ipLocal = referenceElement.position(vertInElement, dim) - + referenceElement.position(faceIdx, 1) + + referenceElement.position(fIdx, 1) + referenceElement.position(leftEdge, dim-1) + referenceElement.position(rightEdge, dim-1); boundaryFace[bfIdx].ipLocal *= 0.25; boundaryFace[bfIdx].area = quadrilateralArea3D(subContVol[vertInElement].global, - edgeCoordinates[rightEdge], faceCoordinates[faceIdx], + edgeCoordinates[rightEdge], faceCoordinates[fIdx], edgeCoordinates[leftEdge]); break; default: diff --git a/dumux/implicit/box/boxlocalresidual.hh b/dumux/implicit/box/boxlocalresidual.hh index fc3a37309a87b4fd02a50d1e70e1fb6fb275cfd5..c0beded711d79c804ec6755a42f2481e747ad847 100644 --- a/dumux/implicit/box/boxlocalresidual.hh +++ b/dumux/implicit/box/boxlocalresidual.hh @@ -124,19 +124,19 @@ protected: if (isIt->boundary()) { // Assemble the boundary for all vertices of the current // face - int faceIdx = isIt->indexInInside(); - int numFaceVerts = refElement.size(faceIdx, 1, dim); + int fIdx = isIt->indexInInside(); + int numFaceVerts = refElement.size(fIdx, 1, dim); for (int faceVertIdx = 0; faceVertIdx < numFaceVerts; ++faceVertIdx) { - int scvIdx = refElement.subEntity(faceIdx, + int scvIdx = refElement.subEntity(fIdx, 1, faceVertIdx, dim); int boundaryFaceIdx = - this->fvGeometry_().boundaryFaceIndex(faceIdx, faceVertIdx); + this->fvGeometry_().boundaryFaceIndex(fIdx, faceVertIdx); // add the residual of all vertices of the boundary // segment diff --git a/dumux/implicit/box/intersectiontovertexbc.hh b/dumux/implicit/box/intersectiontovertexbc.hh index fc9f5bc6b5a2520fd58eb5b34b70bd5ce5185840..e2dc81a52e465e46650bcb91d23bc0e824b760bc 100644 --- a/dumux/implicit/box/intersectiontovertexbc.hh +++ b/dumux/implicit/box/intersectiontovertexbc.hh @@ -78,11 +78,11 @@ public: if (!bcTypes.hasDirichlet()) continue; - int faceIdx = isIt->indexInInside(); - int numFaceVerts = refElement.size(faceIdx, 1, dim); + int fIdx = isIt->indexInInside(); + int numFaceVerts = refElement.size(fIdx, 1, dim); for (int faceVertIdx = 0; faceVertIdx < numFaceVerts; ++faceVertIdx) { - int elemVertIdx = refElement.subEntity(faceIdx, 1, faceVertIdx, dim); + int elemVertIdx = refElement.subEntity(fIdx, 1, faceVertIdx, dim); int vIdxGlobal = problem.vertexMapper().map(*eIt, elemVertIdx, dim); for (int eqIdx = 0; eqIdx < numEq; eqIdx++) diff --git a/dumux/implicit/cellcentered/ccelementvolumevariables.hh b/dumux/implicit/cellcentered/ccelementvolumevariables.hh index 8bc400a8363ab1663353cd7dc4e55ddf388efe35..28b485d5762dc158943af7cd5ed41d6b1c8487e2 100644 --- a/dumux/implicit/cellcentered/ccelementvolumevariables.hh +++ b/dumux/implicit/cellcentered/ccelementvolumevariables.hh @@ -121,8 +121,8 @@ public: BoundaryTypes bcTypes; problem.boundaryTypes(bcTypes, *isIt); - int faceIdx = isIt->indexInInside(); - int indexInVariables = numNeighbors + faceIdx; + int fIdx = isIt->indexInInside(); + int indexInVariables = numNeighbors + fIdx; if (bcTypes.hasDirichlet()) { diff --git a/dumux/implicit/cellcentered/ccfvelementgeometry.hh b/dumux/implicit/cellcentered/ccfvelementgeometry.hh index 80f0dc41c5a1e0db6b8bb228ec0c3f1f0605c660..a52ae4c48c8db5de046d33191303fe60db9bf8e0 100644 --- a/dumux/implicit/cellcentered/ccfvelementgeometry.hh +++ b/dumux/implicit/cellcentered/ccfvelementgeometry.hh @@ -85,7 +85,7 @@ public: Dune::FieldVector<Scalar, maxNFAP> shapeValue; //!< value of shape functions at ip Dune::FieldVector<int, maxNFAP> fapIndices; //!< indices w.r.t.neighbors of the flux approximation points unsigned numFap; //!< number of flux approximation points - unsigned faceIdx; //!< the index (w.r.t. the element) of the face (codim 1 entity) that the scvf is part of + unsigned fIdx; //!< the index (w.r.t. the element) of the face (codim 1 entity) that the scvf is part of }; typedef SubControlVolumeFace BoundaryFace; //!< compatibility typedef @@ -171,7 +171,7 @@ public: subContVolFace[k].fapIndices[0] = subContVolFace[k].i; subContVolFace[k].fapIndices[1] = subContVolFace[k].j; - subContVolFace[k].faceIdx = isIt->indexInInside(); + subContVolFace[k].fIdx = isIt->indexInInside(); } // boundary cvf data diff --git a/dumux/implicit/cellcentered/cclocalresidual.hh b/dumux/implicit/cellcentered/cclocalresidual.hh index 9baa26c530eb607ae9c4411c48cc3de29c0d128d..242a7a74934ab47d6ca9d176cc79c34fa40f04b0 100644 --- a/dumux/implicit/cellcentered/cclocalresidual.hh +++ b/dumux/implicit/cellcentered/cclocalresidual.hh @@ -156,7 +156,7 @@ protected: for (int nIdx = 0; nIdx < fvGeometry.numNeighbors-1; nIdx++) { // check whether the two faces are opposite of each other - if (fvGeometry.subContVolFace[nIdx].faceIdx == oppositeIdx) + if (fvGeometry.subContVolFace[nIdx].fIdx == oppositeIdx) { boundaryFace.j = nIdx+1; break; @@ -236,18 +236,18 @@ protected: { // calculate the mass flux over the faces and subtract // it from the local rates - int faceIdx = -1; + int fIdx = -1; IntersectionIterator isIt = this->gridView_().ibegin(this->element_()); IntersectionIterator isEndIt = this->gridView_().iend(this->element_()); for (; isIt != isEndIt; ++isIt) { if (!isIt->neighbor()) continue; - faceIdx++; + fIdx++; PrimaryVariables flux; Valgrind::SetUndefined(flux); - this->asImp_().computeFlux(flux, faceIdx); + this->asImp_().computeFlux(flux, fIdx); Valgrind::CheckDefined(flux); flux *= this->curVolVars_(0).extrusionFactor(); diff --git a/dumux/implicit/common/implicitdarcyfluxvariables.hh b/dumux/implicit/common/implicitdarcyfluxvariables.hh index 65e1f05d82faa5cf28adc5de9edeedd3e341b006..31196ec5a7f7232df4b62d67a72e2699dfc8fabf 100644 --- a/dumux/implicit/common/implicitdarcyfluxvariables.hh +++ b/dumux/implicit/common/implicitdarcyfluxvariables.hh @@ -79,7 +79,7 @@ public: * \param problem The problem * \param element The finite element * \param fvGeometry The finite-volume geometry - * \param faceIdx The local index of the SCV (sub-control-volume) face + * \param fIdx The local index of the SCV (sub-control-volume) face * \param elemVolVars The volume variables of the current element * \param onBoundary A boolean variable to specify whether the flux variables * are calculated for interior SCV faces or boundary faces, default=false @@ -87,10 +87,10 @@ public: ImplicitDarcyFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, - const int faceIdx, + const int fIdx, const ElementVolumeVariables &elemVolVars, const bool onBoundary = false) - : fvGeometry_(fvGeometry), faceIdx_(faceIdx), onBoundary_(onBoundary) + : fvGeometry_(fvGeometry), faceIdx_(fIdx), onBoundary_(onBoundary) { mobilityUpwindWeight_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Implicit, MobilityUpwindWeight); calculateGradients_(problem, element, elemVolVars); diff --git a/dumux/implicit/common/implicitforchheimerfluxvariables.hh b/dumux/implicit/common/implicitforchheimerfluxvariables.hh index 7e7aa69f2bd17f65c0231a29b83eb44286596370..67b45d8efa2041f030085c7a3e03ab5ede9263d9 100644 --- a/dumux/implicit/common/implicitforchheimerfluxvariables.hh +++ b/dumux/implicit/common/implicitforchheimerfluxvariables.hh @@ -104,7 +104,7 @@ public: * \param problem The problem * \param element The finite element * \param fvGeometry The finite-volume geometry - * \param faceIdx The local index of the SCV (sub-control-volume) face + * \param fIdx The local index of the SCV (sub-control-volume) face * \param elemVolVars The volume variables of the current element * \param onBoundary A boolean variable to specify whether the flux variables * are calculated for interior SCV faces or boundary faces, default=false @@ -112,11 +112,11 @@ public: ImplicitForchheimerFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, - const unsigned int faceIdx, + const unsigned int fIdx, const ElementVolumeVariables &elemVolVars, const bool onBoundary = false) : ImplicitDarcyFluxVariables<TypeTag>(problem, element, fvGeometry, - faceIdx, elemVolVars, onBoundary) + fIdx, elemVolVars, onBoundary) { calculateNormalVelocity_(problem, element, elemVolVars); } diff --git a/dumux/implicit/common/implicitmodel.hh b/dumux/implicit/common/implicitmodel.hh index 82bbfa61ac6121bb746473ec0e65e05bd6a2faaf..d4a0141dcefa6482dd532a6fa4acb453fb8423cd 100644 --- a/dumux/implicit/common/implicitmodel.hh +++ b/dumux/implicit/common/implicitmodel.hh @@ -970,13 +970,13 @@ protected: { // add all vertices on the intersection to the set of // boundary vertices - int faceIdx = isIt->indexInInside(); - int numFaceVerts = refElement.size(faceIdx, 1, dim); + int fIdx = isIt->indexInInside(); + int numFaceVerts = refElement.size(fIdx, 1, dim); for (int faceVertIdx = 0; faceVertIdx < numFaceVerts; ++faceVertIdx) { - int elemVertIdx = refElement.subEntity(faceIdx, + int elemVertIdx = refElement.subEntity(fIdx, 1, faceVertIdx, dim); diff --git a/dumux/implicit/common/implicitvelocityoutput.hh b/dumux/implicit/common/implicitvelocityoutput.hh index 262dfcebc49f21f7dd6945b424e9ce520853064a..501b97964fc70fac8f8c163e23937bc825383de2 100644 --- a/dumux/implicit/common/implicitvelocityoutput.hh +++ b/dumux/implicit/common/implicitvelocityoutput.hh @@ -139,10 +139,10 @@ public: SCVVelocities scvVelocities(pow(2,dim)); scvVelocities = 0; - for (int faceIdx = 0; faceIdx < fvGeometry.numScvf; faceIdx++) + for (int fIdx = 0; fIdx < fvGeometry.numScvf; fIdx++) { // local position of integration point - const Dune::FieldVector<Scalar, dim>& localPosIP = fvGeometry.subContVolFace[faceIdx].ipLocal; + const Dune::FieldVector<Scalar, dim>& localPosIP = fvGeometry.subContVolFace[fIdx].ipLocal; // Transformation of the global normal vector to normal vector in the reference element const typename Element::Geometry::JacobianTransposed jacobianT1 = @@ -151,7 +151,7 @@ public: FluxVariables fluxVars(problem_, element, fvGeometry, - faceIdx, + fIdx, elemVolVars); const GlobalPosition globalNormal = fluxVars.face().normal; @@ -197,7 +197,7 @@ public: for (IntersectionIterator isIt = problem_.gridView().ibegin(element); isIt != isEndIt; ++isIt) { - int faceIdx = isIt->indexInInside(); + int fIdx = isIt->indexInInside(); if (isIt->neighbor()) { @@ -208,7 +208,7 @@ public: elemVolVars); Scalar flux = fluxVars.volumeFlux(phaseIdx); - scvVelocities[faceIdx] = flux; + scvVelocities[fIdx] = flux; innerFaceIdx++; } @@ -217,11 +217,11 @@ public: FluxVariables fluxVars(problem_, element, fvGeometry, - faceIdx, + fIdx, elemVolVars,true); Scalar flux = fluxVars.volumeFlux(phaseIdx); - scvVelocities[faceIdx] = flux; + scvVelocities[fIdx] = flux; } } diff --git a/dumux/implicit/mpnc/mpncfluxvariables.hh b/dumux/implicit/mpnc/mpncfluxvariables.hh index a738c4e79510f2d2bfbf94172fe88239f8697331..e3a22f42184f17e5b5f7bab79c6a312d34f5a5b3 100644 --- a/dumux/implicit/mpnc/mpncfluxvariables.hh +++ b/dumux/implicit/mpnc/mpncfluxvariables.hh @@ -80,7 +80,7 @@ public: * \param problem The problem * \param element The finite element * \param fvGeometry The finite-volume geometry in the fully implicit scheme - * \param faceIdx The local index of the SCV (sub-control-volume) face + * \param fIdx The local index of the SCV (sub-control-volume) face * \param elemVolVars The volume variables of the current element * \param onBoundary A boolean variable to specify whether the flux variables * are calculated for interior SCV faces or boundary faces, default=false @@ -88,11 +88,11 @@ public: MPNCFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, - const unsigned int faceIdx, + const unsigned int fIdx, const ElementVolumeVariables &elemVolVars, const bool onBoundary = false) - : BaseFluxVariables(problem, element, fvGeometry, faceIdx, elemVolVars, onBoundary), - fvGeometry_(fvGeometry), faceIdx_(faceIdx), elemVolVars_(elemVolVars), onBoundary_(onBoundary) + : BaseFluxVariables(problem, element, fvGeometry, fIdx, elemVolVars, onBoundary), + fvGeometry_(fvGeometry), faceIdx_(fIdx), elemVolVars_(elemVolVars), onBoundary_(onBoundary) { // velocities can be obtained from the Parent class. diff --git a/dumux/implicit/mpnc/mpnclocalresidual.hh b/dumux/implicit/mpnc/mpnclocalresidual.hh index cca71f4e46bc5a16fed71641b4d54b48b96f3f11..54916957d22e15a8ae741210cec695d175ce6558 100644 --- a/dumux/implicit/mpnc/mpnclocalresidual.hh +++ b/dumux/implicit/mpnc/mpnclocalresidual.hh @@ -195,17 +195,17 @@ public: * over a face of a subcontrol volume. * * \param flux The flux over the SCV (sub-control-volume) face for each component - * \param faceIdx The index of the SCV face + * \param fIdx The index of the SCV face * \param onBoundary A boolean variable to specify whether the flux variables * are calculated for interior SCV faces or boundary faces, default=false */ void computeFlux(PrimaryVariables &flux, - const unsigned int faceIdx, const bool onBoundary=false) const + const unsigned int fIdx, const bool onBoundary=false) const { FluxVariables fluxVars(this->problem_(), this->element_(), this->fvGeometry_(), - faceIdx, + fIdx, this->curVolVars_(), onBoundary); diff --git a/dumux/implicit/mpnc/mpncmodelkinetic.hh b/dumux/implicit/mpnc/mpncmodelkinetic.hh index 57baf4fdcf52bfcf94193d7de1882d5944e4e6dd..7037ba267bfb3cdde2a3febc835feb8dd10a4889 100644 --- a/dumux/implicit/mpnc/mpncmodelkinetic.hh +++ b/dumux/implicit/mpnc/mpncmodelkinetic.hh @@ -155,21 +155,21 @@ public: false); this->updateCurHints(*eIt, elemVolVars); - for (int faceIdx = 0; faceIdx < fvGeometry.numScvf; ++ faceIdx) { - int i = fvGeometry.subContVolFace[faceIdx].i; + for (int fIdx = 0; fIdx < fvGeometry.numScvf; ++ fIdx) { + int i = fvGeometry.subContVolFace[fIdx].i; int I = this->vertexMapper().map(*eIt, i, dim); - int j = fvGeometry.subContVolFace[faceIdx].j; + int j = fvGeometry.subContVolFace[fIdx].j; int J = this->vertexMapper().map(*eIt, j, dim); - const Scalar scvfArea = fvGeometry.subContVolFace[faceIdx].normal.two_norm(); + const Scalar scvfArea = fvGeometry.subContVolFace[fIdx].normal.two_norm(); boxSurface_[I] += scvfArea; boxSurface_[J] += scvfArea; FluxVariables fluxVars(this->problem_(), *eIt, fvGeometry, - faceIdx, + fIdx, elemVolVars); for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { diff --git a/dumux/implicit/nonisothermal/nifluxvariables.hh b/dumux/implicit/nonisothermal/nifluxvariables.hh index f5d0b8c3fd8eb3584f18b4dca530d3e09e7285ab..09ecbd2b2b5f32f7113a05552bcb4047ec8c04aa 100644 --- a/dumux/implicit/nonisothermal/nifluxvariables.hh +++ b/dumux/implicit/nonisothermal/nifluxvariables.hh @@ -64,17 +64,17 @@ public: * \param problem The problem * \param element The finite element * \param fvGeometry The finite-volume geometry in the fully implicit scheme - * \param faceIdx The local index of the sub-control-volume face + * \param fIdx The local index of the sub-control-volume face * \param elemVolVars The volume variables of the current element * \param onBoundary Distinguishes if we are on a sub-control-volume face or on a boundary face */ NIFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, - const int faceIdx, + const int fIdx, const ElementVolumeVariables &elemVolVars, bool onBoundary = false) - : ParentType(problem, element, fvGeometry, faceIdx, elemVolVars, onBoundary) + : ParentType(problem, element, fvGeometry, fIdx, elemVolVars, onBoundary) { calculateValues_(problem, element, elemVolVars); } diff --git a/dumux/implicit/richards/richardslocalresidual.hh b/dumux/implicit/richards/richardslocalresidual.hh index 06c060b0907d0130bbf58f1bc48cd449c3a1197f..c57a514cb700c3716db3c1b94a7aa7ef4e143014 100644 --- a/dumux/implicit/richards/richardslocalresidual.hh +++ b/dumux/implicit/richards/richardslocalresidual.hh @@ -99,17 +99,17 @@ public: * * \param flux Stores the total mass fluxes over a sub-control volume face * of the current element \f$\mathrm{[kg/s]}\f$ - * \param faceIdx The sub control volume face index inside the current + * \param fIdx The sub control volume face index inside the current * element * \param onBoundary A boolean variable to specify whether the flux variables * are calculated for interior SCV faces or boundary faces, default=false */ - void computeFlux(PrimaryVariables &flux, const int faceIdx, bool onBoundary=false) const + void computeFlux(PrimaryVariables &flux, const int fIdx, bool onBoundary=false) const { FluxVariables fluxVars(this->problem_(), this->element_(), this->fvGeometry_(), - faceIdx, + fIdx, this->curVolVars_(), onBoundary); diff --git a/dumux/multidomain/couplinglocalresiduals/2p2ccouplinglocalresidual.hh b/dumux/multidomain/couplinglocalresiduals/2p2ccouplinglocalresidual.hh index 3e02d41e63a33be105849d873318fd9dfe590e7c..7b864efb337d1ade9851356b7304ea3a48fd7e6a 100644 --- a/dumux/multidomain/couplinglocalresiduals/2p2ccouplinglocalresidual.hh +++ b/dumux/multidomain/couplinglocalresiduals/2p2ccouplinglocalresidual.hh @@ -107,14 +107,14 @@ public: continue; // assemble the boundary for all vertices of the current face - const int faceIdx = isIt->indexInInside(); - const int numFaceVertices = refElement.size(faceIdx, 1, dim); + const int fIdx = isIt->indexInInside(); + const int numFaceVertices = refElement.size(fIdx, 1, dim); // loop over the single vertices on the current face for (int faceVertIdx = 0; faceVertIdx < numFaceVertices; ++faceVertIdx) { - const int boundaryFaceIdx = this->fvGeometry_().boundaryFaceIndex(faceIdx, faceVertIdx); - const int elemVertIdx = refElement.subEntity(faceIdx, 1, faceVertIdx, dim); + const int boundaryFaceIdx = this->fvGeometry_().boundaryFaceIndex(fIdx, faceVertIdx); + const int elemVertIdx = refElement.subEntity(fIdx, 1, faceVertIdx, dim); // only evaluate, if we consider the same face vertex as in the outer // loop over the element vertices if (elemVertIdx != idx) @@ -207,16 +207,16 @@ public: // calculate the mass flux over the faces and subtract // it from the local rates - for (int faceIdx = 0; faceIdx < this->fvGeometry_().numScvf; faceIdx++) + for (int fIdx = 0; fIdx < this->fvGeometry_().numScvf; fIdx++) { FluxVariables vars(this->problem_(), this->element_(), this->fvGeometry_(), - faceIdx, + fIdx, this->curVolVars_()); - int i = this->fvGeometry_().subContVolFace[faceIdx].i; - int j = this->fvGeometry_().subContVolFace[faceIdx].j; + int i = this->fvGeometry_().subContVolFace[fIdx].i; + int j = this->fvGeometry_().subContVolFace[fIdx].j; const Scalar extrusionFactor = (this->curVolVars_(i).extrusionFactor() diff --git a/dumux/multidomain/couplinglocalresiduals/2p2cnicouplinglocalresidual.hh b/dumux/multidomain/couplinglocalresiduals/2p2cnicouplinglocalresidual.hh index 5069329a12ce2899d93b308c517ac1db747bcc0a..a3eab1e514e82012351e6a7cbd95357f9fc787b1 100644 --- a/dumux/multidomain/couplinglocalresiduals/2p2cnicouplinglocalresidual.hh +++ b/dumux/multidomain/couplinglocalresiduals/2p2cnicouplinglocalresidual.hh @@ -121,14 +121,14 @@ public: continue; // assemble the boundary for all vertices of the current face - const int faceIdx = isIt->indexInInside(); - const int numFaceVertices = refElement.size(faceIdx, 1, dim); + const int fIdx = isIt->indexInInside(); + const int numFaceVertices = refElement.size(fIdx, 1, dim); // loop over the single vertices on the current face for (int faceVertIdx = 0; faceVertIdx < numFaceVertices; ++faceVertIdx) { - const int elemVertIdx = refElement.subEntity(faceIdx, 1, faceVertIdx, dim); - const int boundaryFaceIdx = this->fvGeometry_().boundaryFaceIndex(faceIdx, faceVertIdx); + const int elemVertIdx = refElement.subEntity(fIdx, 1, faceVertIdx, dim); + const int boundaryFaceIdx = this->fvGeometry_().boundaryFaceIndex(fIdx, faceVertIdx); // only evaluate, if we consider the same face vertex as in the outer // loop over the element vertices if (elemVertIdx != idx) @@ -225,16 +225,16 @@ public: // calculate the mass flux over the faces and subtract // it from the local rates - for (int faceIdx = 0; faceIdx < this->fvGeometry_().numScvf; faceIdx++) + for (int fIdx = 0; fIdx < this->fvGeometry_().numScvf; fIdx++) { FluxVariables vars(this->problem_(), this->element_(), this->fvGeometry_(), - faceIdx, + fIdx, this->curVolVars_()); - int i = this->fvGeometry_().subContVolFace[faceIdx].i; - int j = this->fvGeometry_().subContVolFace[faceIdx].j; + int i = this->fvGeometry_().subContVolFace[fIdx].i; + int j = this->fvGeometry_().subContVolFace[fIdx].j; const Scalar extrusionFactor = (this->curVolVars_(i).extrusionFactor() diff --git a/dumux/multidomain/couplinglocalresiduals/stokesnccouplinglocalresidual.hh b/dumux/multidomain/couplinglocalresiduals/stokesnccouplinglocalresidual.hh index 9c3aeceaed444c80822346de0b00b33cd4f8c6c9..aa2d4baa8d91a3a4927f08887b45f27773dc3ccd 100644 --- a/dumux/multidomain/couplinglocalresiduals/stokesnccouplinglocalresidual.hh +++ b/dumux/multidomain/couplinglocalresiduals/stokesnccouplinglocalresidual.hh @@ -132,19 +132,19 @@ public: continue; // assemble the boundary for all vertices of the current face - const int faceIdx = isIt->indexInInside(); - const int numFaceVertices = refElement.size(faceIdx, 1, dim); + const int fIdx = isIt->indexInInside(); + const int numFaceVertices = refElement.size(fIdx, 1, dim); // loop over the single vertices on the current face for (int faceVertIdx = 0; faceVertIdx < numFaceVertices; ++faceVertIdx) { // only evaluate, if we consider the same face vertex as in the outer // loop over the element vertices - if (refElement.subEntity(faceIdx, 1, faceVertIdx, dim) + if (refElement.subEntity(fIdx, 1, faceVertIdx, dim) != idx) continue; - const int boundaryFaceIdx = this->fvGeometry_().boundaryFaceIndex(faceIdx, faceVertIdx); + const int boundaryFaceIdx = this->fvGeometry_().boundaryFaceIndex(fIdx, faceVertIdx); const FluxVariables boundaryVars(this->problem_(), this->element_(), this->fvGeometry_(), diff --git a/dumux/multidomain/couplinglocalresiduals/stokesncnicouplinglocalresidual.hh b/dumux/multidomain/couplinglocalresiduals/stokesncnicouplinglocalresidual.hh index 7435f16c25006f855d742b0eaaa86878ded8663d..b0d1e44277973024cda41ed9fb2239c98f59f8d3 100644 --- a/dumux/multidomain/couplinglocalresiduals/stokesncnicouplinglocalresidual.hh +++ b/dumux/multidomain/couplinglocalresiduals/stokesncnicouplinglocalresidual.hh @@ -135,19 +135,19 @@ namespace Dumux continue; // assemble the boundary for all vertices of the current face - const int faceIdx = isIt->indexInInside(); - const int numFaceVertices = refElement.size(faceIdx, 1, dim); + const int fIdx = isIt->indexInInside(); + const int numFaceVertices = refElement.size(fIdx, 1, dim); // loop over the single vertices on the current face for (int faceVertIdx = 0; faceVertIdx < numFaceVertices; ++faceVertIdx) { // only evaluate, if we consider the same face vertex as in the outer // loop over the element vertices - if (refElement.subEntity(faceIdx, 1, faceVertIdx, dim) + if (refElement.subEntity(fIdx, 1, faceVertIdx, dim) != idx) continue; - const int boundaryFaceIdx = this->fvGeometry_().boundaryFaceIndex(faceIdx, faceVertIdx); + const int boundaryFaceIdx = this->fvGeometry_().boundaryFaceIndex(fIdx, faceVertIdx); const FluxVariables boundaryVars(this->problem_(), this->element_(), this->fvGeometry_(), diff --git a/test/decoupled/1p/resultevaluation.hh b/test/decoupled/1p/resultevaluation.hh index 016c08de1f43a4375313a68128fb29243cf7f7b5..5a3dc6aa1c21efd96c4ab680a4c2383afb2ccbc4 100644 --- a/test/decoupled/1p/resultevaluation.hh +++ b/test/decoupled/1p/resultevaluation.hh @@ -140,12 +140,12 @@ public: for (IntersectionIterator is = gridView.ibegin(element); is!=endis; ++is) { // local number of facet - int faceIdx = is->indexInInside(); + int fIdx = is->indexInInside(); if (consecutiveNumbering) isIdx++; else - isIdx = faceIdx; + isIdx = fIdx; Dune::FieldVector<double,dim> faceGlobal = is->geometry().center(); double faceVol = is->geometry().volume(); @@ -178,7 +178,7 @@ public: // calculate the fluxes through the element faces exactFlux *= faceVol; approximateFlux *= faceVol; - fluxVector[faceIdx] = approximateFlux; + fluxVector[fIdx] = approximateFlux; if (!is->neighbor()) { if (fabs(faceGlobal[1]) < 1e-6) { @@ -208,9 +208,9 @@ public: for (int dimIdx = 0; dimIdx < dim; dimIdx++) { refVelocity[dimIdx] = -fluxVector[dim - 1 - dimIdx]; - for (int faceIdx = 0; faceIdx < dim + 1; faceIdx++) + for (int fIdx = 0; fIdx < dim + 1; fIdx++) { - refVelocity[dimIdx] += fluxVector[faceIdx]/(dim + 1); + refVelocity[dimIdx] += fluxVector[fIdx]/(dim + 1); } } } diff --git a/test/decoupled/1p/resultevaluation3d.hh b/test/decoupled/1p/resultevaluation3d.hh index fb7e34bb5b1b23ad6f80841e41cbd0985c6059dd..2f710b0a62c59c4efb510fd2b23ea6bc1a56b0b8 100644 --- a/test/decoupled/1p/resultevaluation3d.hh +++ b/test/decoupled/1p/resultevaluation3d.hh @@ -311,9 +311,9 @@ public: for (int dimIdx = 0; dimIdx < dim; dimIdx++) { refVelocity[dimIdx] = -fluxVector[dim - 1 - dimIdx]; - for (int faceIdx = 0; faceIdx < dim + 1; faceIdx++) + for (int fIdx = 0; fIdx < dim + 1; fIdx++) { - refVelocity[dimIdx] += fluxVector[faceIdx]/(dim + 1); + refVelocity[dimIdx] += fluxVector[fIdx]/(dim + 1); } } } @@ -566,12 +566,12 @@ public: for (IntersectionIterator is = beginis; is!=endis; ++is) { // local number of facet - int faceIdx = is->indexInInside(); + int fIdx = is->indexInInside(); if (consecutiveNumbering) isIdx++; else - isIdx = faceIdx; + isIdx = fIdx; Dune::FieldVector<double,dim> faceGlobal = is->geometry().center(); double faceVol = is->geometry().volume(); @@ -590,7 +590,7 @@ public: double exactFlux = KGrad*unitOuterNormal; // get the approximate normalvelocity - double approximateFlux = problem.variables().cellData(eIdx).fluxData().velocityTotal(faceIdx)*unitOuterNormal; + double approximateFlux = problem.variables().cellData(eIdx).fluxData().velocityTotal(fIdx)*unitOuterNormal; // calculate the difference in the normal velocity double fluxDiff = exactFlux + approximateFlux; @@ -610,7 +610,7 @@ public: // calculate the fluxes through the element faces exactFlux *= faceVol; approximateFlux *= faceVol; - fluxVector[faceIdx] = approximateFlux; + fluxVector[fIdx] = approximateFlux; if (!is->neighbor()) { if (fabs(faceGlobal[2]) < 1e-6) { diff --git a/test/implicit/3p3cni/kuevettespatialparams.hh b/test/implicit/3p3cni/kuevettespatialparams.hh index 8e640abaf019644b967eb792d2ffb1fe78edf41e..6781b2520f3c56f9883464ae83f957feed5084b2 100644 --- a/test/implicit/3p3cni/kuevettespatialparams.hh +++ b/test/implicit/3p3cni/kuevettespatialparams.hh @@ -245,7 +245,7 @@ public: * \param tempGrad The temperature gradient * \param element The current finite element * \param fvGeometry The finite volume geometry of the current element - * \param faceIdx The local index of the sub-control volume face where + * \param fIdx The local index of the sub-control volume face where * the matrix heat flux should be calculated */ void matrixHeatFlux(DimVector &heatFlux, @@ -254,7 +254,7 @@ public: const DimVector &tempGrad, const Element &element, const FVElementGeometry &fvGeometry, - const int faceIdx) const + const int fIdx) const { static const Scalar lDry = 0.35; static const Scalar lsw1 = 1.8;