← Back to team overview

dolfin team mailing list archive

Re: Interpolate coefficients for a sub function

 



Anders Logg wrote:
On Sat, Dec 27, 2008 at 03:18:24PM +0000, Garth N. Wells wrote:
Any thoughts on an interpolate function in Function which would interpolate coefficients of a sub function only? At the moment, I have a solver in which I can't use SpecialFunction::IsOutFlowFacet because the velocity is a sub function of the solution Function. I can use SubFunction, but SubFunction makes a copy of the vector every time. I can think of a number of other examples in which this would be useful.

An alternative would be to have a variant on a SubFunction which shares the vector of the Function it is a part of.

Garth

Is the copying of values expensive?

It's intuitively (to me) not very nice to make a copy of a large part of the solution vector just to decide if a facet is inflow or outflow.

Now that you have added caching of
(sub) function spaces, I imagine the copying should be very fast and
be only a fraction of the cost for calling IsOutflowFacet::eval() on
all cells.


There is quite a bit of code in IsOutflowFacet::eval(). Does anyone have a feeling for the cost of this?

Garth






------------------------------------------------------------------------

_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev



Follow ups

References