Initializing a function with two sub-functions
Hello,
Is there a nice way to initialize a mixed element function with two of its sub-functions. Specifically,
element = FiniteElement(
vecElement = element + element
u = Coefficient(
Now, in the code, I want to do this:
u[0] = func1
u[1] = func2
where func1 and func2 are functions of "element". I want to do this to initialize u in a newton solver. The above code doesnt copy the values to u's sub-functions. Another way of framing my question could be, given two subfunctions, how do I combine them into a mixed-function?
I can think of some workarounds, e.g. initializing the function "u" as a vector function using an Expression class, but thats not as clean a solution as I would like. I would like to initialize u, given two input functions which are scalar.
Thanks,
-Jehanzeb
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask jhameed2@illinois.edu for more information if necessary.