#define dealii__fe_poly_tensor_h
+#include <deal.II/base/config.h>
#include <deal.II/lac/full_matrix.h>
#include <deal.II/fe/fe.h>
#include <deal.II/base/derivative_form.h>
#include <deal.II/base/quadrature.h>
+#include <deal.II/base/thread_management.h>
+
DEAL_II_NAMESPACE_OPEN
*/
FullMatrix<double> inverse_node_matrix;
+ /**
+ * A mutex to be used to guard access to the variables below.
+ */
+ mutable Threads::Mutex cache_mutex;
+
/**
* If a shape function is computed at a single point, we must compute all of
* them to apply #inverse_node_matrix. In order to avoid too much overhead,
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
Assert (component < dim, ExcIndexRange (component, 0, dim));
+ Threads::Mutex::ScopedLock lock (cache_mutex);
+
if (cached_point != p || cached_values.size() == 0)
{
cached_point = p;
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
Assert (component < dim, ExcIndexRange (component, 0, dim));
+ Threads::Mutex::ScopedLock lock (cache_mutex);
+
if (cached_point != p || cached_grads.size() == 0)
{
cached_point = p;
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
Assert (component < dim, ExcIndexRange (component, 0, dim));
+ Threads::Mutex::ScopedLock lock (cache_mutex);
+
if (cached_point != p || cached_grad_grads.size() == 0)
{
cached_point = p;