simpleMatrix code
Hi,
In OpenFOAM's test---simpleMatrix.I have this code: Code:
int main(int argc, char *argv[]) This is the result in terminal: Code:
3 3((-3 10 -4)(2 3 10)(2 6 1)) |
Your system "hmm" is a linear system of vectors
So you have A x = b with : - A the matrix - "x" the solution and "b" the source term (both are vector of vectors). The code in red fill the source vector "b" (composed by vector because your system is a simpleMatrix of vectors) Code:
hmm.source()[0] = vector(2.0, 1.0, 3.0); |
Quote:
|
Quote:
|
Quote:
I didn't see this message few years ago but you cannot separate one solution vector from the others (the system has 9 dependent unknowns, and not 3 x 3 unknwowns). When you run the code, you get : Code:
3((-0.452599 1.12232 -0.149847) (0.125382 0.452599 0.345566) (0.152905 0.0397554 0.2263)) Code:
A = Code:
x = Code:
A * x = Pierre |
All times are GMT -4. The time now is 03:55. |