From 2d0755e1918bed5bd82a7bdb8b478487cac1df3a Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <dmitri.naumov@ufz.de>
Date: Wed, 21 Feb 2018 17:50:54 +0100
Subject: [PATCH] [PL] CachedSecondaryVars: Fix PETScVector access.

---
 ProcessLib/Output/CachedSecondaryVariable.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ProcessLib/Output/CachedSecondaryVariable.cpp b/ProcessLib/Output/CachedSecondaryVariable.cpp
index c511a3737f6..f2413cb7c1f 100644
--- a/ProcessLib/Output/CachedSecondaryVariable.cpp
+++ b/ProcessLib/Output/CachedSecondaryVariable.cpp
@@ -68,6 +68,9 @@ GlobalVector const& CachedSecondaryVariable::evalFieldNoArgs() const
         1, *_extrapolatables, _t, *_current_solution, *_dof_table);
     auto const& nodal_values = _extrapolator.getNodalValues();
     MathLib::LinAlg::copy(nodal_values, _cached_nodal_values);
+
+    MathLib::LinAlg::setLocalAccessibleVector(
+        _cached_nodal_values);  // For access in the getValue()
     _needs_recomputation = false;
     return nodal_values;
 }
-- 
GitLab