dune-fem 2.12-git
Loading...
Searching...
No Matches
Dune::Fem::ExplicitFieldVector< T, N > Class Template Reference

#include <dune/fem/common/explicitfieldvector.hh>

Inheritance diagram for Dune::Fem::ExplicitFieldVector< T, N >:
Inheritance graph

Public Types

typedef typename Base::size_type size_type
 
typedef typename Base::value_type value_type
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef Traits::derived_type derived_type
 
typedef FieldTraits< value_type >::field_type field_type
 
typedef Traits::value_type block_type
 
typedef DenseIterator< DenseVector, value_typeIterator
 
typedef Iterator iterator
 
typedef DenseIterator< const DenseVector, const value_typeConstIterator
 
typedef ConstIterator const_iterator
 

Public Member Functions

constexpr ExplicitFieldVector ()
 Constructor making default-initialized vector.
 
template<class... Args, disableCopyMove< ThisType, Args... > = 0, std::enable_if_t< std::is_constructible< BaseType, Args &&... >::value, int > = 0>
 ExplicitFieldVector (Args &&... args)
 
 ExplicitFieldVector (const std::initializer_list< T > &values)
 
template<class C >
 ExplicitFieldVector (const DenseVector< C > &x, typename std::enable_if<(IsFieldVectorSizeCorrect< C, N >::value &&AcceptElementImplicitConstruction< C, T >::value) >::type *dummy=0)
 
template<typename C , std::enable_if_t<(N==1 &&AcceptElementImplicitConstruction< C, T >::value &&std::is_assignable< T, C >::value &&! std::is_base_of< DenseVector< typename FieldTraits< T >::field_type >, T >::value), int > = 0>
ExplicitFieldVectoroperator= (const C &c)
 Assignment operator for scalar.
 
ExplicitFieldVectoroperator= (const ExplicitFieldVector &other)
 copy assignment operator
 
template<typename C , std::enable_if_t< std::is_assignable< T, C >::value, int > = 0>
ExplicitFieldVectoroperator= (const FieldVector< C, N > &other)
 
template<typename C , std::enable_if_t< std::is_assignable< T, C >::value, int > = 0>
ExplicitFieldVectoroperator= (const ExplicitFieldVector< C, N > &other)
 
 explicit (SIZE !=1) const expr FieldVector(const value_type &value) noexcept
 
 explicit (SIZE !=1) const expr FieldVector(const S &scalar) noexcept(std::is_nothrow_constructible_v< K, S >)
 
constexpr value_typefront ()
 
constexpr const value_typefront () const
 
constexpr value_typeback ()
 
constexpr const value_typeback () const
 
constexpr bool empty () const
 
constexpr size_type size () const
 
constexpr Iterator begin ()
 
constexpr ConstIterator begin () const
 
constexpr Iterator end ()
 
constexpr ConstIterator end () const
 
constexpr Iterator beforeEnd ()
 
constexpr ConstIterator beforeEnd () const
 
constexpr Iterator beforeBegin ()
 
constexpr ConstIterator beforeBegin () const
 
constexpr Iterator find (size_type i)
 
constexpr ConstIterator find (size_type i) const
 
constexpr Iterator find (size_type i)
 
constexpr ConstIterator find (size_type i) const
 
constexpr derived_typeoperator+= (const DenseVector< Other > &x)
 
constexpr std::enable_if< std::is_convertible< ValueType, value_type >::value, derived_type >::type & operator+= (const ValueType &kk)
 
constexpr derived_typeoperator-= (const DenseVector< Other > &x)
 
constexpr std::enable_if< std::is_convertible< ValueType, value_type >::value, derived_type >::type & operator-= (const ValueType &kk)
 
constexpr derived_type operator+ (const DenseVector< Other > &b) const
 
constexpr derived_type operator- (const DenseVector< Other > &b) const
 
constexpr derived_type operator- () const
 
constexpr std::enable_if< std::is_convertible< FieldType, field_type >::value, derived_type >::type & operator*= (const FieldType &kk)
 
constexpr std::enable_if< std::is_convertible< FieldType, field_type >::value, derived_type >::type & operator/= (const FieldType &kk)
 
constexpr bool operator== (const DenseVector< Other > &x) const
 
constexpr bool operator!= (const DenseVector< Other > &x) const
 
constexpr derived_typeaxpy (const field_type &a, const DenseVector< Other > &x)
 
constexpr PromotionTraits< field_type, typenameDenseVector< Other >::field_type >::PromotedType operator* (const DenseVector< Other > &x) const
 
constexpr PromotionTraits< field_type, typenameDenseVector< Other >::field_type >::PromotedType dot (const DenseVector< Other > &x) const
 
constexpr FieldTraits< value_type >::real_type one_norm () const
 
constexpr FieldTraits< value_type >::real_type one_norm_real () const
 
constexpr FieldTraits< value_type >::real_type two_norm () const
 
constexpr FieldTraits< value_type >::real_type two_norm2 () const
 
constexpr FieldTraits< vt >::real_type infinity_norm () const
 
constexpr FieldTraits< vt >::real_type infinity_norm () const
 
constexpr FieldTraits< vt >::real_type infinity_norm_real () const
 
constexpr FieldTraits< vt >::real_type infinity_norm_real () const
 
constexpr size_type N () const
 
constexpr size_type dim () const
 
constexpr reference operator[] (size_type i)
 
constexpr const_reference operator[] (size_type i) const
 
constexpr reference operator[] (size_type i)
 
constexpr const_reference operator[] (size_type i) const
 
constexpr value_typeoperator[] (size_type i)
 
constexpr const value_typeoperator[] (size_type i) const
 
constexpr K * data () noexcept
 
constexpr const K * data () const noexcept
 
constexpr K * data () noexcept
 
constexpr const K * data () const noexcept
 
constexpr operator const_reference () const noexcept
 
constexpr operator const_reference () const noexcept
 
constexpr operator reference () noexcept
 
constexpr operator reference () noexcept
 
std::istreamoperator>> (std::istream &in, FieldVector< K, SIZE > &v)
 
std::ostreamoperator<< (std::ostream &s, const DenseVector< FieldVector< K, SIZE > > &v)
 
std::ostreamoperator<< (std::ostream &s, const DenseVector< V > &v)
 

Static Public Member Functions

static constexpr size_type size () noexcept
 
static constexpr size_type size () noexcept
 

Static Public Attributes

static constexpr int dimension
 
static constexpr int blocklevel
 

Detailed Description

template<class T, int N>
class Dune::Fem::ExplicitFieldVector< T, N >

A variant of FieldVector which does not allow for implicit type-conversion from an to everything.

Constructor & Destructor Documentation

◆ ExplicitFieldVector() [1/4]

template<class T , int N>
constexpr Dune::Fem::ExplicitFieldVector< T, N >::ExplicitFieldVector ( )
inlineconstexpr

Constructor making default-initialized vector.

◆ ExplicitFieldVector() [2/4]

template<class T , int N>
template<class... Args, disableCopyMove< ThisType, Args... > = 0, std::enable_if_t< std::is_constructible< BaseType, Args &&... >::value, int > = 0>
Dune::Fem::ExplicitFieldVector< T, N >::ExplicitFieldVector ( Args &&...  args)
inlineexplicit

Redirect any general construction to the base class during explicit conversion

◆ ExplicitFieldVector() [3/4]

template<class T , int N>
Dune::Fem::ExplicitFieldVector< T, N >::ExplicitFieldVector ( const std::initializer_list< T > &  values)
inline

◆ ExplicitFieldVector() [4/4]

template<class T , int N>
template<class C >
Dune::Fem::ExplicitFieldVector< T, N >::ExplicitFieldVector ( const DenseVector< C > &  x,
typename std::enable_if<(IsFieldVectorSizeCorrect< C, N >::value &&AcceptElementImplicitConstruction< C, T >::value) >::type *  dummy = 0 
)
inline

Allow implicit conversion if both vectors are either composed of field-elements of some fields which can be converted into each other or if both vectors are composed of more complicated elements (which can be converted into each other), but do not allow implicit conversion of a FieldVector of scalars into a FieldVector composed of more complicated stuff. In particalar, FunctionSpace::RangeType cannot be implicitly converted to FunctionSpace::HessianRangeType.

Member Function Documentation

◆ operator=() [1/4]

template<class T , int N>
template<typename C , std::enable_if_t<(N==1 &&AcceptElementImplicitConstruction< C, T >::value &&std::is_assignable< T, C >::value &&! std::is_base_of< DenseVector< typename FieldTraits< T >::field_type >, T >::value), int > = 0>
ExplicitFieldVector & Dune::Fem::ExplicitFieldVector< T, N >::operator= ( const C &  c)
inline

Assignment operator for scalar.

◆ operator=() [2/4]

template<class T , int N>
ExplicitFieldVector & Dune::Fem::ExplicitFieldVector< T, N >::operator= ( const ExplicitFieldVector< T, N > &  other)
inline

copy assignment operator

◆ operator=() [3/4]

template<class T , int N>
template<typename C , std::enable_if_t< std::is_assignable< T, C >::value, int > = 0>
ExplicitFieldVector & Dune::Fem::ExplicitFieldVector< T, N >::operator= ( const ExplicitFieldVector< C, N > &  other)
inline

◆ operator=() [4/4]

template<class T , int N>
template<typename C , std::enable_if_t< std::is_assignable< T, C >::value, int > = 0>
ExplicitFieldVector & Dune::Fem::ExplicitFieldVector< T, N >::operator= ( const FieldVector< C, N > &  other)
inline

The documentation for this class was generated from the following file: