1

我目前正在尝试使用

paraview.simple.Histogram(Input, params)

作为

paraview.simple.Histogram(q, BinCount = 30) 

在 shell 中,q 是我的“out.e”ExodusII 文件中的变量数据集。我收到错误

Traceback (most recent call last):
  File "<console>", line 1, in <module>
NameError: name 'q' is not defined

我试图在 Paraview 中搜索有关 python shell 脚本的文献,但它似乎在逃避我。我知道这是一个快速修复。谢谢

4

2 回答 2

1

试试这个:

Histogram(SelectInputArray="q", BinCount=30)

这假设您当前将阅读器作为管道浏览器中的活动对象。

于 2014-08-28T00:50:56.293 回答
0

我能够使用以下方法回答这个问题。

outset = Reader(FileName=['/dir/out.e'])

对于直方图

histogram1_1 = Histogram(Input=outset)
    histogram1_1.SelectInputArray = ['CELLS', 'q']
    histogram1_1.BinCount = 30

遇到此问题的任何人请注意,当您在 GUI 中执行任何操作时,Python Shell 中的 TRACE 选项将为您构建一个脚本。

于 2014-09-01T22:28:04.437 回答