Solve linear system A*X=b

Hi every one,

I have a linear system A*X=b…
Is there any command to solve it directly in FreeFem++ ?


Read the do please and look a simple example like examples/tutorial/LaplaceP1.edp

Thanks, but there is no linear system to solve in this example.

I am searching to solve a general linear system A*X=b
In FreeFem, I have tried to use the command:
X=A^-1 * b;
But it doesn’t work.

sorry, the previous example uses a problem type to define the variational formulation.
This example examples/tutorial/ex-vf.edp builds a linear system from a varf.


Thanks again, but my system is not related to a variational form.

You can still use A^-1 * b even if A does not come from a varf.

Thank you very much.

It was only necessary to declare A as “matrix” and not as “real{int,int]”.
But there is still an error. If you can help to solve it.
Please look at the attached file.

You need to call set(A, solver = sparsesolver).

Thank you very much, it works well now.