Commit 3621dc76 authored by Klaus Mosthaf's avatar Klaus Mosthaf
Browse files

Added CouplingInflow and CouplingOutflow as bossible boundary types and...

Added CouplingInflow and CouplingOutflow as bossible boundary types and possibilities to check, if we are on a couplingOutflow/couplingInflow boundary.

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@4219 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent db832afb
......@@ -84,6 +84,8 @@ public:
boundaryInfo_[eqIdx].isDirichlet = 0;
boundaryInfo_[eqIdx].isNeumann = 1;
boundaryInfo_[eqIdx].isOutflow = 0;
boundaryInfo_[eqIdx].isCouplingInflow = 0;
boundaryInfo_[eqIdx].isCouplingOutflow = 0;
Valgrind::SetDefined(boundaryInfo_[eqIdx]);
}
......@@ -99,6 +101,8 @@ public:
boundaryInfo_[eqIdx].isDirichlet = 1;
boundaryInfo_[eqIdx].isNeumann = 0;
boundaryInfo_[eqIdx].isOutflow = 0;
boundaryInfo_[eqIdx].isCouplingInflow = 0;
boundaryInfo_[eqIdx].isCouplingOutflow = 0;
eq2pvIdx_[eqIdx] = eqIdx;
pv2eqIdx_[eqIdx] = eqIdx;
......@@ -117,6 +121,42 @@ public:
boundaryInfo_[eqIdx].isDirichlet = 0;
boundaryInfo_[eqIdx].isNeumann = 0;
boundaryInfo_[eqIdx].isOutflow = 1;
boundaryInfo_[eqIdx].isCouplingInflow = 0;
boundaryInfo_[eqIdx].isCouplingOutflow = 0;
Valgrind::SetDefined(boundaryInfo_[eqIdx]);
}
}
/*!
* \brief Set all boundary conditions to coupling inflow.
*/
void setAllCouplingInflow()
{
for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) {
boundaryInfo_[eqIdx].visited = 1;
boundaryInfo_[eqIdx].isDirichlet = 0;
boundaryInfo_[eqIdx].isNeumann = 0;
boundaryInfo_[eqIdx].isOutflow = 0;
boundaryInfo_[eqIdx].isCouplingInflow = 1;
boundaryInfo_[eqIdx].isCouplingOutflow = 0;
Valgrind::SetDefined(boundaryInfo_[eqIdx]);
}
}
/*!
* \brief Set all boundary conditions to coupling outflow.
*/
void setAllCouplingOutflow()
{
for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) {
boundaryInfo_[eqIdx].visited = 1;
boundaryInfo_[eqIdx].isDirichlet = 0;
boundaryInfo_[eqIdx].isNeumann = 0;
boundaryInfo_[eqIdx].isOutflow = 1;
boundaryInfo_[eqIdx].isCouplingInflow = 0;
boundaryInfo_[eqIdx].isCouplingOutflow = 1;
Valgrind::SetDefined(boundaryInfo_[eqIdx]);
}
......@@ -132,6 +172,8 @@ public:
boundaryInfo_[eqIdx].isDirichlet = 0;
boundaryInfo_[eqIdx].isNeumann = 1;
boundaryInfo_[eqIdx].isOutflow = 0;
boundaryInfo_[eqIdx].isCouplingInflow = 0;
boundaryInfo_[eqIdx].isCouplingOutflow = 0;
Valgrind::SetDefined(boundaryInfo_[eqIdx]);
}
......@@ -152,6 +194,8 @@ public:
boundaryInfo_[eqIdx].isDirichlet = 1;
boundaryInfo_[eqIdx].isNeumann = 0;
boundaryInfo_[eqIdx].isOutflow = 0;
boundaryInfo_[eqIdx].isCouplingInflow = 0;
boundaryInfo_[eqIdx].isCouplingOutflow = 0;
// update the equation <-> primary variable mapping
eq2pvIdx_[eqIdx] = pvIdx;
......@@ -170,6 +214,8 @@ public:
boundaryInfo_[eqIdx].isDirichlet = 0;
boundaryInfo_[eqIdx].isNeumann = 0;
boundaryInfo_[eqIdx].isOutflow = 1;
boundaryInfo_[eqIdx].isCouplingInflow = 0;
boundaryInfo_[eqIdx].isCouplingOutflow = 0;
Valgrind::SetDefined(boundaryInfo_[eqIdx]);
}
......@@ -243,6 +289,44 @@ public:
return false;
};
/*!
* \brief Returns true if an equation is used to specify an
* inflow coupling condition.
*/
bool isCouplingInflow(unsigned eqIdx) const
{ return boundaryInfo_[eqIdx].isCouplingInflow; };
/*!
* \brief Returns true if some equation is used to specify an
* inflow coupling condition.
*/
bool hasCouplingInflow() const
{
for (int i = 0; i < numEq; ++i)
if (boundaryInfo_[i].isCouplingInflow)
return true;
return false;
};
/*!
* \brief Returns true if an equation is used to specify an
* outflow coupling condition.
*/
bool isCouplingOutflow(unsigned eqIdx) const
{ return boundaryInfo_[eqIdx].isCouplingOutflow; };
/*!
* \brief Returns true if some equation is used to specify an
* outflow coupling condition.
*/
bool hasCouplingOutflow() const
{
for (int i = 0; i < numEq; ++i)
if (boundaryInfo_[i].isCouplingOutflow)
return true;
return false;
};
/*!
* \brief Returns the index of the equation which should be used
* for the dirichlet condition of the pvIdx's primary
......@@ -266,8 +350,8 @@ private:
unsigned char isDirichlet : 1;
unsigned char isNeumann : 1;
unsigned char isOutflow : 1;
// unsigned char isCouplingInflow : 1;
// unsigned char isCouplingOutflow : 1;
unsigned char isCouplingInflow : 1;
unsigned char isCouplingOutflow : 1;
} boundaryInfo_[numEq];
unsigned char eq2pvIdx_[numEq];
......
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