From c5c62221e5937e5878a41b697465c27e966b37cd Mon Sep 17 00:00:00 2001 From: Simon Praetorius <simon.praetorius@tu-dresden.de> Date: Fri, 3 May 2019 13:29:14 +0200 Subject: [PATCH] improved documentation and add header files to CMakeLists.txt --- src/amdis/common/Access.hpp | 5 ++++- src/amdis/common/CMakeLists.txt | 2 ++ src/amdis/common/HybridSize.hpp | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/amdis/common/Access.hpp b/src/amdis/common/Access.hpp index aab0e55c..202deada 100644 --- a/src/amdis/common/Access.hpp +++ b/src/amdis/common/Access.hpp @@ -32,9 +32,11 @@ namespace AMDiS } // end namespace Definition + /// Vector component can be accessed either with [.] or (.) template <class V, class I> using VectorAccessible_t = bool_t<models<Definition::HasVectorAccess(V, I, Dune::PriorityTag<42>)>>; + /// Matrix component can be accessed either with [.][.] or (.,.) template <class M, class I, class J> using MatrixAccessible_t = bool_t<models<Definition::HasMatrixAccess(M, I, J, Dune::PriorityTag<42>)>>; @@ -42,7 +44,7 @@ namespace AMDiS #ifdef DOXYGEN - /// \brief Uniform vector access using [.] + /// \brief Uniform vector access using [.] or (.) template <class Vector, class I> decltype(auto) access(Vector&& vec, I const& i); @@ -77,6 +79,7 @@ namespace AMDiS } } + // access i'th component of a vector template <class Vector, class I> decltype(auto) access(Vector&& vec, I const& i) { diff --git a/src/amdis/common/CMakeLists.txt b/src/amdis/common/CMakeLists.txt index ebf8a782..8988200e 100644 --- a/src/amdis/common/CMakeLists.txt +++ b/src/amdis/common/CMakeLists.txt @@ -4,6 +4,7 @@ dune_library_add_sources(amdis SOURCES ) install(FILES + Access.hpp Algorithm.hpp Apply.hpp Concepts.hpp @@ -13,6 +14,7 @@ install(FILES FieldMatVec.inc.hpp Filesystem.hpp ForEach.hpp + HybridSize.hpp Index.hpp Literals.hpp Logical.hpp diff --git a/src/amdis/common/HybridSize.hpp b/src/amdis/common/HybridSize.hpp index 720be03e..d26fdba2 100644 --- a/src/amdis/common/HybridSize.hpp +++ b/src/amdis/common/HybridSize.hpp @@ -15,9 +15,11 @@ namespace AMDiS { namespace Concepts { + /// Vector can be accessed with dynamic indices. See \ref VectorAccessible_t template <class V> using DynamicVectorAccessible_t = VectorAccessible_t<V, std::size_t>; + /// Matrix can be accessed with dynamic indices. See \ref MatrixAccessible_t template <class M> using DynamicMatrixAccessible_t = MatrixAccessible_t<M, std::size_t, std::size_t>; -- GitLab