diff --git a/dumux/discretization/cellcentered/mpfa/dualgridindexset.hh b/dumux/discretization/cellcentered/mpfa/dualgridindexset.hh index 01c369b4ee47124678eb69f746a0f188ca70d73c..fcd012caafc51d75c8085b00967ddbe15a960d75 100644 --- a/dumux/discretization/cellcentered/mpfa/dualgridindexset.hh +++ b/dumux/discretization/cellcentered/mpfa/dualgridindexset.hh @@ -146,11 +146,11 @@ public: { return numBoundaryScvfs_; } //! returns the grid scv indices connected to this dual grid node - const NodalGridStencilType& globalScvIndices() const + const NodalGridStencilType& gridScvIndices() const { return scvIndices_; } //! returns the grid scvf indices connected to this dual grid node - const NodalGridScvfStencilType& globalScvfIndices() const + const NodalGridScvfStencilType& gridScvfIndices() const { return scvfIndices_; } //! returns whether or not the i-th scvf is on a domain boundary @@ -161,21 +161,21 @@ public: } //! returns the grid scv idx of the i-th scv - GridIndexType scvIdxGlobal(unsigned int i) const + GridIndexType gridScvIndex(unsigned int i) const { assert(i < numScvs()); return scvIndices_[i]; } //! returns the index of the i-th scvf - GridIndexType scvfIdxGlobal(unsigned int i) const + GridIndexType gridScvfIndex(unsigned int i) const { assert(i < numScvfs()); return scvfIndices_[i]; } //! returns the grid index of the j-th scvf embedded in the i-th scv - GridIndexType scvfIdxGlobal(unsigned int i, unsigned int j) const + GridIndexType gridScvfIndex(unsigned int i, unsigned int j) const { assert(i < numScvs()); assert(j < localScvfIndicesInScv_[i].size()); @@ -183,7 +183,7 @@ public: } //! returns the node-local index of the j-th scvf embedded in the i-th scv - LocalIndexType scvfIdxLocal(unsigned int i, unsigned int j) const + LocalIndexType localScvfIndex(unsigned int i, unsigned int j) const { assert(i < numScvs()); assert(j < localScvfIndicesInScv_[i].size()); @@ -191,7 +191,7 @@ public: } //! returns the node-local index of the inside scv of the i-th scvf - LocalIndexType insideScvIdxLocal(unsigned int i) const + LocalIndexType insideScvLocalIndex(unsigned int i) const { assert(i < numScvfs()); return scvfInsideScvIndices_[i]; diff --git a/dumux/discretization/cellcentered/mpfa/elementvolumevariables.hh b/dumux/discretization/cellcentered/mpfa/elementvolumevariables.hh index 675980bf32850b70718c5f1f70b8803fb99f7284..7f8635d08aa24ea8cfe711daff5db1ed7adfbc17 100644 --- a/dumux/discretization/cellcentered/mpfa/elementvolumevariables.hh +++ b/dumux/discretization/cellcentered/mpfa/elementvolumevariables.hh @@ -317,7 +317,7 @@ private: void addBoundaryVolVars_(const Problem& problem, const FVElementGeometry& fvGeometry, const NodalIndexSet& nodalIndexSet) { // check each scvf in the index set for boundary presence - for (auto scvfIdx : nodalIndexSet.globalScvfIndices()) + for (auto scvfIdx : nodalIndexSet.gridScvfIndices()) { const auto& ivScvf = fvGeometry.scvf(scvfIdx); diff --git a/dumux/discretization/cellcentered/mpfa/fluxvariablescachefiller.hh b/dumux/discretization/cellcentered/mpfa/fluxvariablescachefiller.hh index 8d8b4968a906578f3dbfee41c7ee425f738c96c8..dfac3b1cb162b19163fc49ee9765017bc3efbde9 100644 --- a/dumux/discretization/cellcentered/mpfa/fluxvariablescachefiller.hh +++ b/dumux/discretization/cellcentered/mpfa/fluxvariablescachefiller.hh @@ -227,7 +227,7 @@ private: for (const auto& d : iv.localFaceData()) { // obtain the scvf - const auto& scvfJ = fvGeometry().scvf(d.globalScvfIndex()); + const auto& scvfJ = fvGeometry().scvf(d.gridScvfIndex()); ivScvfs[i] = &scvfJ; ivFluxVarCaches[i] = &fluxVarsCacheContainer[scvfJ]; ivFluxVarCaches[i]->setIvIndexInContainer(ivIndexInContainer); diff --git a/dumux/discretization/cellcentered/mpfa/localfacedata.hh b/dumux/discretization/cellcentered/mpfa/localfacedata.hh index 4fec383779ce834ccf76d3084350f28d9715da8c..8cc387d95b9afabbfd8b258e09fe138125a069df 100644 --- a/dumux/discretization/cellcentered/mpfa/localfacedata.hh +++ b/dumux/discretization/cellcentered/mpfa/localfacedata.hh @@ -43,7 +43,7 @@ class InteractionVolumeLocalFaceData LocalIndexType ivLocalScvfIndex_; //!< the iv-local scvf index this scvf maps to LocalIndexType ivLocalInsideScvIndex_; //!< the iv-local index of the scvfs' inside scv LocalIndexType scvfLocalOutsideScvfIndex_; //!< the index of this scvf in the scvf-local outside faces - GridIndexType globalScvfIndex_; //!< the index of the corresponding global scvf + GridIndexType gridScvfIndex_; //!< the index of the corresponding global scvf bool isOutside_; //!< indicates if this face is an "outside" face in the iv-local system public: @@ -53,10 +53,10 @@ public: //! Constructor InteractionVolumeLocalFaceData(LocalIndexType faceIndex, LocalIndexType scvIndex, - GridIndexType globalScvfIndex) + GridIndexType gridScvfIndex) : ivLocalScvfIndex_(faceIndex) , ivLocalInsideScvIndex_(scvIndex) - , globalScvfIndex_(globalScvfIndex) + , gridScvfIndex_(gridScvfIndex) , isOutside_(false) {} @@ -64,11 +64,11 @@ public: InteractionVolumeLocalFaceData(LocalIndexType faceIndex, LocalIndexType scvIndex, LocalIndexType indexInScvfOutsideFaces, - GridIndexType globalScvfIndex) + GridIndexType gridScvfIndex) : ivLocalScvfIndex_(faceIndex) , ivLocalInsideScvIndex_(scvIndex) , scvfLocalOutsideScvfIndex_(indexInScvfOutsideFaces) - , globalScvfIndex_(globalScvfIndex) + , gridScvfIndex_(gridScvfIndex) , isOutside_(true) {} @@ -76,7 +76,7 @@ public: LocalIndexType ivLocalScvfIndex() const { return ivLocalScvfIndex_; } LocalIndexType ivLocalInsideScvIndex() const { return ivLocalInsideScvIndex_; } LocalIndexType scvfLocalOutsideScvfIndex() const { assert(isOutside_); return scvfLocalOutsideScvfIndex_; } - GridIndexType globalScvfIndex() const { return globalScvfIndex_; } + GridIndexType gridScvfIndex() const { return gridScvfIndex_; } bool isOutsideFace() const { return isOutside_; } }; diff --git a/dumux/discretization/cellcentered/mpfa/omethod/interactionvolume.hh b/dumux/discretization/cellcentered/mpfa/omethod/interactionvolume.hh index 97c05b84b02d0a3a08a9015923f2909d25fc0ff1..4ed30d9eecfa847738524a60d144c00f1aad89de 100644 --- a/dumux/discretization/cellcentered/mpfa/omethod/interactionvolume.hh +++ b/dumux/discretization/cellcentered/mpfa/omethod/interactionvolume.hh @@ -158,7 +158,7 @@ public: { // for the o-scheme, the stencil is equal to the scv // index set of the dual grid's nodal index set - stencil_ = &indexSet.nodalIndexSet().globalScvIndices(); + stencil_ = &indexSet.nodalIndexSet().gridScvIndices(); // number of interaction-volume-local scvs(=node-local for o-scheme) and scvfs numFaces_ = indexSet.numFaces(); @@ -178,13 +178,12 @@ public: localFaceData_.reserve(numGlobalScvfs); // set up stuff related to sub-control volumes - const auto& scvIndices = indexSet.globalScvIndices(); for (LocalIndexType scvIdxLocal = 0; scvIdxLocal < numLocalScvs; scvIdxLocal++) { - elements_.emplace_back(fvGeometry.fvGridGeometry().element( scvIndices[scvIdxLocal] )); + elements_.emplace_back(fvGeometry.fvGridGeometry().element( stencil()[scvIdxLocal] )); scvs_.emplace_back(fvGeometry.fvGridGeometry().mpfaHelper(), fvGeometry, - fvGeometry.scv( scvIndices[scvIdxLocal] ), + fvGeometry.scv( stencil()[scvIdxLocal] ), scvIdxLocal, indexSet); } @@ -197,7 +196,7 @@ public: wijk_.resize(numFaces_); for (LocalIndexType faceIdxLocal = 0; faceIdxLocal < numFaces_; ++faceIdxLocal) { - const auto& scvf = fvGeometry.scvf(indexSet.scvfIdxGlobal(faceIdxLocal)); + const auto& scvf = fvGeometry.scvf(indexSet.gridScvfIndex(faceIdxLocal)); // the neighboring scvs in local indices (order: 0 - inside scv, 1..n - outside scvs) const auto& neighborScvIndicesLocal = indexSet.neighboringLocalScvIndices(faceIdxLocal); @@ -233,9 +232,9 @@ public: const auto outsideLocalScvIdx = neighborScvIndicesLocal[i]; for (int coord = 0; coord < dim; ++coord) { - if (indexSet.scvfIdxLocal(outsideLocalScvIdx, coord) == faceIdxLocal) + if (indexSet.localScvfIndex(outsideLocalScvIdx, coord) == faceIdxLocal) { - const auto globalScvfIdx = indexSet.nodalIndexSet().scvfIdxGlobal(outsideLocalScvIdx, coord); + const auto globalScvfIdx = indexSet.nodalIndexSet().gridScvfIndex(outsideLocalScvIdx, coord); const auto& flipScvf = fvGeometry.scvf(globalScvfIdx); localFaceData_.emplace_back(faceIdxLocal, // iv-local scvf idx outsideLocalScvIdx, // iv-local scv index @@ -335,7 +334,7 @@ public: ivIndexSetContainer.emplace_back(nodalIndexSet, flipScvfIndexSet); // store the index mapping - for (const auto scvfIdx : nodalIndexSet.globalScvfIndices()) + for (const auto scvfIdx : nodalIndexSet.gridScvfIndices()) scvfIndexMap[scvfIdx] = curGlobalIndex; } diff --git a/dumux/discretization/cellcentered/mpfa/omethod/interactionvolumeindexset.hh b/dumux/discretization/cellcentered/mpfa/omethod/interactionvolumeindexset.hh index 2ab9082e1da9bf531957191ab3eab76267a16830..ca930c1651df6e9cddf154d34eeb3e48f7fc0bcf 100644 --- a/dumux/discretization/cellcentered/mpfa/omethod/interactionvolumeindexset.hh +++ b/dumux/discretization/cellcentered/mpfa/omethod/interactionvolumeindexset.hh @@ -78,7 +78,7 @@ public: // for scvfs touching the boundary there are no "outside" scvfs if (nodalIndexSet.scvfIsOnBoundary(i)) { - scvfNeighborScvLocalIndices_.push_back({nodalIndexSet.insideScvIdxLocal(i)}); + scvfNeighborScvLocalIndices_.push_back({nodalIndexSet.insideScvLocalIndex(i)}); nodeToIvScvf_[i] = ivToNodeScvf_.size(); isHandled[i] = true; ivToNodeScvf_.push_back(i); @@ -92,12 +92,12 @@ public: isHandled[i] = true; // construct local index sets - const auto& flipScvfIndices = flipScvfIndexSet[nodalIndexSet.scvfIdxGlobal(i)]; + const auto& flipScvfIndices = flipScvfIndexSet[nodalIndexSet.gridScvfIndex(i)]; const auto numFlipIndices = flipScvfIndices.size(); ScvfNeighborLocalIndexSet neighborsLocal; neighborsLocal.resize(numFlipIndices + 1); - neighborsLocal[0] = nodalIndexSet.insideScvIdxLocal(i); + neighborsLocal[0] = nodalIndexSet.insideScvLocalIndex(i); // mappings for all flip scvf for (unsigned int j = 0; j < numFlipIndices; ++j) @@ -105,9 +105,9 @@ public: const auto outsideScvfIdx = flipScvfIndices[j]; for (unsigned int nodeLocalIdx = 0; nodeLocalIdx < nodalIndexSet.numScvfs(); ++nodeLocalIdx) { - if (nodalIndexSet.scvfIdxGlobal(nodeLocalIdx) == outsideScvfIdx) + if (nodalIndexSet.gridScvfIndex(nodeLocalIdx) == outsideScvfIdx) { - neighborsLocal[j+1] = nodalIndexSet.insideScvIdxLocal(nodeLocalIdx); + neighborsLocal[j+1] = nodalIndexSet.insideScvLocalIndex(nodeLocalIdx); nodeToIvScvf_[nodeLocalIdx] = curIvLocalScvfIdx; isHandled[nodeLocalIdx] = true; break; // go to next outside scvf @@ -126,8 +126,8 @@ public: { return nodalIndexSet_; } //! returns the global scv indices connected to this dual grid node - const NodalGridStencilType& globalScvIndices() const - { return nodalIndexSet_.globalScvIndices(); } + const NodalGridStencilType& gridScvIndices() const + { return nodalIndexSet_.gridScvIndices(); } //! returns the number of faces in the interaction volume std::size_t numFaces() const @@ -137,18 +137,18 @@ public: std::size_t numScvs() const { return nodalIndexSet_.numScvs(); } - //! returns a global scvf idx for a given iv-local scvf index - GridIndexType scvfIdxGlobal(LocalIndexType ivLocalScvfIdx) const + //! returns a grid scvf idx for a given iv-local scvf index + GridIndexType gridScvfIndex(LocalIndexType ivLocalScvfIdx) const { assert(ivLocalScvfIdx < numFaces()); - return nodalIndexSet_.scvfIdxGlobal( ivToNodeScvf_[ivLocalScvfIdx] ); + return nodalIndexSet_.gridScvfIndex( ivToNodeScvf_[ivLocalScvfIdx] ); } //! returns the iv-local scvf idx of the i-th scvf embedded in a local scv - LocalIndexType scvfIdxLocal(LocalIndexType scvIdxLocal, unsigned int i) const + LocalIndexType localScvfIndex(LocalIndexType scvIdxLocal, unsigned int i) const { - assert(nodalIndexSet_.scvfIdxLocal(scvIdxLocal, i) < nodeToIvScvf_.size()); - return nodeToIvScvf_[ nodalIndexSet_.scvfIdxLocal(scvIdxLocal, i) ]; + assert(nodalIndexSet_.localScvfIndex(scvIdxLocal, i) < nodeToIvScvf_.size()); + return nodeToIvScvf_[ nodalIndexSet_.localScvfIndex(scvIdxLocal, i) ]; } //! returns the local indices of the neighboring scvs of an scvf diff --git a/dumux/discretization/cellcentered/mpfa/omethod/localassembler.hh b/dumux/discretization/cellcentered/mpfa/omethod/localassembler.hh index aeb4d2838f26383af3f7c787bef8403e7d4f7f6a..82aa7b82734b024eac19c550e5f92c6096d3ee25 100644 --- a/dumux/discretization/cellcentered/mpfa/omethod/localassembler.hh +++ b/dumux/discretization/cellcentered/mpfa/omethod/localassembler.hh @@ -133,7 +133,7 @@ public: for (LocalIndexType localDir = 0; localDir < IV::Traits::GridView::dimension; localDir++) { // the scvf corresponding to this local direction in the scv - const auto& curLocalScvf = iv.localScvf(posLocalScv.scvfIdxLocal(localDir)); + const auto& curLocalScvf = iv.localScvf(posLocalScv.localScvfIndex(localDir)); // on interior faces the coefficients of the AB matrix come into play if (!curLocalScvf.isDirichlet()) @@ -262,7 +262,7 @@ public: for (LocalIndexType localDir = 0; localDir < IV::Traits::GridView::dimension; localDir++) { // the scvf corresponding to this local direction in the scv - const auto& curLocalScvf = iv.localScvf(posLocalScv.scvfIdxLocal(localDir)); + const auto& curLocalScvf = iv.localScvf(posLocalScv.localScvfIndex(localDir)); // on interior faces the coefficients of the AB matrix come into play if (!curLocalScvf.isDirichlet()) @@ -300,7 +300,7 @@ public: // put the cell pressures first using LocalIndexType = typename IV::Traits::IndexSet::LocalIndexType; for (LocalIndexType i = 0; i < iv.numScvs(); ++i) - u[i] = getU( iv.localScv(i).globalScvIndex() ); + u[i] = getU( iv.localScv(i).gridScvIndex() ); // Dirichlet BCs come afterwards LocalIndexType i = iv.numScvs(); @@ -363,13 +363,13 @@ public: { // gravitational acceleration on this face const auto& curLocalScvf = iv.localScvf(faceIdx); - const auto& curGlobalScvf = this->fvGeometry().scvf(curLocalScvf.globalScvfIndex()); + const auto& curGlobalScvf = this->fvGeometry().scvf(curLocalScvf.gridScvfIndex()); const auto gravity = this->problem().gravityAtPos(curGlobalScvf.ipGlobal()); // get permeability tensor in "positive" sub volume const auto& neighborScvIndices = curLocalScvf.neighboringLocalScvIndices(); const auto& posLocalScv = iv.localScv(neighborScvIndices[0]); - const auto& posGlobalScv = this->fvGeometry().scv(posLocalScv.globalScvIndex()); + const auto& posGlobalScv = this->fvGeometry().scv(posLocalScv.gridScvIndex()); const auto& posVolVars = this->elemVolVars()[posGlobalScv]; const auto& posElement = iv.element(neighborScvIndices[0]); const auto tensor = getT(this->problem(), posElement, posVolVars, this->fvGeometry(), posGlobalScv); @@ -388,7 +388,7 @@ public: { // obtain outside tensor const auto& negLocalScv = iv.localScv( neighborScvIndices[1] ); - const auto& negGlobalScv = this->fvGeometry().scv(negLocalScv.globalScvIndex()); + const auto& negGlobalScv = this->fvGeometry().scv(negLocalScv.gridScvIndex()); const auto& negVolVars = this->elemVolVars()[negGlobalScv]; const auto& negElement = iv.element( neighborScvIndices[1] ); const auto negTensor = getT(this->problem(), negElement, negVolVars, this->fvGeometry(), negGlobalScv); @@ -497,13 +497,13 @@ public: { // gravitational acceleration on this face const auto& curLocalScvf = iv.localScvf(faceIdx); - const auto& curGlobalScvf = this->fvGeometry().scvf(curLocalScvf.globalScvfIndex()); + const auto& curGlobalScvf = this->fvGeometry().scvf(curLocalScvf.gridScvfIndex()); const auto gravity = this->problem().gravityAtPos(curGlobalScvf.ipGlobal()); // get permeability tensor in "positive" sub volume const auto& neighborScvIndices = curLocalScvf.neighboringLocalScvIndices(); const auto& posLocalScv = iv.localScv(neighborScvIndices[0]); - const auto& posGlobalScv = this->fvGeometry().scv(posLocalScv.globalScvIndex()); + const auto& posGlobalScv = this->fvGeometry().scv(posLocalScv.gridScvIndex()); const auto& posVolVars = this->elemVolVars()[posGlobalScv]; const auto& posElement = iv.element(neighborScvIndices[0]); const auto tensor = getT(this->problem(), posElement, posVolVars, this->fvGeometry(), posGlobalScv); @@ -526,7 +526,7 @@ public: { // obtain outside tensor const auto& negLocalScv = iv.localScv( neighborScvIndices[idxInOutside] ); - const auto& negGlobalScv = this->fvGeometry().scv(negLocalScv.globalScvIndex()); + const auto& negGlobalScv = this->fvGeometry().scv(negLocalScv.gridScvIndex()); const auto& negVolVars = this->elemVolVars()[negGlobalScv]; const auto& negElement = iv.element( neighborScvIndices[idxInOutside] ); const auto negTensor = getT(this->problem(), negElement, negVolVars, this->fvGeometry(), negGlobalScv); @@ -596,7 +596,7 @@ public: for (LocalIndexType localDir = 0; localDir < IV::Traits::GridView::dimension; localDir++) { // the scvf corresponding to this local direction in the scv - const auto& curLocalScvf = iv.localScvf(posLocalScv.scvfIdxLocal(localDir)); + const auto& curLocalScvf = iv.localScvf(posLocalScv.localScvfIndex(localDir)); // on interior faces the coefficients of the AB matrix come into play if (!curLocalScvf.isDirichlet()) @@ -655,12 +655,12 @@ private: for (LocalIndexType faceIdx = 0; faceIdx < iv.numFaces(); ++faceIdx) { const auto& curLocalScvf = iv.localScvf(faceIdx); - const auto& curGlobalScvf = this->fvGeometry().scvf(curLocalScvf.globalScvfIndex()); + const auto& curGlobalScvf = this->fvGeometry().scvf(curLocalScvf.gridScvfIndex()); const auto& neighborScvIndices = curLocalScvf.neighboringLocalScvIndices(); // get tensor in "positive" sub volume const auto& posLocalScv = iv.localScv(neighborScvIndices[0]); - const auto& posGlobalScv = this->fvGeometry().scv(posLocalScv.globalScvIndex()); + const auto& posGlobalScv = this->fvGeometry().scv(posLocalScv.gridScvIndex()); const auto& posVolVars = this->elemVolVars()[posGlobalScv]; const auto& posElement = iv.element(neighborScvIndices[0]); const auto tensor = getT(this->problem(), posElement, posVolVars, this->fvGeometry(), posGlobalScv); @@ -671,7 +671,7 @@ private: const auto posScvLocalDofIdx = posLocalScv.localDofIndex(); for (LocalIndexType localDir = 0; localDir < dim; localDir++) { - const auto& otherLocalScvf = iv.localScvf( posLocalScv.scvfIdxLocal(localDir) ); + const auto& otherLocalScvf = iv.localScvf( posLocalScv.localScvfIndex(localDir) ); const auto otherLocalDofIdx = otherLocalScvf.localDofIndex(); D[faceIdx][otherLocalDofIdx] -= wijk[localDir]; D[faceIdx][posScvLocalDofIdx] += wijk[localDir]; @@ -695,14 +695,14 @@ private: for (LocalIndexType faceIdx = 0; faceIdx < iv.numFaces(); ++faceIdx) { const auto& curLocalScvf = iv.localScvf(faceIdx); - const auto& curGlobalScvf = this->fvGeometry().scvf(curLocalScvf.globalScvfIndex()); + const auto& curGlobalScvf = this->fvGeometry().scvf(curLocalScvf.gridScvfIndex()); const auto curIsDirichlet = curLocalScvf.isDirichlet(); const auto curLocalDofIdx = curLocalScvf.localDofIndex(); // get tensor in "positive" sub volume const auto& neighborScvIndices = curLocalScvf.neighboringLocalScvIndices(); const auto& posLocalScv = iv.localScv(neighborScvIndices[0]); - const auto& posGlobalScv = this->fvGeometry().scv(posLocalScv.globalScvIndex()); + const auto& posGlobalScv = this->fvGeometry().scv(posLocalScv.gridScvIndex()); const auto& posVolVars = this->elemVolVars()[posGlobalScv]; const auto& posElement = iv.element(neighborScvIndices[0]); const auto tensor = getT(this->problem(), posElement, posVolVars, this->fvGeometry(), posGlobalScv); @@ -713,7 +713,7 @@ private: // go over the coordinate directions in the positive sub volume for (unsigned int localDir = 0; localDir < dim; localDir++) { - const auto& otherLocalScvf = iv.localScvf( posLocalScv.scvfIdxLocal(localDir) ); + const auto& otherLocalScvf = iv.localScvf( posLocalScv.localScvfIndex(localDir) ); const auto otherLocalDofIdx = otherLocalScvf.localDofIndex(); // if we are not on a Dirichlet face, add entries associated with unknown face pressures @@ -748,7 +748,7 @@ private: { const auto idxOnScvf = idxInOutside+1; const auto& negLocalScv = iv.localScv( neighborScvIndices[idxOnScvf] ); - const auto& negGlobalScv = this->fvGeometry().scv(negLocalScv.globalScvIndex()); + const auto& negGlobalScv = this->fvGeometry().scv(negLocalScv.gridScvIndex()); const auto& negVolVars = this->elemVolVars()[negGlobalScv]; const auto& negElement = iv.element( neighborScvIndices[idxOnScvf] ); const auto negTensor = getT(this->problem(), negElement, negVolVars, this->fvGeometry(), negGlobalScv); @@ -762,10 +762,10 @@ private: if (dim < dimWorld) wijk[faceIdx][idxOnScvf] *= -1.0; - // go over the coordinate directions in the positive sub volume + // go over the coordinate directions in the negative sub volume for (int localDir = 0; localDir < dim; localDir++) { - const auto otherLocalScvfIdx = negLocalScv.scvfIdxLocal(localDir); + const auto otherLocalScvfIdx = negLocalScv.localScvfIndex(localDir); const auto& otherLocalScvf = iv.localScvf(otherLocalScvfIdx); const auto otherLocalDofIdx = otherLocalScvf.localDofIndex(); diff --git a/dumux/discretization/cellcentered/mpfa/omethod/localsubcontrolentities.hh b/dumux/discretization/cellcentered/mpfa/omethod/localsubcontrolentities.hh index 32f2775f43c9ee69e5e298ece62bcfdcb7870716..6c492a60a4cf4b965d692274f24bb90f135182e1 100644 --- a/dumux/discretization/cellcentered/mpfa/omethod/localsubcontrolentities.hh +++ b/dumux/discretization/cellcentered/mpfa/omethod/localsubcontrolentities.hh @@ -82,7 +82,7 @@ public: LocalBasis localBasis; for (unsigned int coordIdx = 0; coordIdx < myDimension; ++coordIdx) { - const auto scvfIdx = indexSet.nodalIndexSet().scvfIdxGlobal(localDofIndex_, coordIdx); + const auto scvfIdx = indexSet.nodalIndexSet().gridScvfIndex(localDofIndex_, coordIdx); const auto& scvf = fvGeometry.scvf(scvfIdx); localBasis[coordIdx] = scvf.ipGlobal(); localBasis[coordIdx] -= center; @@ -96,8 +96,8 @@ public: ctype detX() const { return detX_; } - //! grid view-global index related to this scv - GridIndexType globalScvIndex() const + //! grid index related to this scv + GridIndexType gridScvIndex() const { return globalScvIndex_; } //! returns the index in the set of cell unknowns of the iv @@ -105,10 +105,10 @@ public: { return localDofIndex_; } //! iv-local index of the coordir's scvf in this scv - LocalIndexType scvfIdxLocal(unsigned int coordDir) const + LocalIndexType localScvfIndex(unsigned int coordDir) const { assert(coordDir < myDimension); - return indexSet_->scvfIdxLocal(localDofIndex_, coordDir); + return indexSet_->localScvfIndex(localDofIndex_, coordDir); } //! the nu vectors are needed for setting up the omegas of the iv @@ -170,7 +170,7 @@ public: LocalIndexType localDofIndex() const { return localDofIndex_; } //! returns the grid view-global index of this scvf - GridIndexType globalScvfIndex() const { return scvfIdxGlobal_; } + GridIndexType gridScvfIndex() const { return scvfIdxGlobal_; } //! Returns the local indices of the scvs neighboring this scvf const ScvfNeighborLocalIndexSet& neighboringLocalScvIndices() const { return *neighborScvIndicesLocal_; } diff --git a/dumux/discretization/cellcentered/mpfa/omethod/staticinteractionvolume.hh b/dumux/discretization/cellcentered/mpfa/omethod/staticinteractionvolume.hh index 04250ea70b06bd2082141b4fc8f4eb2de41c8442..c27a3f05985c28d20a33c686aa11890ef84176af 100644 --- a/dumux/discretization/cellcentered/mpfa/omethod/staticinteractionvolume.hh +++ b/dumux/discretization/cellcentered/mpfa/omethod/staticinteractionvolume.hh @@ -159,16 +159,15 @@ public: // for the o-scheme, the stencil is equal to the scv // index set of the dual grid's nodal index set assert(indexSet.numScvs() == numScv); - stencil_ = &indexSet.nodalIndexSet().globalScvIndices(); + stencil_ = &indexSet.nodalIndexSet().gridScvIndices(); // set up stuff related to sub-control volumes - const auto& scvIndices = indexSet.globalScvIndices(); for (LocalIndexType scvIdxLocal = 0; scvIdxLocal < numScv; scvIdxLocal++) { - elements_[scvIdxLocal] = fvGeometry.fvGridGeometry().element( scvIndices[scvIdxLocal] ); + elements_[scvIdxLocal] = fvGeometry.fvGridGeometry().element( stencil()[scvIdxLocal] ); scvs_[scvIdxLocal] = LocalScvType(fvGeometry.fvGridGeometry().mpfaHelper(), fvGeometry, - fvGeometry.scv( scvIndices[scvIdxLocal] ), + fvGeometry.scv( stencil()[scvIdxLocal] ), scvIdxLocal, indexSet); } @@ -176,7 +175,7 @@ public: // set up quantitites related to sub-control volume faces for (LocalIndexType faceIdxLocal = 0; faceIdxLocal < numScvf; ++faceIdxLocal) { - const auto& scvf = fvGeometry.scvf(indexSet.scvfIdxGlobal(faceIdxLocal)); + const auto& scvf = fvGeometry.scvf(indexSet.gridScvfIndex(faceIdxLocal)); // the neighboring scvs in local indices (order: 0 - inside scv, 1..n - outside scvs) const auto& neighborScvIndicesLocal = indexSet.neighboringLocalScvIndices(faceIdxLocal); @@ -193,9 +192,9 @@ public: const auto outsideLocalScvIdx = neighborScvIndicesLocal[1]; for (int coord = 0; coord < dim; ++coord) { - if (indexSet.scvfIdxLocal(outsideLocalScvIdx, coord) == faceIdxLocal) + if (indexSet.localScvfIndex(outsideLocalScvIdx, coord) == faceIdxLocal) { - const auto globalScvfIdx = indexSet.nodalIndexSet().scvfIdxGlobal(outsideLocalScvIdx, coord); + const auto globalScvfIdx = indexSet.nodalIndexSet().gridScvfIndex(outsideLocalScvIdx, coord); const auto& flipScvf = fvGeometry.scvf(globalScvfIdx); localFaceData_[faceIdxLocal*2+1] = LocalFaceData(faceIdxLocal, // iv-local scvf idx outsideLocalScvIdx, // iv-local scv index @@ -295,7 +294,7 @@ public: ivIndexSetContainer.emplace_back(nodalIndexSet, flipScvfIndexSet); // store the index mapping - for (const auto scvfIdx : nodalIndexSet.globalScvfIndices()) + for (const auto scvfIdx : nodalIndexSet.gridScvfIndices()) scvfIndexMap[scvfIdx] = curGlobalIndex; } diff --git a/dumux/discretization/fluxstencil.hh b/dumux/discretization/fluxstencil.hh index fb3e859234172184a6eccd4608e361c135ddb99c..c601e6f1cc761e8d28ca9a70e2192255d8decad3 100644 --- a/dumux/discretization/fluxstencil.hh +++ b/dumux/discretization/fluxstencil.hh @@ -117,9 +117,9 @@ public: // return the scv (element) indices in the interaction region if (fvGridGeometry.vertexUsesSecondaryInteractionVolume(scvf.vertexIndex())) - return fvGridGeometry.gridInteractionVolumeIndexSets().secondaryIndexSet(scvf).globalScvIndices(); + return fvGridGeometry.gridInteractionVolumeIndexSets().secondaryIndexSet(scvf).gridScvIndices(); else - return fvGridGeometry.gridInteractionVolumeIndexSets().primaryIndexSet(scvf).globalScvIndices(); + return fvGridGeometry.gridInteractionVolumeIndexSets().primaryIndexSet(scvf).gridScvIndices(); } };