Skip to content

Commit

Permalink
Add a test for the empty partition behaviour.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrper committed Aug 11, 2017
1 parent d9bdd63 commit 9e35ada
Show file tree
Hide file tree
Showing 11 changed files with 559 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/empty_partitions/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FLMLMODEL = empty_partitions

default: input

input:
# gmsh -2 -bin square.geo

clean: clean-mesh clean-run-debug
clean-mesh:
# rm -f *.ele *.edge *.node *.msh *.halo
clean-run:
rm -f $(FLMLMODEL)_?*.pvtu $(FLMLMODEL)_?*.vtu
rm -f $(FLMLMODEL).detectors $(FLMLMODEL).stat tmpf*
rm -f fluidity.err-?* fluidity.log-?*
rm -f matrixdump matrixdump.info
rm -f $(FLMLMODEL)_?*_checkpoint.flml
rm -f $(FLMLMODEL)_?*_checkpoint_?*.ele $(FLMLMODEL)_?*_checkpoint_?*.edge $(FLMLMODEL)_?*_checkpoint_?*.halo $(FLMLMODEL)_?*_checkpoint_?*.node
rm -f $(FLMLMODEL)_?*_?*_checkpoint.pvtu $(FLMLMODEL)_?*_?*_checkpoint.vtu
rm -f $(FLMLMODEL)_?*_checkpoint.ele $(FLMLMODEL)_?*_checkpoint.edge $(FLMLMODEL)_?*_checkpoint.node
rm -f $(FLMLMODEL)_?*_checkpoint.vtu
rm -rf $(FLMLMODEL)_?*
clean-run-debug: clean-run
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
rm -f adapted_mesh.edge adapted_mesh.ele adapted_mesh.node
rm -f adapted_mesh_?*.edge adapted_mesh_?*.ele adapted_mesh_?*.node
rm -f adapted_state_?*.pvtu adapted_state_?*.vtu
256 changes: 256 additions & 0 deletions tests/empty_partitions/empty_partitions.flml
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
<?xml version='1.0' encoding='utf-8'?>
<fluidity_options>
<simulation_name>
<string_value lines="1">empty_partitions</string_value>
</simulation_name>
<problem_type>
<string_value lines="1">fluids</string_value>
</problem_type>
<geometry>
<dimension>
<integer_value rank="0">2</integer_value>
</dimension>
<mesh name="CoordinateMesh">
<from_file file_name="square">
<format name="gmsh"/>
<stat>
<include_in_stat/>
</stat>
</from_file>
</mesh>
<mesh name="P0">
<from_mesh>
<mesh name="CoordinateMesh"/>
<mesh_shape>
<polynomial_degree>
<integer_value rank="0">0</integer_value>
</polynomial_degree>
</mesh_shape>
<mesh_continuity>
<string_value>discontinuous</string_value>
</mesh_continuity>
<stat>
<exclude_from_stat/>
</stat>
</from_mesh>
</mesh>
<quadrature>
<degree>
<integer_value rank="0">5</integer_value>
</degree>
</quadrature>
</geometry>
<io>
<dump_format>
<string_value>vtk</string_value>
</dump_format>
<dump_period>
<constant>
<real_value rank="0">0</real_value>
</constant>
</dump_period>
<output_mesh name="CoordinateMesh"/>
<checkpointing>
<checkpoint_period_in_dumps>
<integer_value rank="0">2</integer_value>
</checkpoint_period_in_dumps>
</checkpointing>
<stat/>
</io>
<timestepping>
<current_time>
<real_value rank="0">0.0</real_value>
</current_time>
<timestep>
<real_value rank="0">1.0</real_value>
</timestep>
<finish_time>
<real_value rank="0">4.0</real_value>
</finish_time>
</timestepping>
<material_phase name="Fluid">
<equation_of_state>
<fluids>
<linear>
<reference_density>
<real_value rank="0">1.0</real_value>
</reference_density>
</linear>
</fluids>
</equation_of_state>
<scalar_field name="Pressure" rank="0">
<prognostic>
<mesh name="CoordinateMesh"/>
<spatial_discretisation>
<continuous_galerkin/>
</spatial_discretisation>
<scheme>
<poisson_pressure_solution>
<string_value lines="1">only first timestep</string_value>
</poisson_pressure_solution>
<use_projection_method/>
</scheme>
<solver>
<iterative_method name="cg"/>
<preconditioner name="sor"/>
<relative_error>
<real_value rank="0">1.0e-7</real_value>
</relative_error>
<max_iterations>
<integer_value rank="0">1000</integer_value>
</max_iterations>
<never_ignore_solver_failures/>
<diagnostics>
<monitors/>
</diagnostics>
</solver>
<output/>
<stat/>
<convergence>
<include_in_convergence/>
</convergence>
<detectors>
<exclude_from_detectors/>
</detectors>
<steady_state>
<include_in_steady_state/>
</steady_state>
<no_interpolation/>
</prognostic>
</scalar_field>
<scalar_field name="Density" rank="0">
<diagnostic>
<algorithm name="Internal" material_phase_support="multiple"/>
<mesh name="CoordinateMesh"/>
<output/>
<stat/>
<convergence>
<include_in_convergence/>
</convergence>
<detectors>
<include_in_detectors/>
</detectors>
<steady_state>
<include_in_steady_state/>
</steady_state>
</diagnostic>
</scalar_field>
<vector_field name="Velocity" rank="1">
<prognostic>
<mesh name="CoordinateMesh"/>
<equation name="Boussinesq"/>
<spatial_discretisation>
<continuous_galerkin>
<stabilisation>
<no_stabilisation/>
</stabilisation>
<mass_terms>
<lump_mass_matrix/>
</mass_terms>
<advection_terms/>
<stress_terms>
<tensor_form/>
</stress_terms>
<buoyancy/>
</continuous_galerkin>
<conservative_advection>
<real_value rank="0">1.0</real_value>
</conservative_advection>
</spatial_discretisation>
<temporal_discretisation>
<theta>
<real_value rank="0">0.0</real_value>
</theta>
<relaxation>
<real_value rank="0">1.0</real_value>
</relaxation>
</temporal_discretisation>
<solver>
<iterative_method name="gmres"/>
<preconditioner name="sor"/>
<relative_error>
<real_value rank="0">1.0e-7</real_value>
</relative_error>
<max_iterations>
<integer_value rank="0">1000</integer_value>
</max_iterations>
<never_ignore_solver_failures/>
<diagnostics>
<monitors/>
</diagnostics>
</solver>
<initial_condition name="WholeMesh">
<constant>
<real_value shape="2" dim1="dim" rank="1">0 0</real_value>
</constant>
</initial_condition>
<output/>
<stat>
<include_in_stat/>
<previous_time_step>
<exclude_from_stat/>
</previous_time_step>
<nonlinear_field>
<exclude_from_stat/>
</nonlinear_field>
</stat>
<convergence>
<include_in_convergence/>
</convergence>
<detectors>
<include_in_detectors/>
</detectors>
<steady_state>
<include_in_steady_state/>
</steady_state>
<consistent_interpolation/>
</prognostic>
</vector_field>
<scalar_field name="NodeOwner" rank="0">
<diagnostic>
<algorithm legacy="true" name="Internal" material_phase_support="multiple"/>
<mesh name="CoordinateMesh"/>
<output/>
<stat/>
<convergence>
<include_in_convergence/>
</convergence>
<detectors>
<include_in_detectors/>
</detectors>
<steady_state>
<include_in_steady_state/>
</steady_state>
</diagnostic>
</scalar_field>
</material_phase>
<mesh_adaptivity>
<hr_adaptivity>
<period_in_timesteps>
<integer_value rank="0">1</integer_value>
</period_in_timesteps>
<maximum_number_of_nodes>
<integer_value rank="0">1000000</integer_value>
</maximum_number_of_nodes>
<enable_gradation/>
<tensor_field name="MinimumEdgeLengths">
<anisotropic_symmetric>
<python>
<string_value lines="20" type="code" language="python">def val(X,t):
a = 1.0/max(1.0,0.5*t*t)
return [[a,0],[0,a]]</string_value>
</python>
</anisotropic_symmetric>
</tensor_field>
<tensor_field name="MaximumEdgeLengths">
<anisotropic_symmetric>
<python>
<string_value lines="20" type="code" language="python">def val(X,t):
a = 1.0/max(1.0,0.5*t*t)
return [[a,0],[0,a]]</string_value>
</python>
</anisotropic_symmetric>
</tensor_field>
</hr_adaptivity>
</mesh_adaptivity>
</fluidity_options>
64 changes: 64 additions & 0 deletions tests/empty_partitions/empty_partitions.stat
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<header>
<constant name="FluidityVersion" type="string" value="allow_empty_partitions:6057376d68b9850eabb07d70ed2f24385c822e3c" />
<constant name="CompileTime" type="string" value="Aug 9 2017 14:02:17" />
<constant name="StartTime" type="string" value="20170811 173340.294+0100" />
<constant name="HostName" type="string" value="Unknown" />
<constant name="format" type="string" value="plain_text" />
<field column="1" name="ElapsedTime" statistic="value"/>
<field column="2" name="dt" statistic="value"/>
<field column="3" name="ElapsedWallTime" statistic="value"/>
<field column="4" name="CoordinateMesh" statistic="nodes"/>
<field column="5" name="CoordinateMesh" statistic="elements"/>
<field column="6" name="CoordinateMesh" statistic="surface_elements"/>
<field column="7" name="TotalMemory" statistic="current" material_phase="Memory"/>
<field column="8" name="TotalMemory" statistic="min" material_phase="Memory"/>
<field column="9" name="TotalMemory" statistic="max" material_phase="Memory"/>
<field column="10" name="MeshMemory" statistic="current" material_phase="Memory"/>
<field column="11" name="MeshMemory" statistic="min" material_phase="Memory"/>
<field column="12" name="MeshMemory" statistic="max" material_phase="Memory"/>
<field column="13" name="ScalarFieldMemory" statistic="current" material_phase="Memory"/>
<field column="14" name="ScalarFieldMemory" statistic="min" material_phase="Memory"/>
<field column="15" name="ScalarFieldMemory" statistic="max" material_phase="Memory"/>
<field column="16" name="VectorFieldMemory" statistic="current" material_phase="Memory"/>
<field column="17" name="VectorFieldMemory" statistic="min" material_phase="Memory"/>
<field column="18" name="VectorFieldMemory" statistic="max" material_phase="Memory"/>
<field column="19" name="TensorFieldMemory" statistic="current" material_phase="Memory"/>
<field column="20" name="TensorFieldMemory" statistic="min" material_phase="Memory"/>
<field column="21" name="TensorFieldMemory" statistic="max" material_phase="Memory"/>
<field column="22" name="MatrixSparsityMemory" statistic="current" material_phase="Memory"/>
<field column="23" name="MatrixSparsityMemory" statistic="min" material_phase="Memory"/>
<field column="24" name="MatrixSparsityMemory" statistic="max" material_phase="Memory"/>
<field column="25" name="MatrixMemory" statistic="current" material_phase="Memory"/>
<field column="26" name="MatrixMemory" statistic="min" material_phase="Memory"/>
<field column="27" name="MatrixMemory" statistic="max" material_phase="Memory"/>
<field column="28" name="TransformCacheMemory" statistic="current" material_phase="Memory"/>
<field column="29" name="TransformCacheMemory" statistic="min" material_phase="Memory"/>
<field column="30" name="TransformCacheMemory" statistic="max" material_phase="Memory"/>
<field column="31" name="Pressure" statistic="min" material_phase="Fluid"/>
<field column="32" name="Pressure" statistic="max" material_phase="Fluid"/>
<field column="33" name="Pressure" statistic="l2norm" material_phase="Fluid"/>
<field column="34" name="Pressure" statistic="integral" material_phase="Fluid"/>
<field column="35" name="Density" statistic="min" material_phase="Fluid"/>
<field column="36" name="Density" statistic="max" material_phase="Fluid"/>
<field column="37" name="Density" statistic="l2norm" material_phase="Fluid"/>
<field column="38" name="Density" statistic="integral" material_phase="Fluid"/>
<field column="39" name="NodeOwner" statistic="min" material_phase="Fluid"/>
<field column="40" name="NodeOwner" statistic="max" material_phase="Fluid"/>
<field column="41" name="NodeOwner" statistic="l2norm" material_phase="Fluid"/>
<field column="42" name="NodeOwner" statistic="integral" material_phase="Fluid"/>
<field column="43" name="Velocity%magnitude" statistic="min" material_phase="Fluid"/>
<field column="44" name="Velocity%magnitude" statistic="max" material_phase="Fluid"/>
<field column="45" name="Velocity%magnitude" statistic="l2norm" material_phase="Fluid"/>
<field column="46" name="Velocity%1" statistic="min" material_phase="Fluid"/>
<field column="47" name="Velocity%1" statistic="max" material_phase="Fluid"/>
<field column="48" name="Velocity%1" statistic="l2norm" material_phase="Fluid"/>
<field column="49" name="Velocity%1" statistic="integral" material_phase="Fluid"/>
<field column="50" name="Velocity%2" statistic="min" material_phase="Fluid"/>
<field column="51" name="Velocity%2" statistic="max" material_phase="Fluid"/>
<field column="52" name="Velocity%2" statistic="l2norm" material_phase="Fluid"/>
<field column="53" name="Velocity%2" statistic="integral" material_phase="Fluid"/>
</header>
0.10000000000000000E+001 0.10000000000000000E+001 0.13100000000000001E+000 4 2 4 0.20440000000000000E+004 0.00000000000000000E+000 0.23480000000000000E+004 0.25600000000000000E+003 0.00000000000000000E+000 0.25600000000000000E+003 0.13600000000000000E+003 0.00000000000000000E+000 0.26400000000000000E+003 0.14400000000000000E+003 0.00000000000000000E+000 0.33600000000000000E+003 0.38400000000000000E+003 0.00000000000000000E+000 0.41600000000000000E+003 0.33200000000000000E+003 0.00000000000000000E+000 0.33200000000000000E+003 0.50400000000000000E+003 0.00000000000000000E+000 0.61600000000000000E+003 0.28800000000000000E+003 0.00000000000000000E+000 0.28800000000000000E+003 0.00000000000000000E+000 0.00000000000000000E+000 0.00000000000000000E+000 0.00000000000000000E+000 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 0.40000000000000000E+001 0.25819888974716108E+001 0.25000000000000000E+001 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
0.20000000000000000E+001 0.10000000000000000E+001 0.48529999999999998E+001 4 2 4 0.26800000000000000E+003 0.23600000000000000E+003 0.21440000000000000E+004 0.00000000000000000E+000 0.00000000000000000E+000 0.58400000000000000E+003 0.80000000000000000E+001 0.00000000000000000E+000 0.16800000000000000E+003 0.16000000000000000E+002 0.00000000000000000E+000 0.28800000000000000E+003 0.00000000000000000E+000 0.00000000000000000E+000 0.51200000000000000E+003 0.16000000000000000E+002 0.80000000000000000E+001 0.46400000000000000E+003 0.00000000000000000E+000 0.00000000000000000E+000 0.54400000000000000E+003 0.22800000000000000E+003 0.14400000000000000E+003 0.28800000000000000E+003 0.00000000000000000E+000 0.00000000000000000E+000 0.00000000000000000E+000 0.00000000000000000E+000 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 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
0.30000000000000000E+001 0.10000000000000000E+001 0.91509999999999998E+001 5 4 4 0.32800000000000000E+003 0.24000000000000000E+003 0.32120000000000000E+004 0.00000000000000000E+000 0.00000000000000000E+000 0.10880000000000000E+004 0.80000000000000000E+001 0.00000000000000000E+000 0.15200000000000000E+003 0.16000000000000000E+002 0.00000000000000000E+000 0.36800000000000000E+003 0.00000000000000000E+000 0.00000000000000000E+000 0.80000000000000000E+003 0.16000000000000000E+002 0.80000000000000000E+001 0.74000000000000000E+003 0.00000000000000000E+000 0.00000000000000000E+000 0.14400000000000000E+003 0.28800000000000000E+003 0.14400000000000000E+003 0.28800000000000000E+003 0.00000000000000000E+000 0.00000000000000000E+000 0.00000000000000000E+000 0.00000000000000000E+000 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 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
0.40000000000000000E+001 0.10000000000000000E+001 0.13734000000000000E+002 9 8 8 0.63400000000000000E+004 0.30000000000000000E+003 0.70600000000000000E+004 0.83200000000000000E+003 0.00000000000000000E+000 0.23680000000000000E+004 0.29600000000000000E+003 0.00000000000000000E+000 0.58400000000000000E+003 0.30400000000000000E+003 0.00000000000000000E+000 0.73600000000000000E+003 0.86400000000000000E+003 0.00000000000000000E+000 0.14400000000000000E+004 0.94000000000000000E+003 0.12000000000000000E+002 0.15400000000000000E+004 0.20480000000000000E+004 0.00000000000000000E+000 0.23760000000000000E+004 0.10560000000000000E+004 0.14400000000000000E+003 0.10560000000000000E+004 0.00000000000000000E+000 0.00000000000000000E+000 0.00000000000000000E+000 0.00000000000000000E+000 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 0.10000000000000000E+001 0.40000000000000000E+001 0.22032173444003806E+001 0.20833333333333330E+001 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
Loading

0 comments on commit 9e35ada

Please sign in to comment.