~grm08/fluidity/hilbert-for-pyop2

« back to all changes in this revision

Viewing changes to schemas/burgers_equation.rng

  • Committer: tmb1
  • Date: 2010-10-27 12:18:35 UTC
  • Revision ID: svn-v4:5bf5533e-7014-46e3-b1bb-cce4b9d03719:trunk:2279
Adding a new schemas/ directory following discussion at the dev meeting and
moving all *.rn[c|g] files into it. I'm no schema expert so this may well
require various changes elsewhere to maintain consistency; please could those
who know what they're doing make these changes!

Patrick in particular - please update spud accordingly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8"?>
 
2
<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">
 
3
  <include href="spud_base.rng"/>
 
4
  <include href="adaptivity_options.rng"/>
 
5
  <include href="diagnostic_algorithms.rng"/>
 
6
  <include href="input_output.rng"/>
 
7
  <include href="solvers.rng"/>
 
8
  <include href="stabilisation.rng"/>
 
9
  <include href="reduced_model.rng"/>
 
10
  <include href="mesh_options.rng"/>
 
11
  <include href="physical_parameters.rng"/>
 
12
  <include href="prognostic_field_options.rng"/>
 
13
  <include href="prescribed_field_options.rng"/>
 
14
  <include href="spatial_discretisation.rng"/>
 
15
  <include href="temporal_discretisation.rng"/>
 
16
  <start>
 
17
    <element name="burgers_equation">
 
18
      <a:documentation>The root node of the options dictionary.</a:documentation>
 
19
      <ref name="comment"/>
 
20
      <element name="simulation_name">
 
21
        <a:documentation>Model output files are named according to the simulation
 
22
name, e.g. [simulation_name]_0.vtu. Non-standard
 
23
characters in the simulation name should be avoided.</a:documentation>
 
24
        <ref name="anystring"/>
 
25
      </element>
 
26
      <ref name="geometry"/>
 
27
      <ref name="timestepping"/>
 
28
      <ref name="material_phase"/>
 
29
    </element>
 
30
  </start>
 
31
  <define name="geometry">
 
32
    <element name="geometry">
 
33
      <a:documentation>Options dealing with the specification of geometry</a:documentation>
 
34
      <element name="dimension">
 
35
        <a:documentation>Dimension of the problem.
 
36
&lt;b&gt;This can only be set once&lt;/b&gt;</a:documentation>
 
37
        <attribute name="replaces">
 
38
          <value>NDIM</value>
 
39
        </attribute>
 
40
        <element name="integer_value">
 
41
          <attribute name="rank">
 
42
            <value>0</value>
 
43
          </attribute>
 
44
          <value>1</value>
 
45
        </element>
 
46
      </element>
 
47
      <element name="mesh">
 
48
        <a:documentation>The position mesh</a:documentation>
 
49
        <attribute name="name">
 
50
          <value>CoordinateMesh</value>
 
51
        </attribute>
 
52
        <ref name="mesh_info_fromfile"/>
 
53
      </element>
 
54
      <element name="mesh">
 
55
        <a:documentation>The velocity mesh</a:documentation>
 
56
        <attribute name="name">
 
57
          <value>VelocityMesh</value>
 
58
        </attribute>
 
59
        <ref name="mesh_info_frommesh"/>
 
60
      </element>
 
61
      <element name="quadrature">
 
62
        <a:documentation>Quadrature</a:documentation>
 
63
        <element name="degree">
 
64
          <a:documentation>Quadrature degree
 
65
 
 
66
note: this specifies the degree of quadrature,
 
67
not the number of gauss points</a:documentation>
 
68
          <attribute name="replaces">
 
69
            <value>NGI</value>
 
70
          </attribute>
 
71
          <ref name="integer"/>
 
72
        </element>
 
73
        <optional>
 
74
          <element name="surface_degree">
 
75
            <a:documentation>Surface quadrature degree
 
76
 
 
77
note: this specifies the degree of surface
 
78
quadrature not the number of surface gauss points</a:documentation>
 
79
            <attribute name="replaces">
 
80
              <value>SNGI</value>
 
81
            </attribute>
 
82
            <ref name="integer"/>
 
83
          </element>
 
84
        </optional>
 
85
      </element>
 
86
    </element>
 
87
  </define>
 
88
  <define name="mesh_choice_coordinate">
 
89
    <element name="mesh">
 
90
      <attribute name="name">
 
91
        <value>CoordinateMesh</value>
 
92
      </attribute>
 
93
    </element>
 
94
  </define>
 
95
  <define name="mesh_choice">
 
96
    <choice>
 
97
      <element name="mesh">
 
98
        <attribute name="name">
 
99
          <value>VelocityMesh</value>
 
100
        </attribute>
 
101
      </element>
 
102
      <element name="mesh">
 
103
        <attribute name="name">
 
104
          <value>CoordinateMesh</value>
 
105
        </attribute>
 
106
      </element>
 
107
    </choice>
 
108
  </define>
 
109
  <define name="mesh_info_fromfile">
 
110
    <element name="from_file">
 
111
      <a:documentation>Read mesh from file.</a:documentation>
 
112
      <choice>
 
113
        <element name="format">
 
114
          <a:documentation>Triangle mesh format.
 
115
 
 
116
Enter the base name without the .edge .ele, .face or
 
117
.node extensions, and without process numbers.</a:documentation>
 
118
          <attribute name="name">
 
119
            <value>triangle</value>
 
120
          </attribute>
 
121
          <ref name="comment"/>
 
122
        </element>
 
123
        <element name="format">
 
124
          <a:documentation>Read the mesh from a vtu. Note that the mesh will have no 
 
125
surface or region IDs.</a:documentation>
 
126
          <attribute name="name">
 
127
            <value>vtu</value>
 
128
          </attribute>
 
129
          <ref name="comment"/>
 
130
        </element>
 
131
        <element name="format">
 
132
          <a:documentation>GMSH mesh format</a:documentation>
 
133
          <attribute name="name">
 
134
            <value>gmsh</value>
 
135
          </attribute>
 
136
          <ref name="comment"/>
 
137
        </element>
 
138
      </choice>
 
139
      <attribute name="file_name">
 
140
        <data type="string"/>
 
141
      </attribute>
 
142
      <ref name="from_file_mesh_stat_options"/>
 
143
      <ref name="comment"/>
 
144
    </element>
 
145
  </define>
 
146
  <define name="mesh_info_frommesh">
 
147
    <element name="from_mesh">
 
148
      <a:documentation>Make mesh from existing mesh. </a:documentation>
 
149
      <ref name="mesh_choice_coordinate"/>
 
150
      <optional>
 
151
        <element name="mesh_shape">
 
152
          <optional>
 
153
            <element name="polynomial_degree">
 
154
              <ref name="integer"/>
 
155
            </element>
 
156
          </optional>
 
157
          <optional>
 
158
            <element name="element_type">
 
159
              <element name="string_value">
 
160
                <value>lagrangian</value>
 
161
              </element>
 
162
            </element>
 
163
          </optional>
 
164
        </element>
 
165
      </optional>
 
166
      <ref name="derived_mesh_stat_options"/>
 
167
      <ref name="comment"/>
 
168
    </element>
 
169
  </define>
 
170
  <define name="timestepping">
 
171
    <element name="timestepping">
 
172
      <a:documentation>Options dealing with time discretisation</a:documentation>
 
173
      <element name="current_time">
 
174
        <a:documentation>Current simulation time. At the start of the simulation this
 
175
is the start time.</a:documentation>
 
176
        <attribute name="replaces">
 
177
          <value>ACCTIM</value>
 
178
        </attribute>
 
179
        <ref name="real"/>
 
180
      </element>
 
181
      <element name="timestep">
 
182
        <a:documentation>The time step size. If adaptive time stepping is used
 
183
then this is the initial time step size.</a:documentation>
 
184
        <attribute name="replaces">
 
185
          <value>DT</value>
 
186
        </attribute>
 
187
        <ref name="real"/>
 
188
      </element>
 
189
      <element name="finish_time">
 
190
        <a:documentation>Simulation time at which the simulation should end.</a:documentation>
 
191
        <attribute name="replaces">
 
192
          <value>LTIME</value>
 
193
        </attribute>
 
194
        <ref name="real"/>
 
195
      </element>
 
196
      <optional>
 
197
        <element name="final_timestep">
 
198
          <a:documentation>Timestep after which the simulation should end.</a:documentation>
 
199
          <ref name="integer"/>
 
200
        </element>
 
201
      </optional>
 
202
      <optional>
 
203
        <element name="nonlinear_iterations">
 
204
          <a:documentation>Number of non-linear iterations.
 
205
 
 
206
Manual suggests 2</a:documentation>
 
207
          <attribute name="replaces">
 
208
            <value>ITINOI</value>
 
209
          </attribute>
 
210
          <ref name="integer"/>
 
211
        </element>
 
212
      </optional>
 
213
    </element>
 
214
  </define>
 
215
  <define name="material_phase">
 
216
    <element name="material_phase">
 
217
      <a:documentation>The material phase options</a:documentation>
 
218
      <attribute name="name">
 
219
        <value>Fluid</value>
 
220
      </attribute>
 
221
      <element name="scalar_field">
 
222
        <attribute name="rank">
 
223
          <value>0</value>
 
224
        </attribute>
 
225
        <attribute name="name">
 
226
          <value>Velocity</value>
 
227
        </attribute>
 
228
        <element name="prognostic">
 
229
          <element name="mesh">
 
230
            <attribute name="name">
 
231
              <value>VelocityMesh</value>
 
232
            </attribute>
 
233
          </element>
 
234
          <optional>
 
235
            <element name="temporal_discretisation">
 
236
              <a:documentation>Options dealing with the temporal discretisation of velocity</a:documentation>
 
237
              <element name="theta">
 
238
                <a:documentation>The degree of implicitness in the timestepping. 
 
239
0 is fully explicit, 1 is implicit, 0.5 is Crank-Nicolson.
 
240
Recommended to be 0.5.</a:documentation>
 
241
                <ref name="real"/>
 
242
              </element>
 
243
              <element name="relaxation">
 
244
                <a:documentation>The relaxation term in the nonlinear iterations at each timestep
 
245
0 means the previous timestep velocity is used to form the advection operator,
 
246
while 1 means the best guess of the next timestep velocity is used.
 
247
Recommended to be 0.5.</a:documentation>
 
248
                <ref name="real"/>
 
249
              </element>
 
250
            </element>
 
251
          </optional>
 
252
          <element name="solver">
 
253
            <ref name="linear_solver_options_asym"/>
 
254
          </element>
 
255
          <ref name="initial_condition_scalar"/>
 
256
          <oneOrMore>
 
257
            <ref name="boundary_conditions"/>
 
258
          </oneOrMore>
 
259
          <element name="viscosity">
 
260
            <ref name="real"/>
 
261
          </element>
 
262
          <element name="stat">
 
263
            <ref name="comment"/>
 
264
          </element>
 
265
          <element name="scalar_field">
 
266
            <attribute name="name">
 
267
              <value>Source</value>
 
268
            </attribute>
 
269
            <attribute name="rank">
 
270
              <value>0</value>
 
271
            </attribute>
 
272
            <element name="prescribed">
 
273
              <ref name="prescribed_scalar_field_no_adapt"/>
 
274
              <optional>
 
275
                <ref name="recalculation_options"/>
 
276
              </optional>
 
277
            </element>
 
278
          </element>
 
279
        </element>
 
280
      </element>
 
281
      <zeroOrMore>
 
282
        <element name="scalar_field">
 
283
          <attribute name="rank">
 
284
            <value>0</value>
 
285
          </attribute>
 
286
          <attribute name="name">
 
287
            <data type="string" datatypeLibrary=""/>
 
288
          </attribute>
 
289
          <choice>
 
290
            <element name="prescribed">
 
291
              <ref name="mesh_choice"/>
 
292
              <ref name="prescribed_scalar_field"/>
 
293
            </element>
 
294
            <element name="diagnostic">
 
295
              <ref name="mesh_choice"/>
 
296
              <ref name="diagnostic_scalar_field"/>
 
297
            </element>
 
298
          </choice>
 
299
        </element>
 
300
      </zeroOrMore>
 
301
    </element>
 
302
  </define>
 
303
  <define name="boundary_conditions">
 
304
    <element name="boundary_conditions">
 
305
      <a:documentation>Boundary conditions</a:documentation>
 
306
      <attribute name="name">
 
307
        <data type="string" datatypeLibrary=""/>
 
308
      </attribute>
 
309
      <element name="surface_ids">
 
310
        <a:documentation>Surface id</a:documentation>
 
311
        <ref name="integer_vector"/>
 
312
      </element>
 
313
      <element name="type">
 
314
        <attribute name="name">
 
315
          <value>neumann</value>
 
316
        </attribute>
 
317
        <ref name="input_choice_real"/>
 
318
      </element>
 
319
    </element>
 
320
  </define>
 
321
  <define name="prescribed_output_options">
 
322
    <empty/>
 
323
  </define>
 
324
  <define name="prescribed_detector_options">
 
325
    <empty/>
 
326
  </define>
 
327
  <define name="prescribed_scalar_stat_options">
 
328
    <empty/>
 
329
  </define>
 
330
  <define name="discrete_properties_algorithm_scalar">
 
331
    <empty/>
 
332
  </define>
 
333
  <define name="recalculation_options">
 
334
    <element name="do_not_recalculate">
 
335
      <a:documentation>Prevent this field from being recalculated at every timestep.
 
336
This is cheaper especially if you are enforcing discrete properties on the field.</a:documentation>
 
337
      <empty/>
 
338
    </element>
 
339
  </define>
 
340
  <define name="diagnostic_scalar_field">
 
341
    <ref name="scalar_python_diagnostic_algorithm"/>
 
342
    <element name="stat">
 
343
      <ref name="comment"/>
 
344
    </element>
 
345
    <optional>
 
346
      <ref name="recalculation_options"/>
 
347
    </optional>
 
348
  </define>
 
349
</grammar>