'Variable Coefficient Matrix' Poisson Equation
Asked by
Alex Evans
I am trying to solve the 2D Poisson equation: Div( k grad(p))=0 where k is a diagonal matrix.
I have tried the following attempt to modify existing code for a variable coefficient solver (after importing numpy and dolfin)
------------------
k=zeros(2,2)
k[0][0]
k[1][1]
a = inner(k*
------------------
The error is generated once I have put these lines in as shown. (The solver works for a=inner(
The error given is that numpy arrays can't have expressions as arguments. How should I get around this? Or if there a very different way i should be approaching this problem?
Cheers
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Felix Ospald
- Solved:
- Last query:
- Last reply:
To post a message you must log in.