Variable Coefficient in LHS

Issue #553 invalid
Patricio Villar created an issue

Hi, I'm pretty new to Fenics, so the solution to my question may be obvious, but I'm still struggling to crack on it. Basically, I have a Coefficient in the LHS of my variational equation that varies along the Grid nodes:

Equation

a = ((k2 / n2) * inner(E, v) - inner(nabla_grad(E), nabla_grad(v))) * dx

That's the 'k' coefficient and it different values. I have all these values stored in a matrix of the same order as the Mesh grid (100x100 grid and a 100x100 matrix with all the k values).

Is there a simple way to make the solver take account of such spatial variable coefficient values?

Thanks in advance, Patricio,

Comments (1)

  1. Log in to comment