From eff4f975f7e6727baae813b2458b1e7725159c1b Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 9 Jan 2020 17:44:46 -0500 Subject: [PATCH] Fix external declaration of Tensor::n_independent_components --- include/deal.II/base/tensor.h | 7 +++++++ source/base/tensor.cc | 9 --------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index 12060b444e..2351334fb9 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -1065,6 +1065,9 @@ Tensor<0, dim, Number>::serialize(Archive &ar, const unsigned int) } +template +constexpr unsigned int Tensor<0, dim, Number>::n_independent_components; + /*-------------------- Inline functions: Tensor --------------------*/ @@ -1567,6 +1570,10 @@ Tensor::serialize(Archive &ar, const unsigned int) } +template +constexpr unsigned int Tensor::n_independent_components; + + /* ----------------- Non-member functions operating on tensors. ------------ */ /** diff --git a/source/base/tensor.cc b/source/base/tensor.cc index eb5a8d7233..7ed01375a8 100644 --- a/source/base/tensor.cc +++ b/source/base/tensor.cc @@ -24,15 +24,6 @@ DEAL_II_NAMESPACE_OPEN - -template -constexpr unsigned int Tensor<0, dim, Number>::n_independent_components; - -template -constexpr unsigned int Tensor::n_independent_components; - - #include "tensor.inst" - DEAL_II_NAMESPACE_CLOSE -- 2.39.5