BUGFIX: For the diagonal the size of the upper Matrix coefficients was used which led to an 'out of range'-error

--HG--
branch : bgschaid/minorAdditionsBranch
This commit is contained in:
Bernhard F.W. Gschaider 2013-07-18 23:59:38 +02:00
parent b07fe1c69f
commit c7121e7df2

View file

@ -78,7 +78,7 @@ void Foam::BlockLduMatrix<Type>::AmulCore
{
const scalarTypeField& activeDiag = Diag.asScalar();
for (register label cellI = 0; cellI < u.size(); cellI++)
for (register label cellI = 0; cellI < activeDiag.size(); cellI++)
{
Ax[cellI] += mult(activeDiag[cellI], x[cellI]);
}
@ -87,7 +87,7 @@ void Foam::BlockLduMatrix<Type>::AmulCore
{
const linearTypeField& activeDiag = Diag.asLinear();
for (register label cellI = 0; cellI < u.size(); cellI++)
for (register label cellI = 0; cellI < activeDiag.size(); cellI++)
{
Ax[cellI] += mult(activeDiag[cellI], x[cellI]);
}
@ -96,7 +96,7 @@ void Foam::BlockLduMatrix<Type>::AmulCore
{
const squareTypeField& activeDiag = Diag.asSquare();
for (register label cellI = 0; cellI < u.size(); cellI++)
for (register label cellI = 0; cellI < activeDiag.size(); cellI++)
{
Ax[cellI] += mult(activeDiag[cellI], x[cellI]);
}
@ -248,7 +248,7 @@ void Foam::BlockLduMatrix<Type>::TmulCore
{
const scalarTypeField& activeDiag = Diag.asScalar();
for (register label cellI = 0; cellI < u.size(); cellI++)
for (register label cellI = 0; cellI < activeDiag.size(); cellI++)
{
Tx[cellI] += mult(activeDiag[cellI], x[cellI]);
}
@ -257,7 +257,7 @@ void Foam::BlockLduMatrix<Type>::TmulCore
{
const linearTypeField& activeDiag = Diag.asLinear();
for (register label cellI = 0; cellI < u.size(); cellI++)
for (register label cellI = 0; cellI < activeDiag.size(); cellI++)
{
Tx[cellI] += mult(activeDiag[cellI], x[cellI]);
}
@ -266,7 +266,7 @@ void Foam::BlockLduMatrix<Type>::TmulCore
{
const squareTypeField& activeDiag = Diag.asSquare();
for (register label cellI = 0; cellI < u.size(); cellI++)
for (register label cellI = 0; cellI < activeDiag.size(); cellI++)
{
Tx[cellI] += mult(activeDiag[cellI].T(), x[cellI]);
}