1#ifndef DUNE_FEM_COMMON_EXPLICITFIELDVECTOR_HH
2#define DUNE_FEM_COMMON_EXPLICITFIELDVECTOR_HH
7#include <dune/common/fmatrix.hh>
8#include <dune/common/fvector.hh>
9#include <dune/common/typeutilities.hh>
19 template<
class T,
int N>
20 class ExplicitFieldVector;
23 template<
class T,
int N>
24 struct DenseMatVecTraits< Fem::ExplicitFieldVector<T, N> >
25 : DenseMatVecTraits<FieldVector<T, N> >
30 template<
class T,
int N>
31 struct FieldTraits<Fem::ExplicitFieldVector<T, N> >
32 : FieldTraits<FieldVector<T, N> >
35 template<
typename T,
int N,
int M>
36 struct IsFieldVectorSizeCorrect<Fem::ExplicitFieldVector<T, N>, M>
37 : IsFieldVectorSizeCorrect<FieldVector<T, N>, M>
45 : std::is_same<typename FieldTraits<T>::field_type, T>
57 template<
class C,
class T,
class SFINAE =
void>
62 template<
class C,
class T>
65 std::enable_if_t<((IsFieldType<typename DenseMatVecTraits<C>::value_type>::value
67 IsFieldType<T>::value)
72 template<
class T,
int N>
74 :
public Dune::FieldVector<T, N>
77 typedef Dune::FieldVector<T, N> BaseType;
87 template<
class... Args, disableCopyMove< ThisType, Args... > = 0, std::enable_if_t< std::is_constructible< BaseType, Args &&... >::value,
int > = 0 >
89 : BaseType(
std::forward< Args >( args )... )
107 typename std::enable_if<(
108 IsFieldVectorSizeCorrect<C, N>::value
120 std::is_assignable<T, C>::value &&
121 ! std::is_base_of<DenseVector<typename FieldTraits<T>::field_type>, T
133 using DenseVector<FieldVector<T, N> >::operator=;
138 static_cast<BaseType&
>(*this) =
static_cast<const BaseType&
>(other);
142 template <typename C, std::enable_if_t<std::is_assignable<T, C>::value,
int> = 0>
145 static_cast<BaseType&
>(*this) = other;
149 template <typename C, std::enable_if_t<std::is_assignable<T, C>::value,
int> = 0>
152 static_cast<BaseType&
>(*this) = other;
164 template<
class Field,
int Size>
Definition: bindguard.hh:11
typename MakeExplicit< FV >::Type Explicit
Definition: explicitfieldvector.hh:171
Definition: explicitfieldvector.hh:75
ExplicitFieldVector & operator=(const ExplicitFieldVector< C, N > &other)
Definition: explicitfieldvector.hh:150
constexpr ExplicitFieldVector()
Constructor making default-initialized vector.
Definition: explicitfieldvector.hh:80
ExplicitFieldVector & operator=(const ExplicitFieldVector &other)
copy assignment operator
Definition: explicitfieldvector.hh:136
ExplicitFieldVector(Args &&... args)
Definition: explicitfieldvector.hh:88
ExplicitFieldVector(const std::initializer_list< T > &values)
Definition: explicitfieldvector.hh:92
ExplicitFieldVector & operator=(const FieldVector< C, N > &other)
Definition: explicitfieldvector.hh:143
ExplicitFieldVector(const DenseVector< C > &x, typename std::enable_if<(IsFieldVectorSizeCorrect< C, N >::value &&AcceptElementImplicitConstruction< C, T >::value) >::type *dummy=0)
Definition: explicitfieldvector.hh:106
Fem::ExplicitFieldVector< T, N > derived_type
Definition: explicitfieldvector.hh:27
Definition: explicitfieldvector.hh:46
Definition: explicitfieldvector.hh:60
Definition: explicitfieldvector.hh:160
FV Type
Definition: explicitfieldvector.hh:161