Arezou-gh / Stokes_hp

0 stars 1 forks source link

Convergence problem #2

Open Rombur opened 10 years ago

Rombur commented 10 years ago

Arezou,

if you have a problem it's better to open an issue. Pull request is just to merge code. Issue is to discuss problems you encounter.

If I were you, I wouldn't spend too much time on reading about preconditioner. If you want to know if the preconditioner is the problem, you can use the identity as a preconditioner. You will see right away if it is the problem.


Bruno, I got the following error message,


[100%] Run Stokes with Debug configuration Cycle 0: Number of active cells: 12 Total number of cells: 15 Number of degrees of freedom: 151(130+21)


Exception on processing: Iterative method reported convergence failure in step 21 with residual 5.48199e+09

Aborting!

CMake Error at CMakeFiles/run_target.cmake:6 (MESSAGE):

Program terminated with exit code: 1

make[3]: * [CMakeFiles/run] Error 1 make[2]: * [CMakeFiles/run.dir/all] Error 2 make[1]: * [CMakeFiles/run.dir/rule] Error 2 make: * [run] Error 2


I thought the divergence comes from the preconditioner using in class SchurComplement. Right now, I am reading some documents on linear algebra to review the materials on preconditioners...I will think about it, but if still could not get rid of this issue I might ask your opinion, then.

Arezou-gh commented 10 years ago

Bruno,

I tried PreconditionIdentity for preconditioner in cg solver. Still the same error:

"Iterative method reported convergence failure in step 21 with residual 6.00788 Aborting!"

but this time with smaller residual!

shows obviously the matrix is not SPD.

How can I look at my assemebling function to see why is not looks as it should? i.e., why is not SPD?

On Wed, Sep 24, 2014 at 11:13 AM, Bruno Turcksin notifications@github.com wrote:

Arezou,

if you have a problem it's better to open an issue. Pull request is just to merge code. Issue is to discuss problems you encounter.

If I were you, I wouldn't spend too much time on reading about preconditioner. If you want to know if the preconditioner is the problem, you can use the identity as a preconditioner. You will see right away if it

is the problem.

Bruno,

I got the following error message,

[100%] Run Stokes with Debug configuration Cycle 0: Number of active cells: 12 Total number of cells: 15

Number of degrees of freedom: 151(130+21)

Exception on processing: Iterative method reported convergence failure in step 21 with residual 5.48199e+09 Aborting!

CMake Error at CMakeFiles/run_target.cmake:6 (MESSAGE):

Program terminated with exit code: 1

make[3]: * [CMakeFiles/run] Error 1 make[2]: * [CMakeFiles/run.dir/all] Error 2 make[1]: *\ [CMakeFiles/run.dir/rule] Error 2

make: *\ [run] Error 2

I thought the divergence comes from the preconditioner using in class SchurComplement. Right now, I am reading some documents on linear algebra to review the materials on preconditioners...I will think about it, but if still could not get rid of this issue I might ask your opinion, then.

— Reply to this email directly or view it on GitHub https://github.com/Arezou-gh/Stokes_hp/issues/2.

Rombur commented 10 years ago

First you want to create a problem that is as small as possible ideally it would be only one cell. Then, I would check if the matrix is symmetric. You can just check that the matrix minus is transpose is close to zero. That should help you find which terms are wrong. If it doesn't, what you need to do is take some terms off the matrix and check that they are correct. For example, if you think the problem is at line 388, I would check that - div_phi_u[i] * phi_p[j] - phi_p[i] * div_phi_u[j] is SPD. Then, I would add more and more terms.