Missing transpose in BlockLduMatrix TMulCore and new formulation of symmetry for block matrix
This commit is contained in:
parent
41f6e0f983
commit
03347200a9
3 changed files with 19 additions and 3 deletions
|
@ -257,6 +257,8 @@ public:
|
|||
const CoeffField<Type>& f,
|
||||
const labelList& addr
|
||||
);
|
||||
|
||||
|
||||
// Member operators
|
||||
|
||||
void operator=(const CoeffField<Type>&);
|
||||
|
|
|
@ -295,7 +295,19 @@ bool Foam::BlockLduMatrix<Type>::symmetric() const
|
|||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
return (diagPtr_ && (!lowerPtr_ && upperPtr_));
|
||||
// Assuming that the matrix is not symmetric if diag or upper are square
|
||||
// type coefficients. VV and HJ, 9/Sep/2015.
|
||||
bool activeSquare = false;
|
||||
if
|
||||
(
|
||||
diagPtr_->activeType() == blockCoeffBase::SQUARE
|
||||
|| upperPtr_->activeType() == blockCoeffBase::SQUARE
|
||||
)
|
||||
{
|
||||
activeSquare = true;
|
||||
}
|
||||
|
||||
return (diagPtr_ && (!lowerPtr_ && upperPtr_) && !activeSquare);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -237,7 +237,8 @@ void Foam::BlockLduMatrix<Type>::TmulCore
|
|||
|
||||
for (register label coeffI = 0; coeffI < u.size(); coeffI++)
|
||||
{
|
||||
Tx[u[coeffI]] += mult(activeUpper[coeffI], x[l[coeffI]]);
|
||||
// Bug fix: Missing transpose. VV, 31/Aug/2015.
|
||||
Tx[u[coeffI]] += mult(activeUpper[coeffI].T(), x[l[coeffI]]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -303,7 +304,8 @@ void Foam::BlockLduMatrix<Type>::TmulCore
|
|||
|
||||
for (register label coeffI = 0; coeffI < u.size(); coeffI++)
|
||||
{
|
||||
Tx[l[coeffI]] += mult(activeLower[coeffI], x[u[coeffI]]);
|
||||
// Bug fix: Missing transpose. VV, 31/Aug/2015.
|
||||
Tx[l[coeffI]] += mult(activeLower[coeffI].T(), x[u[coeffI]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue