Commit 78fe9222 authored by Timo Koch's avatar Timo Koch
Browse files

[cleanup] Remove deprecation warnings from entitypointers

Remove occations of dereferencing entities that were
entiypointers before.
parent a40a747b
......@@ -184,7 +184,7 @@ public:
{
if (isItN->neighbor())
{
if (isItN->outside() == eIt)
if (isItN->outside() == *eIt)
{
break;
}
......
......@@ -858,15 +858,13 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::storeInteractionVolumeInfo()
{
int localVertIdx12corner = referenceElement.subEntity(indexInInside12, dim - 1, i, dim);
int globalVertIdx12corner = problem_.variables().index(
*((*eIt).template subEntity < dim > (localVertIdx12corner)));
int globalVertIdx12corner = problem_.variables().index(eIt->template subEntity<dim>(localVertIdx12corner));
for (int j = 0; j < isIt14->geometry().corners(); ++j)
{
int localVertIdx14corner = referenceElement.subEntity(indexInInside14, dim - 1, j, dim);
int globalVertIdx14corner = problem_.variables().index(
*((*eIt).template subEntity < dim > (localVertIdx14corner)));
int globalVertIdx14corner = problem_.variables().index(eIt->template subEntity<dim>(localVertIdx14corner));
if (globalVertIdx12corner == globalVertIdx14corner)
{
......@@ -1308,8 +1306,7 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::storeInteractionVolumeInfo()
int localVertIdx2corner = referenceElement.subEntity(isIt2->indexInInside(), dim - 1, i,
dim);
int globalVertIdx2corner = problem_.variables().index(
*((element2).template subEntity < dim > (localVertIdx2corner)));
int globalVertIdx2corner = problem_.variables().index(element2.template subEntity<dim>(localVertIdx2corner));
if (globalVertIdx2corner == globalVertIdx1234)
{
......@@ -1420,8 +1417,7 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::storeInteractionVolumeInfo()
int localVertIdx12corner = referenceElement.subEntity(indexInInside12, dim - 1, i, dim);
int globalVertIdx12corner = problem_.variables().index(
*((*eIt).template subEntity < dim > (localVertIdx12corner)));
int globalVertIdx12corner = problem_.variables().index(eIt->template subEntity<dim>(localVertIdx12corner));
for (int j = 0; j < isIt14->geometry().corners(); ++j)
{
......@@ -2393,10 +2389,10 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::assemble()
auto element = interactionVolume.getSubVolumeElement(elemIdx);
// get global coordinate of cell centers
const GlobalPosition& globalPos = element->geometry().center();
const GlobalPosition& globalPos = element.geometry().center();
// cell volumes
Scalar volume = element->geometry().volume();
Scalar volume = element.geometry().volume();
// cell index
int eIdxGlobal = problem_.variables().index(element);
......@@ -2436,11 +2432,11 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::assemble()
int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx);
const ReferenceElement& referenceElement = ReferenceElements::general(
element->geometry().type());
element.geometry().type());
const LocalPosition& localPos = referenceElement.position(boundaryFaceIdx, 1);
const GlobalPosition& globalPosFace = element->geometry().global(localPos);
const GlobalPosition& globalPosFace = element.geometry().global(localPos);
DimVector distVec(globalPosFace - globalPos);
Scalar dist = distVec.two_norm();
......
......@@ -228,7 +228,7 @@ public:
if (isIt->neighbor())
{
int neighborIdx = problem.variables().index(*(isIt->outside()));
int neighborIdx = problem.variables().index(isIt->outside());
CellData& cellDataNeighbor = problem.variables().cellData(neighborIdx);
......
......@@ -230,7 +230,7 @@ public:
if (isIt->neighbor())
{
const CellData& cellDataJ = problem_.variables().cellData(problem_.variables().index(*(isIt->outside())));
const CellData& cellDataJ = problem_.variables().cellData(problem_.variables().index(isIt->outside()));
if (!checkPhysicalRange_(cellDataJ))
{
indicatorVector_[globalIdxI] = refineBound_ + 1.0;
......
......@@ -256,7 +256,7 @@ void FV2dPressure2P2CAdaptive<TypeTag>::initializeMatrix()
rowSize++;
// if mpfa is used, more entries might be needed if both halfedges are regarded
if (enableMPFA && (enableSecondHalfEdge && isIt->outside()->level() != eIt->level()))
if (enableMPFA && (enableSecondHalfEdge && isIt->outside().level() != eIt->level()))
{
GlobalPosition globalPos3(0.);
int globalIdx3=-1;
......@@ -322,7 +322,7 @@ void FV2dPressure2P2CAdaptive<TypeTag>::initializeMatrix()
this->A_.addindex(globalIdxI, globalIdxJ);
// if mpfa is used, more entries might be needed if both halfedges are regarded
if (enableMPFA && (enableSecondHalfEdge && isIt->outside()->level() != eIt->level()))
if (enableMPFA && (enableSecondHalfEdge && isIt->outside().level() != eIt->level()))
{
GlobalPosition globalPos3(0.);
int globalIdx3=-1;
......@@ -619,12 +619,12 @@ void FV2dPressure2P2CAdaptive<TypeTag>::getMpfaFlux(const IntersectionIterator&
potentialW += (cellDataI.pressure(wPhaseIdx)-temp1*densityW) * additionalT[2]
+ (cellDataJ.pressure(wPhaseIdx)-temp2*densityW) * additionalT[0]
+ (cellDataAdditional.pressure(wPhaseIdx)
-(additionalIsIt->outside()->geometry().center()*gravity_)
-(additionalIsIt->outside().geometry().center()*gravity_)
*densityW) * additionalT[1];
potentialNW += (cellDataI.pressure(nPhaseIdx)-temp1*densityNW) * additionalT[2]
+ (cellDataJ.pressure(nPhaseIdx)-temp2*densityNW) * additionalT[0]
+ (cellDataAdditional.pressure(nPhaseIdx)
-(additionalIsIt->outside()->geometry().center()*gravity_)
-(additionalIsIt->outside().geometry().center()*gravity_)
*densityNW) * additionalT[1];
}
......@@ -729,7 +729,7 @@ void FV2dPressure2P2CAdaptive<TypeTag>::getMpfaFlux(const IntersectionIterator&
// add gravity to RHS vector
this->f_[globalIdxI] += (densityW * lambdaW * dV_w + densityNW * lambdaN * dV_n) * temp2 * additionalT[0];
this->f_[globalIdxI] += (densityW * lambdaW * dV_w + densityNW * lambdaN * dV_n)
* (additionalIsIt->outside()->geometry().center()*gravity_) * additionalT[1];
* (additionalIsIt->outside().geometry().center()*gravity_) * additionalT[1];
this->f_[globalIdxI] += (densityW * lambdaW * dV_w + densityNW * lambdaN * dV_n) * temp1 * additionalT[2];
if(enableVolumeIntegral) // switch off volume integral for mpfa case
......@@ -742,7 +742,7 @@ void FV2dPressure2P2CAdaptive<TypeTag>::getMpfaFlux(const IntersectionIterator&
// add gravity to RHS vector
this->f_[globalIdxI] -= weightingFactor * (densityW * lambdaW * gV_w + densityNW * lambdaN * gV_n) * temp2 * additionalT[0];
this->f_[globalIdxI] -= weightingFactor * (densityW * lambdaW * gV_w + densityNW * lambdaN * gV_n)
* (additionalIsIt->outside()->geometry().center()*gravity_) * additionalT[1];
* (additionalIsIt->outside().geometry().center()*gravity_) * additionalT[1];
this->f_[globalIdxI] -= weightingFactor * (densityW * lambdaW * gV_w + densityNW * lambdaN * gV_n) * temp1 * additionalT[2];
}
......@@ -884,7 +884,7 @@ int FV2dPressure2P2CAdaptive<TypeTag>::computeTransmissibilities(const Intersect
Dune::dgrave << "is 13 not found!!!" << std::endl;
// get information of cell3
globalPos3 = face13->outside()->geometry().center();
globalPos3 = face13->outside().geometry().center();
globalIdx3 = problem().variables().index(face13->outside());
// get absolute permeability of neighbor cell 3
DimMatrix K3(problem().spatialParams().intrinsicPermeability(*(face13->outside())));
......
......@@ -226,7 +226,7 @@ void FV2dTransport2P2CAdaptive<TypeTag>::update(const Scalar t, Scalar& dt, Tran
// handle interior face
if (isIt->neighbor())
{
if (enableMPFA && (isIt->outside()->level() != eIt->level()))
if (enableMPFA && (isIt->outside().level() != eIt->level()))
getMpfaFlux(entries, timestepFlux, isIt, cellDataI);
else
this->getFlux(entries, timestepFlux, *isIt, cellDataI);
......@@ -439,18 +439,18 @@ void FV2dTransport2P2CAdaptive<TypeTag>::getMpfaFlux(Dune::FieldVector<Scalar, 2
// second half edge, if there is one
if(halfedgesStored == 2)
{
int AdditionalIdx = problem().variables().index(*(additionalIsIt->outside()));
int AdditionalIdx = problem().variables().index(additionalIsIt->outside());
CellData& cellDataAdditional = problem().variables().cellData(AdditionalIdx);
potential[wPhaseIdx] += (pressI-temp1*densityW_mean) * additionalT[2]
+(pressJ-temp2*densityW_mean) * additionalT[0]
+(problem().pressureModel().pressure(AdditionalIdx)
-(additionalIsIt->outside()->geometry().center()*gravity_*densityW_mean)
-(additionalIsIt->outside().geometry().center()*gravity_*densityW_mean)
) * additionalT[1];
potential[nPhaseIdx] += (pressI+pcI-temp1*densityNW_mean) * additionalT[2]
+(pressJ+pcJ-temp2*densityNW_mean) * additionalT[0]
+(problem().pressureModel().pressure(AdditionalIdx)
+ cellDataAdditional.capillaryPressure()
-(additionalIsIt->outside()->geometry().center()*gravity_*densityNW_mean)
-(additionalIsIt->outside().geometry().center()*gravity_*densityNW_mean)
) * additionalT[1];
}
}
......@@ -465,19 +465,19 @@ void FV2dTransport2P2CAdaptive<TypeTag>::getMpfaFlux(Dune::FieldVector<Scalar, 2
// second half edge, if there is one
if(halfedgesStored == 2)
{
int AdditionalIdx = problem().variables().index(*(additionalIsIt->outside()));
int AdditionalIdx = problem().variables().index(additionalIsIt->outside());
CellData& cellDataAdditional = problem().variables().cellData(AdditionalIdx);
potential[wPhaseIdx] += (pressI-pcI-temp1*densityW_mean) * additionalT[2]
+(pressJ-pcJ-temp2*densityW_mean) * additionalT[0]
+(problem().pressureModel().pressure(AdditionalIdx)
- cellDataAdditional.capillaryPressure()
-(additionalIsIt->outside()->geometry().center()*gravity_*densityW_mean)
-(additionalIsIt->outside().geometry().center()*gravity_*densityW_mean)
) * additionalT[1];
potential[nPhaseIdx] += (pressI-temp1*densityNW_mean) * additionalT[2]
+(pressJ-temp2*densityNW_mean) * additionalT[0]
+(problem().pressureModel().pressure(AdditionalIdx)
-(additionalIsIt->outside()->geometry().center()*gravity_*densityNW_mean))
-(additionalIsIt->outside().geometry().center()*gravity_*densityNW_mean))
* additionalT[1];
}
}
......
......@@ -276,9 +276,9 @@ private:
// search through corners of large cell with isIt
int localIdxLarge = 0;
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
for(localIdxLarge = 0; localIdxLarge < is.inside()->subEntities(dim); ++localIdxLarge)
for(localIdxLarge = 0; localIdxLarge < is.inside().subEntities(dim); ++localIdxLarge)
#else
for(localIdxLarge = 0; localIdxLarge<is.inside()->template count<dim>(); ++localIdxLarge)
for(localIdxLarge = 0; localIdxLarge<is.inside().template count<dim>(); ++localIdxLarge)
#endif
{
auto vLarge = is.inside().template subEntity<dim>(localIdxLarge);
......@@ -287,7 +287,7 @@ private:
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
for(int verticeSmall = 0; verticeSmall<is.outside().subEntities(dim); ++verticeSmall)
#else
for(int verticeSmall = 0; verticeSmall<is.outside()->template count<dim>(); ++verticeSmall)
for(int verticeSmall = 0; verticeSmall<is.outside().template count<dim>(); ++verticeSmall)
#endif
{
auto vSmall = is.outside().template subEntity<dim>(verticeSmall);
......@@ -372,14 +372,14 @@ void FV3dPressure2P2CAdaptive<TypeTag>::initializeMatrixRowSize()
rowSize++;
// special treatment for hanging nodes in the mpfa case
if (enableMPFA && (eIt->level() < isIt->outside()->level()))
if (enableMPFA && (eIt->level() < isIt->outside().level()))
{
// each cell might have 4 hanging nodes with 4 irregular neighbors each
// get global ID of Interface from larger cell
int intersectionID = problem().grid().localIdSet().subId(*eIt,
isIt->indexInInside(), 1);
//index outside
int eIdxGlobalJ = problem().variables().index(*isIt->outside());
int eIdxGlobalJ = problem().variables().index(isIt->outside());
// add Entry of current neighbor cell to the IS seen from large cell
irregularCellMap_[intersectionID].push_back(eIdxGlobalJ);
......@@ -460,9 +460,9 @@ void FV3dPressure2P2CAdaptive<TypeTag>::initializeMatrixRowSize()
{
if (isItcheck->neighbor())
{
if(additionalIdx2==problem().variables().index(*isItcheck->outside()))
if(additionalIdx2==problem().variables().index(isItcheck->outside()))
additional2isNeighbor = true;
if(additionalIdx3 == problem().variables().index(*isItcheck->outside()))
if(additionalIdx3 == problem().variables().index(isItcheck->outside()))
additional3isNeighbor = true;
}
......@@ -520,9 +520,9 @@ void FV3dPressure2P2CAdaptive<TypeTag>::initializeMatrixRowSize()
{
if (isItcheck->neighbor())
{
if(additionalIdx2 == problem().variables().index(*isItcheck->outside()))
if(additionalIdx2 == problem().variables().index(isItcheck->outside()))
additional2isNeighbor = true;
if(additionalIdx3 == problem().variables().index(*isItcheck->outside()))
if(additionalIdx3 == problem().variables().index(isItcheck->outside()))
additional3isNeighbor = true;
}
}
......@@ -609,7 +609,7 @@ void FV3dPressure2P2CAdaptive<TypeTag>::initializeMatrixIndices()
this->A_.addindex(eIdxGlobalI, eIdxGlobalJ);
// special treatment for hanging nodes in the mpfa case
if (enableMPFA && (eIt->level() < isIt->outside()->level()))
if (enableMPFA && (eIt->level() < isIt->outside().level()))
{
// prepare stuff to enter transmissibility calculation
GlobalPosition globalPos3(0.);
......@@ -1358,7 +1358,7 @@ int FV3dPressure2P2CAdaptive<TypeTag>::computeTransmissibilities(const Intersect
// determine ID of intersection seen from larger cell
int intersectionID = 0;
if(isIt->inside()->level() < isIt->outside()->level())
if(isIt->inside().level() < isIt->outside().level())
intersectionID = problem().grid().localIdSet().subId(element,
isIt->indexInInside(), 1);
else
......@@ -1382,7 +1382,7 @@ int FV3dPressure2P2CAdaptive<TypeTag>::computeTransmissibilities(const Intersect
if(!(isIt2->neighbor()) || isIt2->outside() == element)
continue;
int currentNeighbor = problem().variables().index(*isIt2->outside());
int currentNeighbor = problem().variables().index(isIt2->outside());
// have we found face24?
if (find(localIrregularCells.begin(), localIrregularCells.end(),
......@@ -1408,15 +1408,15 @@ int FV3dPressure2P2CAdaptive<TypeTag>::computeTransmissibilities(const Intersect
}
// get information of cell4
globalPos4 = face24->outside()->geometry().center();
eIdxGlobal4 = problem().variables().index(*(face24->outside()));
globalPos4 = face24->outside().geometry().center();
eIdxGlobal4 = problem().variables().index(face24->outside());
GlobalPosition outerNormaln24 = face24->centerUnitOuterNormal();
// get absolute permeability of neighbor cell 3
DimMatrix K4(problem().spatialParams().intrinsicPermeability(*(face24->outside())));
// get information of cell6
globalPos6 = face26->outside()->geometry().center();
eIdxGlobal6 = problem().variables().index(*(face26->outside()));
globalPos6 = face26->outside().geometry().center();
eIdxGlobal6 = problem().variables().index(face26->outside());
GlobalPosition outerNormaln26 = face26->centerUnitOuterNormal();
// get absolute permeability of neighbor cell 3
DimMatrix K6(problem().spatialParams().intrinsicPermeability(*(face26->outside())));
......@@ -1725,7 +1725,7 @@ int FV3dPressure2P2CAdaptive<TypeTag>::computeTransmissibilities(const Intersect
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
for(int verticeSmall = 0; verticeSmall < isIt->outside().subEntities(dim); ++verticeSmall)
#else
for(int verticeSmall = 0; verticeSmall<isIt->outside()->template count<dim>(); ++verticeSmall)
for(int verticeSmall = 0; verticeSmall<isIt->outside().template count<dim>(); ++verticeSmall)
#endif
{
auto vSmall = isIt->outside().template subEntity<dim>(verticeSmall);
......@@ -2020,8 +2020,8 @@ int FV3dPressure2P2CAdaptive<TypeTag>::transmissibilityAdapter_(const Intersecti
case 4:{
if (hangingNodeType == InteractionVolume::fourSmallCellsEdge) // should never happen, cause TPFA should be applied
{
assert(problem().variables().index(*(interactionVolume.getSubVolumeElement(4)))
!= problem().variables().index(*(interactionVolume.getSubVolumeElement(5)))); // else there would not be a subVolFaceIdx 4
assert(problem().variables().index(interactionVolume.getSubVolumeElement(4))
!= problem().variables().index(interactionVolume.getSubVolumeElement(5))); // else there would not be a subVolFaceIdx 4
Dune::dgrave << " SubVolumeFace4 in hanging node type 3 should be modelled by"
<< " Tpfa!!" <<std::endl; // TODO: or use 1,5,3,4 and case 4
return -1;
......@@ -2058,8 +2058,8 @@ int FV3dPressure2P2CAdaptive<TypeTag>::transmissibilityAdapter_(const Intersecti
case 5:{
if (hangingNodeType == InteractionVolume::fourSmallCellsEdge)
{
assert (problem().variables().index(*(interactionVolume.getSubVolumeElement(4)))
!= problem().variables().index(*(interactionVolume.getSubVolumeElement(6)))); // else there would not be a subVolFaceIdx 5
assert (problem().variables().index(interactionVolume.getSubVolumeElement(4))
!= problem().variables().index(interactionVolume.getSubVolumeElement(6))); // else there would not be a subVolFaceIdx 5
Dune::dgrave << " SubVolumeFace5 in hanging node type 3 should be modelled by"
<< " Tpfa!!" <<std::endl; // TODO: or use 1,5,7,0 and case 3
return -1;
......@@ -2119,8 +2119,8 @@ int FV3dPressure2P2CAdaptive<TypeTag>::transmissibilityAdapter_(const Intersecti
case 6:{
if (hangingNodeType == InteractionVolume::fourSmallCellsEdge)
{
assert (problem().variables().index(*(interactionVolume.getSubVolumeElement(4)))
!= problem().variables().index(*(interactionVolume.getSubVolumeElement(5)))); // else there would not be a subVolFaceIdx 4
assert (problem().variables().index(interactionVolume.getSubVolumeElement(4))
!= problem().variables().index(interactionVolume.getSubVolumeElement(5))); // else there would not be a subVolFaceIdx 4
Dune::dgrave << " SubVolumeFace6 in hanging node type 3 should be modelled by"
<< " Tpfa!!" <<std::endl; // TODO: or use 2,6,0,7 and case 4
return -1;
......@@ -2162,8 +2162,8 @@ int FV3dPressure2P2CAdaptive<TypeTag>::transmissibilityAdapter_(const Intersecti
{
if (hangingNodeType == InteractionVolume::fourSmallCellsEdge)
{
assert (problem().variables().index(*(interactionVolume.getSubVolumeElement(4)))
!= problem().variables().index(*(interactionVolume.getSubVolumeElement(6)))); // else there would not be a subVolFaceIdx 5
assert (problem().variables().index(interactionVolume.getSubVolumeElement(4))
!= problem().variables().index(interactionVolume.getSubVolumeElement(6))); // else there would not be a subVolFaceIdx 5
Dune::dgrave << " SubVolumeFace5 in hanging node type 3 should be modelled by"
<< " Tpfa!!" <<std::endl; // TODO: or use 4,0,6,1 and case 4
return -1;
......@@ -2234,8 +2234,8 @@ int FV3dPressure2P2CAdaptive<TypeTag>::transmissibilityAdapter_(const Intersecti
}
else if (hangingNodeType == InteractionVolume::fourSmallCellsDiag
|| (hangingNodeType == InteractionVolume::fourSmallCellsEdge
&& (problem().variables().index(*(interactionVolume.getSubVolumeElement(4)))
!= problem().variables().index(*(interactionVolume.getSubVolumeElement(6))))) )
&& (problem().variables().index(interactionVolume.getSubVolumeElement(4))
!= problem().variables().index(interactionVolume.getSubVolumeElement(6)))) )
{
useCases[0] = false;
useCases[1] = true;
......@@ -2298,8 +2298,8 @@ int FV3dPressure2P2CAdaptive<TypeTag>::transmissibilityAdapter_(const Intersecti
}
else if (hangingNodeType == InteractionVolume::fourSmallCellsDiag
|| (hangingNodeType == InteractionVolume::fourSmallCellsEdge
&&(problem().variables().index(*(interactionVolume.getSubVolumeElement(4)))
!= problem().variables().index(*(interactionVolume.getSubVolumeElement(6)))) ))
&&(problem().variables().index(interactionVolume.getSubVolumeElement(4))
!= problem().variables().index(interactionVolume.getSubVolumeElement(6))) ))
{
useCases[0] = true;
useCases[1] = false;
......@@ -2310,8 +2310,8 @@ int FV3dPressure2P2CAdaptive<TypeTag>::transmissibilityAdapter_(const Intersecti
lambda, 1, 5, 3, 7, 0, 4, useCases);
}
else if (hangingNodeType == InteractionVolume::fourSmallCellsEdge
&&(problem().variables().index(*(interactionVolume.getSubVolumeElement(4)))
!= problem().variables().index(*(interactionVolume.getSubVolumeElement(5)))) )
&&(problem().variables().index(interactionVolume.getSubVolumeElement(4))
!= problem().variables().index(interactionVolume.getSubVolumeElement(5))) )
{
useCases[0] = true;
useCases[1] = false;
......@@ -2359,8 +2359,8 @@ int FV3dPressure2P2CAdaptive<TypeTag>::transmissibilityAdapter_(const Intersecti
caseL = mpfal3DTransmissibilityCalculator_.transmissibilityCaseTwo(T, interactionVolume,
lambda, 7, 3, 1, 2);
else if ((hangingNodeType == InteractionVolume::fourSmallCellsEdge
&&(problem().variables().index(*(interactionVolume.getSubVolumeElement(4)))
!= problem().variables().index(*(interactionVolume.getSubVolumeElement(6)))) )
&&(problem().variables().index(interactionVolume.getSubVolumeElement(4))
!= problem().variables().index(interactionVolume.getSubVolumeElement(6))) )
|| hangingNodeType == InteractionVolume::sixSmallCells)
{
useCases[0] = false;
......@@ -2433,8 +2433,8 @@ int FV3dPressure2P2CAdaptive<TypeTag>::transmissibilityAdapter_(const Intersecti
caseL = mpfal3DTransmissibilityCalculator_.transmissibilityCaseOne(T, interactionVolume,
lambda, 2, 6, 0, 3);
else if ((hangingNodeType == InteractionVolume::fourSmallCellsEdge
&& (problem().variables().index(*(interactionVolume.getSubVolumeElement(4)))
!= problem().variables().index(*(interactionVolume.getSubVolumeElement(6)))))
&& (problem().variables().index(interactionVolume.getSubVolumeElement(4))
!= problem().variables().index(interactionVolume.getSubVolumeElement(6))))
|| hangingNodeType == InteractionVolume::sixSmallCells)
{
useCases[0] = true;
......@@ -2446,8 +2446,8 @@ int FV3dPressure2P2CAdaptive<TypeTag>::transmissibilityAdapter_(const Intersecti
lambda, 2, 6, 0, 4, 3, 7, useCases);
}
else if (hangingNodeType == InteractionVolume::fourSmallCellsEdge
&& (problem().variables().index(*(interactionVolume.getSubVolumeElement(4)))
!= problem().variables().index(*(interactionVolume.getSubVolumeElement(5)))) )
&& (problem().variables().index(interactionVolume.getSubVolumeElement(4))
!= problem().variables().index(interactionVolume.getSubVolumeElement(5))) )
{
useCases[0] = true;
useCases[1] = false;
......
......@@ -223,7 +223,7 @@ void FV3dTransport2P2CAdaptive<TypeTag>::update(const Scalar t, Scalar& dt,
// handle interior face
if (isIt->neighbor())
{
if (enableMPFA && isIt->outside()->level() != eIt->level())
if (enableMPFA && isIt->outside().level() != eIt->level())
getMpfaFlux(entries, timestepFlux, isIt, cellDataI);
else
this->getFlux(entries, timestepFlux, *isIt, cellDataI);
......
......@@ -407,8 +407,8 @@ inline int FvMpfaL3d2P2CInteractionVolumeContainerAdaptive<TypeTag>::getMpfaCase
}
Dune::dgrave << " Could not find "<< interactionVolume.getHangingNodeType() <<" case configuration for I = "
<< problem_.variables().index(*isIt->inside()) << " localIdx " << mapI << " , "
<< problem_.variables().index(*isIt->outside()) << " localIdx " << mapJ << std::endl;
<< problem_.variables().index(isIt->inside()) << " localIdx " << mapI << " , "
<< problem_.variables().index(isIt->outside()) << " localIdx " << mapJ << std::endl;
return -1;
}
......@@ -554,8 +554,8 @@ inline int FvMpfaL3d2P2CInteractionVolumeContainerAdaptive<TypeTag>::getMpfaCase
}
Dune::dgrave << " Could not find "<< interactionVolume.getHangingNodeType() <<" case configuration for I = "
<< problem_.variables().index(*isIt->inside()) << " localIdx " << mapI << " and "
<< problem_.variables().index(*isIt->outside()) << " localIdx " << mapJ << std::endl;
<< problem_.variables().index(isIt->inside()) << " localIdx " << mapI << " and "
<< problem_.variables().index(isIt->outside()) << " localIdx " << mapJ << std::endl;
return -1;
}
......
......@@ -294,7 +294,7 @@ void FVPressure2P2CMultiPhysics<TypeTag>::assemble(bool first)
/************* handle interior face *****************/
if (isIt->neighbor())
{
int eIdxGlobalJ = problem().variables().index(*(isIt->outside()));
int eIdxGlobalJ = problem().variables().index(isIt->outside());
if (cellDataI.subdomain() != 2
or problem().variables().cellData(eIdxGlobalJ).subdomain() != 2) // cell in the 1p domain
......@@ -815,7 +815,7 @@ void FVPressure2P2CMultiPhysics<TypeTag>::updateMaterialLaws(bool postTimeStep)
{
if (isIt->neighbor())
{
int eIdxGlobalJ = problem().variables().index(*(isIt->outside()));
int eIdxGlobalJ = problem().variables().index(isIt->outside());
// mark neighbor Element
nextSubdomain[eIdxGlobalJ] = 2;
}
......
......@@ -178,7 +178,7 @@ public:
IdType intersectionID = grid_.localIdSet().subId(
*irregularIs.inside(), irregularIs.indexInInside(), 1);
// mapping is only unique from smaller cell (if *inside and not *outside)
if (irregularIs.inside()->level() < irregularIs.outside()->level())
if (irregularIs.inside().level() < irregularIs.outside().level())
{
// IS is regarded from larger cell: get the unique number as seen from smaller
intersectionID = grid_.localIdSet().subId(
......@@ -220,16 +220,16 @@ public:
const int& globalIdx3)
{
IdType intersectionID
= grid_.localIdSet().subId(*irregularIs.inside(),
irregularIs.indexInInside(), 1);
= grid_.localIdSet().subId(irregularIs.inside(),
irregularIs.indexInInside(), 1);
// mapping is only unique from smaller cell (if *inside and not *outside)
if (irregularIs.inside()->level() < irregularIs.outside()->level())
if (irregularIs.inside().level() < irregularIs.outside().level())
{
// IS is regarded from larger cell: get the unique number as seen from smaller
intersectionID
= grid_.localIdSet().subId(*irregularIs.outside(),
irregularIs.indexInOutside(), 1);
= grid_.localIdSet().subId(irregularIs.outside(),
irregularIs.indexInOutside(), 1);
// store as if it was seen from smaller: change i & j
irregularInterfaceMap_[intersectionID].T1_[first][2] = - T1[0];
......@@ -282,16 +282,16 @@ public:
const int offset = subFaceIdx * 2;
IdType intersectionID
= grid_.localIdSet().subId(*irregularIs.inside(),
irregularIs.indexInInside(), 1);
= grid_.localIdSet().subId(irregularIs.inside(),
irregularIs.indexInInside(), 1);
// mapping is only unique from smaller cell (if *inside and not *outside)
if (irregularIs.inside()->level() < irregularIs.outside()->level())
if (irregularIs.inside().level() < irregularIs.outside().level())
{
// IS is regarded from larger cell: get the unique ID as seen from smaller
intersectionID
= grid_.localIdSet().subId(*irregularIs.outside(),
irregularIs.indexInOutside(), 1);
= grid_.localIdSet().subId(irregularIs.outside(),
irregularIs.indexInOutside(), 1);
// store as if it was seen from smaller: change i & j
irregularInterfaceMap_[intersectionID].T1_[subFaceIdx][0] = -T1[1];
......@@ -331,16 +331,16 @@ public:
Scalar weight, int subFaceIdx = -1)
{
IdType intersectionID
= grid_.localIdSet().subId(*irregularIs.inside(),
irregularIs.indexInInside(), 1);
= grid_.localIdSet().subId(irregularIs.inside(),
irregularIs.indexInInside(), 1);
// mapping is only unique from smaller cell (if *inside and not *outside)
if (irregularIs.inside()->level() < irregularIs.outside()->level())
if (irregularIs.inside().level() < irregularIs.outside().level())
{
// IS is regarded from larger cell: get the unique ID as seen from smaller
intersectionID
= grid_.localIdSet().subId(*irregularIs.outside(),
irregularIs.indexInOutside(), 1);
= grid_.localIdSet().subId(irregularIs.outside(),
irregularIs.indexInOutside(), 1);
}
// for subFaceIdx == -1, we weight all subfaces equally
......@@ -375,15 +375,15 @@ public:
int& globalIdx3)
{
IdType intersectionID
= grid_.localIdSet().subId(*irregularIs.inside(),
irregularIs.indexInInside(), 1);
= grid_.localIdSet().subId(irregularIs.inside(),
irregularIs.indexInInside(), 1);
// mapping is only unique from smaller cell (if *inside and not *outside)
if (irregularIs.