Merge lp:~s-parkinson11/fluidity/sinking_velocity_schema_fix into lp:fluidity
- sinking_velocity_schema_fix
- Merge into dev-trunk
Status: | Merged |
---|---|
Merged at revision: | 4133 |
Proposed branch: | lp:~s-parkinson11/fluidity/sinking_velocity_schema_fix |
Merge into: | lp:fluidity |
Diff against target: |
406 lines (+160/-9) 14 files modified
assemble/Advection_Diffusion_CG.F90 (+15/-2) assemble/Advection_Diffusion_DG.F90 (+82/-1) assemble/Advection_Diffusion_FV.F90 (+15/-2) assemble/Field_Equations_CV.F90 (+19/-2) schemas/fluidity_options.rnc (+3/-0) schemas/fluidity_options.rng (+4/-1) schemas/prognostic_field_options.rnc (+6/-0) schemas/prognostic_field_options.rng (+7/-1) tests/biology_6_component_parallel/biology_conservation.flml (+1/-0) tests/biology_6_component_parallel/biology_conservation_parallel.flml (+1/-0) tests/biology_conservation_adapt/biology_conservation.flml (+1/-0) tests/mms_sediment/MMS_X.flml (+4/-0) tests/sinking_velocity/sinking_velocity.flml (+1/-0) tests/sinking_velocity_cv/sinking_velocity.flml (+1/-0) |
To merge this branch: | bzr merge lp:~s-parkinson11/fluidity/sinking_velocity_schema_fix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jon Hill | Approve | ||
Review via email:
|
Commit message
Description of the change
Edited the schema to allow specification of the mesh used for sinking velocity fields. This is needed when the velocity field is on a different mesh to the scalar field with the sinking velocity or when using P1DGP2 with a DG field and projecting velocity to continuous.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Samuel Parkinson (s-parkinson11) wrote : | # |
- 4068. By Samuel Parkinson
-
changes to schema so that sinking velocity can have any mesh
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Jon Hill (jon-hill) wrote : | # |
Add some documentation to the schema to say that this should be the velocity mesh?
Also, an options check somewhere wouldn't go amiss to make sure this is the case.
- 4069. By Samuel Parkinson
-
Added SinkingVelocity mesh checking to check_options routines of:
Advection_Diffusion_ CG.F90
Advection_Diffusion_ FV.F90
Field_Equations_CV.F90 Added check_options routine in Advection_
Diffusion_ DG.F90 with check for SinkingVelocity mesh. not tested yet.
- 4070. By Samuel Parkinson
-
merge with trunk
- 4071. By Samuel Parkinson
-
fixed bugs in options checking routines - these now work as planned
- 4072. By Samuel Parkinson
-
updated test flml files
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Samuel Parkinson (s-parkinson11) wrote : | # |
Thanks Jon,
I have made some changes following your review. Do you think these meet the requirements?
I did notice that all prognostic field advection-diffusion discretisation options checking only happens on scalar fields that are in the root node of a material phase in the schema file. This could do with fixing at some point.
Cheers,
Sam
- 4073. By Samuel Parkinson
-
fixed bug that made all runs with scalar fields, but no sinking velocity, fail
- 4074. By Samuel Parkinson
-
merge with broken branch
- 4075. By Samuel Parkinson
-
merge with trunk
Preview Diff
1 | === modified file 'assemble/Advection_Diffusion_CG.F90' | |||
2 | --- assemble/Advection_Diffusion_CG.F90 2012-08-12 22:16:26 +0000 | |||
3 | +++ assemble/Advection_Diffusion_CG.F90 2012-11-27 18:25:25 +0000 | |||
4 | @@ -1431,7 +1431,7 @@ | |||
5 | 1431 | subroutine advection_diffusion_cg_check_options | 1431 | subroutine advection_diffusion_cg_check_options |
6 | 1432 | !!< Check CG advection-diffusion specific options | 1432 | !!< Check CG advection-diffusion specific options |
7 | 1433 | 1433 | ||
9 | 1434 | character(len = FIELD_NAME_LEN) :: field_name, state_name | 1434 | character(len = FIELD_NAME_LEN) :: field_name, state_name, mesh_0, mesh_1 |
10 | 1435 | character(len = OPTION_PATH_LEN) :: path | 1435 | character(len = OPTION_PATH_LEN) :: path |
11 | 1436 | integer :: i, j, stat | 1436 | integer :: i, j, stat |
12 | 1437 | real :: beta, l_theta | 1437 | real :: beta, l_theta |
13 | @@ -1504,7 +1504,20 @@ | |||
14 | 1504 | call field_error(state_name, field_name, & | 1504 | call field_error(state_name, field_name, & |
15 | 1505 | & "Weak Dirichlet boundary conditions with diffusivity are not supported by CG advection-diffusion") | 1505 | & "Weak Dirichlet boundary conditions with diffusivity are not supported by CG advection-diffusion") |
16 | 1506 | end if | 1506 | end if |
18 | 1507 | 1507 | ||
19 | 1508 | if (have_option(trim(path) // "/scalar_field::SinkingVelocity")) then | ||
20 | 1509 | call get_option(trim(complete_field_path(trim(path) // & | ||
21 | 1510 | "/scalar_field::SinkingVelocity"))//"/mesh[0]/name", & | ||
22 | 1511 | mesh_0, stat) | ||
23 | 1512 | if(stat == SPUD_NO_ERROR) then | ||
24 | 1513 | call get_option(trim(complete_field_path("/material_phase[" // int2str(i) // & | ||
25 | 1514 | "]/vector_field::Velocity")) // "/mesh[0]/name", mesh_1) | ||
26 | 1515 | if(trim(mesh_0) /= trim(mesh_1)) then | ||
27 | 1516 | call field_warning(state_name, field_name, & | ||
28 | 1517 | & "SinkingVelocity is on a different mesh to the Velocity field. This could cause problems") | ||
29 | 1518 | end if | ||
30 | 1519 | end if | ||
31 | 1520 | end if | ||
32 | 1508 | if(have_option(trim(path) // "/spatial_discretisation/continuous_galerkin/advection_terms/exclude_advection_terms")) then | 1521 | if(have_option(trim(path) // "/spatial_discretisation/continuous_galerkin/advection_terms/exclude_advection_terms")) then |
33 | 1509 | if(have_option(trim(path) // "/scalar_field::SinkingVelocity")) then | 1522 | if(have_option(trim(path) // "/scalar_field::SinkingVelocity")) then |
34 | 1510 | call field_warning(state_name, field_name, & | 1523 | call field_warning(state_name, field_name, & |
35 | 1511 | 1524 | ||
36 | === modified file 'assemble/Advection_Diffusion_DG.F90' | |||
37 | --- assemble/Advection_Diffusion_DG.F90 2012-10-11 17:52:01 +0000 | |||
38 | +++ assemble/Advection_Diffusion_DG.F90 2012-11-27 18:25:25 +0000 | |||
39 | @@ -45,6 +45,7 @@ | |||
40 | 45 | use petsc_solve_state_module | 45 | use petsc_solve_state_module |
41 | 46 | use boundary_conditions | 46 | use boundary_conditions |
42 | 47 | use boundary_conditions_from_options | 47 | use boundary_conditions_from_options |
43 | 48 | use field_options | ||
44 | 48 | use spud | 49 | use spud |
45 | 49 | use upwind_stabilisation | 50 | use upwind_stabilisation |
46 | 50 | use slope_limiters_dg | 51 | use slope_limiters_dg |
47 | @@ -67,7 +68,8 @@ | |||
48 | 67 | character(len=255), private :: message | 68 | character(len=255), private :: message |
49 | 68 | 69 | ||
50 | 69 | private | 70 | private |
52 | 70 | public solve_advection_diffusion_dg, construct_advection_diffusion_dg | 71 | public solve_advection_diffusion_dg, construct_advection_diffusion_dg, & |
53 | 72 | advection_diffusion_dg_check_options | ||
54 | 71 | 73 | ||
55 | 72 | ! Local private control parameters. These are module-global parameters | 74 | ! Local private control parameters. These are module-global parameters |
56 | 73 | ! because it would be expensive and/or inconvenient to re-evaluate them | 75 | ! because it would be expensive and/or inconvenient to re-evaluate them |
57 | @@ -3120,5 +3122,84 @@ | |||
58 | 3120 | end subroutine initialise_aijxy | 3122 | end subroutine initialise_aijxy |
59 | 3121 | 3123 | ||
60 | 3122 | end function masslumped_rt0_aij | 3124 | end function masslumped_rt0_aij |
61 | 3125 | |||
62 | 3126 | subroutine advection_diffusion_dg_check_options | ||
63 | 3127 | !!< Check DG advection-diffusion specific options | ||
64 | 3128 | |||
65 | 3129 | character(len = FIELD_NAME_LEN) :: field_name, mesh_0, mesh_1, state_name | ||
66 | 3130 | character(len = OPTION_PATH_LEN) :: path | ||
67 | 3131 | integer :: i, j, stat | ||
68 | 3132 | real :: beta, l_theta | ||
69 | 3133 | |||
70 | 3134 | if(option_count("/material_phase/scalar_field/prognostic/spatial_discretisation/discontinuous_galerkin") == 0) then | ||
71 | 3135 | ! Nothing to check | ||
72 | 3136 | return | ||
73 | 3137 | end if | ||
74 | 3138 | |||
75 | 3139 | ewrite(2, *) "Checking DG advection-diffusion options" | ||
76 | 3140 | |||
77 | 3141 | do i = 0, option_count("/material_phase") - 1 | ||
78 | 3142 | path = "/material_phase[" // int2str(i) // "]" | ||
79 | 3143 | call get_option(trim(path) // "/name", state_name) | ||
80 | 3144 | |||
81 | 3145 | do j = 0, option_count(trim(path) // "/scalar_field") - 1 | ||
82 | 3146 | path = "/material_phase[" // int2str(i) // "]/scalar_field[" // int2str(j) // "]" | ||
83 | 3147 | call get_option(trim(path) // "/name", field_name) | ||
84 | 3148 | |||
85 | 3149 | if(field_name /= "Pressure") then | ||
86 | 3150 | |||
87 | 3151 | path = trim(path) // "/prognostic" | ||
88 | 3152 | |||
89 | 3153 | if(have_option(trim(path) // "/spatial_discretisation/discontinuous_galerkin").and.& | ||
90 | 3154 | have_option(trim(path) // "/equation[0]")) then | ||
91 | 3155 | |||
92 | 3156 | if (have_option(trim(path) // "/scalar_field::SinkingVelocity")) then | ||
93 | 3157 | call get_option(trim(complete_field_path(trim(path) // & | ||
94 | 3158 | "/scalar_field::SinkingVelocity"))//"/mesh[0]/name", & | ||
95 | 3159 | mesh_0, stat) | ||
96 | 3160 | if(stat == SPUD_NO_ERROR) then | ||
97 | 3161 | call get_option(trim(complete_field_path("/material_phase[" // int2str(i) // & | ||
98 | 3162 | "]/vector_field::Velocity")) // "/mesh[0]/name", mesh_1) | ||
99 | 3163 | if(trim(mesh_0) /= trim(mesh_1)) then | ||
100 | 3164 | call field_warning(state_name, field_name, & | ||
101 | 3165 | "SinkingVelocity is on a different mesh to the Velocity field this could "//& | ||
102 | 3166 | "cause problems. If using advection_scheme/project_velocity_to_continuous "//& | ||
103 | 3167 | "and a discontinuous Velocity field, then SinkingVelocity must be on a "//& | ||
104 | 3168 | "continuous mesh and hence should not be on the same mesh as the Velocity") | ||
105 | 3169 | end if | ||
106 | 3170 | end if | ||
107 | 3171 | end if | ||
108 | 3172 | |||
109 | 3173 | end if | ||
110 | 3174 | |||
111 | 3175 | end if | ||
112 | 3176 | end do | ||
113 | 3177 | end do | ||
114 | 3178 | |||
115 | 3179 | ewrite(2, *) "Finished checking CG advection-diffusion options" | ||
116 | 3180 | |||
117 | 3181 | contains | ||
118 | 3182 | |||
119 | 3183 | subroutine field_warning(state_name, field_name, msg) | ||
120 | 3184 | character(len = *), intent(in) :: state_name | ||
121 | 3185 | character(len = *), intent(in) :: field_name | ||
122 | 3186 | character(len = *), intent(in) :: msg | ||
123 | 3187 | |||
124 | 3188 | ewrite(0, *) "Warning: For field " // trim(field_name) // " in state " // trim(state_name) | ||
125 | 3189 | ewrite(0, *) trim(msg) | ||
126 | 3190 | |||
127 | 3191 | end subroutine field_warning | ||
128 | 3192 | |||
129 | 3193 | subroutine field_error(state_name, field_name, msg) | ||
130 | 3194 | character(len = *), intent(in) :: state_name | ||
131 | 3195 | character(len = *), intent(in) :: field_name | ||
132 | 3196 | character(len = *), intent(in) :: msg | ||
133 | 3197 | |||
134 | 3198 | ewrite(-1, *) "For field " // trim(field_name) // " in state " // trim(state_name) | ||
135 | 3199 | FLExit(trim(msg)) | ||
136 | 3200 | |||
137 | 3201 | end subroutine field_error | ||
138 | 3202 | |||
139 | 3203 | end subroutine advection_diffusion_dg_check_options | ||
140 | 3123 | 3204 | ||
141 | 3124 | end module advection_diffusion_DG | 3205 | end module advection_diffusion_DG |
142 | 3125 | 3206 | ||
143 | === modified file 'assemble/Advection_Diffusion_FV.F90' | |||
144 | --- assemble/Advection_Diffusion_FV.F90 2012-08-09 12:50:11 +0000 | |||
145 | +++ assemble/Advection_Diffusion_FV.F90 2012-11-27 18:25:25 +0000 | |||
146 | @@ -598,7 +598,7 @@ | |||
147 | 598 | 598 | ||
148 | 599 | subroutine advection_diffusion_fv_check_options | 599 | subroutine advection_diffusion_fv_check_options |
149 | 600 | 600 | ||
151 | 601 | character(len = FIELD_NAME_LEN) :: field_name, state_name | 601 | character(len = FIELD_NAME_LEN) :: field_name, mesh_0, mesh_1, state_name |
152 | 602 | character(len = OPTION_PATH_LEN) :: path | 602 | character(len = OPTION_PATH_LEN) :: path |
153 | 603 | integer :: i, j, stat | 603 | integer :: i, j, stat |
154 | 604 | real :: beta, l_theta | 604 | real :: beta, l_theta |
155 | @@ -652,7 +652,20 @@ | |||
156 | 652 | call field_warning(state_name, field_name, & | 652 | call field_warning(state_name, field_name, & |
157 | 653 | & "Implicitness factor (theta) should = 1.0 when excluding mass") | 653 | & "Implicitness factor (theta) should = 1.0 when excluding mass") |
158 | 654 | end if | 654 | end if |
160 | 655 | 655 | ||
161 | 656 | if (have_option(trim(path) // "/scalar_field::SinkingVelocity")) then | ||
162 | 657 | call get_option(trim(complete_field_path(trim(path) // & | ||
163 | 658 | "/scalar_field::SinkingVelocity"))//"/mesh[0]/name", & | ||
164 | 659 | mesh_0, stat) | ||
165 | 660 | if(stat == SPUD_NO_ERROR) then | ||
166 | 661 | call get_option(trim(complete_field_path("/material_phase[" // int2str(i) // & | ||
167 | 662 | "]/vector_field::Velocity")) // "/mesh[0]/name", mesh_1) | ||
168 | 663 | if(trim(mesh_0) /= trim(mesh_1)) then | ||
169 | 664 | call field_warning(state_name, field_name, & | ||
170 | 665 | & "SinkingVelocity is on a different mesh to the Velocity field this could cause problems") | ||
171 | 666 | end if | ||
172 | 667 | end if | ||
173 | 668 | end if | ||
174 | 656 | if(have_option(trim(path) // "/spatial_discretisation/finite_volume/advection_terms/exclude_advection_terms")) then | 669 | if(have_option(trim(path) // "/spatial_discretisation/finite_volume/advection_terms/exclude_advection_terms")) then |
175 | 657 | if(have_option(trim(path) // "/scalar_field::SinkingVelocity")) then | 670 | if(have_option(trim(path) // "/scalar_field::SinkingVelocity")) then |
176 | 658 | call field_warning(state_name, field_name, & | 671 | call field_warning(state_name, field_name, & |
177 | 659 | 672 | ||
178 | === modified file 'assemble/Field_Equations_CV.F90' | |||
179 | --- assemble/Field_Equations_CV.F90 2012-08-18 21:34:37 +0000 | |||
180 | +++ assemble/Field_Equations_CV.F90 2012-11-27 18:25:25 +0000 | |||
181 | @@ -3544,8 +3544,8 @@ | |||
182 | 3544 | !************************************************************************ | 3544 | !************************************************************************ |
183 | 3545 | ! control volume options checking | 3545 | ! control volume options checking |
184 | 3546 | subroutine field_equations_cv_check_options | 3546 | subroutine field_equations_cv_check_options |
187 | 3547 | integer :: nmat, nfield, m, f | 3547 | integer :: nmat, nfield, m, f, stat |
188 | 3548 | character(len=OPTION_PATH_LEN) :: mat_name, field_name, diff_scheme | 3548 | character(len=OPTION_PATH_LEN) :: mat_name, field_name, mesh_0, mesh_1, diff_scheme |
189 | 3549 | integer :: weakdirichlet_count | 3549 | integer :: weakdirichlet_count |
190 | 3550 | logical :: cv_disc, mmat_cv_disc, diff, conv_file, subcycle, cv_temp_disc, tolerance, explicit | 3550 | logical :: cv_disc, mmat_cv_disc, diff, conv_file, subcycle, cv_temp_disc, tolerance, explicit |
191 | 3551 | real :: theta, p_theta | 3551 | real :: theta, p_theta |
192 | @@ -3675,6 +3675,23 @@ | |||
193 | 3675 | FLExit("Only pure control volume or coupled_cv discretisations can solve explicitly") | 3675 | FLExit("Only pure control volume or coupled_cv discretisations can solve explicitly") |
194 | 3676 | end if | 3676 | end if |
195 | 3677 | end if | 3677 | end if |
196 | 3678 | |||
197 | 3679 | if(mmat_cv_disc .or. cv_disc) then | ||
198 | 3680 | if (have_option("/material_phase["//int2str(m)//"]/scalar_field["//int2str(f)//& | ||
199 | 3681 | "]/prognostic/scalar_field::SinkingVelocity")) then | ||
200 | 3682 | call get_option(trim(complete_field_path("/material_phase["//& | ||
201 | 3683 | int2str(m)//"]/scalar_field["//int2str(f)//& | ||
202 | 3684 | "]/prognostic/scalar_field::SinkingVelocity"))//"/mesh[0]/name", mesh_0, stat) | ||
203 | 3685 | if(stat == 0) then | ||
204 | 3686 | call get_option(trim(complete_field_path("/material_phase[" // int2str(m) // & | ||
205 | 3687 | "]/vector_field::Velocity")) // "/mesh[0]/name", mesh_1) | ||
206 | 3688 | if(trim(mesh_0) /= trim(mesh_1)) then | ||
207 | 3689 | ewrite(0, *) "SinkingVelocity for "//trim(field_name)//& | ||
208 | 3690 | " is on a different mesh to the Velocity field this could cause problems" | ||
209 | 3691 | end if | ||
210 | 3692 | end if | ||
211 | 3693 | end if | ||
212 | 3694 | end if | ||
213 | 3678 | 3695 | ||
214 | 3679 | end do | 3696 | end do |
215 | 3680 | end do | 3697 | end do |
216 | 3681 | 3698 | ||
217 | === modified file 'schemas/fluidity_options.rnc' | |||
218 | --- schemas/fluidity_options.rnc 2012-10-04 16:29:40 +0000 | |||
219 | +++ schemas/fluidity_options.rnc 2012-11-27 18:25:25 +0000 | |||
220 | @@ -1904,10 +1904,13 @@ | |||
221 | 1904 | ## | 1904 | ## |
222 | 1905 | ## As with the sinking velocity, this velocity is in the direction of gravity so if the substance | 1905 | ## As with the sinking velocity, this velocity is in the direction of gravity so if the substance |
223 | 1906 | ## floats upwards, this field should be negative. | 1906 | ## floats upwards, this field should be negative. |
224 | 1907 | ## | ||
225 | 1908 | ## This should be on the same mesh as the associated SinkingVelocity field. | ||
226 | 1907 | element scalar_field { | 1909 | element scalar_field { |
227 | 1908 | attribute name { "UnhinderedSinkingVelocity" }, | 1910 | attribute name { "UnhinderedSinkingVelocity" }, |
228 | 1909 | attribute rank { "0" }, | 1911 | attribute rank { "0" }, |
229 | 1910 | element prescribed { | 1912 | element prescribed { |
230 | 1913 | velocity_mesh_choice, | ||
231 | 1911 | prescribed_scalar_field | 1914 | prescribed_scalar_field |
232 | 1912 | } | 1915 | } |
233 | 1913 | }?, | 1916 | }?, |
234 | 1914 | 1917 | ||
235 | === modified file 'schemas/fluidity_options.rng' | |||
236 | --- schemas/fluidity_options.rng 2012-11-05 14:25:55 +0000 | |||
237 | +++ schemas/fluidity_options.rng 2012-11-27 18:25:25 +0000 | |||
238 | @@ -2662,7 +2662,9 @@ | |||
239 | 2662 | If the 'SinkingVelocity' is not set to diagnostic, this field will not be used. | 2662 | If the 'SinkingVelocity' is not set to diagnostic, this field will not be used. |
240 | 2663 | 2663 | ||
241 | 2664 | As with the sinking velocity, this velocity is in the direction of gravity so if the substance | 2664 | As with the sinking velocity, this velocity is in the direction of gravity so if the substance |
243 | 2665 | floats upwards, this field should be negative.</a:documentation> | 2665 | floats upwards, this field should be negative. |
244 | 2666 | |||
245 | 2667 | This should be on the same mesh as the associated SinkingVelocity field.</a:documentation> | ||
246 | 2666 | <attribute name="name"> | 2668 | <attribute name="name"> |
247 | 2667 | <value>UnhinderedSinkingVelocity</value> | 2669 | <value>UnhinderedSinkingVelocity</value> |
248 | 2668 | </attribute> | 2670 | </attribute> |
249 | @@ -2670,6 +2672,7 @@ | |||
250 | 2670 | <value>0</value> | 2672 | <value>0</value> |
251 | 2671 | </attribute> | 2673 | </attribute> |
252 | 2672 | <element name="prescribed"> | 2674 | <element name="prescribed"> |
253 | 2675 | <ref name="velocity_mesh_choice"/> | ||
254 | 2673 | <ref name="prescribed_scalar_field"/> | 2676 | <ref name="prescribed_scalar_field"/> |
255 | 2674 | </element> | 2677 | </element> |
256 | 2675 | </element> | 2678 | </element> |
257 | 2676 | 2679 | ||
258 | === modified file 'schemas/prognostic_field_options.rnc' | |||
259 | --- schemas/prognostic_field_options.rnc 2012-09-29 11:32:16 +0000 | |||
260 | +++ schemas/prognostic_field_options.rnc 2012-11-27 18:25:25 +0000 | |||
261 | @@ -295,14 +295,20 @@ | |||
262 | 295 | ## | 295 | ## |
263 | 296 | ## This velocity is in the direction of gravity so if the substance | 296 | ## This velocity is in the direction of gravity so if the substance |
264 | 297 | ## floats or swims upwards, this field should be negative. | 297 | ## floats or swims upwards, this field should be negative. |
265 | 298 | ## | ||
266 | 299 | ## This should be on the same mesh as the velocity field unless you are | ||
267 | 300 | ## using a DG discretisation and projecting the velocity to contiuous, in | ||
268 | 301 | ## which case it should be on a continuous mesh. | ||
269 | 298 | element scalar_field { | 302 | element scalar_field { |
270 | 299 | attribute name { "SinkingVelocity" }, | 303 | attribute name { "SinkingVelocity" }, |
271 | 300 | attribute rank { "0" }, | 304 | attribute rank { "0" }, |
272 | 301 | ( | 305 | ( |
273 | 302 | element prescribed { | 306 | element prescribed { |
274 | 307 | velocity_mesh_choice, | ||
275 | 303 | prescribed_scalar_field_no_adapt | 308 | prescribed_scalar_field_no_adapt |
276 | 304 | }| | 309 | }| |
277 | 305 | element diagnostic { | 310 | element diagnostic { |
278 | 311 | velocity_mesh_choice, | ||
279 | 306 | ( | 312 | ( |
280 | 307 | scalar_python_diagnostic_algorithm | | 313 | scalar_python_diagnostic_algorithm | |
281 | 308 | internal_algorithm | 314 | internal_algorithm |
282 | 309 | 315 | ||
283 | === modified file 'schemas/prognostic_field_options.rng' | |||
284 | --- schemas/prognostic_field_options.rng 2012-09-29 11:32:16 +0000 | |||
285 | +++ schemas/prognostic_field_options.rng 2012-11-27 18:25:25 +0000 | |||
286 | @@ -381,7 +381,11 @@ | |||
287 | 381 | <a:documentation>Velocity at which this substance sinks through the water column. | 381 | <a:documentation>Velocity at which this substance sinks through the water column. |
288 | 382 | 382 | ||
289 | 383 | This velocity is in the direction of gravity so if the substance | 383 | This velocity is in the direction of gravity so if the substance |
291 | 384 | floats or swims upwards, this field should be negative.</a:documentation> | 384 | floats or swims upwards, this field should be negative. |
292 | 385 | |||
293 | 386 | This should be on the same mesh as the velocity field unless you are | ||
294 | 387 | using a DG discretisation and projecting the velocity to contiuous, in | ||
295 | 388 | which case it should be on a continuous mesh.</a:documentation> | ||
296 | 385 | <attribute name="name"> | 389 | <attribute name="name"> |
297 | 386 | <value>SinkingVelocity</value> | 390 | <value>SinkingVelocity</value> |
298 | 387 | </attribute> | 391 | </attribute> |
299 | @@ -390,9 +394,11 @@ | |||
300 | 390 | </attribute> | 394 | </attribute> |
301 | 391 | <choice> | 395 | <choice> |
302 | 392 | <element name="prescribed"> | 396 | <element name="prescribed"> |
303 | 397 | <ref name="velocity_mesh_choice"/> | ||
304 | 393 | <ref name="prescribed_scalar_field_no_adapt"/> | 398 | <ref name="prescribed_scalar_field_no_adapt"/> |
305 | 394 | </element> | 399 | </element> |
306 | 395 | <element name="diagnostic"> | 400 | <element name="diagnostic"> |
307 | 401 | <ref name="velocity_mesh_choice"/> | ||
308 | 396 | <choice> | 402 | <choice> |
309 | 397 | <ref name="scalar_python_diagnostic_algorithm"/> | 403 | <ref name="scalar_python_diagnostic_algorithm"/> |
310 | 398 | <ref name="internal_algorithm"/> | 404 | <ref name="internal_algorithm"/> |
311 | 399 | 405 | ||
312 | === modified file 'tests/biology_6_component_parallel/biology_conservation.flml' | |||
313 | --- tests/biology_6_component_parallel/biology_conservation.flml 2012-03-11 02:25:56 +0000 | |||
314 | +++ tests/biology_6_component_parallel/biology_conservation.flml 2012-11-27 18:25:25 +0000 | |||
315 | @@ -517,6 +517,7 @@ | |||
316 | 517 | </scalar_field> | 517 | </scalar_field> |
317 | 518 | <scalar_field name="SinkingVelocity" rank="0"> | 518 | <scalar_field name="SinkingVelocity" rank="0"> |
318 | 519 | <prescribed> | 519 | <prescribed> |
319 | 520 | <mesh name="VelocityMesh"/> | ||
320 | 520 | <value name="WholeMesh"> | 521 | <value name="WholeMesh"> |
321 | 521 | <python> | 522 | <python> |
322 | 522 | <string_value lines="20" type="code" language="python">def val(X,t): | 523 | <string_value lines="20" type="code" language="python">def val(X,t): |
323 | 523 | 524 | ||
324 | === modified file 'tests/biology_6_component_parallel/biology_conservation_parallel.flml' | |||
325 | --- tests/biology_6_component_parallel/biology_conservation_parallel.flml 2012-03-11 02:25:56 +0000 | |||
326 | +++ tests/biology_6_component_parallel/biology_conservation_parallel.flml 2012-11-27 18:25:25 +0000 | |||
327 | @@ -517,6 +517,7 @@ | |||
328 | 517 | </scalar_field> | 517 | </scalar_field> |
329 | 518 | <scalar_field name="SinkingVelocity" rank="0"> | 518 | <scalar_field name="SinkingVelocity" rank="0"> |
330 | 519 | <prescribed> | 519 | <prescribed> |
331 | 520 | <mesh name="VelocityMesh"/> | ||
332 | 520 | <value name="WholeMesh"> | 521 | <value name="WholeMesh"> |
333 | 521 | <python> | 522 | <python> |
334 | 522 | <string_value lines="20" type="code" language="python">def val(X,t): | 523 | <string_value lines="20" type="code" language="python">def val(X,t): |
335 | 523 | 524 | ||
336 | === modified file 'tests/biology_conservation_adapt/biology_conservation.flml' | |||
337 | --- tests/biology_conservation_adapt/biology_conservation.flml 2012-03-11 02:25:56 +0000 | |||
338 | +++ tests/biology_conservation_adapt/biology_conservation.flml 2012-11-27 18:25:25 +0000 | |||
339 | @@ -558,6 +558,7 @@ | |||
340 | 558 | </scalar_field> | 558 | </scalar_field> |
341 | 559 | <scalar_field name="SinkingVelocity" rank="0"> | 559 | <scalar_field name="SinkingVelocity" rank="0"> |
342 | 560 | <prescribed> | 560 | <prescribed> |
343 | 561 | <mesh name="VelocityMesh"/> | ||
344 | 561 | <value name="WholeMesh"> | 562 | <value name="WholeMesh"> |
345 | 562 | <python> | 563 | <python> |
346 | 563 | <string_value lines="20" type="code" language="python">def val(X,t): | 564 | <string_value lines="20" type="code" language="python">def val(X,t): |
347 | 564 | 565 | ||
348 | === modified file 'tests/mms_sediment/MMS_X.flml' | |||
349 | --- tests/mms_sediment/MMS_X.flml 2012-10-05 13:00:44 +0000 | |||
350 | +++ tests/mms_sediment/MMS_X.flml 2012-11-27 18:25:25 +0000 | |||
351 | @@ -1194,6 +1194,7 @@ | |||
352 | 1194 | </scalar_field> | 1194 | </scalar_field> |
353 | 1195 | <scalar_field name="SinkingVelocity" rank="0"> | 1195 | <scalar_field name="SinkingVelocity" rank="0"> |
354 | 1196 | <diagnostic> | 1196 | <diagnostic> |
355 | 1197 | <mesh name="VelocityMesh"/> | ||
356 | 1197 | <algorithm name="Internal" material_phase_support="multiple"/> | 1198 | <algorithm name="Internal" material_phase_support="multiple"/> |
357 | 1198 | <output/> | 1199 | <output/> |
358 | 1199 | <stat/> | 1200 | <stat/> |
359 | @@ -1327,6 +1328,7 @@ | |||
360 | 1327 | </scalar_field> | 1328 | </scalar_field> |
361 | 1328 | <scalar_field name="UnhinderedSinkingVelocity" rank="0"> | 1329 | <scalar_field name="UnhinderedSinkingVelocity" rank="0"> |
362 | 1329 | <prescribed> | 1330 | <prescribed> |
363 | 1331 | <mesh name="VelocityMesh"/> | ||
364 | 1330 | <value name="WholeMesh"> | 1332 | <value name="WholeMesh"> |
365 | 1331 | <constant> | 1333 | <constant> |
366 | 1332 | <real_value rank="0">0.33</real_value> | 1334 | <real_value rank="0">0.33</real_value> |
367 | @@ -1450,6 +1452,7 @@ | |||
368 | 1450 | </scalar_field> | 1452 | </scalar_field> |
369 | 1451 | <scalar_field name="SinkingVelocity" rank="0"> | 1453 | <scalar_field name="SinkingVelocity" rank="0"> |
370 | 1452 | <diagnostic> | 1454 | <diagnostic> |
371 | 1455 | <mesh name="VelocityMesh"/> | ||
372 | 1453 | <algorithm name="Internal" material_phase_support="multiple"/> | 1456 | <algorithm name="Internal" material_phase_support="multiple"/> |
373 | 1454 | <output/> | 1457 | <output/> |
374 | 1455 | <stat/> | 1458 | <stat/> |
375 | @@ -1583,6 +1586,7 @@ | |||
376 | 1583 | </scalar_field> | 1586 | </scalar_field> |
377 | 1584 | <scalar_field name="UnhinderedSinkingVelocity" rank="0"> | 1587 | <scalar_field name="UnhinderedSinkingVelocity" rank="0"> |
378 | 1585 | <prescribed> | 1588 | <prescribed> |
379 | 1589 | <mesh name="VelocityMesh"/> | ||
380 | 1586 | <value name="WholeMesh"> | 1590 | <value name="WholeMesh"> |
381 | 1587 | <constant> | 1591 | <constant> |
382 | 1588 | <real_value rank="0">0.66</real_value> | 1592 | <real_value rank="0">0.66</real_value> |
383 | 1589 | 1593 | ||
384 | === modified file 'tests/sinking_velocity/sinking_velocity.flml' | |||
385 | --- tests/sinking_velocity/sinking_velocity.flml 2012-03-11 02:25:56 +0000 | |||
386 | +++ tests/sinking_velocity/sinking_velocity.flml 2012-11-27 18:25:25 +0000 | |||
387 | @@ -176,6 +176,7 @@ | |||
388 | 176 | </boundary_conditions> | 176 | </boundary_conditions> |
389 | 177 | <scalar_field name="SinkingVelocity" rank="0"> | 177 | <scalar_field name="SinkingVelocity" rank="0"> |
390 | 178 | <prescribed> | 178 | <prescribed> |
391 | 179 | <mesh name="VelocityMesh"/> | ||
392 | 179 | <value name="WholeMesh"> | 180 | <value name="WholeMesh"> |
393 | 180 | <python> | 181 | <python> |
394 | 181 | <string_value lines="20" type="code" language="python">def val(X,t): | 182 | <string_value lines="20" type="code" language="python">def val(X,t): |
395 | 182 | 183 | ||
396 | === modified file 'tests/sinking_velocity_cv/sinking_velocity.flml' | |||
397 | --- tests/sinking_velocity_cv/sinking_velocity.flml 2012-03-11 02:25:56 +0000 | |||
398 | +++ tests/sinking_velocity_cv/sinking_velocity.flml 2012-11-27 18:25:25 +0000 | |||
399 | @@ -178,6 +178,7 @@ | |||
400 | 178 | </boundary_conditions> | 178 | </boundary_conditions> |
401 | 179 | <scalar_field name="SinkingVelocity" rank="0"> | 179 | <scalar_field name="SinkingVelocity" rank="0"> |
402 | 180 | <prescribed> | 180 | <prescribed> |
403 | 181 | <mesh name="VelocityMesh"/> | ||
404 | 181 | <value name="WholeMesh"> | 182 | <value name="WholeMesh"> |
405 | 182 | <python> | 183 | <python> |
406 | 183 | <string_value lines="20" type="code" language="python">def val(X,t): | 184 | <string_value lines="20" type="code" language="python">def val(X,t): |
I realised I hadn't actually pushed the changes to this branch before requesting a review. I have now :)