mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3383 Make transmissibility condenser behave well with zero internal degrees of freedom.
This commit is contained in:
parent
477b7dd018
commit
38d3b666e6
@ -415,12 +415,21 @@ void RigTransmissibilityCondenser::calculateCondensedTransmissibilities()
|
|||||||
|
|
||||||
int externalEquationCount = totalEquationCount - internalEquationCount;
|
int externalEquationCount = totalEquationCount - internalEquationCount;
|
||||||
|
|
||||||
|
MatrixXd condensedSystem;
|
||||||
MatrixXd Tee = totalSystem.bottomRightCorner(externalEquationCount, externalEquationCount);
|
MatrixXd Tee = totalSystem.bottomRightCorner(externalEquationCount, externalEquationCount);
|
||||||
MatrixXd Tei = totalSystem.bottomLeftCorner(externalEquationCount, internalEquationCount);
|
|
||||||
m_TiiInv = totalSystem.topLeftCorner(internalEquationCount, internalEquationCount).inverse();
|
|
||||||
m_Tie = totalSystem.topRightCorner(internalEquationCount, externalEquationCount);
|
|
||||||
|
|
||||||
MatrixXd condensedSystem = Tee - Tei * m_TiiInv * m_Tie;
|
if (internalEquationCount == 0)
|
||||||
|
{
|
||||||
|
condensedSystem = Tee;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MatrixXd Tei = totalSystem.bottomLeftCorner(externalEquationCount, internalEquationCount);
|
||||||
|
m_TiiInv = totalSystem.topLeftCorner(internalEquationCount, internalEquationCount).inverse();
|
||||||
|
m_Tie = totalSystem.topRightCorner(internalEquationCount, externalEquationCount);
|
||||||
|
condensedSystem = Tee - Tei * m_TiiInv * m_Tie;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// std::cout << "Te = " << std::endl << condensedSystem << std::endl << std::endl;
|
// std::cout << "Te = " << std::endl << condensedSystem << std::endl << std::endl;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user