We are using a very simple tcl function to evaluate functions of the coordinates:

Code: Select all

`proc EvalDirichletCondition { value x y z } {`

set result 0.0

if { [catch { set result [format "%14.6f" [expr $value]] }]!=0} {

WarnWinText "Error in Dirichlet boundary conditions!"

}

return $result

}

Then we call this function on the .fix file:

Code: Select all

`*Set Cond PLCD_Initial_Velocity_2D *nodes`

*loop nodes *OnlyInCond

*set var x =NodesCoord(1)

*set var y =NodesCoord(2)

*set var z =NodesCoord(3)

[b]*format "%i %i%i %i %i"[/b]

*NodesNum *tcl(FemussEvalDirichletCondition *cond(Value_velocity_x) *x *y *z) *tcl(FemussEvalDirichletCondition *cond(Value_velocity_y) *x *y *z)

*end

We would like to write the result of the evaluation in a Scientific notation, however when we change the %i to %15.8e, for instance, we obtain the following error:

Error in base file ...: Bad integer format

Thank you for your help on this,

Kind regards,

Joan