[cig-commits] [commit] master: Add tests (7cc295c)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed May 21 13:03:31 PDT 2014
Repository : https://github.com/geodynamics/aspect
On branch : master
Link : https://github.com/geodynamics/aspect/compare/2df080f4905a6be43fd1729ea0d6a7a956cce070...a7135c1f7697d39efff2f47a79ca1e1395cff504
>---------------------------------------------------------------
commit 7cc295c8985aa5b75517735605068f9e0ba1d172
Author: ian-r-rose <ian.r.rose at gmail.com>
Date: Wed May 21 13:11:10 2014 -0500
Add tests
>---------------------------------------------------------------
7cc295c8985aa5b75517735605068f9e0ba1d172
{cookbooks/future => tests}/periodic_box.prm | 39 +++---
tests/periodic_box/screen-output | 133 +++++++++++++++++++++
tests/periodic_box/statistics | 22 ++++
.../periodic_box_freesurface.prm | 45 +++----
tests/periodic_box_freesurface/screen-output | 106 ++++++++++++++++
tests/periodic_box_freesurface/statistics | 18 +++
6 files changed, 323 insertions(+), 40 deletions(-)
diff --git a/cookbooks/future/periodic_box.prm b/tests/periodic_box.prm
similarity index 74%
copy from cookbooks/future/periodic_box.prm
copy to tests/periodic_box.prm
index 5bca9f7..f64ab6d 100644
--- a/cookbooks/future/periodic_box.prm
+++ b/tests/periodic_box.prm
@@ -1,21 +1,22 @@
+#Test for running a box in 2D with periodic boundary conditions
+#in the x condition. Also tests the removal of net translations
+#in the periodic direction
+
set Dimension = 2
set CFL number = 1.0
-set End time = 1e9
+set End time = 1e6
set Output directory = output
-set Resume computation = false
-set Start time = 0
set Adiabatic surface temperature = 0
set Surface pressure = 0
-set Pressure normalization = no
+set Pressure normalization = no
set Linear solver tolerance = 1.e-7
set Use years in output instead of seconds = true
set Nonlinear solver scheme = IMPES
subsection Boundary temperature model
- set Model name = box
- subsection Box
- set Top temperature = 0.0
- set Bottom temperature = 1000.0
+ set Model name = constant
+ subsection Constant
+ set Boundary indicator to temperature mappings = 0:0,1:0,2:0,3:0
end
end
@@ -72,13 +73,12 @@ subsection Material model
end
end
-
subsection Mesh refinement
set Additional refinement times =
- set Initial adaptive refinement = 2 # default: 2
- set Initial global refinement = 6 # default: 2
+ set Initial adaptive refinement = 1 # default: 2
+ set Initial global refinement = 5 # default: 2
set Refinement fraction = 0.3
- set Coarsening fraction = 0.03
+ set Coarsening fraction = 0.05
set Strategy = thermal energy density
set Time steps between mesh refinement = 10 # default: 10
end
@@ -91,15 +91,14 @@ subsection Model settings
set Prescribed velocity boundary indicators =
set Tangential velocity boundary indicators = 2,3
set Zero velocity boundary indicators =
- set Remove nullspace = net translation
+ set Remove nullspace = net x translation
+end
+
+subsection Termination criteria
+ set Termination criteria = end step
+ set End step = 10
end
subsection Postprocess
- set List of postprocessors = visualization
- subsection Visualization
- set List of output variables =
- set Number of grouped files = 1
- set Output format = vtu
- set Time between graphical output = 1.e3
- end
+ set List of postprocessors = velocity statistics
end
diff --git a/tests/periodic_box/screen-output b/tests/periodic_box/screen-output
new file mode 100644
index 0000000..3df45cb
--- /dev/null
+++ b/tests/periodic_box/screen-output
@@ -0,0 +1,133 @@
+-----------------------------------------------------------------------------
+-- This is ASPECT, the Advanced Solver for Problems in Earth's ConvecTion.
+-- . running in DEBUG mode
+-- . running with 1 MPI process
+-- . using Trilinos
+-----------------------------------------------------------------------------
+
+Number of active cells: 1,024 (on 6 levels)
+Number of degrees of freedom: 13,764 (8,450+1,089+4,225)
+
+*** Timestep 0: t=0 years
+ Solving temperature system... 0 iterations.
+ Rebuilding Stokes preconditioner...
+ Solving Stokes system... 30+2 iterations.
+
+Number of active cells: 493 (on 7 levels)
+Number of degrees of freedom: 7,441 (4,568+589+2,284)
+
+*** Timestep 0: t=0 years
+ Solving temperature system... 0 iterations.
+ Rebuilding Stokes preconditioner...
+ Solving Stokes system... 30+2 iterations.
+
+ Postprocessing:
+
+ Reference density (kg/m^3): 3300
+ Reference gravity (m/s^2): 10
+ Reference thermal expansion (1/K): 4e-05
+ Temperature contrast across model domain (K): 0
+ Model domain depth (m): 500000
+ Reference thermal diffusivity (m^2/s): 1.13939e-06
+ Reference viscosity (Pas): 1e+20
+ Ra number: 0
+ k_value: 4.7
+ reference_cp: 1250
+ reference_thermal_diffusivity: 1.13939e-06
+
+ RMS, max velocity: 0.385 m/year, 0.913 m/year
+
+*** Timestep 1: t=4945 years
+ Solving temperature system... 13 iterations.
+ Solving Stokes system... 22 iterations.
+
+ Postprocessing:
+ RMS, max velocity: 0.386 m/year, 0.916 m/year
+
+*** Timestep 2: t=9825.97 years
+ Solving temperature system... 11 iterations.
+ Solving Stokes system... 16 iterations.
+
+ Postprocessing:
+ RMS, max velocity: 0.387 m/year, 0.919 m/year
+
+*** Timestep 3: t=14648.8 years
+ Solving temperature system... 12 iterations.
+ Solving Stokes system... 16 iterations.
+
+ Postprocessing:
+ RMS, max velocity: 0.388 m/year, 0.921 m/year
+
+*** Timestep 4: t=19419.1 years
+ Solving temperature system... 11 iterations.
+ Solving Stokes system... 16 iterations.
+
+ Postprocessing:
+ RMS, max velocity: 0.388 m/year, 0.923 m/year
+
+*** Timestep 5: t=24142.3 years
+ Solving temperature system... 11 iterations.
+ Solving Stokes system... 16 iterations.
+
+ Postprocessing:
+ RMS, max velocity: 0.388 m/year, 0.924 m/year
+
+*** Timestep 6: t=28823.5 years
+ Solving temperature system... 11 iterations.
+ Solving Stokes system... 15 iterations.
+
+ Postprocessing:
+ RMS, max velocity: 0.389 m/year, 0.925 m/year
+
+*** Timestep 7: t=33467.4 years
+ Solving temperature system... 11 iterations.
+ Solving Stokes system... 15 iterations.
+
+ Postprocessing:
+ RMS, max velocity: 0.389 m/year, 0.925 m/year
+
+*** Timestep 8: t=38078.4 years
+ Solving temperature system... 10 iterations.
+ Solving Stokes system... 15 iterations.
+
+ Postprocessing:
+ RMS, max velocity: 0.389 m/year, 0.925 m/year
+
+*** Timestep 9: t=42660.5 years
+ Solving temperature system... 10 iterations.
+ Solving Stokes system... 15 iterations.
+
+ Postprocessing:
+ RMS, max velocity: 0.388 m/year, 0.924 m/year
+
+*** Timestep 10: t=47217.5 years
+ Solving temperature system... 10 iterations.
+ Solving Stokes system... 15 iterations.
+
+ Postprocessing:
+ RMS, max velocity: 0.388 m/year, 0.923 m/year
+
+Number of active cells: 430 (on 7 levels)
+Number of degrees of freedom: 6,677 (4,100+527+2,050)
+
+Termination requested by criterion: end step
+
+
++---------------------------------------------+------------+------------+
+| Total wallclock time elapsed since start | 1.88s | |
+| | | |
+| Section | no. calls | wall time | % of total |
++---------------------------------+-----------+------------+------------+
+| Assemble Stokes system | 12 | 0.269s | 14% |
+| Assemble temperature system | 12 | 0.458s | 24% |
+| Build Stokes preconditioner | 2 | 0.2s | 11% |
+| Build temperature preconditioner| 12 | 0.0312s | 1.7% |
+| Solve Stokes system | 12 | 0.368s | 20% |
+| Solve temperature system | 12 | 0.0277s | 1.5% |
+| Initialization | 3 | 0.0258s | 1.4% |
+| Postprocessing | 11 | 0.0204s | 1.1% |
+| Refine mesh structure, part 1 | 2 | 0.257s | 14% |
+| Refine mesh structure, part 2 | 2 | 0.0028s | 0.15% |
+| Setup dof systems | 3 | 0.162s | 8.6% |
++---------------------------------+-----------+------------+------------+
+
diff --git a/tests/periodic_box/statistics b/tests/periodic_box/statistics
new file mode 100644
index 0000000..69fb822
--- /dev/null
+++ b/tests/periodic_box/statistics
@@ -0,0 +1,22 @@
+# 1: Time step number
+# 2: Time (years)
+# 3: Number of mesh cells
+# 4: Number of Stokes degrees of freedom
+# 5: Number of temperature degrees of freedom
+# 6: Iterations for temperature solver
+# 7: Iterations for Stokes solver
+# 8: Time step size (years)
+# 9: RMS velocity (m/year)
+# 10: Max. velocity (m/year)
+ 0 0.0000e+00 1024 9539 4225 0 32 8.5731e+03 0.00000000e+00 0.00000000e+00
+ 0 0.0000e+00 493 5157 2284 0 32 4.9450e+03 3.85023804e-01 9.13275767e-01
+ 1 4.9450e+03 493 5157 2284 13 22 4.8810e+03 3.86043890e-01 9.16294037e-01
+ 2 9.8260e+03 493 5157 2284 11 16 4.8228e+03 3.86882854e-01 9.19030591e-01
+ 3 1.4649e+04 493 5157 2284 12 16 4.7703e+03 3.87564602e-01 9.21100646e-01
+ 4 1.9419e+04 493 5157 2284 11 16 4.7232e+03 3.88090809e-01 9.22833305e-01
+ 5 2.4142e+04 493 5157 2284 11 16 4.6812e+03 3.88460878e-01 9.23897436e-01
+ 6 2.8823e+04 493 5157 2284 11 15 4.6439e+03 3.88676673e-01 9.24700343e-01
+ 7 3.3467e+04 493 5157 2284 11 15 4.6110e+03 3.88738621e-01 9.25036347e-01
+ 8 3.8078e+04 493 5157 2284 10 15 4.5821e+03 3.88653678e-01 9.24754308e-01
+ 9 4.2660e+04 493 5157 2284 10 15 4.5570e+03 3.88423729e-01 9.24256257e-01
+10 4.7217e+04 493 5157 2284 10 15 4.5354e+03 3.88054166e-01 9.23348281e-01
diff --git a/cookbooks/future/periodic_box.prm b/tests/periodic_box_freesurface.prm
similarity index 69%
copy from cookbooks/future/periodic_box.prm
copy to tests/periodic_box_freesurface.prm
index 5bca9f7..2379a0e 100644
--- a/cookbooks/future/periodic_box.prm
+++ b/tests/periodic_box_freesurface.prm
@@ -1,21 +1,22 @@
+#Test for running a box in 2D with periodic boundary conditions
+#in the x condition and a free surface on the top.
+# Also tests the removal of net translations in the periodic direction
+
set Dimension = 2
-set CFL number = 1.0
-set End time = 1e9
+set CFL number = 0.4
+set End time = 1e6
set Output directory = output
-set Resume computation = false
-set Start time = 0
set Adiabatic surface temperature = 0
set Surface pressure = 0
-set Pressure normalization = no
+set Pressure normalization = no
set Linear solver tolerance = 1.e-7
set Use years in output instead of seconds = true
set Nonlinear solver scheme = IMPES
subsection Boundary temperature model
- set Model name = box
- subsection Box
- set Top temperature = 0.0
- set Bottom temperature = 1000.0
+ set Model name = constant
+ subsection Constant
+ set Boundary indicator to temperature mappings = 0:0,1:0,2:0,3:0
end
end
@@ -72,13 +73,17 @@ subsection Material model
end
end
+subsection Free surface
+ set Free surface stabilization theta = 1.0
+end
+
subsection Mesh refinement
set Additional refinement times =
- set Initial adaptive refinement = 2 # default: 2
+ set Initial adaptive refinement = 1 # default: 2
set Initial global refinement = 6 # default: 2
set Refinement fraction = 0.3
- set Coarsening fraction = 0.03
+ set Coarsening fraction = 0.05
set Strategy = thermal energy density
set Time steps between mesh refinement = 10 # default: 10
end
@@ -89,17 +94,17 @@ subsection Model settings
set Include shear heating = false
set Fixed temperature boundary indicators = 2,3
set Prescribed velocity boundary indicators =
- set Tangential velocity boundary indicators = 2,3
+ set Tangential velocity boundary indicators = 2
set Zero velocity boundary indicators =
- set Remove nullspace = net translation
+ set Free surface boundary indicators = 3
+ set Remove nullspace = net x translation
+end
+
+subsection Termination criteria
+ set Termination criteria = end step
+ set End step = 4
end
subsection Postprocess
- set List of postprocessors = visualization
- subsection Visualization
- set List of output variables =
- set Number of grouped files = 1
- set Output format = vtu
- set Time between graphical output = 1.e3
- end
+ set List of postprocessors = velocity statistics, topography,
end
diff --git a/tests/periodic_box_freesurface/screen-output b/tests/periodic_box_freesurface/screen-output
new file mode 100644
index 0000000..1c9a283
--- /dev/null
+++ b/tests/periodic_box_freesurface/screen-output
@@ -0,0 +1,106 @@
+-----------------------------------------------------------------------------
+-- This is ASPECT, the Advanced Solver for Problems in Earth's ConvecTion.
+-- . running in DEBUG mode
+-- . running with 1 MPI process
+-- . using Trilinos
+-----------------------------------------------------------------------------
+
+Number of active cells: 4,096 (on 7 levels)
+Number of degrees of freedom: 54,148 (33,282+4,225+16,641)
+
+Number of free surface degrees of freedom: 8450
+*** Timestep 0: t=0 years
+ Solving mesh velocity system... 0 iterations.
+ Solving temperature system... 0 iterations.
+ Rebuilding Stokes preconditioner...
+ Solving Stokes system... 30+4 iterations.
+
+Number of active cells: 1,444 (on 8 levels)
+Number of degrees of freedom: 20,706 (12,722+1,623+6,361)
+
+Number of free surface degrees of freedom: 3246
+*** Timestep 0: t=0 years
+ Solving mesh velocity system... 0 iterations.
+ Solving temperature system... 0 iterations.
+ Rebuilding Stokes preconditioner...
+ Solving Stokes system... 30+3 iterations.
+
+ Postprocessing:
+
+ Reference density (kg/m^3): 3300
+ Reference gravity (m/s^2): 10
+ Reference thermal expansion (1/K): 4e-05
+ Temperature contrast across model domain (K): 0
+ Model domain depth (m): 500000
+ Reference thermal diffusivity (m^2/s): 1.13939e-06
+ Reference viscosity (Pas): 1e+20
+ Ra number: 0
+ k_value: 4.7
+ reference_cp: 1250
+ reference_thermal_diffusivity: 1.13939e-06
+
+ RMS, max velocity: 0.627 m/year, 1.22 m/year
+ Topography min/max: 0 m, 0 m,
+
+*** Timestep 1: t=659.368 years
+ Solving mesh velocity system... 11 iterations.
+ Solving temperature system... 10 iterations.
+ Rebuilding Stokes preconditioner...
+ Solving Stokes system... 30+3 iterations.
+
+ Postprocessing:
+ RMS, max velocity: 0.44 m/year, 0.997 m/year
+ Topography min/max: -467.1 m, 512.7 m,
+
+*** Timestep 2: t=1538.39 years
+ Solving mesh velocity system... 11 iterations.
+ Solving temperature system... 10 iterations.
+ Rebuilding Stokes preconditioner...
+ Solving Stokes system... 30+3 iterations.
+
+ Postprocessing:
+ RMS, max velocity: 0.408 m/year, 0.951 m/year
+ Topography min/max: -643.6 m, 755.9 m,
+
+*** Timestep 3: t=2488.17 years
+ Solving mesh velocity system... 11 iterations.
+ Solving temperature system... 10 iterations.
+ Rebuilding Stokes preconditioner...
+ Solving Stokes system... 30+2 iterations.
+
+ Postprocessing:
+ RMS, max velocity: 0.396 m/year, 0.933 m/year
+ Topography min/max: -729.1 m, 911 m,
+
+*** Timestep 4: t=3470.04 years
+ Solving mesh velocity system... 11 iterations.
+ Solving temperature system... 10 iterations.
+ Rebuilding Stokes preconditioner...
+ Solving Stokes system... 28 iterations.
+
+ Postprocessing:
+ RMS, max velocity: 0.391 m/year, 0.923 m/year
+ Topography min/max: -774.3 m, 1012 m,
+
+Termination requested by criterion: end step
+
+
++---------------------------------------------+------------+------------+
+| Total wallclock time elapsed since start | 8.4s | |
+| | | |
+| Section | no. calls | wall time | % of total |
++---------------------------------+-----------+------------+------------+
+| Assemble Stokes system | 6 | 2.13s | 25% |
+| Assemble temperature system | 6 | 0.989s | 12% |
+| Build Stokes preconditioner | 6 | 1.58s | 19% |
+| Build temperature preconditioner| 6 | 0.0506s | 0.6% |
+| Solve Stokes system | 6 | 1.85s | 22% |
+| Solve temperature system | 6 | 0.0288s | 0.34% |
+| FreeSurface | 6 | 0.398s | 4.7% |
+| Initialization | 3 | 0.0535s | 0.64% |
+| Postprocessing | 5 | 0.0284s | 0.34% |
+| Refine mesh structure, part 1 | 1 | 0.607s | 7.2% |
+| Refine mesh structure, part 2 | 1 | 0.00698s | 0.083% |
+| Setup dof systems | 2 | 0.504s | 6% |
++---------------------------------+-----------+------------+------------+
+
diff --git a/tests/periodic_box_freesurface/statistics b/tests/periodic_box_freesurface/statistics
new file mode 100644
index 0000000..f446334
--- /dev/null
+++ b/tests/periodic_box_freesurface/statistics
@@ -0,0 +1,18 @@
+# 1: Time step number
+# 2: Time (years)
+# 3: Number of mesh cells
+# 4: Number of Stokes degrees of freedom
+# 5: Number of temperature degrees of freedom
+# 6: Iterations for temperature solver
+# 7: Iterations for Stokes solver
+# 8: Time step size (years)
+# 9: RMS velocity (m/year)
+# 10: Max. velocity (m/year)
+# 11: Minimum topography (m)
+# 12: Maximum topography (m)
+0 0.0000e+00 4096 37507 16641 0 34 1.2740e+03 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00
+0 0.0000e+00 1444 14345 6361 0 33 6.5937e+02 6.27253733e-01 1.22358311e+00 0.00000000e+00 0.00000000e+00
+1 6.5937e+02 1444 14345 6361 10 33 8.7902e+02 4.40498631e-01 9.96996409e-01 -4.67056438e+02 5.12724308e+02
+2 1.5384e+03 1444 14345 6361 10 33 9.4978e+02 4.08178983e-01 9.51202911e-01 -6.43558938e+02 7.55860963e+02
+3 2.4882e+03 1444 14345 6361 10 32 9.8187e+02 3.96204414e-01 9.32576482e-01 -7.29090108e+02 9.11003915e+02
+4 3.4700e+03 1444 14345 6361 10 28 9.9791e+02 3.90544334e-01 9.23310133e-01 -7.74285158e+02 1.01221791e+03
More information about the CIG-COMMITS
mailing list