Commit 3c951ef9 authored by Jakub Both's avatar Jakub Both

Exchange FieldVector<FieldVector<...>> with FieldMatrix as derivative type.

parent 94f460d4
Pipeline #3354 passed with stage
in 18 minutes and 35 seconds
...@@ -24,7 +24,7 @@ struct FunctionRange<D, R, ...@@ -24,7 +24,7 @@ struct FunctionRange<D, R,
using Domain = D; using Domain = D;
using Range = R; using Range = R;
using RangeField = typename Range::value_type; using RangeField = typename Range::value_type;
using JacobianRange = FieldVector< FieldVector<RangeField, Domain::dimension>, Range::dimension>; using JacobianRange = FieldMatrix<RangeField, Range::dimension, Domain::dimension>;
}; };
template<typename D, typename R> template<typename D, typename R>
......
...@@ -75,30 +75,6 @@ struct FlatVectorBackend<typename Dune::FieldMatrix<K, n, m> > ...@@ -75,30 +75,6 @@ struct FlatVectorBackend<typename Dune::FieldMatrix<K, n, m> >
}; };
template<class K, int n, int m>
struct FlatVectorBackend<typename Dune::FieldVector< typename Dune::FieldVector<K, n>, m> >
{
// Note: The ordering of first and second index is reverse compared to the FieldMatrix
// specialization. This is due to definition of the JacobianRange functionrange.hh.
template<class VV, class Index>
static auto getEntry(VV&& v, const Index& i) -> decltype(v[i%m][i/m])
{
return v[i%m][i/m];
}
template<class VV>
static std::size_t size(VV&& v)
{
auto size = 0;
for (std::size_t i=0; i<v.size(); ++i)
size += v[i].size();
return size;
}
};
} // namespace Dune::Functions } // namespace Dune::Functions
} // namespace Dune } // namespace Dune
......
...@@ -82,7 +82,6 @@ public: ...@@ -82,7 +82,6 @@ public:
using Domain = typename EntitySet::GlobalCoordinate; using Domain = typename EntitySet::GlobalCoordinate;
using Range = R; using Range = R;
using RangeField = typename FunctionRange<Domain,Range>::RangeField;
using JacobianRange = typename FunctionRange<Domain,Range>::JacobianRange; using JacobianRange = typename FunctionRange<Domain,Range>::JacobianRange;
using LocalDomain = typename EntitySet::LocalCoordinate; using LocalDomain = typename EntitySet::LocalCoordinate;
......
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