How to define the conditional expression

Hi, everyone

I want to define a vector-valued function, for example:

\boldsymbol{u}(x, y)= \begin{cases} \boldsymbol{0}, & r(x, y)<0.1 \\ \left(\begin{array}{ll} 4(r(x, y)-0.1)^3 \frac{x}{r(x, y)} \\ 4(r(x, y)-0.1)^3 \frac{y}{r(x, y)} \end{array},\right. & r(x, y) \geqslant 0.1\end{cases}

r(x,y) is the radius.

How can I implement this? I only know how to implement scalar-valued functions with conditions.

You would have to implement each component with a conditional and use ufl.as_vector([cond_x, cond_y, cond_z)) to cast it into a vector.