-
Notifications
You must be signed in to change notification settings - Fork 0
/
parallel_upscale.xml
107 lines (99 loc) · 4.04 KB
/
parallel_upscale.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<ServerManagerConfiguration>
<ProxyGroup name="filters">
<SourceProxy name="ParallelUpscale" class="vtkPythonProgrammableFilter"
label="ParallelUpscale">
<Documentation>
long_help=""
short_help=""
</Documentation>
<InputProperty
name="Input"
command="SetInputConnection">
<ProxyGroupDomain name="groups">
<Group name="sources"/>
<Group name="filters"/>
</ProxyGroupDomain>
<DataTypeDomain name="input_type">
<DataType value="vtkDataSet"/>
</DataTypeDomain>
</InputProperty>
<!-- Output data type: "vtkStructuredGrid" -->
<IntVectorProperty
name="OutputDataSetType"
command="SetOutputDataSetType"
number_of_elements="1"
default_values="2"
panel_visibility="never">
</IntVectorProperty>
<StringVectorProperty
name="GridFile"
label="GridFile"
initial_string="GridFile"
command="SetParameter"
animateable="1"
default_values="/home/peter/Codes/BOUT-dev/examples/stellarator/fci.y_no_end.nc"
number_of_elements="1">
<Documentation></Documentation>
<FileListDomain name="files"/>
</StringVectorProperty>
<IntVectorProperty
name="UpscaleFactor"
label="UpscaleFactor"
initial_string="UpscaleFactor"
command="SetParameter"
animateable="1"
default_values="2"
number_of_elements="1">
<Documentation></Documentation>
</IntVectorProperty>
<!-- the script -->
<StringVectorProperty
name="Script"
command="SetScript"
number_of_elements="1"
panel_visibility="advanced"
default_values='import sys
sys.path.append(r"/home/peter/Learning/paraview/boutimport")
import upscale
sgo = upscale.upscale(self, GridFile, UpscaleFactor)
'>
<Hints>
<Widget type="multi_line"/>
</Hints>
<Documentation>This property contains the text of a python program that
the programmable source runs.</Documentation>
</StringVectorProperty>
<!-- <StringVectorProperty -->
<!-- name="InformationScript" -->
<!-- label="RequestInformation Script" -->
<!-- command="SetInformationScript" -->
<!-- number_of_elements="1" -->
<!-- panel_visibility="advanced" -->
<!-- default_values='executive = self.GetExecutive()
out_info = executive.GetOutputInformation(0)
out_info.Set(executive.WHOLE_EXTENT(), 0, 132-1, 0, UpscaleFactor*16-1, 0, 128-1)
'> -->
<!-- <Hints> -->
<!-- <Widget type="multi_line"/> -->
<!-- </Hints> -->
<!-- <Documentation>This property is a python script that is executed during -->
<!-- the RequestInformation pipeline pass. Use this to provide information -->
<!-- such as WHOLE_EXTENT to the pipeline downstream.</Documentation> -->
<!-- </StringVectorProperty> -->
<StringVectorProperty
name="UpdateExtentScript"
label="RequestUpdateExtent Script"
command="SetUpdateExtentScript"
number_of_elements="1"
panel_visibility="advanced"
default_values='import vtk
connection = 0
inInfo = self.GetInputInformation(0, connection)
wholeExtent = inInfo.Get(vtk.vtkStreamingDemandDrivenPipeline.WHOLE_EXTENT())
wholeExtent[3] = wholeExtent[3]*UpscaleFactor
inInfo.Set(vtk.vtkStreamingDemandDrivenPipeline.WHOLE_EXTENT(), wholeExtent, len(wholeExtent))
inInfo.Set(vtk.vtkStreamingDemandDrivenPipeline.UPDATE_EXTENT(), wholeExtent, len(wholeExtent))
'>
<Hints>
<Widget type="multi_line"/>
</Hints>
<Documentation>This property is a python script that is executed during
the RequestUpdateExtent pipeline pass. Use this to modify the update
extent that your filter ask up stream for.</Documentation>
</StringVectorProperty>
</SourceProxy>
</ProxyGroup>
</ServerManagerConfiguration>