Combining discontinuous vectors in a coefficient matrix
Hi,
To give a rough outline of what i am trying to do: I am trying to combine the methods given in http://
I have reached the stage of trying to create said tensor as shown:
for cell_no in range(len(
K = as_matrix(
K[0][0].k1 = kx.vector()
K[1][1].k2 = ky.vector()
u = TrialFunction(V)
v = TestFunction(V)
a = inner(K*
L = f*v*dx
u = Function(V)
solve(a == L, u, [bc, bc2])
(this is a snippet of the code but when defining the kx and ky vectors I have used the method from the first link above, these are the vectors that vary across the domain)
Now, I realise of course that I am trying for put vectors into a scalar space in the matrix but this gives an idea of what I would ideally like to do, ie. to arrive at a matrix which is both usable by dolfin and where the coefficients of the elements of grad(u) are multiplied by the two sets of varying coefficients. Any hints would be much appreciated.
Cheers
Alex
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Marie Rognes
- Solved:
- Last query:
- Last reply: