~skimura04/fluidity/fluidityDGSlope

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
mesh_info =
   (
      ## Read mesh from file.
      element from_file {
         (
            ## Triangle mesh format.
            ##
            ## Enter the base name without the .edge .ele, .face or
            ## .node extensions, and without process numbers.
            element format {
              attribute name { "triangle" },
              comment
            }|
            ## Read the mesh from a vtu. Note that the mesh will have no 
            ## surface or region IDs.
            element format {
              attribute name { "vtu" },
              comment
            }|
            ## GMSH mesh format
            element format {
               attribute name { "gmsh" },
               comment
            }
         ),
         attribute file_name { xsd:string },
         element dimension {
            integer
         }?,
         from_file_mesh_stat_options,
         comment
      }|
      ## Make mesh from existing mesh. 
      element from_mesh {
         mesh_choice,
         element mesh_shape {
            element polynomial_degree {
               integer
            }?,
            element element_type {
               ## Select the element type. "lagrangian" means the usual
               ## Pn element type. "bubble" adds bubble functions that
               ## vanish on the element boundaries, and
               ## trace defines an element that is only defined on faces
               ## and is undefined on the element interior (used for 
               ## enforcing continuity by Lagrange multipliers).
              element string_value{
                 "lagrangian" | "bubble" | "trace"
              }
            }?
         }?,
         element mesh_continuity {
            element string_value{
               "continuous" | "discontinuous"
            }
         }?,
         element constraint_type {
            ## Set the constraint type. This is used to implement
            ## div-conforming elements such as RT0 in a hybridised
            ## solver.
            element string_value{
               "BDM" | "BDFM" | "RT"
            },
            element solver {
               ## Solver is used to apply projections to div-conforming
               ## space, and in elliptic solvers
               linear_solver_options_sym
            }
         }?,
         ## Make mesh periodic
         element periodic_boundary_conditions {
            attribute name { xsd:string },
            ## List of boundary ids that are aliased to
            element physical_boundary_ids {
               integer_vector
            },
            ## List of boundary ids that are aliased
            element  aliased_boundary_ids {
               integer_vector
            },
            ## Python code which takes coordinate of an aliased
            ## boundary node and returns the coordinate of a physical
            ## boundary node.
            ## Note that in adaptive simulations this will be applied to
            ## arbitrary points in space, not just those on the original aliased
            ## boundary.
            element coordinate_map {
               python_code
            },
            ## Python code which takes coordinate of a physical
            ## boundary node and returns the coordinate of an aliased
            ## boundary node. This is used in adaptive simulations to
            ## keep the adapted domain inside the bounding box of the
            ## original domain.
            element inverse_coordinate_map {
               python_code
            }?,
            ## <b>Don't turn this on by hand!</b>
            ## This option gets set by the periodise tool, to indicate
            ## that this mesh should have the periodic boundary conditions
            ## <b>removed</b>. See the discussion on the wiki about 
            ## parallel periodic boundary conditions.
            element remove_periodicity {
               empty
            }?
         }*,
         ## Extrude a horizontal (1D or 2D) mesh in the vertical
         element extrude {
            (
              ## Extrusion options for WholeMesh
              ##
              ## Only specify one set of parameters if not using mesh regions.
              ## Otherwise select other regions option, specify region_ids
              ## and distinct names.  Then add extra regions for other regions.
              element regions {
                attribute name { "WholeMesh" },
                extrusion_options
              }|
              ## Multiple extrusion options are allowed if specifying
              ## different values in different
              ## regions of the mesh (defined by region_ids).  In this case
              ## each set of options
              ## requires a distinct name for the options dictionary.
              element regions {
                attribute name { string },
                region_ids?,
                extrusion_options
              }
            )+,
            ## This is an internal option used by checkpointing. The 
            ## option is switched on automatically in writing a 
            ## checkpoint, so that when starting from the checkpoint .flml
            ## fluidity picks up the extruded mesh from file. After the next
            ## adapt the extrusion is again done as specified in the other
            ## extrusion options and under the adaptivity options.
            element checkpoint_from_file {
               (
                  ## Triangle mesh format.
                  ##
                  ## Enter the base name without the .edge .ele, .face or
                  ## .node extensions, and without process numbers.
                  element format {
                     attribute name { "triangle" },
                     comment
                  }|

                  ## GMSH mesh format
                  element format {
                     attribute name { "gmsh" },
                     comment
                  }
               ),
               attribute file_name { xsd:string },
               comment
            }?
         }?,
         derived_mesh_stat_options,
         comment
      }
   )

# Options for inclusion/exclusion of mesh statistics from the .stat file
include_mesh_in_stat =
   (
      ## Include this mesh in the .stat file
      element include_in_stat {
         comment
      }
   )
exclude_mesh_from_stat =
   (
      ## Exclude this mesh from the .stat file
      element exclude_from_stat {
         comment
      }
   )

# Diagnostic statistics options for meshed, with enabled by default
mesh_stat_options_enabled_default =
   (
      include_mesh_in_stat|
      exclude_mesh_from_stat
   )

# Diagnostic statistics options for meshed, with disabled by default
mesh_stat_options_disabled_default = 
   (
      exclude_mesh_from_stat|
      include_mesh_in_stat
   )

from_file_mesh_stat_options =
   (
      ## Specify what is added to .stat files
      element stat {
         mesh_stat_options_enabled_default
      }
   )
derived_mesh_stat_options =
   (
      ## Specify what is added to .stat files
      element stat {
         mesh_stat_options_disabled_default
      }
   )

extrusion_options = 
   (
      ## Depth over which to extrude
      ## top will be at z=0
      ## bottom will be at z=-bottom_depth
      element bottom_depth {
          input_choice_real_plus_map
      },
      ## Constant or function to specify the depth of the
      ## layers. The function is a function of all coordinates
      ## (so in 2+1D: x,y and z) to specify a layer depth that
      ## varies both in the horizontal as in the vertical.
      element sizing_function {
          input_choice_real_plus_list,
      ## If your sizing function only varies in z enable this options.
      ## Do not use if your function depends on x and/or y as it takes a column of z values and re-uses it. 
          element varies_only_in_z {empty}?
      },
      ## To prevent infinitesimally thin bottom layer if sizing function
      ## is an integer multiple of total depth, the bottom layer needs
      ## to have at least this fraction of the layer depth above it. 
      ##
      ## Default is 1e-3.
      element minimum_bottom_layer_fraction {
          real
      }?,
      ## surface_id to assign to the top of the extruded mesh
      element top_surface_id {
          integer
      }?,
      ## surface_id to assign to the bottom of the extruded mesh
      element bottom_surface_id {
          integer
      }?
   )

# Most common mesh choices
mesh_choice = 
   (
      element mesh {
         attribute name { xsd:string }
      }|
      element mesh {
         attribute name { "CoordinateMesh" }
      }|
      element mesh {
         attribute name { "VelocityMesh" }
      }|
      element mesh {
         attribute name { "PressureMesh" }
      }
   )

# Same choices, but with VelocityMesh offered first
velocity_mesh_choice =
   (
      element mesh {
         attribute name { "VelocityMesh" }
      }|
      element mesh {
         attribute name { "PressureMesh" }
      }|
      element mesh {
         attribute name { "CoordinateMesh" }
      }|
      element mesh {
         attribute name { string }
      }
   )

# Same choices, but with PressureMesh offered first
pressure_mesh_choice =
   (
      element mesh {
         attribute name { "PressureMesh" }
      }|
      element mesh {
         attribute name { "VelocityMesh" }
      }|
      element mesh {
         attribute name { "CoordinateMesh" }
      }|
      element mesh {
         attribute name { string }
      }
   )

# Same choices, but with CoordinateMesh offered first
coordinate_mesh_choice =
   (
      element mesh {
         attribute name { "CoordinateMesh" }
      }|
      element mesh {
         attribute name { "VelocityMesh" }
      }|
      element mesh {
         attribute name { "PressureMesh" }
      }|
      element mesh {
         attribute name { string }
      }
   )