[cig-commits] [commit] master: Viscosity is now only called if adiabatic conditions is available. No need to check for that in function any more. (a7570ef)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed May 21 14:02:55 PDT 2014
Repository : https://github.com/geodynamics/aspect
On branch : master
Link : https://github.com/geodynamics/aspect/compare/a7135c1f7697d39efff2f47a79ca1e1395cff504...73a71ba37f203bfed63bb8b602fdbd30ab99b1af
>---------------------------------------------------------------
commit a7570efa41f4ec033bd0faddb771c2820f93fc15
Author: Rene Gassmoeller <R.Gassmoeller at mailbox.org>
Date: Mon May 19 16:06:45 2014 -0500
Viscosity is now only called if adiabatic conditions is available. No need to check for that in function any more.
>---------------------------------------------------------------
a7570efa41f4ec033bd0faddb771c2820f93fc15
source/material_model/steinberger.cc | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/source/material_model/steinberger.cc b/source/material_model/steinberger.cc
index 32f2923..7cf1116 100644
--- a/source/material_model/steinberger.cc
+++ b/source/material_model/steinberger.cc
@@ -445,20 +445,11 @@ namespace aspect
{
const double depth = this->get_geometry_model().depth(position);
- double vis_lateral;
-
- if (&this->get_adiabatic_conditions())
- {
- const unsigned int idx = static_cast<unsigned int>(avg_temp.size() * depth / this->get_geometry_model().maximal_depth());
- const double delta_temp = temperature-avg_temp[idx];
- const double adia_temp = this->get_adiabatic_conditions().temperature(position);
- const double vis_lateral_exp = -1.0*lateral_viscosity_lookup->lateral_viscosity(depth)*delta_temp/(temperature*adia_temp);
- vis_lateral = std::max(std::min(std::exp(vis_lateral_exp),1e2),1e-2);
- }
- else
- // The adiabatic conditions are not there yet. This means we are currently creating them.
- // Assume we are at an adiabatic temperature.
- vis_lateral = 1;
+ const unsigned int idx = static_cast<unsigned int>(avg_temp.size() * depth / this->get_geometry_model().maximal_depth());
+ const double delta_temp = temperature-avg_temp[idx];
+ const double adia_temp = this->get_adiabatic_conditions().temperature(position);
+ const double vis_lateral_exp = -1.0*lateral_viscosity_lookup->lateral_viscosity(depth)*delta_temp/(temperature*adia_temp);
+ const double vis_lateral = std::max(std::min(std::exp(vis_lateral_exp),1e2),1e-2);
const double vis_radial = radial_viscosity_lookup->radial_viscosity(depth);
More information about the CIG-COMMITS
mailing list