diff --git a/MathLib/LinAlg/GlobalMatrixVectorTypes.h b/MathLib/LinAlg/GlobalMatrixVectorTypes.h index 6b91a620c3f4f0ddf59d88e7c0340d27f31a3a65..7f0751d6c35835bf3b39ffc6db4415b23ae730b6 100644 --- a/MathLib/LinAlg/GlobalMatrixVectorTypes.h +++ b/MathLib/LinAlg/GlobalMatrixVectorTypes.h @@ -72,7 +72,16 @@ namespace detail /// A type used for indexing of global vectors and matrices. It is equal to the /// GlobalMatrixType::IndexType and the GlobalVectorType::IndexType. +static_assert(std::is_integral<detail::GlobalMatrixType::IndexType>::value, + "The index type for global matrices is not an integral type."); +static_assert(std::is_integral<detail::GlobalVectorType::IndexType>::value, + "The index type for global vectors is not an integral type."); +static_assert(std::is_same<detail::GlobalMatrixType::IndexType, + detail::GlobalVectorType::IndexType>::value, + "The global matrix and vector index types do not match."); +// Both types are integral types and equal, define a single GlobalIndexType. using GlobalIndexType = detail::GlobalMatrixType::IndexType; + using GlobalSparsityPattern = MathLib::SparsityPattern<GlobalIndexType>; #endif // MATHLIB_LINALG_GLOBALMATRIXVECTORTYPES_H diff --git a/NumLib/NumericsConfig.h b/NumLib/NumericsConfig.h index 19147bd6dfbadc6cecc8cf68eaa064d19459f981..607704beddb6f7644cfc37f443bd017302a5b8a7 100644 --- a/NumLib/NumericsConfig.h +++ b/NumLib/NumericsConfig.h @@ -59,13 +59,5 @@ using GlobalSetupType = // static_assert(std::is_class<GlobalSetupType>::value, "GlobalSetupType was not defined."); -static_assert(std::is_integral<detail::GlobalMatrixType::IndexType>::value, - "The index type for global matrices is not an integral type."); -static_assert(std::is_integral<detail::GlobalVectorType::IndexType>::value, - "The index type for global vectors is not an integral type."); -static_assert(std::is_same<detail::GlobalMatrixType::IndexType, - detail::GlobalVectorType::IndexType>::value, - "The global matrix and vector index types do not match."); -// Both types are integral types and equal, define a single GlobalIndexType. #endif // APPLICATIONS_NUMERICSCONFIG_H_