******************* This email 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 https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address. ******************* Hello Nektar++ community ! Trying to learn how think work, it is not obvious how to solve some laplacians. I did a first go based on https://github.com/ExCALIBUR-NEPTUNE/nektar-diffusion<https://github.com/ExCALIBUR-NEPTUNE/nektar-diffusion/blob/d9d3584530cb60f33892b820970a8bf72c17eb83/src/UnsteadyDiffusion.cpp#L219C9-L220C55>, which let you solve d_t X = - nabla . (D nabla X) + S using the StdRegions::VarCoeffMap varcoeffs; However trying to modify them during the run has no impact. I guess this is because laplacian is defined only at initialisation with the Implicit time integration method (--verbose tells me Helmholtz operator is "Matrix free"), but even using ImplicitFull doesn't seem to see modification in the factors. So I have two related issues : 1. My D is evolving in time, so what would be the correct setup for time integration and/or solver attributes ? 2. I in fact need to solve two (or more) equations with laplacians, different D for each (and one is without temporal dimension nabla^2 X = S), but how do you define two separate Helmhotz solve for different unknown ? Many thanks in advance for your helpful answers, Romain Futtersack
Hi Romain, I have had a quick look at the code. It looks like this is supported, to some extent, if you use ConstFactors in your Helmholtz matrix key, rather than variable coefficients. These could be changed during the simulation and should be updated on each call to the MatrixFree opertator. Note that these are not spatially varying coefficients; if you need that, then I do not think that is supported at this time. The const factors to use are called StdRegions::eFactorCoeffD00, StdRegions::eFactorCoeffD01, etc, in the factor map. 1. You would probably need to update these coefficients in the ConstFactorMap before each call to ExpList::HelmSolve and then the rest should happen automatically. 2. When you call HelmSolve, you pass in the solution array, RHS array and ConstFactorMap to use, so you should be able to solve multiple equations in this way. Kind regards, Chris On 04/11/2023 16:42, Futtersack, Romain wrote:
This email from romain.futtersack@ukaea.uk 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 <https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email stamping for this address.
Hello Nektar++ community !
Trying to learn how think work, it is not obvious how to solve some laplacians.
I did a first go based on https://github.com/ExCALIBUR-NEPTUNE/nektar-diffusion <https://github.com/ExCALIBUR-NEPTUNE/nektar-diffusion/blob/d9d3584530cb60f33892b820970a8bf72c17eb83/src/UnsteadyDiffusion.cpp#L219C9-L220C55>, which let you solve d_t X = - nabla . (D nabla X) + S using the StdRegions::VarCoeffMap varcoeffs; However trying to modify them during the run has no impact.
I guess this is because laplacian is defined only at initialisation with the Implicit time integration method (--verbose tells me Helmholtz operator is "Matrix free"), but even using ImplicitFull doesn't seem to see modification in the factors.
So I have two related issues :
1. My D is evolving in time, so what would be the correct setup for time integration and/or solver attributes ? 2. I in fact need to solve two (or more) equations with laplacians, different D for each (and one is without temporal dimension nabla^2 X = S), but how do you define two separate Helmhotz solve for different unknown ?
Many thanks in advance for your helpful answers,
Romain Futtersack
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
-- Chris Cantwell Senior Lecturer in Aeronautics Department of Aeronautics Imperial College London South Kensington Campus London SW7 2AZ Tel: +44 (0)20 759 45050 Email:c.cantwell@imperial.ac.uk www.imperial.ac.uk/people/c.cantwell
participants (2)
- 
                
                Chris Cantwell
- 
                
                Futtersack, Romain