[Gmsh] Getting a .geo variable into a Field[1].F equation
Praveen C
cpraveen at gmail.com
Fri Apr 27 17:00:29 CEST 2012
Try
Field[1].F = Sprintf("%g + Sin(x)", a);
On Fri, Apr 27, 2012 at 8:22 PM, Mark Starnes <mark.starnes at fttech.co.uk>wrote:
> Hi everyone,
>
> Is there a way to reference a variable defined in
> my geometry file in a Field[].F expression?
>
> For example,
>
> a = 4;
>
> Field[1] = MathEval;
> Field[1].F = "a + Sin(x)";
>
> reports,
>
> Error : Error [mathex::parseatom()]: invalid token on expression
> Error : a+Sin(x)
> Error : ^
> Error : Field 1: Invalid matheval expression "a+Sin(x)"
>
> when I try to mesh. This is version: 2.4.2
>
> Thanks in advance,
>
> Mark.
>
>
> --
> Dr. Mark Starnes
> Principal Physicist
> FT Technologies
> Church Lane
> Teddington
> TW11 8PA
>
> web: www.fttech.co.uk
> DDI: 0208 614 2730
>
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20120427/f54c71f9/attachment.html>