[cig-commits] [commit] master: Implemented Wolfgang's comments and added test (68302c8)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed May 21 07:11:33 PDT 2014
Repository : https://github.com/geodynamics/aspect
On branch : master
Link : https://github.com/geodynamics/aspect/compare/1cd545b36a722d2b63569794e4675cf3e9d27d98...497a2179702f669476083a98714879503e0dfa90
>---------------------------------------------------------------
commit 68302c86ee536439ede6c1b4b54073b805f2fc6b
Author: anne-glerum <a.c.glerum at uu.nl>
Date: Tue May 20 22:03:50 2014 +0200
Implemented Wolfgang's comments and added test
>---------------------------------------------------------------
68302c86ee536439ede6c1b4b54073b805f2fc6b
.../postprocess/velocity_boundary_statistics.h | 4 +-
source/postprocess/velocity_boundary_statistics.cc | 8 +-
...ne_vel.prm => velocity_boundary_statistics.prm} | 2 +-
tests/velocity_boundary_statistics/screen-output | 206 +++++++++++++++++++++
tests/velocity_boundary_statistics/statistics | 37 ++++
5 files changed, 250 insertions(+), 7 deletions(-)
diff --git a/include/aspect/postprocess/velocity_boundary_statistics.h b/include/aspect/postprocess/velocity_boundary_statistics.h
index f591a9c..abcc572 100644
--- a/include/aspect/postprocess/velocity_boundary_statistics.h
+++ b/include/aspect/postprocess/velocity_boundary_statistics.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2011, 2012 by the authors of the ASPECT code.
+ Copyright (C) 2014 by the authors of the ASPECT code.
This file is part of ASPECT.
@@ -33,7 +33,7 @@ namespace aspect
{
/**
- * A postprocessor that computes some statistics about the velocity_boundary.
+ * A postprocessor that computes some statistics about the velocity at different parts of the boundary.
*
* @ingroup Postprocessing
*/
diff --git a/source/postprocess/velocity_boundary_statistics.cc b/source/postprocess/velocity_boundary_statistics.cc
index b46a3a2..f092f43 100644
--- a/source/postprocess/velocity_boundary_statistics.cc
+++ b/source/postprocess/velocity_boundary_statistics.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2011, 2012, 2013, 2014 by the authors of the ASPECT code.
+ Copyright (C) 2014 by the authors of the ASPECT code.
This file is part of ASPECT.
@@ -87,6 +87,7 @@ namespace aspect
local_min = std::min(vel_mag,
local_min);
}
+ // then merge them with the min/max velocities we found for other faces with the same boundary indicator
local_max_vel[cell->face(f)->boundary_indicator()] = std::max(local_max,
local_max_vel[cell->face(f)->boundary_indicator()]);
local_min_vel[cell->face(f)->boundary_indicator()] = std::min(local_min,
@@ -129,7 +130,7 @@ namespace aspect
}
}
- // now add all of the computed heat fluxes to the statistics object
+ // now add the computed max and min velocities to the statistics object
// and create a single string that can be output to the screen
std::ostringstream screen_text;
unsigned int index = 0;
@@ -204,7 +205,6 @@ namespace aspect
"A postprocessor that computes some statistics about "
"the velocity along the boundaries. For each boundary "
"indicator (see your geometry description for which boundary "
- "indicators are used), the min and max velocity magnitude is computed "
- ".")
+ "indicators are used), the min and max velocity magnitude is computed.")
}
}
diff --git a/tests/refine_vel.prm b/tests/velocity_boundary_statistics.prm
similarity index 96%
copy from tests/refine_vel.prm
copy to tests/velocity_boundary_statistics.prm
index abb452f..05fc8c2 100644
--- a/tests/refine_vel.prm
+++ b/tests/velocity_boundary_statistics.prm
@@ -98,7 +98,7 @@ subsection Model settings
end
subsection Postprocess
- set List of postprocessors = visualization, velocity statistics, temperature statistics, heat flux statistics, depth average
+ set List of postprocessors = visualization, velocity statistics, temperature statistics, heat flux statistics, depth average, velocity boundary statistics
subsection Visualization
set Time between graphical output = 0
diff --git a/tests/velocity_boundary_statistics/screen-output b/tests/velocity_boundary_statistics/screen-output
new file mode 100644
index 0000000..cd171b9
--- /dev/null
+++ b/tests/velocity_boundary_statistics/screen-output
@@ -0,0 +1,206 @@
+-----------------------------------------------------------------------------
+-- 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: 768 (on 5 levels)
+Number of degrees of freedom: 10,436 (6,402+833+3,201)
+
+*** Timestep 0: t=0 seconds
+ 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): 9.81
+ Reference thermal expansion (1/K): 2e-05
+ Temperature contrast across model domain (K): 0
+ Model domain depth (m): 2.89e+06
+ Reference thermal diffusivity (m^2/s): 2.42424e-13
+ Reference viscosity (Pas): 1e+22
+ Ra number: 0
+ k_value: 1e-06
+ reference_cp: 1250
+ reference_thermal_diffusivity: 2.42424e-13
+
+ Writing graphical output: output-velocity_boundary_statistics/solution-00000
+ RMS, max velocity: 1.21e-09 m/s, 3.64e-09 m/s
+ Temperature min/avg/max: 0 K, 101.4 K, 1613 K
+ Heat fluxes through boundary parts: -0.129 W, -0.2469 W, -4.669e-06 W, -4.669e-06 W
+ Writing depth average output-velocity_boundary_statistics/depth_average.gnuplot
+ Max and min velocity along boundary parts: 3.633e-09 m/s, 4.179e-12 m/s, 0 m/s, 0 m/s, 1.741e-10 m/s, 3.486e-12 m/s, 1.431e-09 m/s, 4.823e-14 m/s
+
+Number of active cells: 837 (on 6 levels)
+Number of degrees of freedom: 11,660 (7,154+929+3,577)
+
+Number of active cells: 912 (on 6 levels)
+Number of degrees of freedom: 12,904 (7,916+1,030+3,958)
+
+*** Timestep 1: t=1.56836e+13 seconds
+ Solving temperature system... 19 iterations.
+ Rebuilding Stokes preconditioner...
+ Solving Stokes system... 24 iterations.
+
+ Postprocessing:
+ Writing graphical output: output-velocity_boundary_statistics/solution-00001
+ RMS, max velocity: 1.26e-09 m/s, 3.75e-09 m/s
+ Temperature min/avg/max: -202.2 K, 102.8 K, 1613 K
+ Heat fluxes through boundary parts: -0.1256 W, -0.2457 W, -2.204e-06 W, -6.235e-06 W
+ Writing depth average output-velocity_boundary_statistics/depth_average.gnuplot
+ Max and min velocity along boundary parts: 3.73e-09 m/s, 4.287e-12 m/s, 0 m/s, 0 m/s, 1.77e-10 m/s, 3.41e-12 m/s, 1.462e-09 m/s, 4.62e-13 m/s
+
+*** Timestep 2: t=2.32729e+13 seconds
+ Solving temperature system... 13 iterations.
+ Solving Stokes system... 20 iterations.
+
+ Postprocessing:
+ Writing graphical output: output-velocity_boundary_statistics/solution-00002
+ RMS, max velocity: 1.29e-09 m/s, 3.8e-09 m/s
+ Temperature min/avg/max: -202.4 K, 103.8 K, 1613 K
+ Heat fluxes through boundary parts: -0.1229 W, -0.2444 W, -1.313e-06 W, -8.754e-06 W
+ Writing depth average output-velocity_boundary_statistics/depth_average.gnuplot
+ Max and min velocity along boundary parts: 3.776e-09 m/s, 4.368e-12 m/s, 0 m/s, 0 m/s, 1.789e-10 m/s, 3.409e-12 m/s, 1.477e-09 m/s, 3.695e-13 m/s
+
+Number of active cells: 990 (on 6 levels)
+Number of degrees of freedom: 14,115 (8,658+1,128+4,329)
+
+*** Timestep 3: t=3.07665e+13 seconds
+ Solving temperature system... 12 iterations.
+ Rebuilding Stokes preconditioner...
+ Solving Stokes system... 20 iterations.
+
+ Postprocessing:
+ Writing graphical output: output-velocity_boundary_statistics/solution-00003
+ RMS, max velocity: 1.32e-09 m/s, 3.85e-09 m/s
+ Temperature min/avg/max: -202.6 K, 104.7 K, 1613 K
+ Heat fluxes through boundary parts: -0.1202 W, -0.2435 W, -3.309e-07 W, -1.015e-05 W
+ Writing depth average output-velocity_boundary_statistics/depth_average.gnuplot
+ Max and min velocity along boundary parts: 3.821e-09 m/s, 4.453e-12 m/s, 0 m/s, 0 m/s, 1.81e-10 m/s, 2.623e-12 m/s, 1.493e-09 m/s, 2.277e-12 m/s
+
+*** Timestep 4: t=3.81707e+13 seconds
+ Solving temperature system... 12 iterations.
+ Solving Stokes system... 19 iterations.
+
+ Postprocessing:
+ Writing graphical output: output-velocity_boundary_statistics/solution-00004
+ RMS, max velocity: 1.35e-09 m/s, 3.89e-09 m/s
+ Temperature min/avg/max: -202.9 K, 105.6 K, 1613 K
+ Heat fluxes through boundary parts: -0.1178 W, -0.2424 W, 1.713e-07 W, -1.151e-05 W
+ Writing depth average output-velocity_boundary_statistics/depth_average.gnuplot
+ Max and min velocity along boundary parts: 3.863e-09 m/s, 4.54e-12 m/s, 0 m/s, 0 m/s, 1.831e-10 m/s, 2.625e-12 m/s, 1.508e-09 m/s, 2.319e-12 m/s
+
+Number of active cells: 1,092 (on 6 levels)
+Number of degrees of freedom: 15,598 (9,568+1,246+4,784)
+
+*** Timestep 5: t=4.54881e+13 seconds
+ Solving temperature system... 14 iterations.
+ Rebuilding Stokes preconditioner...
+ Solving Stokes system... 20 iterations.
+
+ Postprocessing:
+ Writing graphical output: output-velocity_boundary_statistics/solution-00005
+ RMS, max velocity: 1.38e-09 m/s, 3.94e-09 m/s
+ Temperature min/avg/max: -202.9 K, 106.4 K, 1613 K
+ Heat fluxes through boundary parts: -0.116 W, -0.2413 W, 1.648e-06 W, -1.207e-05 W
+ Writing depth average output-velocity_boundary_statistics/depth_average.gnuplot
+ Max and min velocity along boundary parts: 3.912e-09 m/s, 4.615e-12 m/s, 0 m/s, 0 m/s, 1.848e-10 m/s, 2.517e-13 m/s, 1.523e-09 m/s, 1.411e-13 m/s
+
+*** Timestep 6: t=5.27266e+13 seconds
+ Solving temperature system... 14 iterations.
+ Solving Stokes system... 20 iterations.
+
+ Postprocessing:
+ Writing graphical output: output-velocity_boundary_statistics/solution-00006
+ RMS, max velocity: 1.41e-09 m/s, 3.98e-09 m/s
+ Temperature min/avg/max: -202.6 K, 107 K, 1613 K
+ Heat fluxes through boundary parts: -0.1147 W, -0.2403 W, 1.338e-06 W, -1.428e-05 W
+ Writing depth average output-velocity_boundary_statistics/depth_average.gnuplot
+ Max and min velocity along boundary parts: 3.952e-09 m/s, 4.686e-12 m/s, 0 m/s, 0 m/s, 1.863e-10 m/s, 2.504e-13 m/s, 1.538e-09 m/s, 1.366e-13 m/s
+
+Number of active cells: 1,209 (on 6 levels)
+Number of degrees of freedom: 17,345 (10,640+1,385+5,320)
+
+*** Timestep 7: t=5.9889e+13 seconds
+ Solving temperature system... 14 iterations.
+ Rebuilding Stokes preconditioner...
+ Solving Stokes system... 19 iterations.
+
+ Postprocessing:
+ Writing graphical output: output-velocity_boundary_statistics/solution-00007
+ RMS, max velocity: 1.44e-09 m/s, 4.01e-09 m/s
+ Temperature min/avg/max: -202.4 K, 107.6 K, 1613 K
+ Heat fluxes through boundary parts: -0.1138 W, -0.2394 W, 6.598e-07 W, -4.841e-06 W
+ Writing depth average output-velocity_boundary_statistics/depth_average.gnuplot
+ Max and min velocity along boundary parts: 3.988e-09 m/s, 2.363e-12 m/s, 0 m/s, 0 m/s, 1.876e-10 m/s, 2.509e-13 m/s, 1.553e-09 m/s, 1.34e-13 m/s
+
+*** Timestep 8: t=6.6987e+13 seconds
+ Solving temperature system... 14 iterations.
+ Solving Stokes system... 18 iterations.
+
+ Postprocessing:
+ Writing graphical output: output-velocity_boundary_statistics/solution-00008
+ RMS, max velocity: 1.47e-09 m/s, 4.05e-09 m/s
+ Temperature min/avg/max: -202.1 K, 108.1 K, 1613 K
+ Heat fluxes through boundary parts: -0.1136 W, -0.2386 W, 5.164e-07 W, 5.954e-06 W
+ Writing depth average output-velocity_boundary_statistics/depth_average.gnuplot
+ Max and min velocity along boundary parts: 4.024e-09 m/s, 2.387e-12 m/s, 0 m/s, 0 m/s, 1.889e-10 m/s, 2.507e-13 m/s, 1.568e-09 m/s, 1.305e-13 m/s
+
+Number of active cells: 1,356 (on 7 levels)
+Number of degrees of freedom: 19,477 (11,950+1,552+5,975)
+
+*** Timestep 9: t=7.40219e+13 seconds
+ Solving temperature system... 15 iterations.
+ Rebuilding Stokes preconditioner...
+ Solving Stokes system... 17 iterations.
+
+ Postprocessing:
+ Writing graphical output: output-velocity_boundary_statistics/solution-00009
+ RMS, max velocity: 1.5e-09 m/s, 4.08e-09 m/s
+ Temperature min/avg/max: -201.9 K, 108.5 K, 1613 K
+ Heat fluxes through boundary parts: -0.1138 W, -0.2378 W, 5.627e-07 W, 7.65e-06 W
+ Writing depth average output-velocity_boundary_statistics/depth_average.gnuplot
+ Max and min velocity along boundary parts: 4.054e-09 m/s, 2.359e-12 m/s, 0 m/s, 0 m/s, 1.9e-10 m/s, 2.504e-13 m/s, 1.583e-09 m/s, 1.271e-13 m/s
+
+*** Timestep 10: t=8.10056e+13 seconds
+ Solving temperature system... 14 iterations.
+ Solving Stokes system... 19 iterations.
+
+ Postprocessing:
+ Writing graphical output: output-velocity_boundary_statistics/solution-00010
+ RMS, max velocity: 1.53e-09 m/s, 4.11e-09 m/s
+ Temperature min/avg/max: -201.7 K, 108.9 K, 1613 K
+ Heat fluxes through boundary parts: -0.1144 W, -0.2371 W, 1.18e-06 W, 6.828e-06 W
+ Writing depth average output-velocity_boundary_statistics/depth_average.gnuplot
+ Max and min velocity along boundary parts: 4.081e-09 m/s, 2.377e-12 m/s, 0 m/s, 0 m/s, 1.91e-10 m/s, 2.502e-13 m/s, 1.597e-09 m/s, 1.238e-13 m/s
+
+Number of active cells: 1,512 (on 7 levels)
+Number of degrees of freedom: 21,843 (13,406+1,734+6,703)
+
+Termination requested by criterion: end step
+*** Snapshot created!
+
+
+
++---------------------------------------------+------------+------------+
+| Total wallclock time elapsed since start | 169s | |
+| | | |
+| Section | no. calls | wall time | % of total |
++---------------------------------+-----------+------------+------------+
+| Assemble Stokes system | 11 | 11.3s | 6.7% |
+| Assemble temperature system | 11 | 14.9s | 8.8% |
+| Build Stokes preconditioner | 6 | 9.39s | 5.6% |
+| Build temperature preconditioner| 11 | 0.535s | 0.32% |
+| Solve Stokes system | 11 | 2.19s | 1.3% |
+| Solve temperature system | 11 | 1.48s | 0.88% |
+| Create snapshot | 1 | 8.01s | 4.7% |
+| Initialization | 2 | 12.3s | 7.3% |
+| Postprocessing | 11 | 82.3s | 49% |
+| Refine mesh structure, part 1 | 7 | 6.58s | 3.9% |
+| Refine mesh structure, part 2 | 7 | 0.204s | 0.12% |
+| Setup dof systems | 8 | 14.1s | 8.4% |
++---------------------------------+-----------+------------+------------+
+
diff --git a/tests/velocity_boundary_statistics/statistics b/tests/velocity_boundary_statistics/statistics
new file mode 100644
index 0000000..e287ae8
--- /dev/null
+++ b/tests/velocity_boundary_statistics/statistics
@@ -0,0 +1,37 @@
+# 1: Time step number
+# 2: Time (seconds)
+# 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 (seconds)
+# 9: Visualization file name
+# 10: RMS velocity (m/s)
+# 11: Max. velocity (m/s)
+# 12: Minimal temperature (K)
+# 13: Average temperature (K)
+# 14: Maximal temperature (K)
+# 15: Outward heat flux through boundary with indicator 0 (W)
+# 16: Outward heat flux through boundary with indicator 1 (W)
+# 17: Outward heat flux through boundary with indicator 2 (W)
+# 18: Outward heat flux through boundary with indicator 3 (W)
+# 19: Maximum velocity magnitude on boundary with indicator 0 (m/s)
+# 20: Minimum velocity magnitude on boundary with indicator 0 (m/s)
+# 21: Maximum velocity magnitude on boundary with indicator 1 (m/s)
+# 22: Minimum velocity magnitude on boundary with indicator 1 (m/s)
+# 23: Maximum velocity magnitude on boundary with indicator 2 (m/s)
+# 24: Minimum velocity magnitude on boundary with indicator 2 (m/s)
+# 25: Maximum velocity magnitude on boundary with indicator 3 (m/s)
+# 26: Minimum velocity magnitude on boundary with indicator 3 (m/s)
+ 0 0.0000e+00 768 7235 3201 0 33 1.5684e+13 output-velocity_boundary_statistics/solution-00000 1.20522676e-09 3.64484888e-09 0.00000000e+00 1.01429624e+02 1.61300000e+03 -1.28972690e-01 -2.46880441e-01 -4.66932798e-06 -4.66932798e-06 3.63277276e-09 4.17947401e-12 0.00000000e+00 0.00000000e+00 1.74078946e-10 3.48568923e-12 1.43051145e-09 4.82348489e-14
+ 1 1.5684e+13 912 8946 3958 19 24 7.5893e+12 output-velocity_boundary_statistics/solution-00001 1.26276581e-09 3.75246539e-09 -2.02154639e+02 1.02821383e+02 1.61300000e+03 -1.25594741e-01 -2.45686247e-01 -2.20411119e-06 -6.23503138e-06 3.73024886e-09 4.28736653e-12 0.00000000e+00 0.00000000e+00 1.76984138e-10 3.41037374e-12 1.46175721e-09 4.61956094e-13
+ 2 2.3273e+13 912 8946 3958 13 20 7.4936e+12 output-velocity_boundary_statistics/solution-00002 1.29174210e-09 3.80085181e-09 -2.02352134e+02 1.03788568e+02 1.61300000e+03 -1.22866276e-01 -2.44387644e-01 -1.31325396e-06 -8.75368418e-06 3.77643532e-09 4.36787927e-12 0.00000000e+00 0.00000000e+00 1.78945046e-10 3.40906061e-12 1.47715758e-09 3.69516600e-13
+ 3 3.0767e+13 990 9786 4329 12 20 7.4042e+12 output-velocity_boundary_statistics/solution-00003 1.32091007e-09 3.84717699e-09 -2.02556042e+02 1.04688550e+02 1.61300000e+03 -1.20239797e-01 -2.43490988e-01 -3.30878964e-07 -1.01517415e-05 3.82078097e-09 4.45324079e-12 0.00000000e+00 0.00000000e+00 1.80994533e-10 2.62324131e-12 1.49251329e-09 2.27689431e-12
+ 4 3.8171e+13 990 9786 4329 12 19 7.3174e+12 output-velocity_boundary_statistics/solution-00004 1.35017220e-09 3.89186997e-09 -2.02872140e+02 1.05589658e+02 1.61300000e+03 -1.17836300e-01 -2.42360720e-01 1.71333450e-07 -1.15090106e-05 3.86275246e-09 4.53973352e-12 0.00000000e+00 0.00000000e+00 1.83065436e-10 2.62451887e-12 1.50786885e-09 2.31863572e-12
+ 5 4.5488e+13 1092 10814 4784 14 20 7.2385e+12 output-velocity_boundary_statistics/solution-00005 1.37961950e-09 3.93562579e-09 -2.02853244e+02 1.06353285e+02 1.61300000e+03 -1.15998972e-01 -2.41329223e-01 1.64805688e-06 -1.20710819e-05 3.91211954e-09 4.61535659e-12 0.00000000e+00 0.00000000e+00 1.84779575e-10 2.51734271e-13 1.52302913e-09 1.41102308e-13
+ 6 5.2727e+13 1092 10814 4784 14 20 7.1624e+12 output-velocity_boundary_statistics/solution-00006 1.40908707e-09 3.97607791e-09 -2.02621148e+02 1.07035669e+02 1.61300000e+03 -1.14659992e-01 -2.40345976e-01 1.33815067e-06 -1.42771282e-05 3.95237978e-09 4.68645727e-12 0.00000000e+00 0.00000000e+00 1.86321228e-10 2.50387713e-13 1.53793749e-09 1.36588779e-13
+ 7 5.9889e+13 1209 12025 5320 14 19 7.0980e+12 output-velocity_boundary_statistics/solution-00007 1.43861733e-09 4.01221740e-09 -2.02382834e+02 1.07604258e+02 1.61300000e+03 -1.13815411e-01 -2.39423208e-01 6.59831030e-07 -4.84055592e-06 3.98831987e-09 2.36273268e-12 0.00000000e+00 0.00000000e+00 1.87626907e-10 2.50915580e-13 1.55298238e-09 1.33978216e-13
+ 8 6.6987e+13 1209 12025 5320 14 18 7.0350e+12 output-velocity_boundary_statistics/solution-00008 1.46811557e-09 4.04813091e-09 -2.02143532e+02 1.08090112e+02 1.61300000e+03 -1.13580761e-01 -2.38552219e-01 5.16365930e-07 5.95415419e-06 4.02385479e-09 2.38700119e-12 0.00000000e+00 0.00000000e+00 1.88854576e-10 2.50707840e-13 1.56789480e-09 1.30547432e-13
+ 9 7.4022e+13 1356 13502 5975 15 17 6.9837e+12 output-velocity_boundary_statistics/solution-00009 1.49748550e-09 4.07892319e-09 -2.01905106e+02 1.08518814e+02 1.61300000e+03 -1.13779733e-01 -2.37778656e-01 5.62717166e-07 7.64971465e-06 4.05401769e-09 2.35889313e-12 0.00000000e+00 0.00000000e+00 1.89971408e-10 2.50433003e-13 1.58259887e-09 1.27148065e-13
+10 8.1006e+13 1356 13502 5975 14 19 6.9340e+12 output-velocity_boundary_statistics/solution-00010 1.52666686e-09 4.10696634e-09 -2.01667829e+02 1.08911515e+02 1.61300000e+03 -1.14396054e-01 -2.37078396e-01 1.18045065e-06 6.82840634e-06 4.08135306e-09 2.37651999e-12 0.00000000e+00 0.00000000e+00 1.91004857e-10 2.50168609e-13 1.59721869e-09 1.23782831e-13
More information about the CIG-COMMITS
mailing list