Commit 15fd7171 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

[naming] replace globalIdx by .IdxGlobal

As decided at the Dumux day.

Discussed with Johannes.



git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@13788 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 4f7316eb
......@@ -153,7 +153,7 @@ public:
ElementIterator eEndIt = gridView_.template end<0>();
for (ElementIterator eIt = gridView_.template begin<0>(); eIt != eEndIt; ++eIt)
{
int globalIdx = map(*eIt);
int eIdxGlobal = map(*eIt);
int fIdx = 0;
// run through all intersections with neighbors
......@@ -161,7 +161,7 @@ public:
for (IntersectionIterator isIt = gridView_.ibegin(*eIt); isIt != isEndIt; ++isIt)
{
int indexInInside = isIt->indexInInside();
intersectionMapLocal_[globalIdx][fIdx] = indexInInside;
intersectionMapLocal_[eIdxGlobal][fIdx] = indexInInside;
fIdx++;
}
......@@ -170,7 +170,7 @@ public:
int globalIntersectionIdx = 0;
for (ElementIterator eIt = gridView_.template begin<0>(); eIt != eEndIt; ++eIt)
{
int globalIdx = map(*eIt);
int eIdxGlobal = map(*eIt);
int fIdx = 0;
// run through all intersections with neighbors
......@@ -182,7 +182,7 @@ public:
ElementPointer neighbor = isIt->outside();
int globalIdxNeighbor = map(*neighbor);
if (eIt->level() > neighbor->level() || (eIt->level() == neighbor->level() && globalIdx < globalIdxNeighbor))
if (eIt->level() > neighbor->level() || (eIt->level() == neighbor->level() && eIdxGlobal < globalIdxNeighbor))
{
int faceIdxNeighbor = 0;
......@@ -206,14 +206,14 @@ public:
}
}
intersectionMapGlobal_[globalIdx][fIdx] = globalIntersectionIdx;
intersectionMapGlobal_[eIdxGlobal][fIdx] = globalIntersectionIdx;
intersectionMapGlobal_[globalIdxNeighbor][faceIdxNeighbor] = globalIntersectionIdx;
globalIntersectionIdx ++;
}
}
else
{
intersectionMapGlobal_[globalIdx][fIdx] = globalIntersectionIdx;
intersectionMapGlobal_[eIdxGlobal][fIdx] = globalIntersectionIdx;
globalIntersectionIdx ++;
}
fIdx++;
......
......@@ -157,12 +157,12 @@ public:
/*! \brief Stores the pressure solution of a cell
*
* \param globalIdx Global cell index
* \param eIdxGlobal Global cell index
* \param cellData A CellData object
*/
void storePressureSolution(int globalIdx, CellData& cellData)
void storePressureSolution(int eIdxGlobal, CellData& cellData)
{
Scalar press = this->pressure()[globalIdx];
Scalar press = this->pressure()[eIdxGlobal];
cellData.setPressure(press);
}
......
......@@ -119,9 +119,9 @@ public:
for (ElementIterator eIt = problem_.gridView().template begin<0>(); eIt != eEndIt; ++eIt)
{
// cell index
int globalIdx = problem_.variables().index(*eIt);
int eIdxGlobal = problem_.variables().index(*eIt);
CellData& cellData = problem_.variables().cellData(globalIdx);
CellData& cellData = problem_.variables().cellData(eIdxGlobal);
const typename Element::Geometry& geometry = eIt->geometry();
// get corresponding reference element
......@@ -181,7 +181,7 @@ public:
jacobianT.umtv(refVelocity, elementVelocity);
elementVelocity /= geometry.integrationElement(localPos);
velocity[globalIdx] = elementVelocity;
velocity[eIdxGlobal] = elementVelocity;
}
writer.attachCellData(velocity, "velocity", dim);
......@@ -208,9 +208,9 @@ void FVVelocity1P<TypeTag>::calculateVelocity(const Intersection& intersection,
ElementPointer elementI = intersection.inside();
ElementPointer elementJ = intersection.outside();
int globalIdxJ = problem_.variables().index(*elementJ);
int eIdxGlobalJ = problem_.variables().index(*elementJ);
CellData& cellDataJ = problem_.variables().cellData(globalIdxJ);
CellData& cellDataJ = problem_.variables().cellData(eIdxGlobalJ);
// get global coordinates of cell centers
const GlobalPosition& globalPosI = elementI->geometry().center();
......
......@@ -320,8 +320,8 @@ public:
*/
void storePressureSolution(const Element& element)
{
int globalIdx = problem_.variables().index(element);
CellData& cellData = problem_.variables().cellData(globalIdx);
int eIdxGlobal = problem_.variables().index(element);
CellData& cellData = problem_.variables().cellData(eIdxGlobal);
if (compressibility_)
{
......@@ -333,7 +333,7 @@ public:
{
case pw:
{
Scalar pressW = this->pressure()[globalIdx];
Scalar pressW = this->pressure()[eIdxGlobal];
Scalar pc = cellData.capillaryPressure();
cellData.setPressure(wPhaseIdx, pressW);
......@@ -350,7 +350,7 @@ public:
}
case pn:
{
Scalar pressNw = this->pressure()[globalIdx];
Scalar pressNw = this->pressure()[eIdxGlobal];
Scalar pc = cellData.capillaryPressure();
cellData.setPressure(nPhaseIdx, pressNw);
......@@ -367,7 +367,7 @@ public:
}
case pGlobal:
{
Scalar press = this->pressure()[globalIdx];
Scalar press = this->pressure()[eIdxGlobal];
cellData.setGlobalPressure(press);
Scalar pc = cellData.capillaryPressure();
......@@ -1057,9 +1057,9 @@ void FVPressure2P<TypeTag>::updateMaterialLaws()
ElementIterator eEndIt = problem_.gridView().template end<0>();
for (ElementIterator eIt = problem_.gridView().template begin<0>(); eIt != eEndIt; ++eIt)
{
int globalIdx = problem_.variables().index(*eIt);
int eIdxGlobal = problem_.variables().index(*eIt);
CellData& cellData = problem_.variables().cellData(globalIdx);
CellData& cellData = problem_.variables().cellData(eIdxGlobal);
Scalar temperature = problem_.temperature(*eIt);
......
......@@ -194,9 +194,9 @@ public:
for (ElementIterator eIt = problem_.gridView().template begin<0>(); eIt != eEndIt; ++eIt)
{
// cell index
int globalIdx = problem_.variables().index(*eIt);
int eIdxGlobal = problem_.variables().index(*eIt);
CellData& cellData = problem_.variables().cellData(globalIdx);
CellData& cellData = problem_.variables().cellData(eIdxGlobal);
const typename Element::Geometry& geometry = eIt->geometry();
// get corresponding reference element
......@@ -256,7 +256,7 @@ public:
jacobianT.umtv(refVelocity, elementVelocity);
elementVelocity /= geometry.integrationElement(localPos);
velocity[globalIdx] = elementVelocity;
velocity[eIdxGlobal] = elementVelocity;
// calculate velocity on reference element as the Raviart-Thomas-0
// interpolant of the fluxes
......@@ -286,7 +286,7 @@ public:
jacobianT.umtv(refVelocity, elementVelocity);
elementVelocity /= geometry.integrationElement(localPos);
velocitySecondPhase[globalIdx] = elementVelocity;
velocitySecondPhase[eIdxGlobal] = elementVelocity;
}
//switch velocities
......@@ -334,9 +334,9 @@ void FVVelocity2P<TypeTag>::calculateVelocity(const Intersection& intersection,
ElementPointer elementI = intersection.inside();
ElementPointer elementJ = intersection.outside();
int globalIdxJ = problem_.variables().index(*elementJ);
int eIdxGlobalJ = problem_.variables().index(*elementJ);
CellData& cellDataJ = problem_.variables().cellData(globalIdxJ);
CellData& cellDataJ = problem_.variables().cellData(eIdxGlobalJ);
// get global coordinates of cell centers
const GlobalPosition& globalPosI = (*elementI).geometry().center();
......
......@@ -235,16 +235,16 @@ void FvMpfaL2dPressureVelocity2p<TypeTag>::calculateVelocity()
ElementPointer & elementPointer4 = interactionVolume.getSubVolumeElement(3);
// cell index
int globalIdx1 = problem_.variables().index(*elementPointer1);
int globalIdx2 = problem_.variables().index(*elementPointer2);
int globalIdx3 = problem_.variables().index(*elementPointer3);
int globalIdx4 = problem_.variables().index(*elementPointer4);
int eIdxGlobal1 = problem_.variables().index(*elementPointer1);
int eIdxGlobal2 = problem_.variables().index(*elementPointer2);
int eIdxGlobal3 = problem_.variables().index(*elementPointer3);
int eIdxGlobal4 = problem_.variables().index(*elementPointer4);
//get the cell Data
CellData& cellData1 = problem_.variables().cellData(globalIdx1);
CellData& cellData2 = problem_.variables().cellData(globalIdx2);
CellData& cellData3 = problem_.variables().cellData(globalIdx3);
CellData& cellData4 = problem_.variables().cellData(globalIdx4);
CellData& cellData1 = problem_.variables().cellData(eIdxGlobal1);
CellData& cellData2 = problem_.variables().cellData(eIdxGlobal2);
CellData& cellData3 = problem_.variables().cellData(eIdxGlobal3);
CellData& cellData4 = problem_.variables().cellData(eIdxGlobal4);
velocity_.calculateInnerInteractionVolumeVelocity(interactionVolume, cellData1, cellData2,
cellData3, cellData4, this->innerBoundaryVolumeFaces_);
......@@ -272,9 +272,9 @@ void FvMpfaL2dPressureVelocity2p<TypeTag>::calculateVelocity()
ElementPointer & elementPointer = interactionVolume.getSubVolumeElement(elemIdx);
// cell index
int globalIdx = problem_.variables().index(*elementPointer);
int eIdxGlobal = problem_.variables().index(*elementPointer);
//get the cell Data
CellData& cellData = problem_.variables().cellData(globalIdx);
CellData& cellData = problem_.variables().cellData(eIdxGlobal);
velocity_.calculateBoundaryInteractionVolumeVelocity(interactionVolume, cellData, elemIdx);
}
......@@ -302,10 +302,10 @@ void FvMpfaL2dPressureVelocity2p<TypeTag>::calculateVelocity(const Intersection&
ElementPointer elementPtrI = intersection.inside();
ElementPointer elementPtrJ = intersection.outside();
int globalIdxI = problem_.variables().index(*elementPtrI);
int globalIdxJ = problem_.variables().index(*elementPtrJ);
int eIdxGlobalI = problem_.variables().index(*elementPtrI);
int eIdxGlobalJ = problem_.variables().index(*elementPtrJ);
CellData& cellDataJ = problem_.variables().cellData(globalIdxJ);
CellData& cellDataJ = problem_.variables().cellData(eIdxGlobalJ);
const ReferenceElement& referenceElement = ReferenceElements::general(elementPtrI->geometry().type());
......@@ -332,24 +332,24 @@ void FvMpfaL2dPressureVelocity2p<TypeTag>::calculateVelocity(const Intersection&
ElementPointer & elementPointer4 = interactionVolume.getSubVolumeElement(3);
// cell index
int globalIdx[4];
globalIdx[0] = problem_.variables().index(*elementPointer1);
globalIdx[1] = problem_.variables().index(*elementPointer2);
globalIdx[2] = problem_.variables().index(*elementPointer3);
globalIdx[3] = problem_.variables().index(*elementPointer4);
int eIdxGlobal[4];
eIdxGlobal[0] = problem_.variables().index(*elementPointer1);
eIdxGlobal[1] = problem_.variables().index(*elementPointer2);
eIdxGlobal[2] = problem_.variables().index(*elementPointer3);
eIdxGlobal[3] = problem_.variables().index(*elementPointer4);
//get the cell Data
cellDataTemp[0] = problem_.variables().cellData(globalIdx[0]);
cellDataTemp[1] = problem_.variables().cellData(globalIdx[1]);
cellDataTemp[2] = problem_.variables().cellData(globalIdx[2]);
cellDataTemp[3] = problem_.variables().cellData(globalIdx[3]);
cellDataTemp[0] = problem_.variables().cellData(eIdxGlobal[0]);
cellDataTemp[1] = problem_.variables().cellData(eIdxGlobal[1]);
cellDataTemp[2] = problem_.variables().cellData(eIdxGlobal[2]);
cellDataTemp[3] = problem_.variables().cellData(eIdxGlobal[3]);
velocity_.calculateInnerInteractionVolumeVelocity(interactionVolume, cellDataTemp[0], cellDataTemp[1],
cellDataTemp[2], cellDataTemp[3], this->innerBoundaryVolumeFaces_);
for (int i = 0; i < 4; i++)
{
if (globalIdx[i] == globalIdxI)
if (eIdxGlobal[i] == eIdxGlobalI)
{
cellData.fluxData().setVelocity(wPhaseIdx, indexInInside,
cellDataTemp[i].fluxData().velocity(wPhaseIdx, indexInInside));
......@@ -360,7 +360,7 @@ void FvMpfaL2dPressureVelocity2p<TypeTag>::calculateVelocity(const Intersection&
cellData.fluxData().setUpwindPotential(nPhaseIdx, indexInInside,
cellDataTemp[i].fluxData().upwindPotential(nPhaseIdx, indexInInside));
}
else if (globalIdx[i] == globalIdxJ)
else if (eIdxGlobal[i] == eIdxGlobalJ)
{
cellDataJ.fluxData().setVelocity(wPhaseIdx, indexInOutside,
cellDataTemp[i].fluxData().velocity(wPhaseIdx, indexInOutside));
......
......@@ -246,16 +246,16 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity()
ElementPointer & elementPointer4 = interactionVolume.getSubVolumeElement(3);
// cell index
int globalIdx1 = problem_.variables().index(*elementPointer1);
int globalIdx2 = problem_.variables().index(*elementPointer2);
int globalIdx3 = problem_.variables().index(*elementPointer3);
int globalIdx4 = problem_.variables().index(*elementPointer4);
int eIdxGlobal1 = problem_.variables().index(*elementPointer1);
int eIdxGlobal2 = problem_.variables().index(*elementPointer2);
int eIdxGlobal3 = problem_.variables().index(*elementPointer3);
int eIdxGlobal4 = problem_.variables().index(*elementPointer4);
//get the cell Data
CellData& cellData1 = problem_.variables().cellData(globalIdx1);
CellData& cellData2 = problem_.variables().cellData(globalIdx2);
CellData& cellData3 = problem_.variables().cellData(globalIdx3);
CellData& cellData4 = problem_.variables().cellData(globalIdx4);
CellData& cellData1 = problem_.variables().cellData(eIdxGlobal1);
CellData& cellData2 = problem_.variables().cellData(eIdxGlobal2);
CellData& cellData3 = problem_.variables().cellData(eIdxGlobal3);
CellData& cellData4 = problem_.variables().cellData(eIdxGlobal4);
velocity_.calculateInnerInteractionVolumeVelocity(interactionVolume, cellData1, cellData2, cellData3,
cellData4, this->innerBoundaryVolumeFaces_);
......@@ -268,14 +268,14 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity()
ElementPointer & elementPointer4 = interactionVolume.getSubVolumeElement(3);
// cell index
int globalIdx1 = problem_.variables().index(*elementPointer1);
int globalIdx2 = problem_.variables().index(*elementPointer2);
int globalIdx4 = problem_.variables().index(*elementPointer4);
int eIdxGlobal1 = problem_.variables().index(*elementPointer1);
int eIdxGlobal2 = problem_.variables().index(*elementPointer2);
int eIdxGlobal4 = problem_.variables().index(*elementPointer4);
//get the cell Data
CellData& cellData1 = problem_.variables().cellData(globalIdx1);
CellData& cellData2 = problem_.variables().cellData(globalIdx2);
CellData& cellData4 = problem_.variables().cellData(globalIdx4);
CellData& cellData1 = problem_.variables().cellData(eIdxGlobal1);
CellData& cellData2 = problem_.variables().cellData(eIdxGlobal2);
CellData& cellData4 = problem_.variables().cellData(eIdxGlobal4);
velocity_.calculateHangingNodeInteractionVolumeVelocity(interactionVolume, cellData1, cellData2,
cellData4, this->innerBoundaryVolumeFaces_);
......@@ -309,9 +309,9 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity()
ElementPointer & elementPointer = interactionVolume.getSubVolumeElement(elemIdx);
// cell index
int globalIdx = problem_.variables().index(*elementPointer);
int eIdxGlobal = problem_.variables().index(*elementPointer);
//get the cell Data
CellData& cellData = problem_.variables().cellData(globalIdx);
CellData& cellData = problem_.variables().cellData(eIdxGlobal);
velocity_.calculateBoundaryInteractionVolumeVelocity(interactionVolume, cellData, elemIdx);
}
......@@ -340,10 +340,10 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity(const Inter
int levelI = elementPtrI->level();
int levelJ = elementPtrJ->level();
int globalIdxI = problem_.variables().index(*elementPtrI);
int globalIdxJ = problem_.variables().index(*elementPtrJ);
int eIdxGlobalI = problem_.variables().index(*elementPtrI);
int eIdxGlobalJ = problem_.variables().index(*elementPtrJ);
CellData& cellDataJ = problem_.variables().cellData(globalIdxJ);
CellData& cellDataJ = problem_.variables().cellData(eIdxGlobalJ);
const ReferenceElement& referenceElement = ReferenceElements::general(elementPtrI->geometry().type());
......@@ -392,7 +392,7 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity(const Inter
if (interactionVolume.isInnerVolume())
{
// cell index vector
std::vector<int> globalIdx(0);
std::vector<int> eIdxGlobal(0);
if (interactionVolume.getElementNumber() == 4)
{
......@@ -401,20 +401,20 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity(const Inter
ElementPointer & elementPointer3 = interactionVolume.getSubVolumeElement(2);
ElementPointer & elementPointer4 = interactionVolume.getSubVolumeElement(3);
globalIdx.resize(4);
eIdxGlobal.resize(4);
globalIdx[0] = problem_.variables().index(*elementPointer1);
globalIdx[1] = problem_.variables().index(*elementPointer2);
globalIdx[2] = problem_.variables().index(*elementPointer3);
globalIdx[3] = problem_.variables().index(*elementPointer4);
eIdxGlobal[0] = problem_.variables().index(*elementPointer1);
eIdxGlobal[1] = problem_.variables().index(*elementPointer2);
eIdxGlobal[2] = problem_.variables().index(*elementPointer3);
eIdxGlobal[3] = problem_.variables().index(*elementPointer4);
//cell Data vector
cellDataTemp.resize(4);
cellDataTemp[0] = problem_.variables().cellData(globalIdx[0]);
cellDataTemp[1] = problem_.variables().cellData(globalIdx[1]);
cellDataTemp[2] = problem_.variables().cellData(globalIdx[2]);
cellDataTemp[3] = problem_.variables().cellData(globalIdx[3]);
cellDataTemp[0] = problem_.variables().cellData(eIdxGlobal[0]);
cellDataTemp[1] = problem_.variables().cellData(eIdxGlobal[1]);
cellDataTemp[2] = problem_.variables().cellData(eIdxGlobal[2]);
cellDataTemp[3] = problem_.variables().cellData(eIdxGlobal[3]);
velocity_.calculateInnerInteractionVolumeVelocity(interactionVolume, cellDataTemp[0], cellDataTemp[1],
cellDataTemp[2], cellDataTemp[3], this->innerBoundaryVolumeFaces_);
......@@ -425,18 +425,18 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity(const Inter
ElementPointer & elementPointer2 = interactionVolume.getSubVolumeElement(1);
ElementPointer & elementPointer4 = interactionVolume.getSubVolumeElement(3);
globalIdx.resize(3);
eIdxGlobal.resize(3);
globalIdx[0] = problem_.variables().index(*elementPointer1);
globalIdx[1] = problem_.variables().index(*elementPointer2);
globalIdx[2] = problem_.variables().index(*elementPointer4);
eIdxGlobal[0] = problem_.variables().index(*elementPointer1);
eIdxGlobal[1] = problem_.variables().index(*elementPointer2);
eIdxGlobal[2] = problem_.variables().index(*elementPointer4);
//cell Data vector
cellDataTemp.resize(3);
cellDataTemp[0] = problem_.variables().cellData(globalIdx[0]);
cellDataTemp[1] = problem_.variables().cellData(globalIdx[1]);
cellDataTemp[2] = problem_.variables().cellData(globalIdx[2]);
cellDataTemp[0] = problem_.variables().cellData(eIdxGlobal[0]);
cellDataTemp[1] = problem_.variables().cellData(eIdxGlobal[1]);
cellDataTemp[2] = problem_.variables().cellData(eIdxGlobal[2]);
velocity_.calculateHangingNodeInteractionVolumeVelocity(interactionVolume, cellDataTemp[0], cellDataTemp[1],
......@@ -450,7 +450,7 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity(const Inter
int size = cellDataTemp.size();
for (int i = 0; i < size; i++)
{
if (globalIdx[i] == globalIdxI)
if (eIdxGlobal[i] == eIdxGlobalI)
{
if (levelI >= levelJ)
{
......@@ -478,7 +478,7 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity(const Inter
}
}
else if (globalIdx[i] == globalIdxJ)
else if (eIdxGlobal[i] == eIdxGlobalJ)
{
if (levelJ >= levelI)
{
......
......@@ -190,9 +190,9 @@ public:
for (ElementIterator eIt = problem_.gridView().template begin<0>(); eIt != eEndIt; ++eIt)
{
// cell index
int globalIdx = problem_.variables().index(*eIt);
int eIdxGlobal = problem_.variables().index(*eIt);
CellData & cellData = problem_.variables().cellData(globalIdx);
CellData & cellData = problem_.variables().cellData(eIdxGlobal);
Dune::FieldVector < Scalar, 2 * dim > fluxW(0);
Dune::FieldVector < Scalar, 2 * dim > fluxNw(0);
......@@ -223,7 +223,7 @@ public:
jacobianT.umtv(refVelocity, elementVelocity);
elementVelocity /= eIt->geometry().integrationElement(localPos);
velocityWetting[globalIdx] = elementVelocity;
velocityWetting[eIdxGlobal] = elementVelocity;
refVelocity = 0;
refVelocity[0] = 0.5 * (fluxNw[1] - fluxNw[0]);
......@@ -234,7 +234,7 @@ public:
jacobianT.umtv(refVelocity, elementVelocity);
elementVelocity /= eIt->geometry().integrationElement(localPos);
velocityNonwetting[globalIdx] = elementVelocity;
velocityNonwetting[eIdxGlobal] = elementVelocity;
}
writer.attachCellData(velocityWetting, "wetting-velocity", dim);
......@@ -295,10 +295,10 @@ void FvMpfaL2dVelocity2p<TypeTag>::calculateInnerInteractionVolumeVelocity(Inter
int level4 = elementPointer4->level();
// cell index
int globalIdx1 = problem_.variables().index(*elementPointer1);
int globalIdx2 = problem_.variables().index(*elementPointer2);
int globalIdx3 = problem_.variables().index(*elementPointer3);
int globalIdx4 = problem_.variables().index(*elementPointer4);
int eIdxGlobal1 = problem_.variables().index(*elementPointer1);
int eIdxGlobal2 = problem_.variables().index(*elementPointer2);
int eIdxGlobal3 = problem_.variables().index(*elementPointer3);
int eIdxGlobal4 = problem_.variables().index(*elementPointer4);
// get pressure values
Dune::FieldVector < Scalar, 2 * dim > potW(0);
......@@ -669,35 +669,35 @@ void FvMpfaL2dVelocity2p<TypeTag>::calculateInnerInteractionVolumeVelocity(Inter
vel41 *= fracFlow14;
vel43 *= fracFlow34;
if (innerBoundaryVolumeFaces[globalIdx1][interactionVolume.getIndexOnElement(0, 0)])
if (innerBoundaryVolumeFaces[eIdxGlobal1][interactionVolume.getIndexOnElement(0, 0)])
{
vel12 *= 2;
}
if (innerBoundaryVolumeFaces[globalIdx1][interactionVolume.getIndexOnElement(0, 1)])
if (innerBoundaryVolumeFaces[eIdxGlobal1][interactionVolume.getIndexOnElement(0, 1)])
{
vel14 *= 2;
}
if (innerBoundaryVolumeFaces[globalIdx2][interactionVolume.getIndexOnElement(1, 0)])
if (innerBoundaryVolumeFaces[eIdxGlobal2][interactionVolume.getIndexOnElement(1, 0)])
{
vel23 *= 2;
}
if (innerBoundaryVolumeFaces[globalIdx2][interactionVolume.getIndexOnElement(1, 1)])
if (innerBoundaryVolumeFaces[eIdxGlobal2][interactionVolume.getIndexOnElement(1, 1)])
{
vel21 *= 2;
}
if (innerBoundaryVolumeFaces[globalIdx3][interactionVolume.getIndexOnElement(2, 0)])
if (innerBoundaryVolumeFaces[eIdxGlobal3][interactionVolume.getIndexOnElement(2, 0)])
{
vel34 *= 2;
}
if (innerBoundaryVolumeFaces[globalIdx3][interactionVolume.getIndexOnElement(2, 1)])
if (innerBoundaryVolumeFaces[eIdxGlobal3][interactionVolume.getIndexOnElement(2, 1)])
{
vel32 *= 2;
}
if (innerBoundaryVolumeFaces[globalIdx4][interactionVolume.getIndexOnElement(3, 0)])
if (innerBoundaryVolumeFaces[eIdxGlobal4][interactionVolume.getIndexOnElement(3, 0)])
{
vel41 *= 2;
}
if (innerBoundaryVolumeFaces[globalIdx4][interactionVolume.getIndexOnElement(3, 1)])
if (innerBoundaryVolumeFaces[eIdxGlobal4][interactionVolume.getIndexOnElement(3, 1)])
{
vel43 *= 2;
}
......
......@@ -226,21 +226,21 @@ void FvMpfaL3dPressureVelocity2p<TypeTag>::calculateVelocity()
if (interactionVolume.isInnerVolume())
{
// cell index
int globalIdx[8];
int eIdxGlobal[8];
for (int i = 0; i < 8; i++)
{
globalIdx[i] = problem_.variables().index(*(interactionVolume.getSubVolumeElement(i)));
eIdxGlobal[i] = problem_.variables().index(*(interactionVolume.getSubVolumeElement(i)));
}
//get the cell Data
CellData & cellData1 = problem_.variables().cellData(globalIdx[0]);
CellData & cellData2 = problem_.variables().cellData(globalIdx[1]);
CellData & cellData3 = problem_.variables().cellData(globalIdx[2]);
CellData & cellData4 = problem_.variables().cellData(globalIdx[3]);
CellData & cellData5 = problem_.variables().cellData(globalIdx[4]);
CellData & cellData6 = problem_.variables().cellData(globalIdx[5]);