Hello,
I'm trying to compute the element wise minimum of a function, that is I need a P_0 function which is smaller than the original function.
mesh = UnitSquareMesh( 10, 10 )
space = FunctionSpace( mesh, "CG", 1 )
spaceP0 = FunctionSpace( mesh, "DG", 0 )
fun = interpolate( Expression( "sin( x[0] * pi ) * sin( x[1] * pi )" ), space )
funP0 = Function( spaceP0 )
# compute values of funP0 such that funP0 <= fun
Has anybody an idea how to do this fast and high level?
Thanks in advance,
Jo