[cig-commits] [commit] master: Minor changes (9c66324)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Thu May 22 15:35:35 PDT 2014
Repository : https://github.com/geodynamics/aspect
On branch : master
Link : https://github.com/geodynamics/aspect/compare/4a5e27e5690a0e0c1e13e19100af7398e37f36b8...d31f4e9435a1c12781f5b673b672cbd29c41c2c2
>---------------------------------------------------------------
commit 9c663249358c2f47ffb822b54fd366f8155c7b56
Author: Siqi Zhang <siqi.zhang at mq.edu.au>
Date: Wed May 21 23:28:53 2014 -0500
Minor changes
Fix typos and naming
>---------------------------------------------------------------
9c663249358c2f47ffb822b54fd366f8155c7b56
include/aspect/heating_model/radioactive_decay.h | 8 ++---
source/heating_model/radioactive_decay.cc | 42 ++++++++++-------------
source/postprocess/internal_heating_statistics.cc | 6 ++--
3 files changed, 26 insertions(+), 30 deletions(-)
diff --git a/include/aspect/heating_model/radioactive_decay.h b/include/aspect/heating_model/radioactive_decay.h
index 93414d0..efc56d8 100644
--- a/include/aspect/heating_model/radioactive_decay.h
+++ b/include/aspect/heating_model/radioactive_decay.h
@@ -40,13 +40,13 @@ namespace aspect
* @ingroup HeatingModels
*/
template <int dim>
- class Radioactive_decay : public Interface<dim>, public SimulatorAccess<dim>
+ class RadioactiveDecay : public Interface<dim>, public SimulatorAccess<dim>
{
public:
/**
* Constructor.
*/
- Radioactive_decay ();
+ RadioactiveDecay ();
/**
* Return the specific heating rate as calculated by
@@ -106,12 +106,12 @@ namespace aspect
/**
* Store the initial consentration in the crust.
*/
- std::vector<double> radioactive_initial_consentration_crust;
+ std::vector<double> radioactive_initial_concentration_crust;
/**
* Store the initial consentration in the mantle.
*/
- std::vector<double> radioactive_initial_consentration_mantle;
+ std::vector<double> radioactive_initial_concentration_mantle;
/**
* Whether crust defined by composition or depth
diff --git a/source/heating_model/radioactive_decay.cc b/source/heating_model/radioactive_decay.cc
index b31877f..8768e1b 100644
--- a/source/heating_model/radioactive_decay.cc
+++ b/source/heating_model/radioactive_decay.cc
@@ -20,7 +20,7 @@
/* $Id$ */
-#include <aspect/heating_model/radioactive_decay.h>
+#include <aspect/heating_model/Radioactive_decay.h>
#include <aspect/geometry_model/interface.h>
#include <aspect/global.h>
@@ -29,14 +29,14 @@ namespace aspect
namespace HeatingModel
{
template <int dim>
- Radioactive_decay<dim>::Radioactive_decay ()
+ RadioactiveDecay<dim>::RadioactiveDecay ()
{}
template <int dim>
double
- Radioactive_decay<dim>::
+ RadioactiveDecay<dim>::
specific_heating_rate (const double,
const double,
const std::vector<double> &composition,
@@ -61,8 +61,7 @@ namespace aspect
for(unsigned i_radio=0;i_radio<n_radio_heating_elements;i_radio++)
timedependent_radioactive_heating_rate+=
radioactive_heating_rate[i_radio]
- *(radioactive_initial_consentration_mantle[i_radio]*(1-crust_percent)
- +radioactive_initial_consentration_crust[i_radio]*crust_percent)*1e-6
+ *(radioactive_initial_concentration_mantle[i_radio]*(1-crust_percent)
*std::pow(0.5,time/half_decay_time[i_radio]);
}
return (timedependent_radioactive_heating_rate);
@@ -71,7 +70,7 @@ namespace aspect
template <int dim>
void
- Radioactive_decay<dim>::update ()
+ RadioactiveDecay<dim>::update ()
{
time = this->get_time();
// we get time passed as seconds (always) but may want
@@ -83,7 +82,7 @@ namespace aspect
template <int dim>
void
- Radioactive_decay<dim>::declare_parameters (ParameterHandler &prm)
+ RadioactiveDecay<dim>::declare_parameters (ParameterHandler &prm)
{
prm.enter_subsection("Heating model");
{
@@ -124,7 +123,7 @@ namespace aspect
template <int dim>
void
- Radioactive_decay<dim>::parse_parameters (ParameterHandler &prm)
+ RadioactiveDecay<dim>::parse_parameters (ParameterHandler &prm)
{
prm.enter_subsection("Heating model");
{
@@ -146,18 +145,14 @@ namespace aspect
ExcMessage("Number of half decay time entities does not match "
"the number of radioactive elements."));
- radioactive_initial_consentration_crust=Utilities::string_to_double
- (Utilities::split_string_list
+ radioactive_initial_concentration_crust=Utilities::string_to_double
(prm.get("Initial concentration crust")));
- AssertThrow(radioactive_initial_consentration_crust.size()==n_radio_heating_elements,
- ExcMessage("Number of initial concentration entities does not match "
+ AssertThrow(radioactive_initial_concentration_crust.size()==n_radio_heating_elements,
"the number of radioactive elements."));
- radioactive_initial_consentration_mantle=Utilities::string_to_double
- (Utilities::split_string_list
+ radioactive_initial_concentration_mantle=Utilities::string_to_double
(prm.get("Initial concentration mantle")));
- AssertThrow(radioactive_initial_consentration_mantle.size()==n_radio_heating_elements,
- ExcMessage("Number of initial concentration entities does not match "
+ AssertThrow(radioactive_initial_concentration_mantle.size()==n_radio_heating_elements,
"the number of radioactive elements."));
is_crust_defined_by_composition = prm.get_bool ("Crust defined by composition");
@@ -177,13 +172,14 @@ namespace aspect
{
namespace HeatingModel
{
- ASPECT_REGISTER_HEATING_MODEL(Radioactive_decay,
- "radioactive decay",
- "Implementation of a model in which the heating "
- "rate is decaying exponentially over time \n"
- "The formula is interpreted as having units "
- "W/kg."
- "\n\n")
+ ASPECT_REGISTER_HEATING_MODEL(RadioactiveDecay,
+ "radioactive decay",
+ "Implementation of a model in which the heating "
+ "rate is decaying exponentially over time \n"
+ "The formula is interpreted as having units "
+ "W/kg."
+ "\n\n")
}
}
+
\ No newline at end of file
diff --git a/source/postprocess/internal_heating_statistics.cc b/source/postprocess/internal_heating_statistics.cc
index 472fb02..1f4dfde 100644
--- a/source/postprocess/internal_heating_statistics.cc
+++ b/source/postprocess/internal_heating_statistics.cc
@@ -101,7 +101,7 @@ namespace aspect
double global_volume=global_value[1];
// finally produce something for the statistics file
- const std::string name("Average radioactive heating rate (W/kg) ");
+ const std::string name("Average internal heating rate (W/kg) ");
statistics.add_value (name, global_internal_heating_integrals/global_volume);
// also make sure that the other columns filled by the this object
@@ -112,9 +112,9 @@ namespace aspect
std::ostringstream output;
output.precision(4);
- output << global_internal_heating_integrals/global_volume << " (W//kg) ";
+ output << global_internal_heating_integrals/global_volume << " (W/kg) ";
- return std::pair<std::string, std::string> ("Average radioactive heating rate: ",
+ return std::pair<std::string, std::string> ("Average internal heating rate: ",
output.str());
}
}
More information about the CIG-COMMITS
mailing list