[Gmsh] Getting a .geo variable into a Field[1].F equation

Mark Starnes mark.starnes at fttech.co.uk
Fri Apr 27 16:52:34 CEST 2012


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