private:
ScratchData<number> *my_scratch_data;
};
-
- /**
- * The actual data object that contains a scratch data for each thread.
- */
- static Threads::ThreadLocalStorage<ScratchData<number>> scratch_data;
};
const size_type n_local_dofs = local_dof_indices.size();
- typename internal::AffineConstraints::AffineConstraintsData<number>::
- ScratchDataAccessor scratch_data(
- internal::AffineConstraints::AffineConstraintsData<number>::scratch_data);
+ typename internal::AffineConstraints::AffineConstraintsData<
+ number>::ScratchDataAccessor scratch_data(this->scratch_data);
internal::AffineConstraints::GlobalRowsFromLocal<number> &global_rows =
scratch_data->global_rows;
}
Assert(sorted == true, ExcMatrixNotClosed());
- typename internal::AffineConstraints::AffineConstraintsData<number>::
- ScratchDataAccessor scratch_data(
- internal::AffineConstraints::AffineConstraintsData<number>::scratch_data);
+ typename internal::AffineConstraints::AffineConstraintsData<
+ number>::ScratchDataAccessor scratch_data(this->scratch_data);
const size_type n_local_dofs = local_dof_indices.size();
internal::AffineConstraints::GlobalRowsFromLocal<number> &global_rows =
typename internal::AffineConstraints::AffineConstraintsData<
typename MatrixType::value_type>::ScratchDataAccessor
- scratch_data(
- internal::AffineConstraints::AffineConstraintsData<number>::scratch_data);
+ scratch_data(this->scratch_data);
internal::AffineConstraints::GlobalRowsFromLocal<number> &global_rows =
scratch_data->global_rows;
ExcNotQuadratic());
const size_type n_local_dofs = local_dof_indices.size();
- typename internal::AffineConstraints::AffineConstraintsData<number>::
- ScratchDataAccessor scratch_data(
- internal::AffineConstraints::AffineConstraintsData<number>::scratch_data);
+ typename internal::AffineConstraints::AffineConstraintsData<
+ number>::ScratchDataAccessor scratch_data(this->scratch_data);
const bool dof_mask_is_active = (dof_mask.n_rows() == n_local_dofs);
if (dof_mask_is_active == true)
const size_type n_local_dofs = local_dof_indices.size();
const size_type num_blocks = sparsity_pattern.n_block_rows();
- typename internal::AffineConstraints::AffineConstraintsData<number>::
- ScratchDataAccessor scratch_data(
- internal::AffineConstraints::AffineConstraintsData<number>::scratch_data);
+ typename internal::AffineConstraints::AffineConstraintsData<
+ number>::ScratchDataAccessor scratch_data(this->scratch_data);
const bool dof_mask_is_active = (dof_mask.n_rows() == n_local_dofs);
if (dof_mask_is_active == true)
# endif
#endif
-/*
- * Allocate scratch data.
- *
- * We cannot use the generic template instantiation because we need to
- * provide an initializer object of type
- * internals::AffineConstraintsData<Number> that can be passed to the
- * constructor of scratch_data (it won't allow one to be constructed in
- * place).
- */
-
-namespace internal
-{
- namespace AffineConstraints
- {
-#define SCRATCH_INITIALIZER(number, Name) \
- ScratchData<number> scratch_data_initializer_##Name; \
- template <> \
- Threads::ThreadLocalStorage<ScratchData<number>> \
- AffineConstraintsData<number>::scratch_data( \
- scratch_data_initializer_##Name)
-
- SCRATCH_INITIALIZER(double, d);
- SCRATCH_INITIALIZER(float, f);
-#ifdef DEAL_II_WITH_COMPLEX_VALUES
- SCRATCH_INITIALIZER(std::complex<double>, cd);
- SCRATCH_INITIALIZER(std::complex<float>, cf);
-#endif
-#undef SCRATCH_INITIALIZER
- } // namespace AffineConstraints
-} // namespace internal
-
DEAL_II_NAMESPACE_CLOSE