Commit fa6bdcc0 authored by Praetorius, Simon's avatar Praetorius, Simon

Merge branch 'issue/convection_diffusion_bug' into 'develop'

corrected bug in convection-diffusion when assigning a FieldVector<1> to a FieldVector<N>

See merge request spraetor/dune-amdis!75
parents 04e259ab b990f698
Pipeline #1635 passed with stage
in 29 minutes and 2 seconds
......@@ -104,7 +104,7 @@ namespace AMDiS[i][0], gradients[i]);
const auto A = localFctA(local);
WorldVector b; b = localFctB(local);
WorldVector b = makeB(localFctB(local));
const auto c = localFctC(local);
IF_CONSTEXPR(conserving) {
......@@ -194,6 +194,21 @@ namespace AMDiS
[] (auto) { return 0; });
template <class T, int N>
static FieldVector<T,dow> makeB(FieldVector<T,N> const& b) { return b; }
template <class T, int N>
static FieldVector<T,dow> makeB(FieldVector<T,N>&& b) { return std::move(b); }
template <class T>
static FieldVector<T,dow> makeB(FieldVector<T,1> const& b) { return {T(b)}; }
template <class T>
static FieldVector<T,dow> makeB(FieldVector<T,1>&& b) { return {T(b)}; }
template <class T, std::enable_if_t<std::is_arithmetic<T>::value, int> = 0>
static FieldVector<T,dow> makeB(T b) { return {b}; }
GridFctA gridFctA_;
GridFctB gridFctB_;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment