Is it possible to set the fespace itself as an input argument of a self-defined func function? My problem is related to the node id of the fespace, and a simplified example is as follows:
mesh Th = square(2, 2);
fespace Wh(Th, P2);
for (int k = 0; k < Th.nt; k++) {
for (int i = 0; i < 6; i++) {
int j = Wh(k, i);
cout << j << " ";
}
cout << endl;
}
Is it possible to define a function and use the fespace Wh as an input argument? A test is as follows, but an error called syntax error before token fespace occurs.
func int test(fespace Wh) {
int j = Wh(0, 0);
return j;
}
If it is not possible to implement such function, should the mesh Th be the input argument, or just define the mesh and fespace within the func function?