Invalide array size

Hello again,

I have the following lines:

> load "SLEPc-complex"
> include "macro_ddm.idp"
> 
> mesh Th=readmesh("D:\\Test\\Mesh.msh");		
> plot (Th, cmm="Mesh.msh", wait=true);
> 
> func E = [P2, P2, P2, P1];
> fespace XXXXFES(Th, E);	    
> 		XXXXFES<complex>[ue,ve,we,pe]; 
> 		XXXXFES<complex>[hx,hy,hz,q];	
> 		XXXXFES[Ub,Vb,Wb,Pb];		    
> 
> Mat<complex> M;
> createMat(Th, M, E)

When I run the program I get the following error:

I also tried to write directly [P2, P2, P2, P1] instead of declaring a function E but it still doesn’t work and I don’t understand why. Writing only one element like createMat(Th, M, P2) works but otherwise I get this error. I also mention that the examples available run with no problem. May it be related somehow to the mesh? It was obtained from a single core simulation.
Thank you in advance!

As shown in the error message, the vectorial macros def and init is missing (scalar macros by default). You can do it in the following way.

Mat<complex> M;
{
    macro def(u) [u, u#B, u#C, u#D] //
    macro init(u) [u, u, u, u] //
    createMat(Th, M, E);
}

Thanks

Thank you, it works now.