[cig-commits] [commit] master: fix temperature postprocessor (4d91c92)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Mon May 19 20:13:32 PDT 2014
Repository : https://github.com/geodynamics/aspect
On branch : master
Link : https://github.com/geodynamics/aspect/compare/76d4275352ef2cae5de9a073acd1c03a92c2670c...4f3d06fd1f3754419813db37ec9ef7f0f6f3cb15
>---------------------------------------------------------------
commit 4d91c92c572ea5aa441c63a411d5a1f1c588bacb
Author: Timo Heister <timo.heister at gmail.com>
Date: Mon May 12 17:33:58 2014 -0400
fix temperature postprocessor
>---------------------------------------------------------------
4d91c92c572ea5aa441c63a411d5a1f1c588bacb
source/postprocess/temperature_statistics.cc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/source/postprocess/temperature_statistics.cc b/source/postprocess/temperature_statistics.cc
index bd91404..3cb8a85 100644
--- a/source/postprocess/temperature_statistics.cc
+++ b/source/postprocess/temperature_statistics.cc
@@ -81,11 +81,12 @@ namespace aspect
// picture of their true values
double local_min_temperature = std::numeric_limits<double>::max();
double local_max_temperature = -std::numeric_limits<double>::max();
- IndexSet range = this->get_solution().block(2).locally_owned_elements();
+ const unsigned int blockidx = this->introspection().block_indices.temperature;
+ IndexSet range = this->get_solution().block(blockidx).locally_owned_elements();
for (unsigned int i=0; i<range.n_elements(); ++i)
{
const unsigned int idx = range.nth_index_in_set(i);
- const double val = this->get_solution().block(2)(idx);
+ const double val = this->get_solution().block(blockidx)(idx);
local_min_temperature = std::min<double> (local_min_temperature, val);
local_max_temperature = std::max<double> (local_max_temperature, val);
More information about the CIG-COMMITS
mailing list