Skip to content
Snippets Groups Projects
Commit d46bc04c authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

corrected MR issues

parent 18b54d5b
No related branches found
No related tags found
1 merge request!58Add generalized derivative and local-to-global adapter to handle the global derivatives uniformly
...@@ -10,6 +10,7 @@ install(FILES ...@@ -10,6 +10,7 @@ install(FILES
Concepts.hpp Concepts.hpp
ConceptsBase.hpp ConceptsBase.hpp
ConcurrentCache.hpp ConcurrentCache.hpp
DerivativeTraits.hpp
FakeContainer.hpp FakeContainer.hpp
FieldMatVec.hpp FieldMatVec.hpp
FieldMatVec.inc.hpp FieldMatVec.inc.hpp
......
...@@ -3,14 +3,19 @@ ...@@ -3,14 +3,19 @@
#include <type_traits> #include <type_traits>
#include <dune/common/typetraits.hh> #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 #ifdef DOXYGEN
#define REQUIRES(...) #define REQUIRES(...)
#define REQUIRES_(...) #define REQUIRES_(...)
#define CONCEPT constexpr #define CONCEPT constexpr
#define CHECK_CONCEPT(...)
#else #else
#define REQUIRES(...) std::enable_if_t<__VA_ARGS__ , int> = 0 #define REQUIRES(...) std::enable_if_t<__VA_ARGS__ , int> = 0
#define REQUIRES_(...) std::enable_if_t<__VA_ARGS__ , int> #define REQUIRES_(...) std::enable_if_t<__VA_ARGS__ , int>
#define CONCEPT constexpr #define CONCEPT constexpr
#define CHECK_CONCEPT(...) static __VA_ARGS__ MACRO_CONCAT( _concept_check_, __COUNTER__ )
#endif #endif
namespace AMDiS namespace AMDiS
......
...@@ -97,7 +97,7 @@ namespace AMDiS ...@@ -97,7 +97,7 @@ namespace AMDiS
* differentiable, i.e. a free function `partial(fct,_0)` must exist. * differentiable, i.e. a free function `partial(fct,_0)` must exist.
* *
* **Requirements:** * **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> template <class R, class D, class LC, class F, class Type>
auto derivative(AnalyticLocalFunction<R(D),LC,F> const& lf, Type const& type) auto derivative(AnalyticLocalFunction<R(D),LC,F> const& lf, Type const& type)
......
...@@ -53,8 +53,8 @@ namespace AMDiS ...@@ -53,8 +53,8 @@ namespace AMDiS
using LocalFctRange = typename Traits::Range; using LocalFctRange = typename Traits::Range;
using LocalFctDomain = typename GridFunction::EntitySet::LocalCoordinate; using LocalFctDomain = typename GridFunction::EntitySet::LocalCoordinate;
using _CHECK1_ = Impl::CheckValidRange<Traits>; CHECK_CONCEPT(Impl::CheckValidRange<Traits>);
using _CHECK2_ = Impl::CheckFunctorConcept<LocalFunction, LocalFctRange(LocalFctDomain)>; CHECK_CONCEPT(Impl::CheckFunctorConcept<LocalFunction, LocalFctRange(LocalFctDomain)>);
enum { hasDerivative = false }; enum { hasDerivative = false };
......
install(FILES install(FILES
AssembleOperators.hpp AssembleOperators.hpp
LocalBasisCache.hpp LocalBasisCache.hpp
LocalToGlobalAdapter.hpp
QuadratureFactory.hpp QuadratureFactory.hpp
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/amdis/utility) DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/amdis/utility)
...@@ -114,14 +114,14 @@ namespace AMDiS ...@@ -114,14 +114,14 @@ namespace AMDiS
return localBasis_.order() + Traits::dimDomainGlobal - 1; 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, void evaluateFunction(typename Traits::DomainLocal const& x,
std::vector<typename Traits::Range>& out) const std::vector<typename Traits::Range>& out) const
{ {
out = localBasisCache_.evaluateFunction(geometry_.type(), x); 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. /// return the result using a reference to a thread_local (or static) vector.
auto const& valuesAt(typename Traits::DomainLocal const& x) const auto const& valuesAt(typename Traits::DomainLocal const& x) const
{ {
...@@ -129,7 +129,7 @@ namespace AMDiS ...@@ -129,7 +129,7 @@ namespace AMDiS
} }
/// Return the full (global) gradient of the local basis functions in /// 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, void evaluateGradient(typename Traits::DomainLocal const& x,
std::vector<typename Traits::GradientRange>& out) const std::vector<typename Traits::GradientRange>& out) const
{ {
...@@ -143,7 +143,7 @@ namespace AMDiS ...@@ -143,7 +143,7 @@ namespace AMDiS
} }
/// Return the full (global) gradient of the local basis functions in /// 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. /// to a thread_local (or static) vector.
auto const& gradientsAt(typename Traits::DomainLocal const& x) const auto const& gradientsAt(typename Traits::DomainLocal const& x) const
{ {
...@@ -153,7 +153,7 @@ namespace AMDiS ...@@ -153,7 +153,7 @@ namespace AMDiS
} }
/// Return the (global) partial derivative in direction `comp` of the /// 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, void evaluatePartial(typename Traits::DomainLocal const& x,
std::size_t comp, std::size_t comp,
std::vector<typename Traits::PartialRange>& out) const std::vector<typename Traits::PartialRange>& out) const
...@@ -172,7 +172,7 @@ namespace AMDiS ...@@ -172,7 +172,7 @@ namespace AMDiS
} }
/// Return the (global) partial derivative in direction `comp` of the /// 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. /// result using a reference to a thread_local (or static) vector.
auto const& partialsAt(typename Traits::DomainLocal const& x, std::size_t comp) const auto const& partialsAt(typename Traits::DomainLocal const& x, std::size_t comp) const
{ {
......
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