Hi all,
I want to use the result of a simulation as input to another simulation (after a few mathematical manipulations).
For example, I obtain the result U of simulation #1 as GridFunction. Here, I can take the derivative w.r.t. to the spatial coordinates using U.Deriv().
However, when I take for example U*U, the result is a CoefficientFunction, which can only be differentiated symbolically (which would result in 0, as the data is only numeric). In order to perform something like .Deriv(), I would have to interpolate the CoefficientFunction on the grid using gfu.Set() first. But this is very slow, because I have to do it for many functions. Is there any way around this, so that the differentiation w.r.t. to the spatial coordinates is possible directly?
Best regards