Merge lp:~j-percival/fluidity/periodic-adaptivity-at-first-timestep into lp:fluidity

Proposed by James Robert Percival
Status: Superseded
Proposed branch: lp:~j-percival/fluidity/periodic-adaptivity-at-first-timestep
Merge into: lp:fluidity
Diff against target: 679 lines (+586/-9)
8 files modified
assemble/Adapt_State.F90 (+1/-3)
preprocessor/Populate_State.F90 (+6/-6)
tests/periodic_adaptivity_at_first_timestep/Makefile (+6/-0)
tests/periodic_adaptivity_at_first_timestep/periodic_adaptivity_at_first_timestep.flml (+239/-0)
tests/periodic_adaptivity_at_first_timestep/periodic_adaptivity_at_first_timestep.stat (+64/-0)
tests/periodic_adaptivity_at_first_timestep/periodic_adaptivity_at_first_timestep.xml (+24/-0)
tests/periodic_adaptivity_at_first_timestep/periodic_adaptivity_at_first_timestep_periodised.flml (+234/-0)
tests/periodic_adaptivity_at_first_timestep/src/MMS_B.geo (+12/-0)
To merge this branch: bzr merge lp:~j-percival/fluidity/periodic-adaptivity-at-first-timestep
Reviewer Review Type Date Requested Status
Stephan Kramer Pending
Review via email: mp+94218@code.launchpad.net

This proposal has been superseded by a proposal from 2013-06-25.

Description of the change

This pulls out Cian's two fixes with regard to peroiodic adaptivity and adds a test (pretty much copied exactly from Patrick's to confirm that the functionality works. Note that while the test fails on an unfixed branch, it may need extending for more insidious failure modes

To post a comment you must log in.
Revision history for this message
Stephan Kramer (s-kramer) wrote :

Hey James, thanks for committing this.

Two questions:
- what exactly do you mean by: "it may need extending for more insidious failure modes"
- is the new "periodic_adaptivity_at_first_timestep" test indeed simply a copy of the existing 'periodic_adaptivity' test with 'adapt_at_first_timestep' switched on? In this case, I'd much prefer to only have a single test (i.e. only switch on adapt_at_first_timestep in the exisitng 'periodic_adaptivity' test), as 'periodic_adaptivity_at_first_timestep' would duplicate the test coverage of 'periodic_adaptivity'.

The changes in the code look correct to me.

Revision history for this message
James Robert Percival (j-percival) wrote :

Thanks for the comments Stephan.

To address your questions:

I was slightly at a loss at what precisely to test for, so copied the basic structure of the periodic_adaptivity test, checking that the problem exited gracefully, produced output and that the maximum of the interpolated field was correct. Given my understanding of the code path, I suspect the second test is in fact redundant. However, I suspect there are ways the code could fail to produce a usable mesh while still producing output which passes the tests.

I would argue there is value in having a separate test problem for the adapt_at_first_timestep routines, since a) the code path is sufficiently individual that bugs such as the one fixed here can slip through and b) as written I think switching on adapt_at_first_timestep will cause the subsequent mesh adapts to be "do nothing" events However, given that the input mesh is identical I agree that the two tests can be combined (i.e. a single xml file which runs 2 flmls and tests both outputs). Actually is this what you meant?

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'assemble/Adapt_State.F90'
--- assemble/Adapt_State.F90 2011-09-28 13:38:45 +0000
+++ assemble/Adapt_State.F90 2012-02-22 16:35:01 +0000
@@ -880,7 +880,6 @@
880880
881 character(len = *), parameter :: base_path = "/mesh_adaptivity/hr_adaptivity/adapt_at_first_timestep"881 character(len = *), parameter :: base_path = "/mesh_adaptivity/hr_adaptivity/adapt_at_first_timestep"
882 integer :: adapt_iterations, i882 integer :: adapt_iterations, i
883 type(mesh_type), pointer :: old_mesh
884 type(tensor_field) :: metric883 type(tensor_field) :: metric
885 type(vector_field), pointer :: output_positions884 type(vector_field), pointer :: output_positions
886 real :: dt885 real :: dt
@@ -910,8 +909,7 @@
910 end if909 end if
911910
912 ! Form the new metric911 ! Form the new metric
913 old_mesh => extract_mesh(states(1), "CoordinateMesh")912 call allocate(metric, extract_mesh(states(1), topology_mesh_name), "ErrorMetric")
914 call allocate(metric, old_mesh, "ErrorMetric")
915 call assemble_metric(states, metric)913 call assemble_metric(states, metric)
916914
917 ! Adapt state, initialising fields from the options tree rather than915 ! Adapt state, initialising fields from the options tree rather than
918916
=== modified file 'preprocessor/Populate_State.F90'
--- preprocessor/Populate_State.F90 2012-01-30 15:36:17 +0000
+++ preprocessor/Populate_State.F90 2012-02-22 16:35:01 +0000
@@ -1911,12 +1911,12 @@
1911 adapt_path=trim(path)//"/adaptivity_options"1911 adapt_path=trim(path)//"/adaptivity_options"
1912 if(have_option(trim(adapt_path)//"/absolute_measure")) then1912 if(have_option(trim(adapt_path)//"/absolute_measure")) then
1913 adapt_path=trim(adapt_path)//"/absolute_measure/scalar_field::InterpolationErrorBound"1913 adapt_path=trim(adapt_path)//"/absolute_measure/scalar_field::InterpolationErrorBound"
1914 call allocate_and_insert_scalar_field(adapt_path, state, parent_mesh=mesh_name, &1914 call allocate_and_insert_scalar_field(adapt_path, state, parent_mesh=topology_mesh_name, &
1915 parent_name=lfield_name, &1915 parent_name=lfield_name, &
1916 dont_allocate_prognostic_value_spaces=dont_allocate_prognostic_value_spaces)1916 dont_allocate_prognostic_value_spaces=dont_allocate_prognostic_value_spaces)
1917 else if(have_option(trim(adapt_path)//"/relative_measure")) then1917 else if(have_option(trim(adapt_path)//"/relative_measure")) then
1918 adapt_path=trim(adapt_path)//"/relative_measure/scalar_field::InterpolationErrorBound"1918 adapt_path=trim(adapt_path)//"/relative_measure/scalar_field::InterpolationErrorBound"
1919 call allocate_and_insert_scalar_field(adapt_path, state, parent_mesh=mesh_name, &1919 call allocate_and_insert_scalar_field(adapt_path, state, parent_mesh=topology_mesh_name, &
1920 parent_name=lfield_name, &1920 parent_name=lfield_name, &
1921 dont_allocate_prognostic_value_spaces=dont_allocate_prognostic_value_spaces)1921 dont_allocate_prognostic_value_spaces=dont_allocate_prognostic_value_spaces)
1922 end if1922 end if
@@ -2044,11 +2044,11 @@
2044 adapt_path=trim(path)//"/adaptivity_options"2044 adapt_path=trim(path)//"/adaptivity_options"
2045 if(have_option(trim(adapt_path)//"/absolute_measure")) then2045 if(have_option(trim(adapt_path)//"/absolute_measure")) then
2046 adapt_path=trim(adapt_path)//"/absolute_measure/vector_field::InterpolationErrorBound"2046 adapt_path=trim(adapt_path)//"/absolute_measure/vector_field::InterpolationErrorBound"
2047 call allocate_and_insert_vector_field(adapt_path, state, mesh_name, lfield_name, &2047 call allocate_and_insert_vector_field(adapt_path, state, topology_mesh_name, lfield_name, &
2048 dont_allocate_prognostic_value_spaces=dont_allocate_prognostic_value_spaces)2048 dont_allocate_prognostic_value_spaces=dont_allocate_prognostic_value_spaces)
2049 else if(have_option(trim(adapt_path)//"/relative_measure")) then2049 else if(have_option(trim(adapt_path)//"/relative_measure")) then
2050 adapt_path=trim(adapt_path)//"/relative_measure/vector_field::InterpolationErrorBound"2050 adapt_path=trim(adapt_path)//"/relative_measure/vector_field::InterpolationErrorBound"
2051 call allocate_and_insert_vector_field(adapt_path, state, mesh_name, lfield_name, &2051 call allocate_and_insert_vector_field(adapt_path, state, topology_mesh_name, lfield_name, &
2052 dont_allocate_prognostic_value_spaces=dont_allocate_prognostic_value_spaces)2052 dont_allocate_prognostic_value_spaces=dont_allocate_prognostic_value_spaces)
2053 end if2053 end if
20542054
@@ -2164,11 +2164,11 @@
2164 adapt_path=trim(path)//"/adaptivity_options"2164 adapt_path=trim(path)//"/adaptivity_options"
2165 if(have_option(trim(adapt_path)//"/absolute_measure")) then2165 if(have_option(trim(adapt_path)//"/absolute_measure")) then
2166 adapt_path=trim(adapt_path)//"/absolute_measure/tensor_field::InterpolationErrorBound"2166 adapt_path=trim(adapt_path)//"/absolute_measure/tensor_field::InterpolationErrorBound"
2167 call allocate_and_insert_tensor_field(adapt_path, state, mesh_name, field_name, &2167 call allocate_and_insert_tensor_field(adapt_path, state, topology_mesh_name, field_name, &
2168 dont_allocate_prognostic_value_spaces=dont_allocate_prognostic_value_spaces)2168 dont_allocate_prognostic_value_spaces=dont_allocate_prognostic_value_spaces)
2169 else if(have_option(trim(adapt_path)//"/relative_measure")) then2169 else if(have_option(trim(adapt_path)//"/relative_measure")) then
2170 adapt_path=trim(adapt_path)//"/relative_measure/tensor_field::InterpolationErrorBound"2170 adapt_path=trim(adapt_path)//"/relative_measure/tensor_field::InterpolationErrorBound"
2171 call allocate_and_insert_tensor_field(adapt_path, state, mesh_name, field_name, &2171 call allocate_and_insert_tensor_field(adapt_path, state, topology_mesh_name, field_name, &
2172 dont_allocate_prognostic_value_spaces=dont_allocate_prognostic_value_spaces)2172 dont_allocate_prognostic_value_spaces=dont_allocate_prognostic_value_spaces)
2173 end if2173 end if
21742174
21752175
=== added directory 'tests/periodic_adaptivity_at_first_timestep'
=== added file 'tests/periodic_adaptivity_at_first_timestep/Makefile'
--- tests/periodic_adaptivity_at_first_timestep/Makefile 1970-01-01 00:00:00 +0000
+++ tests/periodic_adaptivity_at_first_timestep/Makefile 2012-02-22 16:35:01 +0000
@@ -0,0 +1,6 @@
1input:
2 gmsh -2 src/MMS_B.geo -o MMS_B.msh
3 ../../bin/gmsh2triangle --2d MMS_B.msh
4
5clean:
6 rm -f *.vtu *.log-? *.err-? *.msh *.edge *.ele *.node periodic_adaptivity.stat periodic_adaptivity_periodised.flml
07
=== added file 'tests/periodic_adaptivity_at_first_timestep/periodic_adaptivity_at_first_timestep.flml'
--- tests/periodic_adaptivity_at_first_timestep/periodic_adaptivity_at_first_timestep.flml 1970-01-01 00:00:00 +0000
+++ tests/periodic_adaptivity_at_first_timestep/periodic_adaptivity_at_first_timestep.flml 2012-02-22 16:35:01 +0000
@@ -0,0 +1,239 @@
1<?xml version='1.0' encoding='utf-8'?>
2<fluidity_options>
3 <simulation_name>
4 <string_value lines="1">periodic_adaptivity_at_first_timestep</string_value>
5 </simulation_name>
6 <problem_type>
7 <string_value lines="1">fluids</string_value>
8 </problem_type>
9 <geometry>
10 <dimension>
11 <integer_value rank="0">2</integer_value>
12 </dimension>
13 <mesh name="CoordinateMesh">
14 <from_file file_name="MMS_B">
15 <format name="triangle"/>
16 <stat>
17 <include_in_stat/>
18 </stat>
19 </from_file>
20 </mesh>
21 <mesh name="VelocityMesh">
22 <from_mesh>
23 <mesh name="PeriodicMesh"/>
24 <stat>
25 <exclude_from_stat/>
26 </stat>
27 </from_mesh>
28 </mesh>
29 <mesh name="PressureMesh">
30 <from_mesh>
31 <mesh name="PeriodicMesh"/>
32 <stat>
33 <exclude_from_stat/>
34 </stat>
35 </from_mesh>
36 </mesh>
37 <mesh name="PeriodicMesh">
38 <from_mesh>
39 <mesh name="CoordinateMesh"/>
40 <periodic_boundary_conditions name="x">
41 <physical_boundary_ids>
42 <integer_value shape="1" rank="1">10</integer_value>
43 </physical_boundary_ids>
44 <aliased_boundary_ids>
45 <integer_value shape="1" rank="1">8</integer_value>
46 </aliased_boundary_ids>
47 <coordinate_map>
48 <string_value lines="20" type="python">def val(X,t):
49 from math import pi
50 return(X[0]-1, X[1])</string_value>
51 </coordinate_map>
52 <inverse_coordinate_map>
53 <string_value lines="20" type="python">def val(X,t):
54 from math import pi
55 return(X[0]+1, X[1])</string_value>
56 </inverse_coordinate_map>
57 </periodic_boundary_conditions>
58 <stat>
59 <exclude_from_stat/>
60 </stat>
61 </from_mesh>
62 </mesh>
63 <quadrature>
64 <degree>
65 <integer_value rank="0">4</integer_value>
66 </degree>
67 </quadrature>
68 </geometry>
69 <io>
70 <dump_format>
71 <string_value>vtk</string_value>
72 </dump_format>
73 <dump_period_in_timesteps>
74 <constant>
75 <integer_value rank="0">1</integer_value>
76 </constant>
77 </dump_period_in_timesteps>
78 <output_mesh name="CoordinateMesh"/>
79 <stat>
80 <output_at_start/>
81 <output_before_adapts/>
82 <output_after_adapts/>
83 </stat>
84 </io>
85 <timestepping>
86 <current_time>
87 <real_value rank="0">0.0</real_value>
88 </current_time>
89 <timestep>
90 <real_value rank="0">1.0</real_value>
91 </timestep>
92 <finish_time>
93 <real_value rank="0">0.0</real_value>
94 </finish_time>
95 </timestepping>
96 <physical_parameters/>
97 <material_phase name="Main">
98 <vector_field name="Velocity" rank="1">
99 <prescribed>
100 <mesh name="VelocityMesh"/>
101 <value name="WholeMesh">
102 <constant>
103 <real_value shape="2" dim1="dim" rank="1">0.0 0.0</real_value>
104 </constant>
105 </value>
106 <output/>
107 <stat>
108 <include_in_stat/>
109 </stat>
110 <detectors>
111 <exclude_from_detectors/>
112 </detectors>
113 </prescribed>
114 </vector_field>
115 <scalar_field name="Unity" rank="0">
116 <prescribed>
117 <mesh name="VelocityMesh"/>
118 <value name="WholeMesh">
119 <python>
120 <string_value lines="20" type="python">def val(X, t):
121 #return (X[0]**2 - X[0])/-0.25
122 return 1.0</string_value>
123 </python>
124 </value>
125 <output/>
126 <stat/>
127 <detectors>
128 <exclude_from_detectors/>
129 </detectors>
130 <adaptivity_options>
131 <absolute_measure>
132 <scalar_field name="InterpolationErrorBound" rank="0">
133 <prescribed>
134 <value name="WholeMesh">
135 <constant>
136 <real_value rank="0">0.01</real_value>
137 </constant>
138 </value>
139 <output/>
140 <stat/>
141 <detectors>
142 <exclude_from_detectors/>
143 </detectors>
144 </prescribed>
145 </scalar_field>
146 </absolute_measure>
147 </adaptivity_options>
148 </prescribed>
149 </scalar_field>
150 <scalar_field name="PrognosticFieldConsistent" rank="0">
151 <prognostic>
152 <mesh name="VelocityMesh"/>
153 <equation name="AdvectionDiffusion"/>
154 <spatial_discretisation>
155 <continuous_galerkin>
156 <stabilisation>
157 <no_stabilisation/>
158 </stabilisation>
159 <advection_terms/>
160 <mass_terms/>
161 </continuous_galerkin>
162 <conservative_advection>
163 <real_value rank="0">1.0</real_value>
164 </conservative_advection>
165 </spatial_discretisation>
166 <temporal_discretisation>
167 <theta>
168 <real_value rank="0">0.5</real_value>
169 </theta>
170 </temporal_discretisation>
171 <solver>
172 <iterative_method name="gmres">
173 <restart>
174 <integer_value rank="0">30</integer_value>
175 </restart>
176 </iterative_method>
177 <preconditioner name="sor"/>
178 <relative_error>
179 <real_value rank="0">1.0e-8</real_value>
180 </relative_error>
181 <max_iterations>
182 <integer_value rank="0">10000</integer_value>
183 </max_iterations>
184 <never_ignore_solver_failures/>
185 <diagnostics>
186 <monitors/>
187 </diagnostics>
188 </solver>
189 <initial_condition name="WholeMesh">
190 <constant>
191 <real_value rank="0">1.0</real_value>
192 </constant>
193 </initial_condition>
194 <output/>
195 <stat/>
196 <convergence>
197 <include_in_convergence/>
198 </convergence>
199 <detectors>
200 <include_in_detectors/>
201 </detectors>
202 <steady_state>
203 <include_in_steady_state/>
204 </steady_state>
205 <consistent_interpolation/>
206 </prognostic>
207 </scalar_field>
208 </material_phase>
209 <mesh_adaptivity>
210 <hr_adaptivity>
211 <period>
212 <real_value rank="0">2.0</real_value>
213 </period>
214 <maximum_number_of_nodes>
215 <integer_value rank="0">10000</integer_value>
216 </maximum_number_of_nodes>
217 <disable_gradation/>
218 <tensor_field name="MinimumEdgeLengths">
219 <anisotropic_symmetric>
220 <constant>
221 <real_value symmetric="true" dim2="dim" shape="2 2" dim1="dim" rank="2">0.01 0.0 0.0 0.01</real_value>
222 </constant>
223 </anisotropic_symmetric>
224 </tensor_field>
225 <tensor_field name="MaximumEdgeLengths">
226 <anisotropic_symmetric>
227 <constant>
228 <real_value symmetric="true" dim2="dim" shape="2 2" dim1="dim" rank="2">0.1 0.0 0.0 0.1</real_value>
229 </constant>
230 </anisotropic_symmetric>
231 </tensor_field>
232 <adapt_at_first_timestep>
233 <number_of_adapts>
234 <integer_value rank="0">2</integer_value>
235 </number_of_adapts>
236 </adapt_at_first_timestep>
237 </hr_adaptivity>
238 </mesh_adaptivity>
239</fluidity_options>
0240
=== added file 'tests/periodic_adaptivity_at_first_timestep/periodic_adaptivity_at_first_timestep.stat'
--- tests/periodic_adaptivity_at_first_timestep/periodic_adaptivity_at_first_timestep.stat 1970-01-01 00:00:00 +0000
+++ tests/periodic_adaptivity_at_first_timestep/periodic_adaptivity_at_first_timestep.stat 2012-02-22 16:35:01 +0000
@@ -0,0 +1,64 @@
1<header>
2<constant name="FluidityVersion" type="string" value="fluidity.3931" />
3<constant name="CompileTime" type="string" value="Feb 22 2012 15:47:10" />
4<constant name="StartTime" type="string" value="20120222 161555.083+0000" />
5<constant name="HostName" type="string" value="Unknown" />
6<constant name="format" type="string" value="plain_text" />
7<field column="1" name="ElapsedTime" statistic="value"/>
8<field column="2" name="dt" statistic="value"/>
9<field column="3" name="ElapsedWallTime" statistic="value"/>
10<field column="4" name="PeriodicMesh" statistic="nodes"/>
11<field column="5" name="PeriodicMesh" statistic="elements"/>
12<field column="6" name="PeriodicMesh" statistic="surface_elements"/>
13<field column="7" name="CoordinateMesh" statistic="nodes"/>
14<field column="8" name="CoordinateMesh" statistic="elements"/>
15<field column="9" name="CoordinateMesh" statistic="surface_elements"/>
16<field column="10" name="TotalMemory" statistic="current" material_phase="Memory"/>
17<field column="11" name="TotalMemory" statistic="min" material_phase="Memory"/>
18<field column="12" name="TotalMemory" statistic="max" material_phase="Memory"/>
19<field column="13" name="MeshMemory" statistic="current" material_phase="Memory"/>
20<field column="14" name="MeshMemory" statistic="min" material_phase="Memory"/>
21<field column="15" name="MeshMemory" statistic="max" material_phase="Memory"/>
22<field column="16" name="ScalarFieldMemory" statistic="current" material_phase="Memory"/>
23<field column="17" name="ScalarFieldMemory" statistic="min" material_phase="Memory"/>
24<field column="18" name="ScalarFieldMemory" statistic="max" material_phase="Memory"/>
25<field column="19" name="VectorFieldMemory" statistic="current" material_phase="Memory"/>
26<field column="20" name="VectorFieldMemory" statistic="min" material_phase="Memory"/>
27<field column="21" name="VectorFieldMemory" statistic="max" material_phase="Memory"/>
28<field column="22" name="TensorFieldMemory" statistic="current" material_phase="Memory"/>
29<field column="23" name="TensorFieldMemory" statistic="min" material_phase="Memory"/>
30<field column="24" name="TensorFieldMemory" statistic="max" material_phase="Memory"/>
31<field column="25" name="MatrixSparsityMemory" statistic="current" material_phase="Memory"/>
32<field column="26" name="MatrixSparsityMemory" statistic="min" material_phase="Memory"/>
33<field column="27" name="MatrixSparsityMemory" statistic="max" material_phase="Memory"/>
34<field column="28" name="MatrixMemory" statistic="current" material_phase="Memory"/>
35<field column="29" name="MatrixMemory" statistic="min" material_phase="Memory"/>
36<field column="30" name="MatrixMemory" statistic="max" material_phase="Memory"/>
37<field column="31" name="TransformCacheMemory" statistic="current" material_phase="Memory"/>
38<field column="32" name="TransformCacheMemory" statistic="min" material_phase="Memory"/>
39<field column="33" name="TransformCacheMemory" statistic="max" material_phase="Memory"/>
40<field column="34" name="Unity" statistic="min" material_phase="Main"/>
41<field column="35" name="Unity" statistic="max" material_phase="Main"/>
42<field column="36" name="Unity" statistic="l2norm" material_phase="Main"/>
43<field column="37" name="Unity" statistic="integral" material_phase="Main"/>
44<field column="38" name="UnityInterpolationErrorBound" statistic="min" material_phase="Main"/>
45<field column="39" name="UnityInterpolationErrorBound" statistic="max" material_phase="Main"/>
46<field column="40" name="UnityInterpolationErrorBound" statistic="l2norm" material_phase="Main"/>
47<field column="41" name="UnityInterpolationErrorBound" statistic="integral" material_phase="Main"/>
48<field column="42" name="PrognosticFieldConsistent" statistic="min" material_phase="Main"/>
49<field column="43" name="PrognosticFieldConsistent" statistic="max" material_phase="Main"/>
50<field column="44" name="PrognosticFieldConsistent" statistic="l2norm" material_phase="Main"/>
51<field column="45" name="PrognosticFieldConsistent" statistic="integral" material_phase="Main"/>
52<field column="46" name="Velocity%magnitude" statistic="min" material_phase="Main"/>
53<field column="47" name="Velocity%magnitude" statistic="max" material_phase="Main"/>
54<field column="48" name="Velocity%magnitude" statistic="l2norm" material_phase="Main"/>
55<field column="49" name="Velocity%1" statistic="min" material_phase="Main"/>
56<field column="50" name="Velocity%1" statistic="max" material_phase="Main"/>
57<field column="51" name="Velocity%1" statistic="l2norm" material_phase="Main"/>
58<field column="52" name="Velocity%1" statistic="integral" material_phase="Main"/>
59<field column="53" name="Velocity%2" statistic="min" material_phase="Main"/>
60<field column="54" name="Velocity%2" statistic="max" material_phase="Main"/>
61<field column="55" name="Velocity%2" statistic="l2norm" material_phase="Main"/>
62<field column="56" name="Velocity%2" statistic="integral" material_phase="Main"/>
63</header>
64 0.00000000000000000E+000 0.10000000000000000E+001 0.61199999999999999E+000 78 144 24 85 144 24 0.50480000000000000E+005 0.00000000000000000E+000 0.92448000000000000E+005 0.14564000000000000E+005 0.00000000000000000E+000 0.36784000000000000E+005 0.18800000000000000E+004 0.00000000000000000E+000 0.24960000000000000E+004 0.26400000000000000E+004 0.00000000000000000E+000 0.66720000000000000E+004 0.25600000000000000E+004 0.00000000000000000E+000 0.10624000000000000E+005 0.78120000000000000E+004 0.00000000000000000E+000 0.21256000000000000E+005 0.34560000000000000E+004 0.00000000000000000E+000 0.86400000000000000E+004 0.17568000000000000E+005 0.00000000000000000E+000 0.17568000000000000E+005 0.10000000000000000E+001 0.10000000000000000E+001 0.99999999999999889E+000 0.99999999999999789E+000 0.10000000000000000E-001 0.10000000000000000E-001 0.99999999999999933E-002 0.10000000000000011E-001 0.10000000000000000E+001 0.10000000000000000E+001 0.99999999999999889E+000 0.99999999999999789E+000 0.00000000000000000E+000 0.00000000000000000E+000 0.00000000000000000E+000 0.00000000000000000E+000 0.00000000000000000E+000 0.00000000000000000E+000 0.00000000000000000E+000 0.00000000000000000E+000 0.00000000000000000E+000 0.00000000000000000E+000 0.00000000000000000E+000
065
=== added file 'tests/periodic_adaptivity_at_first_timestep/periodic_adaptivity_at_first_timestep.xml'
--- tests/periodic_adaptivity_at_first_timestep/periodic_adaptivity_at_first_timestep.xml 1970-01-01 00:00:00 +0000
+++ tests/periodic_adaptivity_at_first_timestep/periodic_adaptivity_at_first_timestep.xml 2012-02-22 16:35:01 +0000
@@ -0,0 +1,24 @@
1<?xml version='1.0' encoding='utf-8'?>
2<testproblem>
3 <name>Periodic adaptivity at first timestep</name>
4 <owner userid="jrper"/>
5 <tags>flml</tags>
6 <problem_definition length="short" nprocs="1">
7 <command_line>../../bin/periodise periodic_adaptivity_at_first_timestep.flml; fluidity -v2 -l periodic_adaptivity_at_first_timestep_periodised.flml</command_line>
8 </problem_definition>
9 <variables>
10 <variable name="consistent_max" language="python">
11import fluidity_tools
12s = fluidity_tools.stat_parser("periodic_adaptivity_at_first_timestep.stat")
13consistent_max = s['Main']['PrognosticFieldConsistent']['max'][-1]
14 </variable>
15 </variables>
16 <pass_tests>
17 <test name="references" language="python">assert "There are no references left" in open("fluidity.log-0").read()</test>
18 <test name="consistent_max" language="python">
19import fluidity_tools
20fluidity_tools.compare_variable(consistent_max, 1.0, 1.0e-10)
21 </test>
22 </pass_tests>
23 <warn_tests/>
24</testproblem>
025
=== added file 'tests/periodic_adaptivity_at_first_timestep/periodic_adaptivity_at_first_timestep_periodised.flml'
--- tests/periodic_adaptivity_at_first_timestep/periodic_adaptivity_at_first_timestep_periodised.flml 1970-01-01 00:00:00 +0000
+++ tests/periodic_adaptivity_at_first_timestep/periodic_adaptivity_at_first_timestep_periodised.flml 2012-02-22 16:35:01 +0000
@@ -0,0 +1,234 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<fluidity_options>
3 <simulation_name>
4 <string_value lines="1">periodic_adaptivity_at_first_timestep</string_value>
5 </simulation_name>
6 <problem_type>
7 <string_value lines="1">fluids</string_value>
8 </problem_type>
9 <geometry>
10 <dimension>
11 <integer_value rank="0">2</integer_value>
12 </dimension>
13 <mesh name="CoordinateMesh">
14 <from_mesh>
15 <mesh name="PeriodicMesh"></mesh>
16 <periodic_boundary_conditions name="x">
17 <remove_periodicity></remove_periodicity>
18 <coordinate_map>
19 <string_value lines="20" type="python">def val(X,t):&#x0A; from math import pi&#x0A; return(X[0]-1, X[1])</string_value>
20 </coordinate_map>
21 <inverse_coordinate_map>
22 <string_value lines="20" type="python">def val(X,t):&#x0A; from math import pi&#x0A; return(X[0]+1, X[1])</string_value>
23 </inverse_coordinate_map>
24 <aliased_boundary_ids>
25 <integer_value rank="1" shape="1">8</integer_value>
26 </aliased_boundary_ids>
27 <physical_boundary_ids>
28 <integer_value rank="1" shape="1">10</integer_value>
29 </physical_boundary_ids>
30 </periodic_boundary_conditions>
31 <stat>
32 <include_in_stat></include_in_stat>
33 </stat>
34 </from_mesh>
35 </mesh>
36 <mesh name="VelocityMesh">
37 <from_mesh>
38 <mesh name="PeriodicMesh"></mesh>
39 <stat>
40 <exclude_from_stat></exclude_from_stat>
41 </stat>
42 </from_mesh>
43 </mesh>
44 <mesh name="PressureMesh">
45 <from_mesh>
46 <mesh name="PeriodicMesh"></mesh>
47 <stat>
48 <exclude_from_stat></exclude_from_stat>
49 </stat>
50 </from_mesh>
51 </mesh>
52 <mesh name="PeriodicMesh">
53 <from_file file_name="MMS_B_periodic">
54 <format name="triangle"></format>
55 <stat>
56 <include_in_stat></include_in_stat>
57 </stat>
58 </from_file>
59 </mesh>
60 <quadrature>
61 <degree>
62 <integer_value rank="0">4</integer_value>
63 </degree>
64 </quadrature>
65 </geometry>
66 <io>
67 <dump_format>
68 <string_value>vtk</string_value>
69 </dump_format>
70 <dump_period_in_timesteps>
71 <constant>
72 <integer_value rank="0">1</integer_value>
73 </constant>
74 </dump_period_in_timesteps>
75 <output_mesh name="CoordinateMesh"></output_mesh>
76 <stat>
77 <output_at_start></output_at_start>
78 <output_before_adapts></output_before_adapts>
79 <output_after_adapts></output_after_adapts>
80 </stat>
81 </io>
82 <timestepping>
83 <current_time>
84 <real_value rank="0">0</real_value>
85 </current_time>
86 <timestep>
87 <real_value rank="0">1</real_value>
88 </timestep>
89 <finish_time>
90 <real_value rank="0">0</real_value>
91 </finish_time>
92 </timestepping>
93 <physical_parameters></physical_parameters>
94 <material_phase name="Main">
95 <vector_field name="Velocity" rank="1">
96 <prescribed>
97 <mesh name="VelocityMesh"></mesh>
98 <value name="WholeMesh">
99 <constant>
100 <real_value rank="1" shape="2" dim1="dim">0 0</real_value>
101 </constant>
102 </value>
103 <output></output>
104 <stat>
105 <include_in_stat></include_in_stat>
106 </stat>
107 <detectors>
108 <exclude_from_detectors></exclude_from_detectors>
109 </detectors>
110 </prescribed>
111 </vector_field>
112 <scalar_field name="Unity" rank="0">
113 <prescribed>
114 <mesh name="VelocityMesh"></mesh>
115 <value name="WholeMesh">
116 <python>
117 <string_value lines="20" type="python">def val(X, t):&#x0A; #return (X[0]**2 - X[0])/-0.25&#x0A; return 1.0</string_value>
118 </python>
119 </value>
120 <output></output>
121 <stat></stat>
122 <detectors>
123 <exclude_from_detectors></exclude_from_detectors>
124 </detectors>
125 <adaptivity_options>
126 <absolute_measure>
127 <scalar_field name="InterpolationErrorBound" rank="0">
128 <prescribed>
129 <value name="WholeMesh">
130 <constant>
131 <real_value rank="0">0.01</real_value>
132 </constant>
133 </value>
134 <output></output>
135 <stat></stat>
136 <detectors>
137 <exclude_from_detectors></exclude_from_detectors>
138 </detectors>
139 </prescribed>
140 </scalar_field>
141 </absolute_measure>
142 </adaptivity_options>
143 </prescribed>
144 </scalar_field>
145 <scalar_field name="PrognosticFieldConsistent" rank="0">
146 <prognostic>
147 <mesh name="VelocityMesh"></mesh>
148 <equation name="AdvectionDiffusion"></equation>
149 <spatial_discretisation>
150 <continuous_galerkin>
151 <stabilisation>
152 <no_stabilisation></no_stabilisation>
153 </stabilisation>
154 <advection_terms></advection_terms>
155 <mass_terms></mass_terms>
156 </continuous_galerkin>
157 <conservative_advection>
158 <real_value rank="0">1</real_value>
159 </conservative_advection>
160 </spatial_discretisation>
161 <temporal_discretisation>
162 <theta>
163 <real_value rank="0">0.5</real_value>
164 </theta>
165 </temporal_discretisation>
166 <solver>
167 <iterative_method name="gmres">
168 <restart>
169 <integer_value rank="0">30</integer_value>
170 </restart>
171 </iterative_method>
172 <preconditioner name="sor"></preconditioner>
173 <relative_error>
174 <real_value rank="0">1e-08</real_value>
175 </relative_error>
176 <max_iterations>
177 <integer_value rank="0">10000</integer_value>
178 </max_iterations>
179 <never_ignore_solver_failures></never_ignore_solver_failures>
180 <diagnostics>
181 <monitors></monitors>
182 </diagnostics>
183 </solver>
184 <initial_condition name="WholeMesh">
185 <constant>
186 <real_value rank="0">1</real_value>
187 </constant>
188 </initial_condition>
189 <output></output>
190 <stat></stat>
191 <convergence>
192 <include_in_convergence></include_in_convergence>
193 </convergence>
194 <detectors>
195 <include_in_detectors></include_in_detectors>
196 </detectors>
197 <steady_state>
198 <include_in_steady_state></include_in_steady_state>
199 </steady_state>
200 <consistent_interpolation></consistent_interpolation>
201 </prognostic>
202 </scalar_field>
203 </material_phase>
204 <mesh_adaptivity>
205 <hr_adaptivity>
206 <period>
207 <real_value rank="0">2</real_value>
208 </period>
209 <maximum_number_of_nodes>
210 <integer_value rank="0">10000</integer_value>
211 </maximum_number_of_nodes>
212 <disable_gradation></disable_gradation>
213 <tensor_field name="MinimumEdgeLengths">
214 <anisotropic_symmetric>
215 <constant>
216 <real_value rank="2" shape="2 2" symmetric="true" dim2="dim" dim1="dim">0.01 0 0 0.01</real_value>
217 </constant>
218 </anisotropic_symmetric>
219 </tensor_field>
220 <tensor_field name="MaximumEdgeLengths">
221 <anisotropic_symmetric>
222 <constant>
223 <real_value rank="2" shape="2 2" symmetric="true" dim2="dim" dim1="dim">0.1 0 0 0.1</real_value>
224 </constant>
225 </anisotropic_symmetric>
226 </tensor_field>
227 <adapt_at_first_timestep>
228 <number_of_adapts>
229 <integer_value rank="0">2</integer_value>
230 </number_of_adapts>
231 </adapt_at_first_timestep>
232 </hr_adaptivity>
233 </mesh_adaptivity>
234</fluidity_options>
0235
=== added directory 'tests/periodic_adaptivity_at_first_timestep/src'
=== added file 'tests/periodic_adaptivity_at_first_timestep/src/MMS_B.geo'
--- tests/periodic_adaptivity_at_first_timestep/src/MMS_B.geo 1970-01-01 00:00:00 +0000
+++ tests/periodic_adaptivity_at_first_timestep/src/MMS_B.geo 2012-02-22 16:35:01 +0000
@@ -0,0 +1,12 @@
1Point(1) = {0,0,0,0.1};
2Extrude {1,0,0} {
3 Point{1}; Layers{3};
4}
5Extrude {0,1,0} {
6 Line{1}; Layers{3};
7}
8Physical Line(7) = {1};
9Physical Line(8) = {4};
10Physical Line(9) = {2};
11Physical Line(10) = {3};
12Physical Surface(10) = {5};