![]() |
Dune-Functions 2.12-git
|
Loading...
Searching...
No Matches
istlvectorbackend.hh
Go to the documentation of this file.
122 using hasDynamicIndexAccess = Dune::Std::is_detected<dynamicIndexAccess_t, std::remove_reference_t<C>>;
125 using hasStaticIndexAccess = Dune::Std::is_detected<staticIndexAccess_t, std::remove_reference_t<C>>;
131 using isDynamicVector = Dune::Std::is_detected<dynamicIndexAccess_t, std::remove_reference_t<C>>;
139 using isScalar = std::bool_constant<(not Dune::Std::is_detected_v<staticIndexAccess_t, std::remove_reference_t<C>>) or Dune::IsNumber<C>::value>;
142 using isVector = std::bool_constant<Dune::Std::is_detected_v<staticIndexAccess_t, std::remove_reference_t<C>>>;
155 static void resize(C&& c, const SizeProvider& sizeProvider, typename SizeProvider::SizePrefix prefix)
190 static void resize(C&& c, const SizeProvider& sizeProvider, typename SizeProvider::SizePrefix prefix)
208 DUNE_THROW(RangeError, "Can't resize non-resizable entry v[" << prefix << "] of size " << c.size() << " to size(" << prefix << ")=" << size);
228 static void resize(C&&, const SizeProvider& sizeProvider, typename SizeProvider::SizePrefix prefix)
232 DUNE_THROW(RangeError, "Can't resize scalar vector entry v[" << prefix << "] to size(" << prefix << ")=" << size);
auto istlVectorBackend(Vector &v)
Return a vector backend wrapping non-const ISTL like containers.
Definition istlvectorbackend.hh:352
constexpr decltype(auto) resolveDynamicMultiIndex(C &&c, const MultiIndex &multiIndex, const IsFinal &isFinal)
Provide multi-index access by chaining operator[].
Definition indexaccess.hh:386
constexpr auto fieldTypes()
Generate list of field types in container.
Definition istlvectorbackend.hh:67
constexpr bool hasUniqueFieldType()
Check if container has a unique field type.
Definition istlvectorbackend.hh:78
std::vector< Child > Vector
Descriptor for vectors with all children of the same type and dynamic size.
Definition containerdescriptors.hh:112
int size() const
static constexpr IntegralRange< std::decay_t< T > > range(T &&from, U &&to) noexcept
decltype(auto) constexpr unpackIntegerSequence(F &&f, std::integer_sequence< I, i... > sequence)
constexpr auto size(const T &t)
constexpr void forEach(Range &&range, F &&f)
constexpr auto integralRange(const Begin &begin, const End &end)
typename detected_or< nonesuch, Op, Args... >::value_t is_detected
std::ptrdiff_t index() const
#define DUNE_THROW(E,...)
constexpr auto uniqueTypeList(TypeList< T... >)
constexpr index_constant< 0 > _0
T tuple_cat(T... args)
