Sorry,
Z0.assign(Z1_out)
De : Floriane Gidel [RPG]
Envoyé : lundi 20 mars 2017 07:47:28
À : firedrake@imperial.ac.uk
Objet : RE: Mismatching function spaces errorHi Anna,
I think you need to write something like
Phi_out, eta_out, mu_out, Z1_out, W1_out, I_out = w.split()
Z0.assign(Z0_out)
Best,
Floriane
De : firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk > de la part de Anna Kalogirou <A.Kalogirou@leeds.ac.uk>
Envoyé : dimanche 19 mars 2017 22:18:38
À : firedrake@imperial.ac.uk
Objet : [firedrake] Mismatching function spaces errorDear all,
I am defining a mixed system as follows:
V = FunctionSpace(mesh, "CG", 1)V_R = FunctionSpace(mesh, "R", 0)W = V * V * V * V_R * V_R * V_R
and some of the functions defined are:
Z0 = Function(V_R)w = Function(W)phi, eta, mu, Z1, W1, I = split(w)
After defining and solving some solvers etc, I do the following assignment but run into a “Mismatching function spaces” error:Z0.assign(Z1)
Variable Z1 is solved in a mixed system and I want to assign it to Z0, which belongs to space V_R.Shouldn’t the assignment line above work? Why am I getting the error?
Thank you,
Anna.
On 19 Feb 2017, at 23:09, Anna Kalogirou <a.kalogirou@leeds.ac.uk> wrote:
Dear all,______________________________
I am trying to solve a set of PDEs and ODEs together as a mixed system. The ODE variables only depend on time, so I define them as functions from the real function space R.
First question: Is this a correct approach?
Second question: I am running into a “Mismatching function spaces” error; can someone please take a look at my code (found here) and let me know what I’m doing wrong? The error arises when the value of one of the mixed-system variables is assigned to another variable which belongs to the same function space. [I remember having the same issue some time ago, but I thought that it was fixed.]
Thank you.
Best, Anna._________________
firedrake mailing list
firedrake@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/firedrake