~grm08/fluidity/hilbert-for-pyop2

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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <include href="spud_base.rng"/>
  <include href="adaptivity_options.rng"/>
  <include href="diagnostic_algorithms.rng"/>
  <include href="input_output.rng"/>
  <include href="solvers.rng"/>
  <include href="stabilisation.rng"/>
  <include href="reduced_model.rng"/>
  <include href="mesh_options.rng"/>
  <include href="physical_parameters.rng"/>
  <include href="prognostic_field_options.rng"/>
  <include href="prescribed_field_options.rng"/>
  <include href="spatial_discretisation.rng"/>
  <include href="temporal_discretisation.rng"/>
  <start>
    <element name="burgers_equation">
      <a:documentation>The root node of the options dictionary.</a:documentation>
      <ref name="comment"/>
      <element name="simulation_name">
        <a:documentation>Model output files are named according to the simulation
name, e.g. [simulation_name]_0.vtu. Non-standard
characters in the simulation name should be avoided.</a:documentation>
        <ref name="anystring"/>
      </element>
      <ref name="geometry"/>
      <ref name="timestepping"/>
      <ref name="material_phase"/>
    </element>
  </start>
  <define name="geometry">
    <element name="geometry">
      <a:documentation>Options dealing with the specification of geometry</a:documentation>
      <element name="dimension">
        <a:documentation>Dimension of the problem.
&lt;b&gt;This can only be set once&lt;/b&gt;</a:documentation>
        <attribute name="replaces">
          <value>NDIM</value>
        </attribute>
        <element name="integer_value">
          <attribute name="rank">
            <value>0</value>
          </attribute>
          <value>1</value>
        </element>
      </element>
      <element name="mesh">
        <a:documentation>The position mesh</a:documentation>
        <attribute name="name">
          <value>CoordinateMesh</value>
        </attribute>
        <ref name="mesh_info_fromfile"/>
      </element>
      <element name="mesh">
        <a:documentation>The velocity mesh</a:documentation>
        <attribute name="name">
          <value>VelocityMesh</value>
        </attribute>
        <ref name="mesh_info_frommesh"/>
      </element>
      <element name="quadrature">
        <a:documentation>Quadrature</a:documentation>
        <element name="degree">
          <a:documentation>Quadrature degree

note: this specifies the degree of quadrature,
not the number of gauss points</a:documentation>
          <attribute name="replaces">
            <value>NGI</value>
          </attribute>
          <ref name="integer"/>
        </element>
        <optional>
          <element name="surface_degree">
            <a:documentation>Surface quadrature degree

note: this specifies the degree of surface
quadrature not the number of surface gauss points</a:documentation>
            <attribute name="replaces">
              <value>SNGI</value>
            </attribute>
            <ref name="integer"/>
          </element>
        </optional>
      </element>
    </element>
  </define>
  <define name="mesh_choice_coordinate">
    <element name="mesh">
      <attribute name="name">
        <value>CoordinateMesh</value>
      </attribute>
    </element>
  </define>
  <define name="mesh_choice">
    <choice>
      <element name="mesh">
        <attribute name="name">
          <value>VelocityMesh</value>
        </attribute>
      </element>
      <element name="mesh">
        <attribute name="name">
          <value>CoordinateMesh</value>
        </attribute>
      </element>
    </choice>
  </define>
  <define name="mesh_info_fromfile">
    <element name="from_file">
      <a:documentation>Read mesh from file.</a:documentation>
      <choice>
        <element name="format">
          <a:documentation>Triangle mesh format.

Enter the base name without the .edge .ele, .face or
.node extensions, and without process numbers.</a:documentation>
          <attribute name="name">
            <value>triangle</value>
          </attribute>
          <ref name="comment"/>
        </element>
        <element name="format">
          <a:documentation>Read the mesh from a vtu. Note that the mesh will have no 
surface or region IDs.</a:documentation>
          <attribute name="name">
            <value>vtu</value>
          </attribute>
          <ref name="comment"/>
        </element>
        <element name="format">
          <a:documentation>GMSH mesh format</a:documentation>
          <attribute name="name">
            <value>gmsh</value>
          </attribute>
          <ref name="comment"/>
        </element>
      </choice>
      <attribute name="file_name">
        <data type="string"/>
      </attribute>
      <ref name="from_file_mesh_stat_options"/>
      <ref name="comment"/>
    </element>
  </define>
  <define name="mesh_info_frommesh">
    <element name="from_mesh">
      <a:documentation>Make mesh from existing mesh. </a:documentation>
      <ref name="mesh_choice_coordinate"/>
      <optional>
        <element name="mesh_shape">
          <optional>
            <element name="polynomial_degree">
              <ref name="integer"/>
            </element>
          </optional>
          <optional>
            <element name="element_type">
              <element name="string_value">
                <value>lagrangian</value>
              </element>
            </element>
          </optional>
        </element>
      </optional>
      <ref name="derived_mesh_stat_options"/>
      <ref name="comment"/>
    </element>
  </define>
  <define name="timestepping">
    <element name="timestepping">
      <a:documentation>Options dealing with time discretisation</a:documentation>
      <element name="current_time">
        <a:documentation>Current simulation time. At the start of the simulation this
is the start time.</a:documentation>
        <attribute name="replaces">
          <value>ACCTIM</value>
        </attribute>
        <ref name="real"/>
      </element>
      <element name="timestep">
        <a:documentation>The time step size. If adaptive time stepping is used
then this is the initial time step size.</a:documentation>
        <attribute name="replaces">
          <value>DT</value>
        </attribute>
        <ref name="real"/>
      </element>
      <element name="finish_time">
        <a:documentation>Simulation time at which the simulation should end.</a:documentation>
        <attribute name="replaces">
          <value>LTIME</value>
        </attribute>
        <ref name="real"/>
      </element>
      <optional>
        <element name="final_timestep">
          <a:documentation>Timestep after which the simulation should end.</a:documentation>
          <ref name="integer"/>
        </element>
      </optional>
      <optional>
        <element name="nonlinear_iterations">
          <a:documentation>Number of non-linear iterations.

Manual suggests 2</a:documentation>
          <attribute name="replaces">
            <value>ITINOI</value>
          </attribute>
          <ref name="integer"/>
        </element>
      </optional>
    </element>
  </define>
  <define name="material_phase">
    <element name="material_phase">
      <a:documentation>The material phase options</a:documentation>
      <attribute name="name">
        <value>Fluid</value>
      </attribute>
      <element name="scalar_field">
        <attribute name="rank">
          <value>0</value>
        </attribute>
        <attribute name="name">
          <value>Velocity</value>
        </attribute>
        <element name="prognostic">
          <element name="mesh">
            <attribute name="name">
              <value>VelocityMesh</value>
            </attribute>
          </element>
          <optional>
            <element name="temporal_discretisation">
              <a:documentation>Options dealing with the temporal discretisation of velocity</a:documentation>
              <element name="theta">
                <a:documentation>The degree of implicitness in the timestepping. 
0 is fully explicit, 1 is implicit, 0.5 is Crank-Nicolson.
Recommended to be 0.5.</a:documentation>
                <ref name="real"/>
              </element>
              <element name="relaxation">
                <a:documentation>The relaxation term in the nonlinear iterations at each timestep
0 means the previous timestep velocity is used to form the advection operator,
while 1 means the best guess of the next timestep velocity is used.
Recommended to be 0.5.</a:documentation>
                <ref name="real"/>
              </element>
            </element>
          </optional>
          <element name="solver">
            <ref name="linear_solver_options_asym"/>
          </element>
          <ref name="initial_condition_scalar"/>
          <oneOrMore>
            <ref name="boundary_conditions"/>
          </oneOrMore>
          <element name="viscosity">
            <ref name="real"/>
          </element>
          <element name="stat">
            <ref name="comment"/>
          </element>
          <element name="scalar_field">
            <attribute name="name">
              <value>Source</value>
            </attribute>
            <attribute name="rank">
              <value>0</value>
            </attribute>
            <element name="prescribed">
              <ref name="prescribed_scalar_field_no_adapt"/>
              <optional>
                <ref name="recalculation_options"/>
              </optional>
            </element>
          </element>
        </element>
      </element>
      <zeroOrMore>
        <element name="scalar_field">
          <attribute name="rank">
            <value>0</value>
          </attribute>
          <attribute name="name">
            <data type="string" datatypeLibrary=""/>
          </attribute>
          <choice>
            <element name="prescribed">
              <ref name="mesh_choice"/>
              <ref name="prescribed_scalar_field"/>
            </element>
            <element name="diagnostic">
              <ref name="mesh_choice"/>
              <ref name="diagnostic_scalar_field"/>
            </element>
          </choice>
        </element>
      </zeroOrMore>
    </element>
  </define>
  <define name="boundary_conditions">
    <element name="boundary_conditions">
      <a:documentation>Boundary conditions</a:documentation>
      <attribute name="name">
        <data type="string" datatypeLibrary=""/>
      </attribute>
      <element name="surface_ids">
        <a:documentation>Surface id</a:documentation>
        <ref name="integer_vector"/>
      </element>
      <element name="type">
        <attribute name="name">
          <value>neumann</value>
        </attribute>
        <ref name="input_choice_real"/>
      </element>
    </element>
  </define>
  <define name="prescribed_output_options">
    <empty/>
  </define>
  <define name="prescribed_detector_options">
    <empty/>
  </define>
  <define name="prescribed_scalar_stat_options">
    <empty/>
  </define>
  <define name="discrete_properties_algorithm_scalar">
    <empty/>
  </define>
  <define name="recalculation_options">
    <element name="do_not_recalculate">
      <a:documentation>Prevent this field from being recalculated at every timestep.
This is cheaper especially if you are enforcing discrete properties on the field.</a:documentation>
      <empty/>
    </element>
  </define>
  <define name="diagnostic_scalar_field">
    <ref name="scalar_python_diagnostic_algorithm"/>
    <element name="stat">
      <ref name="comment"/>
    </element>
    <optional>
      <ref name="recalculation_options"/>
    </optional>
  </define>
</grammar>