Commit e6e1dce5 authored by Johannes Hommel's avatar Johannes Hommel
Browse files

[naming] Replaced globalIdx by mainly dofIdxGlobal or less often by

eIdxGlobal or vIdxGlobal when appropriate as decided on the DUMUX day
25.11.2014
Revied by Bernd 


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@13843 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 85876427
......@@ -121,12 +121,12 @@ public:
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->dofMapper().map(*eIt, scvIdx, dofCodim);
int dofIdxGlobal = this->dofMapper().map(*eIt, scvIdx, dofCodim);
const SpatialParams &spatialParams = this->problem_().spatialParams();
(*p)[globalIdx] = elemVolVars[scvIdx].pressure();
(*K)[globalIdx] = spatialParams.intrinsicPermeability(*eIt,
(*p)[dofIdxGlobal] = elemVolVars[scvIdx].pressure();
(*K)[dofIdxGlobal] = spatialParams.intrinsicPermeability(*eIt,
fvGeometry,
scvIdx);
}
......
......@@ -151,16 +151,16 @@ public:
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->dofMapper().map(*eIt, scvIdx, dofCodim);
pressure[globalIdx] = elemVolVars[scvIdx].pressure();
delp[globalIdx] = elemVolVars[scvIdx].pressure() - 1e5;
moleFraction0[globalIdx] = elemVolVars[scvIdx].moleFraction(0);
moleFraction1[globalIdx] = elemVolVars[scvIdx].moleFraction(1);
massFraction0[globalIdx] = elemVolVars[scvIdx].massFraction(0);
massFraction1[globalIdx] = elemVolVars[scvIdx].massFraction(1);
rho[globalIdx] = elemVolVars[scvIdx].density();
mu[globalIdx] = elemVolVars[scvIdx].viscosity();
int dofIdxGlobal = this->dofMapper().map(*eIt, scvIdx, dofCodim);
pressure[dofIdxGlobal] = elemVolVars[scvIdx].pressure();
delp[dofIdxGlobal] = elemVolVars[scvIdx].pressure() - 1e5;
moleFraction0[dofIdxGlobal] = elemVolVars[scvIdx].moleFraction(0);
moleFraction1[dofIdxGlobal] = elemVolVars[scvIdx].moleFraction(1);
massFraction0[dofIdxGlobal] = elemVolVars[scvIdx].massFraction(0);
massFraction1[dofIdxGlobal] = elemVolVars[scvIdx].massFraction(1);
rho[dofIdxGlobal] = elemVolVars[scvIdx].density();
mu[dofIdxGlobal] = elemVolVars[scvIdx].viscosity();
}
// velocity output
......
......@@ -160,19 +160,19 @@ public:
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->dofMapper().map(*eIt, scvIdx, dofCodim);
(*pw)[globalIdx] = elemVolVars[scvIdx].pressure(wPhaseIdx);
(*pn)[globalIdx] = elemVolVars[scvIdx].pressure(nPhaseIdx);
(*pc)[globalIdx] = elemVolVars[scvIdx].capillaryPressure();
(*sw)[globalIdx] = elemVolVars[scvIdx].saturation(wPhaseIdx);
(*sn)[globalIdx] = elemVolVars[scvIdx].saturation(nPhaseIdx);
(*rhoW)[globalIdx] = elemVolVars[scvIdx].density(wPhaseIdx);
(*rhoN)[globalIdx] = elemVolVars[scvIdx].density(nPhaseIdx);
(*mobW)[globalIdx] = elemVolVars[scvIdx].mobility(wPhaseIdx);
(*mobN)[globalIdx] = elemVolVars[scvIdx].mobility(nPhaseIdx);
(*poro)[globalIdx] = elemVolVars[scvIdx].porosity();
(*Te)[globalIdx] = elemVolVars[scvIdx].temperature();
int dofIdxGlobal = this->dofMapper().map(*eIt, scvIdx, dofCodim);
(*pw)[dofIdxGlobal] = elemVolVars[scvIdx].pressure(wPhaseIdx);
(*pn)[dofIdxGlobal] = elemVolVars[scvIdx].pressure(nPhaseIdx);
(*pc)[dofIdxGlobal] = elemVolVars[scvIdx].capillaryPressure();
(*sw)[dofIdxGlobal] = elemVolVars[scvIdx].saturation(wPhaseIdx);
(*sn)[dofIdxGlobal] = elemVolVars[scvIdx].saturation(nPhaseIdx);
(*rhoW)[dofIdxGlobal] = elemVolVars[scvIdx].density(wPhaseIdx);
(*rhoN)[dofIdxGlobal] = elemVolVars[scvIdx].density(nPhaseIdx);
(*mobW)[dofIdxGlobal] = elemVolVars[scvIdx].mobility(wPhaseIdx);
(*mobN)[dofIdxGlobal] = elemVolVars[scvIdx].mobility(nPhaseIdx);
(*poro)[dofIdxGlobal] = elemVolVars[scvIdx].porosity();
(*Te)[dofIdxGlobal] = elemVolVars[scvIdx].temperature();
}
// velocity output
......
......@@ -179,9 +179,9 @@ public:
fvGeometry, scvIdx);
fluidState.setTemperature(t);
int globalIdx = problem.model().dofMapper().map(element, scvIdx, dofCodim);
int dofIdxGlobal = problem.model().dofMapper().map(element, scvIdx, dofCodim);
int phasePresence = problem.model().phasePresence(globalIdx, isOldSol);
int phasePresence = problem.model().phasePresence(dofIdxGlobal, isOldSol);
/////////////
// set the saturations
......
......@@ -157,17 +157,17 @@ public:
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->dofMapper().map(*eIt, scvIdx, dofCodim);
int dofIdxGlobal = this->dofMapper().map(*eIt, scvIdx, dofCodim);
for (int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) {
(*saturation[phaseIdx])[globalIdx] = elemVolVars[scvIdx].saturation(phaseIdx);
(*pressure[phaseIdx])[globalIdx] = elemVolVars[scvIdx].pressure(phaseIdx);
(*density[phaseIdx])[globalIdx] = elemVolVars[scvIdx].density(phaseIdx);
(*saturation[phaseIdx])[dofIdxGlobal] = elemVolVars[scvIdx].saturation(phaseIdx);
(*pressure[phaseIdx])[dofIdxGlobal] = elemVolVars[scvIdx].pressure(phaseIdx);
(*density[phaseIdx])[dofIdxGlobal] = elemVolVars[scvIdx].density(phaseIdx);
}
(*poro)[globalIdx] = elemVolVars[scvIdx].porosity();
(*perm)[globalIdx] = elemVolVars[scvIdx].permeability();
(*temperature)[globalIdx] = elemVolVars[scvIdx].temperature();
(*poro)[dofIdxGlobal] = elemVolVars[scvIdx].porosity();
(*perm)[dofIdxGlobal] = elemVolVars[scvIdx].permeability();
(*temperature)[dofIdxGlobal] = elemVolVars[scvIdx].temperature();
}
// velocity output
......
......@@ -125,9 +125,9 @@ public:
const MaterialLawParams &materialParams =
problem.spatialParams().materialLawParams(element, fvGeometry, scvIdx);
int globalIdx = problem.model().dofMapper().map(element, scvIdx, dofCodim);
int dofIdxGlobal = problem.model().dofMapper().map(element, scvIdx, dofCodim);
int phasePresence = problem.model().phasePresence(globalIdx, isOldSol);
int phasePresence = problem.model().phasePresence(dofIdxGlobal, isOldSol);
Scalar temp = Implementation::temperature_(priVars, problem, element, fvGeometry, scvIdx);
fluidState_.setTemperature(temp);
......
......@@ -113,13 +113,13 @@ public:
fvGeometry.update(this->gridView_(), *eIt);
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->dofMapper().map(*eIt, scvIdx, dofCodim);
int dofIdxGlobal = this->dofMapper().map(*eIt, scvIdx, dofCodim);
if (ParentType::staticDat_[globalIdx].visited)
if (ParentType::staticDat_[dofIdxGlobal].visited)
continue;
ParentType::staticDat_[globalIdx].visited = true;
volVars.update(curGlobalSol[globalIdx],
ParentType::staticDat_[dofIdxGlobal].visited = true;
volVars.update(curGlobalSol[dofIdxGlobal],
this->problem_(),
*eIt,
fvGeometry,
......@@ -128,10 +128,10 @@ public:
const GlobalPosition &globalPos = eIt->geometry().corner(scvIdx);
if (primaryVarSwitch_(curGlobalSol,
volVars,
globalIdx,
dofIdxGlobal,
globalPos))
{
this->jacobianAssembler().markDofRed(globalIdx);
this->jacobianAssembler().markDofRed(dofIdxGlobal);
wasSwitched = true;
}
}
......@@ -154,13 +154,13 @@ public:
* variable switch was performed.
*/
bool primaryVarSwitch_(SolutionVector &globalSol,
const VolumeVariables &volVars, int globalIdx,
const VolumeVariables &volVars, int dofIdxGlobal,
const GlobalPosition &globalPos)
{
typename FluidSystem::ParameterCache paramCache;
// evaluate primary variable switch
bool wouldSwitch = false;
int phasePresence = ParentType::staticDat_[globalIdx].phasePresence;
int phasePresence = ParentType::staticDat_[dofIdxGlobal].phasePresence;
int newPhasePresence = phasePresence;
// check if a primary var switch is necessary
......@@ -173,21 +173,21 @@ public:
if(xnw > xnwMax)
wouldSwitch = true;
if (ParentType::staticDat_[globalIdx].wasSwitched)
if (ParentType::staticDat_[dofIdxGlobal].wasSwitched)
xnwMax *= 1.02;
//If mole fraction is higher than the equilibrium mole fraction make a phase switch
if(xnw > xnwMax)
{
// wetting phase appears
std::cout << "wetting phase appears at vertex " << globalIdx
std::cout << "wetting phase appears at vertex " << dofIdxGlobal
<< ", coordinates: " << globalPos << ", xnw > xnwMax: "
<< xnw << " > "<< xnwMax << std::endl;
newPhasePresence = bothPhases;
if (formulation == pnsw)
globalSol[globalIdx][switchIdx] = 0.0;
globalSol[dofIdxGlobal][switchIdx] = 0.0;
else if (formulation == pwsn)
globalSol[globalIdx][switchIdx] = 1.0;
globalSol[dofIdxGlobal][switchIdx] = 1.0;
}
}
else if (phasePresence == wPhaseOnly)
......@@ -199,47 +199,47 @@ public:
//If mole fraction is higher than the equilibrium mole fraction make a phase switch
if(xwn > xwnMax)
wouldSwitch = true;
if (ParentType::staticDat_[globalIdx].wasSwitched)
if (ParentType::staticDat_[dofIdxGlobal].wasSwitched)
xwnMax *= 1.02;
if(xwn > xwnMax)
{
// non-wetting phase appears
std::cout << "non-wetting phase appears at vertex " << globalIdx
std::cout << "non-wetting phase appears at vertex " << dofIdxGlobal
<< ", coordinates: " << globalPos << ", xwn > xwnMax: "
<< xwn << " > "<< xwnMax << std::endl;
newPhasePresence = bothPhases;
if (formulation == pnsw)
globalSol[globalIdx][switchIdx] = 0.999;
globalSol[dofIdxGlobal][switchIdx] = 0.999;
else if (formulation == pwsn)
globalSol[globalIdx][switchIdx] = 0.001;
globalSol[dofIdxGlobal][switchIdx] = 0.001;
}
}
else if (phasePresence == bothPhases)
{
Scalar Smin = 0.0;
if (ParentType::staticDat_[globalIdx].wasSwitched)
if (ParentType::staticDat_[dofIdxGlobal].wasSwitched)
Smin = -0.01;
if (volVars.saturation(nPhaseIdx) <= Smin)
{
wouldSwitch = true;
// nonwetting phase disappears
std::cout << "Nonwetting phase disappears at vertex " << globalIdx
std::cout << "Nonwetting phase disappears at vertex " << dofIdxGlobal
<< ", coordinates: " << globalPos << ", sn: "
<< volVars.saturation(nPhaseIdx) << std::endl;
newPhasePresence = wPhaseOnly;
if(!useMoles) //mass-fraction formulation
{
globalSol[globalIdx][switchIdx]
globalSol[dofIdxGlobal][switchIdx]
= volVars.massFraction(wPhaseIdx, nCompIdx);
}
else //mole-fraction formulation
{
globalSol[globalIdx][switchIdx]
globalSol[dofIdxGlobal][switchIdx]
= volVars.moleFraction(wPhaseIdx, nCompIdx);
}
}
......@@ -247,26 +247,26 @@ public:
{
wouldSwitch = true;
// wetting phase disappears
std::cout << "Wetting phase disappears at vertex " << globalIdx
std::cout << "Wetting phase disappears at vertex " << dofIdxGlobal
<< ", coordinates: " << globalPos << ", sw: "
<< volVars.saturation(wPhaseIdx) << std::endl;
newPhasePresence = nPhaseOnly;
if(!useMoles) //mass-fraction formulation
{
globalSol[globalIdx][switchIdx]
globalSol[dofIdxGlobal][switchIdx]
= volVars.massFraction(nPhaseIdx, wCompIdx);
}
else //mole-fraction formulation
{
globalSol[globalIdx][switchIdx]
globalSol[dofIdxGlobal][switchIdx]
= volVars.moleFraction(nPhaseIdx, wCompIdx);
}
}
}
ParentType::staticDat_[globalIdx].phasePresence = newPhasePresence;
ParentType::staticDat_[globalIdx].wasSwitched = wouldSwitch;
ParentType::staticDat_[dofIdxGlobal].phasePresence = newPhasePresence;
ParentType::staticDat_[dofIdxGlobal].wasSwitched = wouldSwitch;
return phasePresence != newPhasePresence;
}
......
......@@ -119,9 +119,9 @@ public:
scvIdx,
isOldSol);
int globalIdx = problem.model().dofMapper().map(element, scvIdx, dofCodim);
int dofIdxGlobal = problem.model().dofMapper().map(element, scvIdx, dofCodim);
int phasePresence = problem.model().phasePresence(globalIdx, isOldSol);
int phasePresence = problem.model().phasePresence(dofIdxGlobal, isOldSol);
Scalar temp = Implementation::temperature_(priVars, problem, element, fvGeometry, scvIdx);
ParentType::fluidState_.setTemperature(temp);
......@@ -371,8 +371,8 @@ public:
Valgrind::CheckDefined(ParentType::porosity_);
// if(phasePresence == bothPhases)
// {
// std::cout<<"globalIdx = "<<globalIdx<<std::endl;
// std::cout<<"scvIdx = "<<globalIdx<<std::endl;
// std::cout<<"dofIdxGlobal = "<<dofIdxGlobal<<std::endl;
// std::cout<<"scvIdx = "<<scvIdx<<std::endl;
// std::cout<<"sn = "<<ParentType::fluidState_.saturation(nPhaseIdx)<<std::endl;
// std::cout<<"sw = "<<ParentType::fluidState_.saturation(wPhaseIdx)<<std::endl;
// std::cout<<"mobilityN = "<<ParentType::mobility(nPhaseIdx)<<std::endl;
......
......@@ -294,17 +294,17 @@ public:
* \brief Force to reassemble a given degree of freedom
* next time the assemble() method is called.
*
* \param globalIdx The global index of the degree of freedom
* \param dofIdxGlobal The global index of the degree of freedom
*/
void markDofRed(const int globalIdx)
void markDofRed(const int dofIdxGlobal)
{
if (!enablePartialReassemble_())
return;
if (isBox)
vertexColor_[globalIdx] = Red;
vertexColor_[dofIdxGlobal] = Red;
else
elementColor_[globalIdx] = Red;
elementColor_[dofIdxGlobal] = Red;
}
/*!
......@@ -333,8 +333,8 @@ public:
if (!enablePartialReassemble_())
return Red; // reassemble unconditionally!
int globalIdx = vertexMapper_().map(element, vIdx, dim);
return vertexColor_[globalIdx];
int vIdxGlobal = vertexMapper_().map(element, vIdx, dim);
return vertexColor_[vIdxGlobal];
}
/*!
......@@ -359,8 +359,8 @@ public:
if (!enablePartialReassemble_())
return Red; // reassemble unconditionally!
int globalIdx = elementMapper_().map(element);
return elementColor_[globalIdx];
int eIdxGlobal = elementMapper_().map(element);
return elementColor_[eIdxGlobal];
}
/*!
......
......@@ -398,21 +398,21 @@ protected:
const int col,
const int pvIdx)
{
int globalIdx;
int dofIdxGlobal;
FVElementGeometry neighborFVGeom;
ElementPointer neighbor(element_());
if (isBox)
{
globalIdx = vertexMapper_().map(element_(), col, dim);
dofIdxGlobal = vertexMapper_().map(element_(), col, dim);
}
else
{
neighbor = fvElemGeom_.neighbors[col];
neighborFVGeom.updateInner(*neighbor);
globalIdx = problemPtr_->elementMapper().map(*neighbor);
dofIdxGlobal = problemPtr_->elementMapper().map(*neighbor);
}
PrimaryVariables priVars(model_().curSol()[globalIdx]);
PrimaryVariables priVars(model_().curSol()[dofIdxGlobal]);
VolumeVariables origVolVars(curVolVars_[col]);
curVolVars_[col].setEvalPoint(&origVolVars);
......
......@@ -98,9 +98,9 @@ public:
// transform vertex velocities from local to global coordinates
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = problem_.vertexMapper().map(*eIt, scvIdx, dofCodim);
int vIdxGlobal = problem_.vertexMapper().map(*eIt, scvIdx, dofCodim);
cellNum_[globalIdx] += 1;
cellNum_[vIdxGlobal] += 1;
}
}
}
......@@ -178,14 +178,14 @@ public:
// transform vertex velocities from local to global coordinates
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = problem_.vertexMapper().map(element, scvIdx, dofCodim);
int vIdxGlobal = problem_.vertexMapper().map(element, scvIdx, dofCodim);
// calculate the subcontrolvolume velocity by the Piola transformation
Dune::FieldVector<CoordScalar, dim> scvVelocity(0);
jacobianT2.mtv(scvVelocities[scvIdx], scvVelocity);
scvVelocity /= element.geometry().integrationElement(localPos)*cellNum_[globalIdx];
scvVelocity /= element.geometry().integrationElement(localPos)*cellNum_[vIdxGlobal];
// add up the wetting phase subcontrolvolume velocities for each vertex
velocity[globalIdx] += scvVelocity;
velocity[vIdxGlobal] += scvVelocity;
}
}
else
......@@ -234,9 +234,9 @@ public:
scvVelocity /= element.geometry().integrationElement(localPos);
int globalIdx = problem_.elementMapper().map(element);
int eIdxGlobal = problem_.elementMapper().map(element);
velocity[globalIdx]= scvVelocity;
velocity[eIdxGlobal]= scvVelocity;
}
} // velocity output
}
......
......@@ -96,11 +96,11 @@ public:
const ElementBoundaryTypes &elemBcTypes)
{
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx) {
const unsigned int globalIdx = this->problem_.model().dofMapper().map(element, scvIdx, dofCodim);
const unsigned int dofIdxGlobal = this->problem_.model().dofMapper().map(element, scvIdx, dofCodim);
const VolumeVariables &volVars = elemVolVars[scvIdx];
if (temperatureOutput_)
temperature_[globalIdx] = volVars.fluidState().temperature(/*phaseIdx=*/0);
temperature_[dofIdxGlobal] = volVars.fluidState().temperature(/*phaseIdx=*/0);
}
}
......
......@@ -94,12 +94,12 @@ public:
const ElementBoundaryTypes &elemBcTypes)
{
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx) {
const unsigned int globalIdx = this->problem_.model().dofMapper().map(element, scvIdx, dofCodim);
const unsigned int dofIdxGlobal = this->problem_.model().dofMapper().map(element, scvIdx, dofCodim);
const VolumeVariables &volVars = elemVolVars[scvIdx];
if (fugacityOutput_) {
for (int compIdx = 0; compIdx < numComponents; ++compIdx) {
fugacity_[compIdx][globalIdx] = volVars.fluidState().fugacity(compIdx);
fugacity_[compIdx][dofIdxGlobal] = volVars.fluidState().fugacity(compIdx);
}
}
}
......
......@@ -319,22 +319,22 @@ public:
* \brief Access to the averaged (magnitude of) velocity for each vertex.
*
* \param phaseIdx The index of the fluid phase
* \param globalIdx The global index of the degree of freedom
* \param dofIdxGlobal The global index of the degree of freedom
*
*/
const Scalar volumeDarcyMagVelocity(const unsigned int phaseIdx,
const unsigned int globalIdx) const
{ return volumeDarcyMagVelocity_[phaseIdx][globalIdx]; }
const unsigned int dofIdxGlobal) const
{ return volumeDarcyMagVelocity_[phaseIdx][dofIdxGlobal]; }
/*!
* \brief Access to the averaged velocity for each vertex.
*
* \param phaseIdx The index of the fluid phase
* \param globalIdx The global index of the degree of freedom
* \param dofIdxGlobal The global index of the degree of freedom
*/
const GlobalPosition volumeDarcyVelocity(const unsigned int phaseIdx,
const unsigned int globalIdx) const
{ return volumeDarcyVelocity_[phaseIdx][globalIdx]; }
const unsigned int dofIdxGlobal) const
{ return volumeDarcyVelocity_[phaseIdx][dofIdxGlobal]; }
private:
PhaseGlobalPositionField volumeDarcyVelocity_;
......
......@@ -130,14 +130,14 @@ public:
{
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->problem_.model().dofMapper().map(element, scvIdx, dofCodim);
int dofIdxGlobal = this->problem_.model().dofMapper().map(element, scvIdx, dofCodim);
const VolumeVariables &volVars = elemVolVars[scvIdx];
if (porosityOutput_) porosity_[globalIdx] = volVars.porosity();
if (porosityOutput_) porosity_[dofIdxGlobal] = volVars.porosity();
// works for scalar permeability in spatialparameters
if (permeabilityOutput_) permeability_[globalIdx] = this->problem_.spatialParams().intrinsicPermeability(element,fvGeometry,scvIdx);
if (permeabilityOutput_) permeability_[dofIdxGlobal] = this->problem_.spatialParams().intrinsicPermeability(element,fvGeometry,scvIdx);
// calculate a single value for the boundary type: use one
// bit for each equation and set it to 1 if the equation
......@@ -147,18 +147,18 @@ public:
if (elemBcTypes[scvIdx].isDirichlet(eqIdx))
tmp += (1 << eqIdx);
}
if (boundaryTypesOutput_) boundaryTypes_[globalIdx] = tmp;
if (boundaryTypesOutput_) boundaryTypes_[dofIdxGlobal] = tmp;
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
if (saturationOutput_) saturation_[phaseIdx][globalIdx] = volVars.fluidState().saturation(phaseIdx);
if (pressureOutput_) pressure_[phaseIdx][globalIdx] = volVars.fluidState().pressure(phaseIdx);
if (densityOutput_) density_[phaseIdx][globalIdx] = volVars.fluidState().density(phaseIdx);
if (mobilityOutput_) mobility_[phaseIdx][globalIdx] = volVars.mobility(phaseIdx);
if (averageMolarMassOutput_) averageMolarMass_[phaseIdx][globalIdx] = volVars.fluidState().averageMolarMass(phaseIdx);
if (saturationOutput_) saturation_[phaseIdx][dofIdxGlobal] = volVars.fluidState().saturation(phaseIdx);
if (pressureOutput_) pressure_[phaseIdx][dofIdxGlobal] = volVars.fluidState().pressure(phaseIdx);
if (densityOutput_) density_[phaseIdx][dofIdxGlobal] = volVars.fluidState().density(phaseIdx);
if (mobilityOutput_) mobility_[phaseIdx][dofIdxGlobal] = volVars.mobility(phaseIdx);
if (averageMolarMassOutput_) averageMolarMass_[phaseIdx][dofIdxGlobal] = volVars.fluidState().averageMolarMass(phaseIdx);
for (int compIdx = 0; compIdx < numComponents; ++compIdx) {
if (moleFracOutput_) moleFrac_[phaseIdx][compIdx][globalIdx] = volVars.fluidState().moleFraction(phaseIdx, compIdx);
if (massFracOutput_) massFrac_[phaseIdx][compIdx][globalIdx] = volVars.fluidState().massFraction(phaseIdx, compIdx);
if (molarityOutput_) molarity_[phaseIdx][compIdx][globalIdx] = volVars.fluidState().molarity(phaseIdx, compIdx);
if (moleFracOutput_) moleFrac_[phaseIdx][compIdx][dofIdxGlobal] = volVars.fluidState().moleFraction(phaseIdx, compIdx);
if (massFracOutput_) massFrac_[phaseIdx][compIdx][dofIdxGlobal] = volVars.fluidState().massFraction(phaseIdx, compIdx);
if (molarityOutput_) molarity_[phaseIdx][compIdx][dofIdxGlobal] = volVars.fluidState().molarity(phaseIdx, compIdx);
}
}
}
......
......@@ -113,8 +113,8 @@ public:
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->dofMapper().map(*eIt, scvIdx, dofCodim);
temperature[globalIdx] = elemVolVars[scvIdx].temperature();
int dofIdxGlobal = this->dofMapper().map(*eIt, scvIdx, dofCodim);
temperature[dofIdxGlobal] = elemVolVars[scvIdx].temperature();
}
}
}
......
......@@ -188,19 +188,19 @@ public:
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->dofMapper().map(*eIt, scvIdx, dofCodim);
(*pw)[globalIdx] = elemVolVars[scvIdx].pressure(wPhaseIdx);
(*pn)[globalIdx] = elemVolVars[scvIdx].pressure(nPhaseIdx);
(*pc)[globalIdx] = elemVolVars[scvIdx].capillaryPressure();
(*sw)[globalIdx] = elemVolVars[scvIdx].saturation(wPhaseIdx);
(*sn)[globalIdx] = elemVolVars[scvIdx].saturation(nPhaseIdx);
(*rhoW)[globalIdx] = elemVolVars[scvIdx].density(wPhaseIdx);
(*rhoN)[globalIdx] = elemVolVars[scvIdx].density(nPhaseIdx);
(*mobW)[globalIdx] = elemVolVars[scvIdx].mobility(wPhaseIdx);
(*mobN)[globalIdx] = elemVolVars[scvIdx].mobility(nPhaseIdx);
(*poro)[globalIdx] = elemVolVars[scvIdx].porosity();
(*Te)[globalIdx] = elemVolVars[scvIdx].temperature();
int dofIdxGlobal = this->dofMapper().map(*eIt, scvIdx, dofCodim);
(*pw)[dofIdxGlobal] = elemVolVars[scvIdx].pressure(wPhaseIdx);
(*pn)[dofIdxGlobal] = elemVolVars[scvIdx].pressure(nPhaseIdx);