How is FieldEngine.ExprEngine.h supposed to work?
Richard Guenther
rguenth at tat.physik.uni-tuebingen.de
Sun Nov 9 12:48:01 UTC 2003
Hi!
I just stumbeled over FieldEngine.ExprEngine and wonder how sub-field
views are supposed to work here. In fact, I get errors about missing
Engine<>(int c, Engine& model) constructors from
(a + b).center(0)
as expected -- normal engines dont have sub-field constructors. But it
seems for material and subField views some constructors Engine<>(Engine&,
int) and Engine<>(Engine&, int, int) match - and somehow "work"!?
Only from reductions I get assertion failures, because the number of
subfields is not updated:
all(a.center(0)+b.center(0) == (a+b).center(0))
does not work.
So my idea of the code is, that the Fields in the expression are hidden
behind _one_ normal expression engine. And the Field information is taken
from the "FarLeft" Field in the expression. But where do the sub-fields
kick in? In fact,
a = b + c;
should evaluate for each subfield of a,b,c - no? How is this reflected
inside the normal expression engine? Wouldnt we have to "rewrite" the
expression tree for taking sub-field views as we do for taking normal
views of normal expression trees?
I'm a little bit confused... - are there some design documents available
about these issues?
Thanks for any hints,
Richard.
More information about the pooma-dev
mailing list