Commit 8a517258 authored by Benjamin Faigle's avatar Benjamin Faigle
Browse files

fixed hard-to read line breaks and issues introduced by commit 12427 to reduce...

fixed hard-to read line breaks and issues introduced by commit 12427 to reduce excessive file lengths.

fvmpfal3dinteractionvolumecontaineradaptive.hh also prepares for the respective class applied in the compositional models that gets derived and will overwrite some functions: this-> Pointer changed to asImp_()

reviewd by Thomas

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@12438 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent dca83919
......@@ -229,8 +229,8 @@ public:
numIter++;
}
// std::cout<<"Pressure defect = "<<pressureNorm<<";
// "<<numIter<<" Iterations needed for initial pressure field"<<std::endl;
//std::cout<<"Pressure defect = "<<pressureNorm<<"; "<<
// numIter<<" Iterations needed for initial pressure field"<<std::endl;
}
storePressureSolution();
......
......@@ -150,11 +150,11 @@ public:
}
//calculate velocities for flux faces of an interaction volume
void calculateInnerInteractionVolumeVelocity(InteractionVolume& interactionVolume, CellData& cellData1,
CellData& cellData2, CellData& cellData3, CellData& cellData4,
InnerBoundaryVolumeFaces& innerBoundaryVolumeFaces);
void calculateInnerInteractionVolumeVelocity(InteractionVolume& interactionVolume,
CellData& cellData1, CellData& cellData2, CellData& cellData3, CellData& cellData4,
InnerBoundaryVolumeFaces& innerBoundaryVolumeFaces);
void calculateBoundaryInteractionVolumeVelocity(InteractionVolume& interactionVolume,
CellData& cellData, int elemIdx);
CellData& cellData, int elemIdx);
//!Initializes the velocity model
void initialize()
......@@ -189,10 +189,10 @@ public:
{
if (vtkOutputLevel_ > 0)
{
Dune::BlockVector < DimVector > &velocityWetting = *(writer.template allocateManagedBuffer<Scalar,
dim>(problem_.gridView().size(0)));
Dune::BlockVector < DimVector > &velocityNonwetting = *(writer.template allocateManagedBuffer<Scalar,
dim>(problem_.gridView().size(0)));
Dune::BlockVector < DimVector > &velocityWetting
= *(writer.template allocateManagedBuffer<Scalar,dim>(problem_.gridView().size(0)));
Dune::BlockVector < DimVector > &velocityNonwetting
= *(writer.template allocateManagedBuffer<Scalar,dim>(problem_.gridView().size(0)));
// compute update vector
ElementIterator eEndIt = problem_.gridView().template end<0>();
......
......@@ -99,6 +99,8 @@ private:
void storeHangingNodeInteractionVolume(InteractionVolume& interactionVolume, const Vertex& vertex);
void storeInnerInteractionVolume(InteractionVolume& interactionVolume, const Vertex& vertex);
friend ParentType;
protected:
void storeInteractionVolumeInfo();
public:
......@@ -129,6 +131,16 @@ public:
}
private:
typedef typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolumeContainer) Implementation;
//! Returns the implementation of the problem (i.e. static polymorphism)
Implementation &asImp_()
{ return *static_cast<Implementation *>(this);}
//! \copydoc Dumux::IMPETProblem::asImp_()
const Implementation &asImp_() const
{ return *static_cast<const Implementation *>(this);}
Problem& problem_;
FaceVerticesVector faceVertices_;
};
......@@ -1622,18 +1634,18 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeInteractionVolum
for (ElementIterator eIt = problem_.gridView().template begin<0>(); eIt != eEndIt; ++eIt)
{
ElementPointer ePtr = *eIt;
this->storeSubVolumeElements(*ePtr, elemVertMap);
asImp_().storeSubVolumeElements(*ePtr, elemVertMap);
}
for (unsigned int i = 0; i < this->interactionVolumes_.size(); i++)
if (this->interactionVolumes_[i].getElementNumber() == 0)
this->interactionVolumes_[i].printInteractionVolumeInfo();
for (unsigned int i = 0; i < asImp_().interactionVolumes_.size(); i++)
if (asImp_().interactionVolumes_[i].getElementNumber() == 0)
asImp_().interactionVolumes_[i].printInteractionVolumeInfo();
// Store information related to DUNE intersections for all interaction volumes
for (ElementIterator eIt = problem_.gridView().template begin<0>(); eIt != eEndIt; ++eIt)
{
ElementPointer ePtr = *eIt;
this->storeIntersectionInfo(*ePtr, elemVertMap);
asImp_().storeIntersectionInfo(*ePtr, elemVertMap);
}
faceVertices_.clear();
......@@ -1646,15 +1658,15 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeInteractionVolum
{
int globalVertIdx = problem_.variables().index(*vIt);
InteractionVolume& interactionVolume = this->interactionVolumes_[globalVertIdx];
InteractionVolume& interactionVolume = asImp_().interactionVolumes_[globalVertIdx];
if (interactionVolume.getElementNumber() == 8)
{
this->storeInnerInteractionVolume(interactionVolume, *vIt);
asImp_().storeInnerInteractionVolume(interactionVolume, *vIt);
}
else if (interactionVolume.isBoundaryInteractionVolume())
{
this->storeBoundaryInteractionVolume(interactionVolume, *vIt);
asImp_().storeBoundaryInteractionVolume(interactionVolume, *vIt);
}
//hanging node!
else
......@@ -1682,16 +1694,16 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeInteractionVolum
int globalIdx7 = problem_.variables().index(*elementPointer7);
int globalIdx8 = problem_.variables().index(*elementPointer8);
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(0, 0), globalIdx1, interactionVolume.getIndexOnElement(0, 0));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(0, 1), globalIdx1, interactionVolume.getIndexOnElement(0, 1));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(0, 2), globalIdx1, interactionVolume.getIndexOnElement(0, 2));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(1, 0), globalIdx2, interactionVolume.getIndexOnElement(1, 0));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(1, 1), globalIdx2, interactionVolume.getIndexOnElement(1, 1));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(1, 2), globalIdx2, interactionVolume.getIndexOnElement(1, 2));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(2, 0), globalIdx3, interactionVolume.getIndexOnElement(2, 0));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(3, 1), globalIdx4, interactionVolume.getIndexOnElement(3, 1));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(4, 0), globalIdx5, interactionVolume.getIndexOnElement(4, 0));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(5, 0), globalIdx6, interactionVolume.getIndexOnElement(5, 0));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(0, 0), globalIdx1, interactionVolume.getIndexOnElement(0, 0));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(0, 1), globalIdx1, interactionVolume.getIndexOnElement(0, 1));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(0, 2), globalIdx1, interactionVolume.getIndexOnElement(0, 2));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(1, 0), globalIdx2, interactionVolume.getIndexOnElement(1, 0));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(1, 1), globalIdx2, interactionVolume.getIndexOnElement(1, 1));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(1, 2), globalIdx2, interactionVolume.getIndexOnElement(1, 2));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(2, 0), globalIdx3, interactionVolume.getIndexOnElement(2, 0));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(3, 1), globalIdx4, interactionVolume.getIndexOnElement(3, 1));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(4, 0), globalIdx5, interactionVolume.getIndexOnElement(4, 0));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(5, 0), globalIdx6, interactionVolume.getIndexOnElement(5, 0));
faceVertices_[globalIdx1][interactionVolume.getIndexOnElement(0, 0)].insert(globalVertIdx);
faceVertices_[globalIdx1][interactionVolume.getIndexOnElement(0, 1)].insert(globalVertIdx);
......@@ -1706,20 +1718,20 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeInteractionVolum
if (interactionVolume.getHangingNodeType() != InteractionVolume::twoSmallCells)
{
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(2, 1), globalIdx3, interactionVolume.getIndexOnElement(2, 1));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(2, 2), globalIdx3, interactionVolume.getIndexOnElement(2, 2));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(3, 0), globalIdx4, interactionVolume.getIndexOnElement(3, 0));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(3, 2), globalIdx4, interactionVolume.getIndexOnElement(3, 2));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(4, 1), globalIdx5, interactionVolume.getIndexOnElement(4, 1));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(4, 2), globalIdx5, interactionVolume.getIndexOnElement(4, 2));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(5, 1), globalIdx6, interactionVolume.getIndexOnElement(5, 1));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(5, 2), globalIdx6, interactionVolume.getIndexOnElement(5, 2));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(6, 0), globalIdx7, interactionVolume.getIndexOnElement(6, 0));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(6, 1), globalIdx7, interactionVolume.getIndexOnElement(6, 1));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(6, 2), globalIdx7, interactionVolume.getIndexOnElement(6, 2));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(7, 0), globalIdx8, interactionVolume.getIndexOnElement(7, 0));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(7, 1), globalIdx8, interactionVolume.getIndexOnElement(7, 1));
this->addRealFluxFaceArea_(interactionVolume.getFaceArea(7, 2), globalIdx8, interactionVolume.getIndexOnElement(7, 2));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(2, 1), globalIdx3, interactionVolume.getIndexOnElement(2, 1));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(2, 2), globalIdx3, interactionVolume.getIndexOnElement(2, 2));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(3, 0), globalIdx4, interactionVolume.getIndexOnElement(3, 0));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(3, 2), globalIdx4, interactionVolume.getIndexOnElement(3, 2));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(4, 1), globalIdx5, interactionVolume.getIndexOnElement(4, 1));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(4, 2), globalIdx5, interactionVolume.getIndexOnElement(4, 2));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(5, 1), globalIdx6, interactionVolume.getIndexOnElement(5, 1));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(5, 2), globalIdx6, interactionVolume.getIndexOnElement(5, 2));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(6, 0), globalIdx7, interactionVolume.getIndexOnElement(6, 0));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(6, 1), globalIdx7, interactionVolume.getIndexOnElement(6, 1));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(6, 2), globalIdx7, interactionVolume.getIndexOnElement(6, 2));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(7, 0), globalIdx8, interactionVolume.getIndexOnElement(7, 0));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(7, 1), globalIdx8, interactionVolume.getIndexOnElement(7, 1));
asImp_().addRealFluxFaceArea_(interactionVolume.getFaceArea(7, 2), globalIdx8, interactionVolume.getIndexOnElement(7, 2));
faceVertices_[globalIdx3][interactionVolume.getIndexOnElement(2, 1)].insert(globalVertIdx);
faceVertices_[globalIdx3][interactionVolume.getIndexOnElement(2, 2)].insert(globalVertIdx);
......
......@@ -381,8 +381,9 @@ void FvMpfaL3dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity(const Inter
{
ElementPointer elemJ = *(interactionVolume.getSubVolumeElement(k));
if (elemJ == elementPtrJ && IndexTranslator::getFaceIndexFromSubVolume(i,j)
== IndexTranslator::getFaceIndexFromElements(i,k))
if (elemJ == elementPtrJ &&
IndexTranslator::getFaceIndexFromSubVolume(i,j)
== IndexTranslator::getFaceIndexFromElements(i,k))
{
std::pair<int,int> localIdx = std::make_pair(i, k);
localMpfaElemIdx.push_back(localIdx);
......
......@@ -265,8 +265,7 @@ int FvMpfaL3dTransmissibilityCalculator<TypeTag>::chooseTransmissibility(Transmi
* \return The type of the chosen L-shape (1-4)
*/
template<class TypeTag>
int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibility(
TransmissibilityType& transmissibility,
int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibility(TransmissibilityType& transmissibility,
InteractionVolume& interactionVolume,
std::vector<DimVector>& lambda,
int idx1, int idx2, int idx3, int idx4,
......@@ -301,7 +300,7 @@ int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibility(
TransmissibilityType transCaseThree(0);
int DUNE_UNUSED transTypeCaseThree = transmissibilityCaseThree(transCaseThree, interactionVolume,
lambda, idx1, idx2, idx4, idx5);
lambda, idx1, idx2, idx4, idx5);
transTypeTemp = transmissibilityCaseFour(transTemp, interactionVolume, lambda, idx1, idx2, idx3, idx6);
transTypeTemp = chooseTransmissibility(transCaseThree, transTemp, 3, 4);
......@@ -321,7 +320,7 @@ int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibility(
TransmissibilityType transTemp(0);
int DUNE_UNUSED transTypeTemp = transmissibilityCaseOne(transTemp, interactionVolume,
lambda, idx1, idx2, idx3, idx5);
lambda, idx1, idx2, idx3, idx5);
int transType = transmissibilityCaseTwo(transmissibility, interactionVolume, lambda, idx1, idx2, idx4, idx6);
transType = chooseTransmissibility(transTemp, transmissibility, 1, 2);
......@@ -367,8 +366,7 @@ int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibility(
* \return The type of the chosen L-shape (1-4)
*/
template<class TypeTag>
int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibility(
TransmissibilityType& transmissibility,
int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibility(TransmissibilityType& transmissibility,
InteractionVolume& interactionVolume,
std::vector<DimVector>& lambda, int idx1,
int idx2, int idx3, int idx4, int idx5,
......@@ -468,7 +466,7 @@ int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibility(
int DUNE_UNUSED transTypeTemp = transmissibilityCaseOne(transTemp, interactionVolume,
lambda, idx1, idx2, idx3, idx5);
int transType = transmissibilityCaseTwo(transmissibility, interactionVolume,
lambda, idx1, idx2, idx4, idx6);
lambda, idx1, idx2, idx4, idx6);
transType = chooseTransmissibility(transTemp, transmissibility, 1, 2);
......@@ -497,9 +495,9 @@ int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibility(
TransmissibilityType transTemp(0);
int DUNE_UNUSED transTypeTemp = transmissibilityCaseThree(transTemp, interactionVolume,
lambda, idx1, idx2, idx4, idx5);
lambda, idx1, idx2, idx4, idx5);
int transType = transmissibilityCaseFour(transmissibility, interactionVolume,
lambda, idx1, idx2, idx3, idx6);
lambda, idx1, idx2, idx3, idx6);
transType = chooseTransmissibility(transTemp, transmissibility, 3, 4);
......@@ -538,11 +536,9 @@ int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibility(
*/
template<class TypeTag>
int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibilityTPFA(
Dune::FieldMatrix<Scalar,
dim,2*dim-dim+1>& transmissibility,
InteractionVolume& interactionVolume,
std::vector<DimVector >& lambda,
int idx1, int idx2)
Dune::FieldMatrix<Scalar,dim,2*dim-dim+1>& transmissibility,
InteractionVolume& interactionVolume,
std::vector<DimVector >& lambda, int idx1, int idx2)
{
ElementPointer& elementPointer1 = interactionVolume.getSubVolumeElement(idx1);
ElementPointer& elementPointer2 = interactionVolume.getSubVolumeElement(idx2);
......@@ -648,11 +644,9 @@ int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibilityTPFA(
*/
template<class TypeTag>
int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibilityCaseOne(
Dune::FieldMatrix<Scalar,
dim,2*dim-dim+1>& transmissibility,
InteractionVolume& interactionVolume,
std::vector<DimVector >& lambda,
int idx1, int idx2, int idx3, int idx5)
Dune::FieldMatrix<Scalar,dim,2*dim-dim+1>& transmissibility,
InteractionVolume& interactionVolume,
std::vector<DimVector >& lambda, int idx1, int idx2, int idx3, int idx5)
{
ElementPointer& elementPointer1 = interactionVolume.getSubVolumeElement(idx1);
ElementPointer& elementPointer2 = interactionVolume.getSubVolumeElement(idx2);
......@@ -1034,11 +1028,9 @@ int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibilityCaseOne(
*/
template<class TypeTag>
int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibilityCaseTwo(
Dune::FieldMatrix<Scalar,
dim,2*dim-dim+1>& transmissibility,
InteractionVolume& interactionVolume,
std::vector<DimVector >& lambda,
int idx1, int idx2, int idx4, int idx6)
Dune::FieldMatrix<Scalar,dim,2*dim-dim+1>& transmissibility,
InteractionVolume& interactionVolume,
std::vector<DimVector >& lambda, int idx1, int idx2, int idx4, int idx6)
{
ElementPointer& elementPointer1 = interactionVolume.getSubVolumeElement(idx1);
ElementPointer& elementPointer2 = interactionVolume.getSubVolumeElement(idx2);
......@@ -1433,11 +1425,9 @@ int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibilityCaseTwo(
*/
template<class TypeTag>
int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibilityCaseThree(
Dune::FieldMatrix<Scalar,
dim,2*dim-dim+1>& transmissibility,
InteractionVolume& interactionVolume,
std::vector<DimVector >& lambda,
int idx1, int idx2, int idx4, int idx5)
Dune::FieldMatrix<Scalar,dim,2*dim-dim+1>& transmissibility,
InteractionVolume& interactionVolume,
std::vector<DimVector >& lambda,int idx1, int idx2, int idx4, int idx5)
{
ElementPointer& elementPointer1 = interactionVolume.getSubVolumeElement(idx1);
ElementPointer& elementPointer2 = interactionVolume.getSubVolumeElement(idx2);
......@@ -1833,11 +1823,9 @@ int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibilityCaseThree(
*/
template<class TypeTag>
int FvMpfaL3dTransmissibilityCalculator<TypeTag>::transmissibilityCaseFour(
Dune::FieldMatrix<Scalar,
dim,2*dim-dim+1>& transmissibility,
InteractionVolume& interactionVolume,
std::vector<DimVector >& lambda,
int idx1, int idx2, int idx3, int idx6)
Dune::FieldMatrix<Scalar,dim,2*dim-dim+1>& transmissibility,
InteractionVolume& interactionVolume,
std::vector<DimVector >& lambda,int idx1, int idx2, int idx3, int idx6)
{
ElementPointer& elementPointer1 = interactionVolume.getSubVolumeElement(idx1);
ElementPointer& elementPointer2 = interactionVolume.getSubVolumeElement(idx2);
......
......@@ -1521,7 +1521,7 @@ void FvMpfaL3dVelocity2pAdaptive<TypeTag>::calculateHangingNodeInteractionVolume
1);
}
else if (hangingNodeType == InteractionVolume::fourSmallCellsDiag ||
(hangingNodeType == InteractionVolume::fourSmallCellsEdge && globalIdx5 != globalIdx7))
(hangingNodeType == InteractionVolume::fourSmallCellsEdge && globalIdx5 != globalIdx7))
{
useCases[0] = false;
useCases[1] = true;
......@@ -1649,7 +1649,7 @@ void FvMpfaL3dVelocity2pAdaptive<TypeTag>::calculateHangingNodeInteractionVolume
0);
}
else if (hangingNodeType == InteractionVolume::fourSmallCellsDiag ||
(hangingNodeType == InteractionVolume::fourSmallCellsEdge && globalIdx5 != globalIdx7))
(hangingNodeType == InteractionVolume::fourSmallCellsEdge && globalIdx5 != globalIdx7))
{
useCases[0] = true;
useCases[1] = false;
......
......@@ -299,8 +299,9 @@ public:
vel += W_[globalIdx][faceIdx][j]*faceVol[j]*(press - pressTrace[j]);
}
void computeReconstructionMatrices(const Element& element, const Dune::FieldMatrix<Scalar,
2 * dim, 2 * dim>& W, Dune::FieldVector<Scalar, 2 * dim>& F, Scalar& dInv)
void computeReconstructionMatrices(const Element& element,
const Dune::FieldMatrix<Scalar, 2 * dim, 2 * dim>& W,
Dune::FieldVector<Scalar, 2 * dim>& F, Scalar& dInv)
{
Dune::FieldVector<Scalar, 2 * dim> c(0);
Dune::FieldMatrix<Scalar, 2 * dim, 2 * dim> Pi(0);
......
......@@ -545,14 +545,14 @@ void EvalCflFluxCoats<TypeTag>::addCoatsFlux(Scalar& lambdaW, Scalar& lambdaNw,
case pw:
{
potWBound = bcValues[eqIdxPress] + density_[wPhaseIdx] * gdeltaZ;
potNwBound = bcValues[eqIdxPress] + MaterialLaw::pc(problem_.spatialParams().materialLawParams(*element),
satWBound) + density_[nPhaseIdx] * gdeltaZ;
potNwBound = bcValues[eqIdxPress] + MaterialLaw::pc(problem_.spatialParams().materialLawParams(*element), satWBound)
+ density_[nPhaseIdx] * gdeltaZ;
break;
}
case pn:
{
potWBound = bcValues[eqIdxPress] - MaterialLaw::pc(problem_.spatialParams().materialLawParams(*element),
satWBound) + density_[wPhaseIdx] * gdeltaZ;
potWBound = bcValues[eqIdxPress] - MaterialLaw::pc(problem_.spatialParams().materialLawParams(*element),satWBound)
+ density_[wPhaseIdx] * gdeltaZ;
potNwBound = bcValues[eqIdxPress] + density_[nPhaseIdx] * gdeltaZ;
break;
}
......@@ -589,13 +589,13 @@ void EvalCflFluxCoats<TypeTag>::addCoatsFlux(Scalar& lambdaW, Scalar& lambdaNw,
if (hasPotWBound && !hasPotNwBound)
{
potNwBound = potWBound + MaterialLaw::pc(problem_.spatialParams().materialLawParams(*element),
satWBound) + (density_[nPhaseIdx] - density_[wPhaseIdx]) * gdeltaZ;
potNwBound = potWBound + MaterialLaw::pc(problem_.spatialParams().materialLawParams(*element),satWBound)
+ (density_[nPhaseIdx] - density_[wPhaseIdx]) * gdeltaZ;
}
else if (!hasPotWBound && hasPotNwBound)
{
potWBound = potNwBound - MaterialLaw::pc(problem_.spatialParams().materialLawParams(*element),
satWBound) + (density_[nPhaseIdx] - density_[wPhaseIdx]) * gdeltaZ;
potWBound = potNwBound - MaterialLaw::pc(problem_.spatialParams().materialLawParams(*element),satWBound)
+ (density_[nPhaseIdx] - density_[wPhaseIdx]) * gdeltaZ;
}
}
else if (bcType.isNeumann(eqIdxPress))
......
......@@ -280,8 +280,8 @@ void dirichletAtPos(PrimaryVariables &values, const GlobalPosition& globalPos) c
Scalar pRef = referencePressureAtPos(globalPos);
Scalar temp = temperatureAtPos(globalPos);
values[pwIdx] = (2e5 + (this->bBoxMax()[dim-1]
- globalPos[dim-1]) * WettingPhase::density(temp, pRef) * this->gravity().two_norm());
values[pwIdx] = (2e5 + (this->bBoxMax()[dim-1] - globalPos[dim-1])
* WettingPhase::density(temp, pRef) * this->gravity().two_norm());
}
else
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment