|
This
email from zhangtengfei@sjtu.edu.cn originates from outside Imperial. Do not click on
links and attachments unless you recognise the sender. If you trust the
sender, add them to your safe senders
list to disable email stamping for this address.
|
Dear Nektar users,
I am writing a new solver using Nektar++ and it requires solving two different set of global linear systems (GLS1 and GLS2). The two sets of systems are inter-related on the RHS, i.e. therefore iterations between the two gobal linear systems should be performed. The HelmHoltz coefficient matrices for GLS1 is different from GLS2. To solve each linear system, I called the HelmSolve() function respectively for GLS1 and GLS2. Problem is, even though I pass in different spatially variable coefficient maps for GLS1 and GLS2, the formed coefficient matrices for GLS1 and GLS2 seem to be the same. Only the first global linear system is formed correctly, and the second global linear system is recognized to be same as the first one.
I found in the HelmSolve() subroutine there is a code snippet
which scans the m_globalLinSysManager to retrieve the GlobalLinSysSharedPtr that has been formed with key. It seems that the code can only allow the existance of one single holmholtz global linear system, right? If so, does anyone know a way of solving this problem (or is there a solver in the code that I can refer to)?
Currently I have to use ClearGlobalLinSysManager() everytime I finish solving a global linear system, which cleans up the space and rebuild the new global linear system. But this is very time-consuming because the global linear systems are constructed again and again during the iteration between GLS1 and GLS2.
Best regards,
Tengfei Zhang