splitting in mixed spaces
Asked by
Sander Rhebergen
Hi,
Looking at the stokes-iterative demo of FEniCS, after solving the linear system using
U = Function(W)
solver.
the solution U is split:
u, p = U.split()
Is there a function with which I can get the indices of U which contain the u solution and the p solution?
For example, if U =[u1 p1 u2 p2,...] then I would like to have the arrays
indices_u = [0,2,4,...]
indices_p = [1,3,5,...]
I'm guessing it's in FEniCS somewhere since it should be used to split the solution? I'd like to know how to do this in both c++ and python.
Thanks!
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Sander Rhebergen for more information if necessary.
To post a message you must log in.