Matrix: Corrected size of field resulting from rectangular matrix multiplication

Resolves bug-report https://bugs.openfoam.org/view.php?id=2740
This commit is contained in:
Henry Weller
2017-10-26 15:54:23 +01:00
parent d8a1697d22
commit effd8186ab

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -652,7 +652,7 @@ inline Foam::tmp<Foam::Field<Type>> Foam::operator*
<< abort(FatalError); << abort(FatalError);
} }
tmp<Field<Type>> tMf(new Field<Type>(f.size(), Zero)); tmp<Field<Type>> tMf(new Field<Type>(M.m(), Zero));
Field<Type>& Mf = tMf.ref(); Field<Type>& Mf = tMf.ref();
for (label i=0; i<M.m(); i++) for (label i=0; i<M.m(); i++)