Hi Tengfei,
Thanks for your email, and for highlighting eVarCoeffLaplacian - I guess this may have been an older implementation that we did not fully remove yet. Did you find this in an older version of the code as I cannot find it in the CardiacEPSolver in our current release?
I believe that when setting variable coefficients for the Laplacian, we consider a more general operator of the form: div(D(x)\nabla u), where D is a 2x2 or 3x3 symmetric diffusion tensor (depending on the spatial dimension), allowing for cases that contain anisotropic diffusion. In your case, you have therefore need to set up m_factors so that you set the diagonal components of D. For example in a 2D problem:
Array<OneD, NekDouble> D; // D(r) coefficients
m_factors[StdRegions::eVarCoeffD00] = D;
m_factors[StdRegions::eVarCoeffD11] = D;
That should then get passed through to the HelmSolve call.
Cheers,
Dave
> On 10 Mar 2020, at 03:00, zhangtengfei@sjtu.edu.cn wrote:
>
> 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 all,
>
> I am trying to implement a new solver using Nektar++ to solve the neutron diffusion equation. This equation has similar form as the Helmholtz equation. One of the differences between my case and all pre-existing solvers is that my solver requires using spatial-dependent constants for each finite element mesh. With the help of Dr. Cantwell I refered to cardiac electrophysiology solver ( in solvers/CardiacEPSolver/EquationSystems/Monodomain.cpp). I copied the code snippet of varying coefficients from CardiacEPSolver into my solver and made changes accordingly. However, something went wrong and it seems that the varying coefficient function does not work properly. I must have some misunderstanding of the variables or omitted some important details. Could anyone please take a look at attached note and see what happens?
>
> Thanks,
>
> Tengfei Zhang
>
> <questions on variable coefficients.doc>_______________________________________________
> Nektar-users mailing list
> Nektar-users@imperial.ac.uk
> https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
--
Dr David Moxey, PhD MMath MIMA FHEA
Senior Lecturer in Engineering
d.moxey@exeter.ac.uk | tel: 01392 724764 | web: davidmoxey.uk
Room 1.24, Hope Hall,
University of Exeter,
Exeter, EX4 4PL, UK.