mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
LUscalarMatrix: Added processor-local matrix inverse function
This commit is contained in:
@ -152,6 +152,11 @@ int main(int argc, char *argv[])
|
||||
LUscalarMatrix LU(squareMatrix);
|
||||
scalarField x(LU.solve(source));
|
||||
Info<< "LU solve residual " << (squareMatrix*x - source) << endl;
|
||||
|
||||
scalarSquareMatrix inv(3);
|
||||
LU.inv(inv);
|
||||
Info<< "LU inv " << inv << endl;
|
||||
Info<< "LU inv*squareMatrix " << (inv*squareMatrix) << endl;
|
||||
}
|
||||
|
||||
{
|
||||
@ -169,6 +174,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "QR inverse solve residual "
|
||||
<< (x - QR.inv()*source) << endl;
|
||||
|
||||
Info<< "QR inv *squareMatrix " << (QR.inv()*squareMatrix) << endl;
|
||||
}
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
|
||||
Reference in New Issue
Block a user