
load "funcTemplate"
 
mesh Th=square(3,3);
fespace Vh(Th,P1);

Vh N;
for(int i=0; i<N.n; i++) {
 N[][i] = i+0.1;
}

Vh P = 2.0;
Vh uh1;
real a;

// OUTPUT:
//    uh1[]
// INPUT:
//    N[]
//    P[]
// Description:
//  make the product N[] .* P[]
//
CppModTemplate3(uh1[], N[], P[]);
cout << endl;
cout << "uh1: " << uh1[].min  << " " << uh1[].max << endl;


CppModTemplate4(uh1[], N[], P[], P[]);
cout << endl;
cout << "uh1: " << uh1[].min  << " " << uh1[].max << endl;

CppModTemplate5(uh1[], N[], P[], P[], P[]);
cout << endl;
cout << "5 args: uh1: " << uh1[].min  << " " << uh1[].max << endl;

CppModTemplate6(uh1[], N[], P[], P[], P[], P[]);
cout << endl;
cout << "6 args: uh1: " << uh1[].min  << " " << uh1[].max << endl;                                                                                                                                           
                                                                                                                                           
CppModTemplate7(uh1[], N[], P[], P[], P[], P[], P[]);
cout << endl;
cout << "7 args: uh1: " << uh1[].min  << " " << uh1[].max << endl; 


CppModTemplate8(uh1[], N[], P[], P[], P[], P[], P[], P[]);
cout << endl;
cout << "8 args: uh1: " << uh1[].min  << " " << uh1[].max << endl; 
cout << " funcs1 " << funcs1(2) << endl;
cout << " funcs2 " << funcs2(2,3) << endl;
cout << " funcs3 " << funcs3(1,2,3) << endl;



Vh[int] U(10); // Array of finite element function 
for(int i=0; i<10; ++i)
  U[i]= i; 
//  plot(U,wait=1);	
cout << "test = "<< test(U) << endl; 
