On 22/giu/09, at 13:00, Rostislav Khlebnikov wrote:
is there any reason for not making FEFieldFunction::set_active_cell
virtual?
I'll explain my use-case and why I need that polymorphic behaviour.
I have an electric potential distribution in volume and I need to
calculate Joule heat. It depends on gradient of electric potential,
which is a result of finite element calculation. Thus I use
FEFieldFunction to calculate those gradients. Plus to that Joule
heat also depends on electric conductivity (which is also a
FEFieldFunction on the same DoFHandler). And so, I need to propagate
set_active_cell to both of these functions (and it would be nice if
I could maintain at least FEFieldFunction abstraction). It doesn't
seem to be possible without virtual set_active_cell().
There is no particular reason, except the fact that I never needed
another level of abstraction.
Still it is not clear to me why you would need that to be virtual.
What you need only requires subsequent calls to set_active_cell, as in
joule.set_active_cell(the_cell);
conductivity.set_active_cell(the_cell);
Maybe I don't understand your question...
Btw, FEFieldFunction was thought as a way to interpolate on arbitrary
points inside cells. If you are doing this with quadrature points, you
are probably better off using FEValues directly...
Luca.
--
Luca Heltai <[email protected]>
http://people.sissa.it/~heltai/
University of Pavia, Dep. of Mathematics
Phone : +39 0382 98 5680, Office: A10
--
There are no answers, only cross references.
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii