Discussion:
[ff3d-users] possibility to define x = convect([U,V,W],dt,Z); outside a solve command ?
Benoit_Desjardins
2007-07-11 10:52:39 UTC
Permalink
Hello Stephane

thanks for your help on Robin boundary conditions !

There is another question I would like to ask you :

As far as I remember, it was possible in freefem2D to define an
auxiliary variable on a mesh M

x = convect([U,V,W],dt,Z);

outside of a "solve" command.
It does not seem to be the case in ff3d (I get a "Segmentation fault").

My idea was to save CP time by pre-computing "x" and use it in several
"solve" loops.

thanks again

Benoit
Stephane Del Pino
2007-07-11 22:33:35 UTC
Permalink
Post by Benoit_Desjardins
Hello Stephane
Hello Benoit.
Post by Benoit_Desjardins
thanks for your help on Robin boundary conditions !
As far as I remember, it was possible in freefem2D to define an
auxiliary variable on a mesh M
x = convect([U,V,W],dt,Z);
outside of a "solve" command.
It does not seem to be the case in ff3d (I get a "Segmentation fault").
The segfault is not normal. This is a bug. Can you send me the example?
How ever, it is possible to define a function:
function c = convect([U,V,W],dt,Z);
this defines the function c to be the expression convect([U,V,W],dt,Z)
Post by Benoit_Desjardins
My idea was to save CP time by pre-computing "x" and use it in several
"solve" loops.
In that case, you must store it in a fem function, the previous example stores
only the function (convection) but not the values :
femfunction c(Z) = convect([U,V,W],dt,Z);
This evaluates the function at degrees of freedom. It might be better to solve
a L^2 projection to compute c, since the convection will be evaluated a
quadrature vertices.

Best regards,
Stéphane.
Stephane Del Pino
2007-07-12 05:26:30 UTC
Permalink
Hello,
Post by Stephane Del Pino
femfunction c(Z) = convect([U,V,W],dt,Z);
femfunction c(M) = convect([U,V,W],dt,Z);
of course. Where M is a mesh.

Regards,
Stéphane.

Loading...