Issue in plotting data with two components (Stokes problem)

Hello all,

I am solving the Stokes problem in 2D (with the two component u and v). Thus I define the FE space for velocity as:

fespace VhK(ThK, [P2, P2]);

and I build a FE array PhiK to store the velocity computed (I don’t know why I have to define a second vector in the same time) :

VhK  [PhiK, PhiK2]

Thus when I store the values, my array PhiK looks like:

PhiK =[u1, v1, u2, v2, ....................u_N, v_N ]

When I do plot(PhiK), it’s seem’s that only the first component u is plotted.

Could someone help me to plot such data in 2D (with vectors field) ?

Thank you in advance for your help,

Best regards,


Just plot([PhiK,PhiK2]); like in example FreeFem-sources/Stokes-eigen.edp at master · FreeFem/FreeFem-sources · GitHub

Thank you @frederichecht ,

It’s work fine,

Best regards,