Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Adaptive mesh refinement: code crashes when using a multigrid preconditioner

More
4 years 3 weeks ago #2536 by anandes
Dear NGSolve developers,

I am trying to use adaptive mesh refinement for a mixed form of the elastodynamic equations. If I use a "multigrid" preconditioner the code goes through the first solve on the original mesh. When the selected elements are refined after the first solve and the bilinear form is reassembled, the code crashes with a segmentation fault. The code works fine with the other preconditioners.

I've attached a python script for a toy problem in elasticity (the solution is within the space of the basis functions - so there is no need for mesh refinement, but this is just for illustration). I use a compound space of functions in HDiv and H1. The preconditioner is defined on line 215. The code goes through one solve with the original mesh and then two solves with adaptively refined meshes. The code works fine with other preconditioners and does not crash. If I use a "multigrid" preconditioner the code crashes after the first solve.

For the original problem that I am trying to solve, unfortunately, none of the other preconditioners help the iterative solver to converge. Of course, the "direct" preconditioner works but I cannot use that for large problems. Only the multigrid preconditioner works - but crashes soon after the first mesh refinement! Is there a fix to this problem?

Thank you,
Anand

File Attachment:

File Name: unit_cube_mod1_amr.py
File Size:10 KB
Time to create page: 0.171 seconds