[cig-commits] [commit] master: Remove the basic statistics part from velocity statistics and update tests. (6dd17a2)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Fri May 23 05:56:47 PDT 2014


Repository : https://github.com/geodynamics/aspect

On branch  : master
Link       : https://github.com/geodynamics/aspect/compare/4f52773fbf2cfbb51201a7d742b1c38faa940596...11c2ea4df18afb9cd1e6cdc9b772c124d6a191db

>---------------------------------------------------------------

commit 6dd17a20bcbf4cfb6b4c223da2797dd1d9d212f1
Author: Rene Gassmoeller <R.Gassmoeller at mailbox.org>
Date:   Thu May 22 17:48:33 2014 -0500

    Remove the basic statistics part from velocity statistics and update tests.
    
    The tests can still reproduce their results, but they now need to call velocity statistics and basic statistics for this.


>---------------------------------------------------------------

6dd17a20bcbf4cfb6b4c223da2797dd1d9d212f1
 include/aspect/postprocess/basic_statistics.h |  2 +-
 source/postprocess/basic_statistics.cc        |  3 --
 source/postprocess/velocity_statistics.cc     | 65 ---------------------------
 tests/adiabatic_conditions.prm                |  2 +-
 tests/box-first-time-step-alternate-bc.prm    |  2 +-
 tests/box-first-time-step.prm                 |  2 +-
 tests/box-repetitions.prm                     |  2 +-
 tests/diffusion-velocity.prm                  |  2 +-
 tests/free_surface_blob.prm                   |  2 +-
 tests/free_surface_relaxation.prm             |  2 +-
 tests/minimum_refinement_function.prm         |  2 +-
 tests/no_adiabatic_heating_02.prm             |  2 +-
 tests/no_adiabatic_heating_03.prm             |  2 +-
 tests/passive_comp.prm                        |  2 +-
 tests/periodic_box.prm                        |  2 +-
 tests/periodic_box_freesurface.prm            |  2 +-
 tests/refine_vel.prm                          |  2 +-
 tests/remove_angular_momentum.prm             |  2 +-
 tests/remove_net_rotation.prm                 |  2 +-
 tests/simple-compressible.prm                 |  2 +-
 tests/simple-incompressible.prm               |  2 +-
 tests/spherical_velocity_statistics.prm       |  2 +-
 tests/steinberger-compressible.prm            |  2 +-
 tests/steinberger-incompressible.prm          |  2 +-
 tests/stokes.prm                              |  2 +-
 tests/temperature-dependent-stokes-matrix.prm |  2 +-
 tests/velocity_boundary_statistics.prm        |  2 +-
 tests/velocity_in_years.prm                   |  2 +-
 28 files changed, 26 insertions(+), 94 deletions(-)

diff --git a/include/aspect/postprocess/basic_statistics.h b/include/aspect/postprocess/basic_statistics.h
index 9e2ceb8..8efa3ed 100644
--- a/include/aspect/postprocess/basic_statistics.h
+++ b/include/aspect/postprocess/basic_statistics.h
@@ -40,7 +40,7 @@ namespace aspect
     {
       public:
         /**
-         * Evaluate the solution for some velocity statistics.
+         * Evaluate the solution for some general statistics.
          */
         virtual
         std::pair<std::string,std::string>
diff --git a/source/postprocess/basic_statistics.cc b/source/postprocess/basic_statistics.cc
index 134f356..d0bbae5 100644
--- a/source/postprocess/basic_statistics.cc
+++ b/source/postprocess/basic_statistics.cc
@@ -27,9 +27,6 @@
 #include <deal.II/base/quadrature_lib.h>
 #include <deal.II/fe/fe_values.h>
 
-#include <boost/archive/text_oarchive.hpp>
-#include <boost/archive/text_iarchive.hpp>
-
 
 namespace aspect
 {
diff --git a/source/postprocess/velocity_statistics.cc b/source/postprocess/velocity_statistics.cc
index 86ddfd2..48fecde 100644
--- a/source/postprocess/velocity_statistics.cc
+++ b/source/postprocess/velocity_statistics.cc
@@ -27,9 +27,6 @@
 #include <deal.II/base/quadrature_lib.h>
 #include <deal.II/fe/fe_values.h>
 
-#include <boost/archive/text_oarchive.hpp>
-#include <boost/archive/text_iarchive.hpp>
-
 
 namespace aspect
 {
@@ -132,68 +129,6 @@ namespace aspect
                << global_max_velocity
                << " m/s";
 
-// TODO: This really doesn't belong here
-      if (this->get_time() == 0e0)
-        {
-          if (dynamic_cast<const MaterialModel::Simple<dim> *>(&this->get_material_model()) != 0)
-            {
-
-              const MaterialModel::Simple<dim> &material_model
-                = dynamic_cast<const MaterialModel::Simple<dim> &>(this->get_material_model());
-
-              const double h = this->get_geometry_model().maximal_depth();
-
-              const double dT = this->get_boundary_temperature().maximal_temperature(this->get_fixed_temperature_boundary_indicators())
-                                - this->get_boundary_temperature().minimal_temperature(this->get_fixed_temperature_boundary_indicators());
-              // we do not compute the compositions but give the functions below the value 0.0 instead
-              std::vector<double> composition_values(this->n_compositional_fields(),0.0);
-
-              Point<dim> representative_point = this->get_geometry_model().representative_point(0);
-              const double gravity = this->get_gravity_model().gravity_vector(representative_point).norm();
-              const double Ra = material_model.reference_density()*
-                                gravity*
-                                material_model.reference_thermal_expansion_coefficient()*
-                                dT*std::pow(h,3)/
-                                (material_model.reference_thermal_diffusivity()*
-                                 material_model.reference_viscosity());
-
-              this->get_pcout()<<  std::endl;
-              this->get_pcout()<< "     Reference density (kg/m^3):                    "
-                               << material_model.reference_density()
-                               << std::endl;
-              this->get_pcout()<< "     Reference gravity (m/s^2):                     "
-                               << gravity
-                               << std::endl;
-              this->get_pcout()<< "     Reference thermal expansion (1/K):             "
-                               << material_model.reference_thermal_expansion_coefficient()
-                               << std::endl;
-              this->get_pcout()<< "     Temperature contrast across model domain (K): "
-                               << dT
-                               << std::endl;
-              this->get_pcout()<< "     Model domain depth (m):                        "
-                               << h
-                               << std::endl;
-              this->get_pcout()<< "     Reference thermal diffusivity (m^2/s):         "
-                               << material_model.reference_thermal_diffusivity()
-                               << std::endl;
-              this->get_pcout()<< "     Reference viscosity (Pas):                     "
-                               << material_model.reference_viscosity()
-                               << std::endl;
-              this->get_pcout()<< "     Ra number:                                     "
-                               << Ra
-                               << std::endl;
-              this->get_pcout()<< "     k_value:                                       "
-                               << material_model.thermal_conductivity(dT, dT, composition_values, representative_point) //TODO: dT for the pressure is wrong
-                               << std::endl;
-              this->get_pcout()<< "     reference_cp:                                  "
-                               << material_model.reference_cp()
-                               << std::endl;
-              this->get_pcout()<< "     reference_thermal_diffusivity:                 "
-                               << material_model.thermal_conductivity(dT, dT, composition_values, representative_point)/(material_model.reference_density()*material_model.reference_cp()) //TODO: dT for the pressure is wrong
-                               << std::endl;
-              this->get_pcout()<<  std::endl;
-            }
-        }
       return std::pair<std::string, std::string> ("RMS, max velocity:",
                                                   output.str());
     }
diff --git a/tests/adiabatic_conditions.prm b/tests/adiabatic_conditions.prm
index 4257bb6..5ebd8dc 100644
--- a/tests/adiabatic_conditions.prm
+++ b/tests/adiabatic_conditions.prm
@@ -75,6 +75,6 @@ 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, basic statistics,  temperature statistics, heat flux statistics, depth average
 end
 
diff --git a/tests/box-first-time-step-alternate-bc.prm b/tests/box-first-time-step-alternate-bc.prm
index 593d6e1..38dc8ed 100644
--- a/tests/box-first-time-step-alternate-bc.prm
+++ b/tests/box-first-time-step-alternate-bc.prm
@@ -69,6 +69,6 @@ subsection Model settings
 end
 
 subsection Postprocess
-  set List of postprocessors = visualization, velocity statistics, temperature statistics, heat flux statistics
+  set List of postprocessors = visualization, velocity statistics, basic statistics,  temperature statistics, heat flux statistics
 end
 
diff --git a/tests/box-first-time-step.prm b/tests/box-first-time-step.prm
index 6abb18f..f09526e 100644
--- a/tests/box-first-time-step.prm
+++ b/tests/box-first-time-step.prm
@@ -63,6 +63,6 @@ subsection Model settings
 end
 
 subsection Postprocess
-  set List of postprocessors = visualization, velocity statistics, temperature statistics, heat flux statistics
+  set List of postprocessors = visualization, velocity statistics, basic statistics,  temperature statistics, heat flux statistics
 end
 
diff --git a/tests/box-repetitions.prm b/tests/box-repetitions.prm
index 9896f86..0d5eecf 100644
--- a/tests/box-repetitions.prm
+++ b/tests/box-repetitions.prm
@@ -66,6 +66,6 @@ subsection Model settings
 end
 
 subsection Postprocess
-  set List of postprocessors = visualization#, velocity statistics, temperature statistics, heat flux statistics
+  set List of postprocessors = visualization#, velocity statistics, basic statistics,  temperature statistics, heat flux statistics
 end
 
diff --git a/tests/diffusion-velocity.prm b/tests/diffusion-velocity.prm
index fb5c8bb..253297b 100644
--- a/tests/diffusion-velocity.prm
+++ b/tests/diffusion-velocity.prm
@@ -370,7 +370,7 @@ subsection Postprocess
   # into files that can be read by a graphical visualization program.
   # Additional run time parameters are read from the parameter subsection
   # 'Visualization'.
-  set List of postprocessors = temperature statistics, heat flux statistics, velocity statistics
+  set List of postprocessors = temperature statistics, heat flux statistics, velocity statistics, basic statistics
 
   subsection Depth average
     # The time interval between each generation of graphical output files. A
diff --git a/tests/free_surface_blob.prm b/tests/free_surface_blob.prm
index 57d48d4..98032e9 100644
--- a/tests/free_surface_blob.prm
+++ b/tests/free_surface_blob.prm
@@ -107,5 +107,5 @@ subsection Termination criteria
 end
 
 subsection Postprocess
-  set List of postprocessors = topography,velocity statistics,
+  set List of postprocessors = topography,velocity statistics, basic statistics, 
 end
diff --git a/tests/free_surface_relaxation.prm b/tests/free_surface_relaxation.prm
index f9d74d4..2b65375 100644
--- a/tests/free_surface_relaxation.prm
+++ b/tests/free_surface_relaxation.prm
@@ -112,5 +112,5 @@ subsection Termination criteria
 end
 
 subsection Postprocess
-  set List of postprocessors = topography,velocity statistics
+  set List of postprocessors = topography,velocity statistics, basic statistics
 end
diff --git a/tests/minimum_refinement_function.prm b/tests/minimum_refinement_function.prm
index f54ccfb..3ecab27 100644
--- a/tests/minimum_refinement_function.prm
+++ b/tests/minimum_refinement_function.prm
@@ -174,7 +174,7 @@ end
 
 subsection Postprocess
 
-  set List of postprocessors = visualization,velocity statistics,temperature statistics,heat flux statistics, depth average # default: all
+  set List of postprocessors = visualization,velocity statistics, basic statistics, temperature statistics,heat flux statistics, depth average # default: all
 
   subsection Depth average
     # The time interval between each generation of graphical output files. A
diff --git a/tests/no_adiabatic_heating_02.prm b/tests/no_adiabatic_heating_02.prm
index 2311629..62212b4 100644
--- a/tests/no_adiabatic_heating_02.prm
+++ b/tests/no_adiabatic_heating_02.prm
@@ -93,7 +93,7 @@ subsection Boundary velocity model
 end
 
 subsection Postprocess
-  set List of postprocessors = temperature statistics, velocity statistics
+  set List of postprocessors = temperature statistics, velocity statistics, basic statistics
 
   subsection Visualization
     set Time between graphical output = 0.1
diff --git a/tests/no_adiabatic_heating_03.prm b/tests/no_adiabatic_heating_03.prm
index 3d804d4..808e364 100644
--- a/tests/no_adiabatic_heating_03.prm
+++ b/tests/no_adiabatic_heating_03.prm
@@ -125,7 +125,7 @@ subsection Boundary velocity model
 end
 
 subsection Postprocess
-  set List of postprocessors = temperature statistics, velocity statistics, visualization
+  set List of postprocessors = temperature statistics, velocity statistics, basic statistics,  visualization
 
   subsection Visualization
     set Time between graphical output = 0.1
diff --git a/tests/passive_comp.prm b/tests/passive_comp.prm
index bcd804c..205493d 100644
--- a/tests/passive_comp.prm
+++ b/tests/passive_comp.prm
@@ -376,7 +376,7 @@ subsection Postprocess
   #
   # `heat flux statistics': A postprocessor
   # that computes some statistics about the heat flux across boundaries.
-  set List of postprocessors = visualization,velocity statistics,temperature statistics,heat flux statistics, depth average
+  set List of postprocessors = visualization,velocity statistics, basic statistics, temperature statistics,heat flux statistics, depth average
 
 
   subsection Visualization
diff --git a/tests/periodic_box.prm b/tests/periodic_box.prm
index f64ab6d..498f3af 100644
--- a/tests/periodic_box.prm
+++ b/tests/periodic_box.prm
@@ -100,5 +100,5 @@ subsection Termination criteria
 end
 
 subsection Postprocess
-  set List of postprocessors = velocity statistics
+  set List of postprocessors = velocity statistics, basic statistics
 end
diff --git a/tests/periodic_box_freesurface.prm b/tests/periodic_box_freesurface.prm
index 2379a0e..a07ccb9 100644
--- a/tests/periodic_box_freesurface.prm
+++ b/tests/periodic_box_freesurface.prm
@@ -106,5 +106,5 @@ subsection Termination criteria
 end
 
 subsection Postprocess
-  set List of postprocessors = velocity statistics, topography, 
+  set List of postprocessors = velocity statistics, basic statistics,  topography, 
 end
diff --git a/tests/refine_vel.prm b/tests/refine_vel.prm
index abb452f..4d708e1 100644
--- a/tests/refine_vel.prm
+++ b/tests/refine_vel.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, basic statistics,  temperature statistics, heat flux statistics, depth average
 
   subsection Visualization
      set Time between graphical output = 0
diff --git a/tests/remove_angular_momentum.prm b/tests/remove_angular_momentum.prm
index 54f2d9a..1f310d2 100644
--- a/tests/remove_angular_momentum.prm
+++ b/tests/remove_angular_momentum.prm
@@ -65,5 +65,5 @@ end
 
 
 subsection Postprocess
-  set List of postprocessors = velocity statistics
+  set List of postprocessors = velocity statistics, basic statistics
 end
diff --git a/tests/remove_net_rotation.prm b/tests/remove_net_rotation.prm
index 10f3cbc..c317721 100644
--- a/tests/remove_net_rotation.prm
+++ b/tests/remove_net_rotation.prm
@@ -65,5 +65,5 @@ end
 
 
 subsection Postprocess
-  set List of postprocessors = velocity statistics
+  set List of postprocessors = velocity statistics, basic statistics
 end
diff --git a/tests/simple-compressible.prm b/tests/simple-compressible.prm
index 166200c..6b64caa 100644
--- a/tests/simple-compressible.prm
+++ b/tests/simple-compressible.prm
@@ -86,7 +86,7 @@ end
 
 
 subsection Postprocess
-  set List of postprocessors = visualization,velocity statistics,temperature statistics,heat flux statistics, depth average
+  set List of postprocessors = visualization,velocity statistics, basic statistics, temperature statistics,heat flux statistics, depth average
 
 
   subsection Visualization
diff --git a/tests/simple-incompressible.prm b/tests/simple-incompressible.prm
index 254ca8b..daf916c 100644
--- a/tests/simple-incompressible.prm
+++ b/tests/simple-incompressible.prm
@@ -83,7 +83,7 @@ end
 
 
 subsection Postprocess
-  set List of postprocessors = visualization,velocity statistics,temperature statistics,heat flux statistics, depth average
+  set List of postprocessors = visualization,velocity statistics, basic statistics, temperature statistics,heat flux statistics, depth average
 
 
   subsection Visualization
diff --git a/tests/spherical_velocity_statistics.prm b/tests/spherical_velocity_statistics.prm
index 5543b26..93022a9 100644
--- a/tests/spherical_velocity_statistics.prm
+++ b/tests/spherical_velocity_statistics.prm
@@ -101,7 +101,7 @@ subsection Model settings
 end
 
 subsection Postprocess
-  set List of postprocessors = visualization, velocity statistics, temperature statistics, heat flux statistics, depth average, spherical velocity statistics
+  set List of postprocessors = visualization, velocity statistics, basic statistics,  temperature statistics, heat flux statistics, depth average, spherical velocity statistics
 
   subsection Visualization
      set Time between graphical output = 0
diff --git a/tests/steinberger-compressible.prm b/tests/steinberger-compressible.prm
index 33ca2ac..bf7da17 100644
--- a/tests/steinberger-compressible.prm
+++ b/tests/steinberger-compressible.prm
@@ -87,7 +87,7 @@ end
 
 
 subsection Postprocess
-  set List of postprocessors = visualization,velocity statistics,temperature statistics,heat flux statistics, depth average
+  set List of postprocessors = visualization,velocity statistics, basic statistics, temperature statistics,heat flux statistics, depth average
 
 
   subsection Visualization
diff --git a/tests/steinberger-incompressible.prm b/tests/steinberger-incompressible.prm
index 8d2f582..1b308bf 100644
--- a/tests/steinberger-incompressible.prm
+++ b/tests/steinberger-incompressible.prm
@@ -89,7 +89,7 @@ end
 
 
 subsection Postprocess
-  set List of postprocessors = visualization,velocity statistics,temperature statistics,heat flux statistics, depth average
+  set List of postprocessors = visualization,velocity statistics, basic statistics, temperature statistics,heat flux statistics, depth average
 
 
   subsection Visualization
diff --git a/tests/stokes.prm b/tests/stokes.prm
index 5b20c6d..9afb157 100644
--- a/tests/stokes.prm
+++ b/tests/stokes.prm
@@ -134,7 +134,7 @@ end
 # velocity field.
 
 subsection Postprocess
-  set List of postprocessors = visualization, velocity statistics
+  set List of postprocessors = visualization, velocity statistics, basic statistics
 
   subsection Visualization
     set List of output variables = density, viscosity
diff --git a/tests/temperature-dependent-stokes-matrix.prm b/tests/temperature-dependent-stokes-matrix.prm
index f143204..0593469 100644
--- a/tests/temperature-dependent-stokes-matrix.prm
+++ b/tests/temperature-dependent-stokes-matrix.prm
@@ -76,7 +76,7 @@ subsection Model settings
 end
 
 subsection Postprocess
-  set List of postprocessors = visualization, velocity statistics
+  set List of postprocessors = visualization, velocity statistics, basic statistics
 
   subsection Visualization
     set List of output variables = viscosity
diff --git a/tests/velocity_boundary_statistics.prm b/tests/velocity_boundary_statistics.prm
index 05fc8c2..937d9d7 100644
--- a/tests/velocity_boundary_statistics.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, velocity boundary statistics
+  set List of postprocessors = visualization, velocity statistics, basic statistics,  temperature statistics, heat flux statistics, depth average, velocity boundary statistics
 
   subsection Visualization
      set Time between graphical output = 0
diff --git a/tests/velocity_in_years.prm b/tests/velocity_in_years.prm
index d7dbd27..a220eae 100644
--- a/tests/velocity_in_years.prm
+++ b/tests/velocity_in_years.prm
@@ -92,7 +92,7 @@ end
 
 
 subsection Postprocess
-  set List of postprocessors = velocity statistics
+  set List of postprocessors = velocity statistics, basic statistics
 
   subsection Visualization
     set List of output variables = density



More information about the CIG-COMMITS mailing list