Merge lp:~jon-hill/fluidity/diagnostic_check into lp:fluidity

Proposed by Jon Hill
Status: Needs review
Proposed branch: lp:~jon-hill/fluidity/diagnostic_check
Merge into: lp:fluidity
Diff against target: 554 lines (+382/-51)
11 files modified
diagnostics/Diagnostic_Fields_New.F90.in (+74/-9)
preprocessor/Additional_Field_Locations.F90 (+88/-0)
preprocessor/Makefile.dependencies (+8/-0)
preprocessor/Makefile.in (+2/-2)
preprocessor/Populate_State.F90 (+1/-40)
tests/additional_fields_diagnostics_check/Makefile (+24/-0)
tests/additional_fields_diagnostics_check/additional_fields_diagnostics_check.xml (+33/-0)
tests/additional_fields_diagnostics_check/diagnostics.flml (+115/-0)
tests/additional_fields_diagnostics_check/square.edge (+12/-0)
tests/additional_fields_diagnostics_check/square.ele (+12/-0)
tests/additional_fields_diagnostics_check/square.node (+13/-0)
To merge this branch: bzr merge lp:~jon-hill/fluidity/diagnostic_check
Reviewer Review Type Date Requested Status
Stephan Kramer Needs Fixing
sam Pending
Review via email: mp+203042@code.launchpad.net

Description of the change

Fix the lookup paths for diagnostics check_options to search for hidden paths. Test for this too. Made a new module that contains all these weird and wonderful paths for both Populate_state and diagnostics. And anything else that needs them too!

To post a comment you must log in.
Revision history for this message
Jon Hill (jon-hill) wrote :

Waiting on a green buildbot.

Revision history for this message
Stephan Kramer (s-kramer) wrote :

A few points:
* you have a few ALL CAPS words in there that shouldn't be: .OR. and DEP_LOOP
* in case(2) split_dependency(1) is the phase_name and split_dependency(2) is the field name, so the checks for additional fields after that as they currently are, don't make any sense.
* where is additional_diagnostic_fields defined? I can't find it anywhere...

review: Needs Fixing
Revision history for this message
Jon Hill (jon-hill) wrote :

1) The ALL CAPS are my code styling. I'll change the .OR. to .or., but the DEP_LOOP stays (I find it easier to spot in amongst the lower case code)

2) Not sure I entirely follow - if you have multiple phase support in your diagnostic, then it will appear in case(2) and you may still want to use, say, DistanceToBottom, which is one of the extra fields that can be checked for. The relative_path fields are checked within the correct material phase, but the others are absolute paths. Unless I got all this wrong! :)

3) Forgot to add the new module that contains the variables...fixed.

4307. By Jon Hill

Helps if you add your new files

Revision history for this message
Stephan Kramer (s-kramer) wrote :

Ad 1) Fine, but in all other Fluidity code ALLCAPS is only used for parameters. If do loop labels are hard to find, it means that the loop is too long (as in this case: the code under both cases are a copy and paste, so that should really just be separated out in a subroutine)

Ad 2) For the relative paths you have "scalar_field::" // trim(split_dependency(1)) everywhere, where split_dependency(1) is a phase name. For the absolute paths, I'm not really sure it makes sense for the user to specify PhaseName::DistanceToTop as the user has no clue that these fields are actually put in one of the (or in this case all) states, so they should just refer to it as DistanceToTop. If you want to allow it however I have no objections to that.

Revision history for this message
sam (samuel-d-parkinson) wrote :

Hi Jon. I'll check this on Monday. Have a good weekend
On 24 Jan 2014 11:36, "Jon Hill" <email address hidden> wrote:

> Waiting on a green buildbot.
> --
>
> https://code.launchpad.net/~jon-hill/fluidity/diagnostic_check/+merge/203042
> You are requested to review the proposed merge of
> lp:~jon-hill/fluidity/diagnostic_check into lp:fluidity.
>

Unmerged revisions

4307. By Jon Hill

Helps if you add your new files

4306. By Jon Hill

Merge from trunk

4305. By Jon Hill

Fix dependency search paths to look in hidden places

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'diagnostics/Diagnostic_Fields_New.F90.in'
2--- diagnostics/Diagnostic_Fields_New.F90.in 2013-01-24 05:46:32 +0000
3+++ diagnostics/Diagnostic_Fields_New.F90.in 2014-01-24 12:43:19 +0000
4@@ -36,6 +36,7 @@
5 use global_parameters, only : FIELD_NAME_LEN, OPTION_PATH_LEN
6 use spud
7 use state_module
8+ use additional_field_locations
9
10 USE_MODULES
11
12@@ -973,9 +974,9 @@
13
14 character(len = OPTION_PATH_LEN) :: dependency, field_name, field_path, field_type_path, state_name, state_path
15 character(len = OPTION_PATH_LEN), dimension(:), allocatable :: dependencies, split_dependency
16- integer :: i, j, k, l, m, stat
17-
18- if(option_count("/material_phase/scalar_field/diagnostic") + &
19+ integer :: i, j, k, l, m, af, stat
20+
21+ if(option_count("/material_phase/scalar_field/diagnostic") + &
22 & option_count("/material_phase/vector_field/diagnostic") + &
23 & option_count("/material_phase/tensor_field/diagnostic") == 0) then
24 ! Nothing to check
25@@ -1017,28 +1018,92 @@
26 if(stat /= SPUD_NO_ERROR) cycle
27
28 call tokenize(trim(dependency), dependencies, ",")
29- do m = 1, size(dependencies)
30+ DEP_LOOP: do m = 1, size(dependencies)
31 call tokenize(trim(dependencies(m)), split_dependency, "::")
32 select case(size(split_dependency))
33 case(1)
34 if(option_count(trim(state_path) // "/scalar_field::" // trim(split_dependency(1))) + &
35 & option_count(trim(state_path) // "/vector_field::" // trim(split_dependency(1))) + &
36- & option_count(trim(state_path) // "/tensor_field::" // trim(split_dependency(1))) == 0) then
37- call field_error(state_name, field_name, "Field depends on " // split_dependency(1))
38+ & option_count(trim(state_path) // "/tensor_field::" // trim(split_dependency(1))) > 0) then
39+ cycle DEP_LOOP
40 end if
41+ ! We now need to check additional paths as the field may
42+ ! be hidden.
43+ ! check absolute fields
44+ do af=1, size(additional_fields_absolute)
45+ if (have_option(trim(additional_fields_absolute(af)) // "/scalar_field::" // trim(split_dependency(1))) .OR. &
46+ & have_option(trim(additional_fields_absolute(af)) // "/vector_field::" // trim(split_dependency(1))) .OR. &
47+ & have_option(trim(additional_fields_absolute(af)) // "/tensor_field::" // trim(split_dependency(1)))) then
48+ cycle DEP_LOOP
49+ end if
50+ end do
51+
52+ ! check relative paths
53+ do af=1, size(additional_fields_relative)
54+ if (have_option(trim(state_path) // trim(additional_fields_relative(af)) // "/scalar_field::" // trim(split_dependency(1))) .OR. &
55+ & have_option(trim(state_path) // trim(additional_fields_relative(af)) // "/vector_field::" // trim(split_dependency(1))) .OR. &
56+ & have_option(trim(state_path) // trim(additional_fields_relative(af)) // "/tensor_field::" // trim(split_dependency(1)))) then
57+ cycle DEP_LOOP
58+ end if
59+ end do
60+
61+ ! check other paths
62+ do af=1, size(additional_diagnostic_paths)
63+ if (have_option(trim(additional_diagnostic_paths(af)) // "/scalar_field::" // trim(split_dependency(1))) .OR. &
64+ & have_option(trim(additional_diagnostic_paths(af)) // "/vector_field::" // trim(split_dependency(1))) .OR. &
65+ & have_option(trim(additional_diagnostic_paths(af)) // "/tensor_field::" // trim(split_dependency(1)))) then
66+ cycle DEP_LOOP
67+ end if
68+ end do
69+
70+ ! Still not found it...then error
71+ call field_error(state_name, field_name, "Field depends on " // split_dependency(1))
72+
73 case(2)
74 if(option_count("/material_phase::" // trim(split_dependency(1)) // "/scalar_field::" // trim(split_dependency(2))) + &
75 & option_count("/material_phase::" // trim(split_dependency(1)) // "/vector_field::" // trim(split_dependency(2))) + &
76- & option_count("/material_phase::" // trim(split_dependency(1)) // "/tensor_field::" // trim(split_dependency(2))) == 0) then
77- call field_error(state_name, field_name, "Field depends on " // trim(split_dependency(2)) // " in state " // split_dependency(1))
78+ & option_count("/material_phase::" // trim(split_dependency(1)) // "/tensor_field::" // trim(split_dependency(2))) > 0) then
79+ cycle DEP_LOOP
80 end if
81+ ! We now need to check additional paths as the field may
82+ ! be hidden.
83+
84+ ! check absolute fields
85+ do af=1, size(additional_fields_absolute)
86+ if (have_option(trim(additional_fields_absolute(af)) // "/scalar_field::" // trim(split_dependency(1))) .OR. &
87+ & have_option(trim(additional_fields_absolute(af)) // "/vector_field::" // trim(split_dependency(1))) .OR. &
88+ & have_option(trim(additional_fields_absolute(af)) // "/tensor_field::" // trim(split_dependency(1)))) then
89+ cycle DEP_LOOP
90+ end if
91+ end do
92+
93+ ! check relative paths
94+ do af=1, size(additional_fields_relative)
95+ if (have_option("/material_phase::" // trim(split_dependency(1)) // trim(additional_fields_relative(af)) // "/scalar_field::" // trim(split_dependency(1))) .OR. &
96+ & have_option("/material_phase::" // trim(split_dependency(1)) // trim(additional_fields_relative(af)) // "/vector_field::" // trim(split_dependency(1))) .OR. &
97+ & have_option("/material_phase::" // trim(split_dependency(1)) // trim(additional_fields_relative(af)) // "/tensor_field::" // trim(split_dependency(1)))) then
98+ cycle DEP_LOOP
99+ end if
100+ end do
101+
102+ ! check other paths - err, these are
103+ do af=1, size(additional_diagnostic_paths)
104+ if (have_option(trim(additional_diagnostic_paths(af)) // "/scalar_field::" // trim(split_dependency(1))) .OR. &
105+ & have_option(trim(additional_diagnostic_paths(af)) // "/vector_field::" // trim(split_dependency(1))) .OR. &
106+ & have_option(trim(additional_diagnostic_paths(af)) // "/tensor_field::" // trim(split_dependency(1)))) then
107+ cycle DEP_LOOP
108+ end if
109+ end do
110+
111+ call field_error(state_name, field_name, "Field depends on " // trim(split_dependency(2)) // " in state " // split_dependency(1))
112+
113 case default
114 ewrite(-1, *) "For dependency " // trim(dependencies(m))
115 call field_error(state_name, field_name, "Invalid dependency")
116 end select
117
118 deallocate(split_dependency)
119- end do
120+ end do DEP_LOOP
121 deallocate(dependencies)
122 end do
123 end do
124
125=== added file 'preprocessor/Additional_Field_Locations.F90'
126--- preprocessor/Additional_Field_Locations.F90 1970-01-01 00:00:00 +0000
127+++ preprocessor/Additional_Field_Locations.F90 2014-01-24 12:43:19 +0000
128@@ -0,0 +1,88 @@
129+! Copyright (C) 2006 Imperial College London and others.
130+!
131+! Please see the AUTHORS file in the main source directory for a full list
132+! of copyright holders.
133+!
134+! Prof. C Pain
135+! Applied Modelling and Computation Group
136+! Department of Earth Science and Engineering
137+! Imperial College London
138+!
139+! amcgsoftware@imperial.ac.uk
140+!
141+! This library is free software; you can redistribute it and/or
142+! modify it under the terms of the GNU Lesser General Public
143+! License as published by the Free Software Foundation,
144+! version 2.1 of the License.
145+!
146+! This library is distributed in the hope that it will be useful,
147+! but WITHOUT ANY WARRANTY; without even the implied warranty of
148+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
149+! Lesser General Public License for more details.
150+!
151+! You should have received a copy of the GNU Lesser General Public
152+! License along with this library; if not, write to the Free Software
153+! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
154+! USA
155+
156+#include "fdebug.h"
157+
158+module additional_field_locations
159+
160+ use global_parameters, only: OPTION_PATH_LEN
161+
162+ implicit none
163+
164+
165+ public :: additional_fields_absolute, additional_fields_relative, grandchild_paths
166+ public :: additional_diagnostic_paths
167+
168+ !! A list of locations in which additional scalar/vector/tensor fields
169+ !! are to be found. These are absolute paths in the schema.
170+ character(len=OPTION_PATH_LEN), dimension(8) :: additional_fields_absolute=&
171+ (/ &
172+ "/ocean_biology/pznd ", &
173+ "/ocean_biology/six_component ", &
174+ "/ocean_forcing/iceshelf_meltrate/Holland08 ", &
175+ "/ocean_forcing/bulk_formulae/output_fluxes_diagnostics ", &
176+ "/porous_media ", &
177+ "/material_phase[0]/vector_field::Velocity/prognostic/spatial_discretisation/continuous_galerkin/les_model/dynamic_les ", &
178+ "/material_phase[0]/vector_field::Velocity/prognostic/spatial_discretisation/continuous_galerkin/les_model/second_order", &
179+ "/material_phase[0]/sediment/ " &
180+ /)
181+
182+ !! A list of relative paths under /material_phase[i]
183+ !! that are searched for additional fields to be added.
184+ character(len=OPTION_PATH_LEN), dimension(13) :: additional_fields_relative=&
185+ (/ &
186+ "/subgridscale_parameterisations/Mellor_Yamada ", &
187+ "/subgridscale_parameterisations/prescribed_diffusivity ", &
188+ "/subgridscale_parameterisations/GLS ", &
189+ "/subgridscale_parameterisations/k-epsilon ", &
190+ "/subgridscale_parameterisations/k-epsilon/debugging_options/source_term_output_fields ", &
191+ "/subgridscale_parameterisations/k-epsilon/debugging_options/prescribed_source_terms ", &
192+ "/vector_field::Velocity/prognostic/spatial_discretisation/continuous_galerkin/les_model/second_order", &
193+ "/vector_field::Velocity/prognostic/spatial_discretisation/continuous_galerkin/les_model/fourth_order", &
194+ "/vector_field::Velocity/prognostic/spatial_discretisation/continuous_galerkin/les_model/wale ", &
195+ "/vector_field::Velocity/prognostic/spatial_discretisation/continuous_galerkin/les_model/dynamic_les ", &
196+ "/vector_field::Velocity/prognostic/equation::ShallowWater ", &
197+ "/vector_field::Velocity/prognostic/equation::ShallowWater/bottom_drag ", &
198+ "/vector_field::BedShearStress/diagnostic/calculation_method/velocity_gradient " &
199+ /)
200+
201+ !! Relative paths under a field that are searched for grandchildren
202+ !! (moved here because of extremely obscure intel ICE -Stephan)
203+ character(len=OPTION_PATH_LEN), dimension(1):: &
204+ grandchild_paths = (/&
205+ & "/spatial_discretisation/inner_element" &
206+ /)
207+
208+ !! List of other fields that Populate_State handles under the hood, but are
209+ !! needed for diagnostic dependencies.
210+ character(len=OPTION_PATH_LEN), dimension(1):: additional_diagnostic_paths = &
211+ (/ &
212+ & "/geometry/ocean_boundaries" &
213+ /)
214+
215+
216+end module additional_field_locations
217
218=== modified file 'preprocessor/Makefile.dependencies'
219--- preprocessor/Makefile.dependencies 2012-11-19 20:46:44 +0000
220+++ preprocessor/Makefile.dependencies 2014-01-24 12:43:19 +0000
221@@ -1,4 +1,11 @@
222 # Dependencies generated by create_makefile.py. DO NOT EDIT
223+../include/additional_field_locations.mod: Additional_Field_Locations.o
224+ @true
225+
226+Additional_Field_Locations.o ../include/additional_field_locations.mod: \
227+ Additional_Field_Locations.F90 ../include/fdebug.h \
228+ ../include/global_parameters.mod
229+
230 ../include/boundary_conditions_from_options.mod: \
231 Boundary_Conditions_From_Options.o
232 @true
233@@ -50,6 +57,7 @@
234 @true
235
236 Populate_State.o ../include/populate_state_module.mod: Populate_State.F90 \
237+ ../include/additional_field_locations.mod \
238 ../include/boundary_conditions_from_options.mod ../include/climatology.mod \
239 ../include/coordinates.mod ../include/data_structures.mod \
240 ../include/diagnostic_variables.mod ../include/elements.mod \
241
242=== modified file 'preprocessor/Makefile.in'
243--- preprocessor/Makefile.in 2011-10-21 10:05:25 +0000
244+++ preprocessor/Makefile.in 2014-01-24 12:43:19 +0000
245@@ -54,8 +54,8 @@
246 TESTLIBS = $(shell echo @LIBS@ | sed 's@./lib/lib\([a-z]*\)\.a@-l\1@g')
247
248 OBJS = Populate_State.o Populate_Sub_State.o Reserve_State.o Field_Priority_Lists.o\
249- Physics_From_Options.o VTK_Cache.o Initialise_Fields.o \
250- Boundary_Conditions_From_Options.o synthetic_bc.o Tidal_Modelling.o
251+ Physics_From_Options.o VTK_Cache.o Initialise_Fields.o Additional_Field_Locations.o \
252+ Boundary_Conditions_From_Options.o synthetic_bc.o Tidal_Modelling.o
253
254 .SUFFIXES: .f90 .F90 .cpp .c .o .a
255
256
257=== modified file 'preprocessor/Populate_State.F90'
258--- preprocessor/Populate_State.F90 2013-10-28 06:46:48 +0000
259+++ preprocessor/Populate_State.F90 2014-01-24 12:43:19 +0000
260@@ -58,6 +58,7 @@
261 use fields_halos
262 use read_triangle
263 use initialise_ocean_forcing_module
264+ use additional_field_locations
265
266 implicit none
267
268@@ -81,46 +82,6 @@
269
270 end interface allocate_field_as_constant
271
272- !! A list of locations in which additional scalar/vector/tensor fields
273- !! are to be found. These are absolute paths in the schema.
274- character(len=OPTION_PATH_LEN), dimension(8) :: additional_fields_absolute=&
275- (/ &
276- "/ocean_biology/pznd ", &
277- "/ocean_biology/six_component ", &
278- "/ocean_forcing/iceshelf_meltrate/Holland08 ", &
279- "/ocean_forcing/bulk_formulae/output_fluxes_diagnostics ", &
280- "/porous_media ", &
281- "/material_phase[0]/vector_field::Velocity/prognostic/spatial_discretisation/continuous_galerkin/les_model/dynamic_les ", &
282- "/material_phase[0]/vector_field::Velocity/prognostic/spatial_discretisation/continuous_galerkin/les_model/second_order", &
283- "/material_phase[0]/sediment/ " &
284- /)
285-
286- !! A list of relative paths under /material_phase[i]
287- !! that are searched for additional fields to be added.
288- character(len=OPTION_PATH_LEN), dimension(13) :: additional_fields_relative=&
289- (/ &
290- "/subgridscale_parameterisations/Mellor_Yamada ", &
291- "/subgridscale_parameterisations/prescribed_diffusivity ", &
292- "/subgridscale_parameterisations/GLS ", &
293- "/subgridscale_parameterisations/k-epsilon ", &
294- "/subgridscale_parameterisations/k-epsilon/debugging_options/source_term_output_fields ", &
295- "/subgridscale_parameterisations/k-epsilon/debugging_options/prescribed_source_terms ", &
296- "/vector_field::Velocity/prognostic/spatial_discretisation/continuous_galerkin/les_model/second_order", &
297- "/vector_field::Velocity/prognostic/spatial_discretisation/continuous_galerkin/les_model/fourth_order", &
298- "/vector_field::Velocity/prognostic/spatial_discretisation/continuous_galerkin/les_model/wale ", &
299- "/vector_field::Velocity/prognostic/spatial_discretisation/continuous_galerkin/les_model/dynamic_les ", &
300- "/vector_field::Velocity/prognostic/equation::ShallowWater ", &
301- "/vector_field::Velocity/prognostic/equation::ShallowWater/bottom_drag ", &
302- "/vector_field::BedShearStress/diagnostic/calculation_method/velocity_gradient " &
303- /)
304-
305- !! Relative paths under a field that are searched for grandchildren
306- !! (moved here because of extremely obscure intel ICE -Stephan)
307- character(len=OPTION_PATH_LEN), dimension(1):: &
308- grandchild_paths = (/&
309- & "/spatial_discretisation/inner_element" &
310- /)
311-
312 contains
313
314
315
316=== added directory 'tests/additional_fields_diagnostics_check'
317=== added file 'tests/additional_fields_diagnostics_check/Makefile'
318--- tests/additional_fields_diagnostics_check/Makefile 1970-01-01 00:00:00 +0000
319+++ tests/additional_fields_diagnostics_check/Makefile 2014-01-24 12:43:19 +0000
320@@ -0,0 +1,24 @@
321+FLMLMODEL = diagnostics
322+MODEL = diagnostics
323+
324+default: input
325+
326+input:
327+
328+clean: clean-mesh clean-run-debug
329+clean-mesh:
330+clean-run:
331+ rm -f $(FLMLMODEL)_?*.pvtu $(FLMLMODEL)_?*.vtu
332+ rm -f $(FLMLMODEL).detectors $(FLMLMODEL).stat tmpf*
333+ rm -f fluidity.err-?* fluidity.log-?*
334+ rm -f matrixdump matrixdump.info
335+ rm -f $(FLMLMODEL)_?*_checkpoint.flml
336+ rm -f $(FLMLMODEL)_?*_checkpoint_?*.ele $(FLMLMODEL)_?*_checkpoint_?*.face $(FLMLMODEL)_?*_checkpoint_?*.halo $(FLMLMODEL)_?*_checkpoint_?*.node
337+ rm -f $(FLMLMODEL)_?*_?*_checkpoint.pvtu $(FLMLMODEL)_?*_?*_checkpoint.vtu
338+ rm -f $(FLMLMODEL)_?*_checkpoint.ele $(FLMLMODEL)_?*_checkpoint.face $(FLMLMODEL)_?*_checkpoint.node
339+ rm -f $(FLMLMODEL)_?*_checkpoint.vtu
340+clean-run-debug: clean-run
341+ rm -f adapted_mesh_?*.vtu bounding_box_?*_?*.vtu final_metric_?*.vtu gmon.out gradation_metric_?*.vtu interpolation_metric_final_?*.vtu interpolation_metric_hessian_?*_?*.vtu interpolation_metric_merge_?*_?*.vtu interpolation_metric_metric_?*_?*.vtu metric_input_?*_?*.vtu
342+ rm -f adapted_mesh.face adapted_mesh.ele adapted_mesh.node
343+ rm -f adapted_mesh_?*.face adapted_mesh_?*.ele adapted_mesh_?*.node
344+ rm -f adapted_state_?*.pvtu adapted_state_?*.vtu
345
346=== added file 'tests/additional_fields_diagnostics_check/additional_fields_diagnostics_check.xml'
347--- tests/additional_fields_diagnostics_check/additional_fields_diagnostics_check.xml 1970-01-01 00:00:00 +0000
348+++ tests/additional_fields_diagnostics_check/additional_fields_diagnostics_check.xml 2014-01-24 12:43:19 +0000
349@@ -0,0 +1,33 @@
350+<?xml version="1.0" encoding="UTF-8" ?>
351+<testproblem>
352+ <name>additional_fields_diagnostic_check</name>
353+ <owner userid="jhill1"/>
354+ <tags>flml</tags>
355+ <problem_definition length = "short" nprocs = "1">
356+ <command_line>make clean-run-debug; fluidity -v2 -l diagnostics.flml</command_line>
357+ </problem_definition>
358+ <variables>
359+ <variable name="solvers_converged" language="python">
360+import os
361+files = os.listdir("./")
362+solvers_converged = not "matrixdump" in files and not "matrixdump.info" in files
363+ </variable>
364+ <variable name = "error_present" language = "python">
365+error_present = False
366+for line in file("fluidity.err-0", "r"):
367+ if line.startswith("Error message: Field depends on"):
368+ error_present = True
369+ break
370+ </variable>
371+ </variables>
372+ <pass_tests>
373+ <test name="Solvers converged" language="python">
374+ assert(solvers_converged)
375+ </test>
376+ <test name="Fluidity failed with the expected error" language = "python">
377+assert(not error_present)
378+ </test>
379+ </pass_tests>
380+ <warn_tests>
381+ </warn_tests>
382+</testproblem>
383
384=== added file 'tests/additional_fields_diagnostics_check/diagnostics.flml'
385--- tests/additional_fields_diagnostics_check/diagnostics.flml 1970-01-01 00:00:00 +0000
386+++ tests/additional_fields_diagnostics_check/diagnostics.flml 2014-01-24 12:43:19 +0000
387@@ -0,0 +1,115 @@
388+<?xml version='1.0' encoding='utf-8'?>
389+<fluidity_options>
390+ <simulation_name>
391+ <string_value lines="1">diagnostics</string_value>
392+ </simulation_name>
393+ <problem_type>
394+ <string_value lines="1">fluids</string_value>
395+ </problem_type>
396+ <geometry>
397+ <dimension>
398+ <integer_value rank="0">2</integer_value>
399+ </dimension>
400+ <mesh name="CoordinateMesh">
401+ <from_file file_name="square">
402+ <format name="triangle"/>
403+ <stat>
404+ <include_in_stat/>
405+ </stat>
406+ </from_file>
407+ </mesh>
408+ <mesh name="VelocityMesh">
409+ <from_mesh>
410+ <mesh name="CoordinateMesh"/>
411+ <stat>
412+ <exclude_from_stat/>
413+ </stat>
414+ </from_mesh>
415+ </mesh>
416+ <mesh name="PressureMesh">
417+ <from_mesh>
418+ <mesh name="CoordinateMesh"/>
419+ <stat>
420+ <exclude_from_stat/>
421+ </stat>
422+ </from_mesh>
423+ </mesh>
424+ <quadrature>
425+ <degree>
426+ <integer_value rank="0">4</integer_value>
427+ </degree>
428+ </quadrature>
429+ </geometry>
430+ <io>
431+ <dump_format>
432+ <string_value>vtk</string_value>
433+ </dump_format>
434+ <dump_period>
435+ <constant>
436+ <real_value rank="0">1</real_value>
437+ </constant>
438+ </dump_period>
439+ <output_mesh name="VelocityMesh"/>
440+ <stat/>
441+ </io>
442+ <timestepping>
443+ <current_time>
444+ <real_value rank="0">0.0</real_value>
445+ </current_time>
446+ <timestep>
447+ <real_value rank="0">1.0</real_value>
448+ </timestep>
449+ <finish_time>
450+ <real_value rank="0">1.0</real_value>
451+ </finish_time>
452+ </timestepping>
453+ <physical_parameters/>
454+ <material_phase name="Fluid">
455+ <subgridscale_parameterisations>
456+ <prescribed_diffusivity>
457+ <tensor_field name="PrescribedDiffusivity" rank="2">
458+ <prescribed>
459+ <mesh name="VelocityMesh"/>
460+ <value name="WholeMesh">
461+ <isotropic>
462+ <constant>
463+ <real_value rank="0">1</real_value>
464+ </constant>
465+ </isotropic>
466+ </value>
467+ <output/>
468+ </prescribed>
469+ </tensor_field>
470+ </prescribed_diffusivity>
471+ </subgridscale_parameterisations>
472+ <vector_field name="Velocity" rank="1">
473+ <prescribed>
474+ <mesh name="VelocityMesh"/>
475+ <value name="WholeMesh">
476+ <constant>
477+ <real_value shape="2" dim1="dim" rank="1">0.0 0.0</real_value>
478+ </constant>
479+ </value>
480+ <output>
481+ <exclude_from_vtu/>
482+ </output>
483+ <stat>
484+ <exclude_from_stat/>
485+ </stat>
486+ <detectors>
487+ <exclude_from_detectors/>
488+ </detectors>
489+ </prescribed>
490+ </vector_field>
491+ <tensor_field name="CopyOfHiddenField" rank="2">
492+ <diagnostic>
493+ <algorithm material_phase_support="single" source_field_type="tensor" source_field_name="PrescribedDiffusivity" name="tensor_copy"/>
494+ <mesh name="VelocityMesh"/>
495+ <output/>
496+ <stat>
497+ <include_in_stat/>
498+ </stat>
499+ </diagnostic>
500+ </tensor_field>
501+ </material_phase>
502+</fluidity_options>
503
504=== added file 'tests/additional_fields_diagnostics_check/square.edge'
505--- tests/additional_fields_diagnostics_check/square.edge 1970-01-01 00:00:00 +0000
506+++ tests/additional_fields_diagnostics_check/square.edge 2014-01-24 12:43:19 +0000
507@@ -0,0 +1,12 @@
508+8 1
509+1 1 2 1
510+2 2 3 1
511+3 7 8 2
512+4 8 9 2
513+5 1 4 4
514+6 4 7 4
515+7 3 6 3
516+8 6 9 3
517+# Created by triangletools.WriteTriangle
518+# Command: /usr/bin/ipython
519+# Thu Apr 2 13:34:14 2009
520
521=== added file 'tests/additional_fields_diagnostics_check/square.ele'
522--- tests/additional_fields_diagnostics_check/square.ele 1970-01-01 00:00:00 +0000
523+++ tests/additional_fields_diagnostics_check/square.ele 2014-01-24 12:43:19 +0000
524@@ -0,0 +1,12 @@
525+8 3 1
526+1 1 4 5 0
527+2 1 5 2 0
528+3 2 5 6 0
529+4 2 6 3 0
530+5 4 7 8 0
531+6 4 8 5 0
532+7 5 8 9 0
533+8 5 9 6 0
534+# Created by triangletools.WriteTriangle
535+# Command: /usr/bin/ipython
536+# Thu Apr 2 13:34:14 2009
537
538=== added file 'tests/additional_fields_diagnostics_check/square.node'
539--- tests/additional_fields_diagnostics_check/square.node 1970-01-01 00:00:00 +0000
540+++ tests/additional_fields_diagnostics_check/square.node 2014-01-24 12:43:19 +0000
541@@ -0,0 +1,13 @@
542+9 2 0 0
543+1 0.0 0.0
544+2 0.0 0.5
545+3 0.0 1.0
546+4 0.5 0.0
547+5 0.5 0.5
548+6 0.5 1.0
549+7 1.0 0.0
550+8 1.0 0.5
551+9 1.0 1.0
552+# Created by triangletools.WriteTriangle
553+# Command: /usr/bin/ipython
554+# Thu Apr 2 13:34:14 2009