March 27, 2015

From flair to bash script

[fluka-discuss]: Re: From flair to bash script: definition of constants (#define) from Ferreira De Almeida Lourenco, Ana on 2015-03-18 (fluka discuss archive) De: Eleftherios Skordis <eleftherios.skordis_at_cern.ch>
Enviado: 18 de mar�o de 2015 11:30
Para: Ferreira De Almeida Lourenco, Ana; fluka-discuss_at_fluka.org
Assunto: RE: From flair to bash script: definition of constants (#define)

Greetings Ana,

FLUKA only understands the values that are written in the actual FLUKA cards.
Flair uses its own quasi-cards starting with "!_at_" and the "what" of the card that is suppose to calculate.
When you change a variables value with your script you are just changing the text inside the input file and nothing else.
Unless you open flair and actually make a quasi-change and re-save the input file nothing will be changed.

However there is a way to update them through a bash script.

If you type flair -h you will find a list of very useful options for flair.
One of them is the "update | -u " which when combined with an input file it will "Recalculate and save input file variables".

e.g. flair -u test.inp

You can use that in your bash script after you have changed the value of the variable.

Kind regards

Lefteris

©