Open kynan opened 13 years ago
I'm not sure I understand this issue - isn't this what happens anyway? For example, in the euler-advection.ufl test case, only the Tracer field is returned to the host, not the velocity.
Having started to read https://github.com/gmarkall/manycore_form_compiler/wiki/UFL-equations-for-Fluidity-fields , I now see that this applies to the UFL code for solving for a particular field in an flml, and is not a general code-generation issue where we were returning the wrong things back to state.
I think i see another issue with this. In tests/inputs/shallow-water.ufl, the final three lines are something like:
(Vnew, Hnew) = split(solve(A,RHS)
state.scalar_fields["Height"] = Hnew
state.scalar_fields["Velocity"] = Vnew
This is done because the pressure and velocity are coupled in this method - how does this fit into the idea that we have to check what the UFL returns when it is the code for a given field?
Good point, I hadn't thought of this case. Presumably, coupled fields will give us more headaches than this. However, I would assume that in the flml file for the shallow water model it would be indicated that these fields are coupled.
I'm not sure this is a valid issue, since we stalled the discussion 10 months ago after mentioning that this isn't that straightforward for coupled fields, and I don't think this is much of an important thing to check for anyway. Shall we close it?
When we have a UFL equation for a field Tracer we need to make sure
Suppose we have UFL input like this
we need to check that there is an assignment to
state.scalar_fields["Tracer"]
but not to any other field instate