From d46bc04c8005a02460662aaa05c90cdd633b0f9a Mon Sep 17 00:00:00 2001 From: Simon Praetorius <simon.praetorius@tu-dresden.de> Date: Wed, 22 May 2019 13:24:03 +0200 Subject: [PATCH] corrected MR issues --- src/amdis/common/CMakeLists.txt | 1 + src/amdis/common/ConceptsBase.hpp | 5 +++++ src/amdis/gridfunctions/AnalyticGridFunction.hpp | 2 +- src/amdis/gridfunctions/DerivativeGridFunction.hpp | 4 ++-- src/amdis/utility/CMakeLists.txt | 1 + src/amdis/utility/LocalToGlobalAdapter.hpp | 12 ++++++------ 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/amdis/common/CMakeLists.txt b/src/amdis/common/CMakeLists.txt index d71fa706..68394a7e 100644 --- a/src/amdis/common/CMakeLists.txt +++ b/src/amdis/common/CMakeLists.txt @@ -10,6 +10,7 @@ install(FILES Concepts.hpp ConceptsBase.hpp ConcurrentCache.hpp + DerivativeTraits.hpp FakeContainer.hpp FieldMatVec.hpp FieldMatVec.inc.hpp diff --git a/src/amdis/common/ConceptsBase.hpp b/src/amdis/common/ConceptsBase.hpp index aa861501..6716d4cf 100644 --- a/src/amdis/common/ConceptsBase.hpp +++ b/src/amdis/common/ConceptsBase.hpp @@ -3,14 +3,19 @@ #include <type_traits> #include <dune/common/typetraits.hh> +#define AMDIS_CONCAT_IMPL( x, y ) x##y +#define AMDIS_MACRO_CONCAT( x, y ) CONCAT_IMPL( x, y ) + #ifdef DOXYGEN #define REQUIRES(...) #define REQUIRES_(...) #define CONCEPT constexpr + #define CHECK_CONCEPT(...) #else #define REQUIRES(...) std::enable_if_t<__VA_ARGS__ , int> = 0 #define REQUIRES_(...) std::enable_if_t<__VA_ARGS__ , int> #define CONCEPT constexpr + #define CHECK_CONCEPT(...) static __VA_ARGS__ MACRO_CONCAT( _concept_check_, __COUNTER__ ) #endif namespace AMDiS diff --git a/src/amdis/gridfunctions/AnalyticGridFunction.hpp b/src/amdis/gridfunctions/AnalyticGridFunction.hpp index 496c6b19..4e683653 100644 --- a/src/amdis/gridfunctions/AnalyticGridFunction.hpp +++ b/src/amdis/gridfunctions/AnalyticGridFunction.hpp @@ -97,7 +97,7 @@ namespace AMDiS * differentiable, i.e. a free function `partial(fct,_0)` must exist. * * **Requirements:** - * - The functor `F` must fulfill the concept \ref Concepts::HasPartial + * - The functor `F` must fulfill the concept \ref Concepts::HasDerivative **/ template <class R, class D, class LC, class F, class Type> auto derivative(AnalyticLocalFunction<R(D),LC,F> const& lf, Type const& type) diff --git a/src/amdis/gridfunctions/DerivativeGridFunction.hpp b/src/amdis/gridfunctions/DerivativeGridFunction.hpp index eb96d470..f11cf65a 100644 --- a/src/amdis/gridfunctions/DerivativeGridFunction.hpp +++ b/src/amdis/gridfunctions/DerivativeGridFunction.hpp @@ -53,8 +53,8 @@ namespace AMDiS using LocalFctRange = typename Traits::Range; using LocalFctDomain = typename GridFunction::EntitySet::LocalCoordinate; - using _CHECK1_ = Impl::CheckValidRange<Traits>; - using _CHECK2_ = Impl::CheckFunctorConcept<LocalFunction, LocalFctRange(LocalFctDomain)>; + CHECK_CONCEPT(Impl::CheckValidRange<Traits>); + CHECK_CONCEPT(Impl::CheckFunctorConcept<LocalFunction, LocalFctRange(LocalFctDomain)>); enum { hasDerivative = false }; diff --git a/src/amdis/utility/CMakeLists.txt b/src/amdis/utility/CMakeLists.txt index e5d246e1..f9300e39 100644 --- a/src/amdis/utility/CMakeLists.txt +++ b/src/amdis/utility/CMakeLists.txt @@ -1,5 +1,6 @@ install(FILES AssembleOperators.hpp LocalBasisCache.hpp + LocalToGlobalAdapter.hpp QuadratureFactory.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/amdis/utility) diff --git a/src/amdis/utility/LocalToGlobalAdapter.hpp b/src/amdis/utility/LocalToGlobalAdapter.hpp index b0df3522..d91748c8 100644 --- a/src/amdis/utility/LocalToGlobalAdapter.hpp +++ b/src/amdis/utility/LocalToGlobalAdapter.hpp @@ -114,14 +114,14 @@ namespace AMDiS return localBasis_.order() + Traits::dimDomainGlobal - 1; } - /// Evaluate the local basis functions in the local coordinate `in` + /// Evaluate the local basis functions in the local coordinate `x` void evaluateFunction(typename Traits::DomainLocal const& x, std::vector<typename Traits::Range>& out) const { out = localBasisCache_.evaluateFunction(geometry_.type(), x); } - /// Evaluate the local basis functions in the local coordinate `in` and + /// Evaluate the local basis functions in the local coordinate `x` and /// return the result using a reference to a thread_local (or static) vector. auto const& valuesAt(typename Traits::DomainLocal const& x) const { @@ -129,7 +129,7 @@ namespace AMDiS } /// Return the full (global) gradient of the local basis functions in - /// the local coordinate `in` + /// the local coordinate `x` void evaluateGradient(typename Traits::DomainLocal const& x, std::vector<typename Traits::GradientRange>& out) const { @@ -143,7 +143,7 @@ namespace AMDiS } /// Return the full (global) gradient of the local basis functions in - /// the local coordinate `in` and return the result using a reference + /// the local coordinate `x` and return the result using a reference /// to a thread_local (or static) vector. auto const& gradientsAt(typename Traits::DomainLocal const& x) const { @@ -153,7 +153,7 @@ namespace AMDiS } /// Return the (global) partial derivative in direction `comp` of the - /// local basis functions in the local coordinate `in` + /// local basis functions in the local coordinate `x` void evaluatePartial(typename Traits::DomainLocal const& x, std::size_t comp, std::vector<typename Traits::PartialRange>& out) const @@ -172,7 +172,7 @@ namespace AMDiS } /// Return the (global) partial derivative in direction `comp` of the - /// local basis functions in the local coordinate `in` and return the + /// local basis functions in the local coordinate `x` and return the /// result using a reference to a thread_local (or static) vector. auto const& partialsAt(typename Traits::DomainLocal const& x, std::size_t comp) const { -- GitLab