Of course. Consider 2 dimensional domain and suppose I have four functions f1, f2, f3 and f4 defined on the mesh. How can I define a piecewise function f on the mesh on 4 pieces of a unit square [0, 1] × [0,1]?
Something like:
f = f1, 0 <= x[0] <=1/2 and 0 <= x[1] <=1/2
f = f2, 1/2 <= x[0] <=1 and 0 <= x[1] <=1/2
f = f3, 0 <= x[0] <=1/2 and 1/2 <= x[1] <=1
f = f4, 1/2 <= x[0] <=1 and 1/2 <= x[1] <=1