Problem in using "NekPy" instead of "FieldConvert" utility
******************* This email originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address. ******************* Dear all, I'm using "FieldConvert" utility (Shell command) multiple times in a python code and it is working well. Now I want to use NekPy modules instead to decrease running time of "FieldConvert" execution. But I ran into a problem and I can't solve it. I will give you a simple example: In a python code, when I run the following two similar "FiledConvert" shell commands, I expect to get two identical output and I get it correctly: !FieldConvert -f -m gradient mesh.xml fields.fld output1.fld !FieldConvert -f -m gradient mesh.xml fields.fld output2.fld And in NekPy when I run the equivalent codes twice in my .py code: from NekPy.FieldUtils import * import sys field = Field(sys.argv, force_output=True) InputModule.Create("xml", field, "mesh.xml").Run() InputModule.Create("fld", field, "fields.fld").Run() ProcessModule.Create("gradient", field).Run() OutputModule.Create("fld", field, output1).Run() InputModule.Create("xml", field, "mesh.xml").Run() InputModule.Create("fld", field, "fields.fld").Run() ProcessModule.Create("gradient", field).Run() OutputModule.Create("fld", field, output2).Run() I get two different outputs, output1.fld and output2.fld It seems that both "gradient" ProcessModule are used in the second output. I can't find a way to prevent the first "gradient" module from being used in the second output. Surely this problem have an easy solution. I would be grateful if you could help me solve this problem. Sina.
participants (1)
- 
                
                Sina Asadi