Hi!
If I want to set a limit for a function I could do the following:
# For MPI.
x.apply("")
x.vector().set_local(numpy.minimum(numpy.maximum(min_value, x.vector().array()), max_value))
# Finalize a tensor.
x.apply("")
where x is a dolfin.Function:
mesh = UnitSquare(8, 8)
V = VectorFunctionSpace(mesh, "Lagrange", 2)
Q = FunctionSpace(mesh, "Lagrange", 1)
VQ = V * Q
x = Function(VQ)
min_value is a lower bound;
max_value is an upper bound.
My question is:
How to set different lower and upper limit for a first and second function subspace in a mixed function space?
Thanks in advance!