Skip to content
Snippets Groups Projects
Commit edee52fb authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[MaL] Move GlobalIndexType asserts.

parent df79a51c
No related branches found
No related tags found
No related merge requests found
......@@ -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
......@@ -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_
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment