dune-common  2.7.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Related Functions | List of all members
Dune::FieldVector< K, SIZE > Class Template Reference

vector space out of a tensor product of fields. More...

#include <dune/common/densematrix.hh>

Inheritance diagram for Dune::FieldVector< K, SIZE >:
Inheritance graph

Public Types

enum  { dimension = SIZE }
 export size More...
 
typedef Base::size_type size_type
 
typedef Base::value_type value_type
 
typedef value_typereference
 The type used for references to the vector entry. More...
 

Public Member Functions

constexpr FieldVector ()
 Constructor making default-initialized vector. More...
 
 FieldVector (const K &t)
 Constructor making vector with identical coordinates. More...
 
 FieldVector (const FieldVector &)=default
 Copy constructor. More...
 
 FieldVector (std::initializer_list< K > const &l)
 Construct from a std::initializer_list. More...
 
FieldVectoroperator= (const FieldVector &)=default
 copy assignment operator More...
 
template<typename T >
FieldVectoroperator= (const FieldVector< T, SIZE > &x)
 
template<typename T , int N>
FieldVectoroperator= (const FieldVector< T, N > &)=delete
 
template<class C >
 FieldVector (const DenseVector< C > &x, typename std::enable_if< IsFieldVectorSizeCorrect< C, SIZE >::value >::type *dummy=0)
 Copy constructor from a second vector of possibly different type. More...
 
template<class K1 >
 FieldVector (const FieldVector< K1, SIZE > &x)
 Constructor making vector with identical coordinates. More...
 
template<typename T , int N>
 FieldVector (const FieldVector< T, N > &)=delete
 
K & operator[] (size_type i)
 
const K & operator[] (size_type i) const
 
K * data () noexcept
 return pointer to underlying array More...
 
const K * data () const noexcept
 return pointer to underlying array More...
 
derived_type & operator= (const value_type &k)
 Assignment operator for scalar. More...
 
DenseVectoroperator= (const DenseVector &)=default
 Assignment operator for other DenseVector of same type. More...
 
template<typename W , std::enable_if_t< std::is_assignable< value_type &, typename DenseVector< W >::value_type >::value, int > = 0>
derived_type & operator= (const DenseVector< W > &other)
 Assignment operator for other DenseVector of different type. More...
 

Static Public Member Functions

static constexpr size_type size ()
 

Public Attributes

const typedef value_typeconst_reference
 The type used for const references to the vector entry. More...
 

Related Functions

(Note that these are not member functions.)

template<class K , int SIZE>
std::istream & operator>> (std::istream &in, FieldVector< K, SIZE > &v)
 Read a FieldVector from an input stream. More...
 

Detailed Description

template<class K, int SIZE>
class Dune::FieldVector< K, SIZE >

vector space out of a tensor product of fields.

Template Parameters
Kthe field type (use float, double, complex, etc)
SIZEnumber of components.

Member Typedef Documentation

◆ reference

template<class K , int SIZE>
typedef value_type& Dune::FieldVector< K, SIZE >::reference

The type used for references to the vector entry.

◆ size_type

template<class K , int SIZE>
typedef Base::size_type Dune::FieldVector< K, SIZE >::size_type

◆ value_type

template<class K , int SIZE>
typedef Base::value_type Dune::FieldVector< K, SIZE >::value_type

Member Enumeration Documentation

◆ anonymous enum

template<class K , int SIZE>
anonymous enum

export size

Enumerator
dimension 

The size of this vector.

Constructor & Destructor Documentation

◆ FieldVector() [1/7]

template<class K , int SIZE>
constexpr Dune::FieldVector< K, SIZE >::FieldVector ( )
inlineconstexpr

Constructor making default-initialized vector.

◆ FieldVector() [2/7]

template<class K , int SIZE>
Dune::FieldVector< K, SIZE >::FieldVector ( const K &  t)
inlineexplicit

Constructor making vector with identical coordinates.

◆ FieldVector() [3/7]

template<class K , int SIZE>
Dune::FieldVector< K, SIZE >::FieldVector ( const FieldVector< K, SIZE > &  )
default

Copy constructor.

◆ FieldVector() [4/7]

template<class K , int SIZE>
Dune::FieldVector< K, SIZE >::FieldVector ( std::initializer_list< K > const &  l)
inline

Construct from a std::initializer_list.

◆ FieldVector() [5/7]

template<class K , int SIZE>
template<class C >
Dune::FieldVector< K, SIZE >::FieldVector ( const DenseVector< C > &  x,
typename std::enable_if< IsFieldVectorSizeCorrect< C, SIZE >::value >::type *  dummy = 0 
)
inline

Copy constructor from a second vector of possibly different type.

If the DenseVector type of the this constructor's argument is implemented by a FieldVector, it is statically checked if it has the correct size. If this is not the case the constructor is removed from the overload set using SFINAE.

Parameters
[in]xA DenseVector with correct size.
[in]dummyA void* dummy argument needed by SFINAE.

◆ FieldVector() [6/7]

template<class K , int SIZE>
template<class K1 >
Dune::FieldVector< K, SIZE >::FieldVector ( const FieldVector< K1, SIZE > &  x)
inlineexplicit

Constructor making vector with identical coordinates.

◆ FieldVector() [7/7]

template<class K , int SIZE>
template<typename T , int N>
Dune::FieldVector< K, SIZE >::FieldVector ( const FieldVector< T, N > &  )
explicitdelete

Member Function Documentation

◆ data() [1/2]

template<class K , int SIZE>
const K* Dune::FieldVector< K, SIZE >::data ( ) const
inlinenoexcept

return pointer to underlying array

◆ data() [2/2]

template<class K , int SIZE>
K* Dune::FieldVector< K, SIZE >::data ( )
inlinenoexcept

return pointer to underlying array

◆ operator=() [1/6]

template<class K , int SIZE>
DenseVector& Dune::DenseVector< V >::operator=
default

Assignment operator for other DenseVector of same type.

◆ operator=() [2/6]

template<class K , int SIZE>
template<typename W , std::enable_if_t< std::is_assignable< value_type &, typename DenseVector< W >::value_type >::value, int > = 0>
derived_type& Dune::DenseVector< V >::operator= ( typename W  ,
std::enable_if_t< std::is_assignable< value_type &, typename DenseVector< W >::value_type >::value, int >  = 0 
)
inline

Assignment operator for other DenseVector of different type.

◆ operator=() [3/6]

template<class K , int SIZE>
FieldVector& Dune::FieldVector< K, SIZE >::operator= ( const FieldVector< K, SIZE > &  )
default

copy assignment operator

◆ operator=() [4/6]

template<class K , int SIZE>
template<typename T , int N>
FieldVector& Dune::FieldVector< K, SIZE >::operator= ( const FieldVector< T, N > &  )
delete

◆ operator=() [5/6]

template<class K , int SIZE>
template<typename T >
FieldVector& Dune::FieldVector< K, SIZE >::operator= ( const FieldVector< T, SIZE > &  x)
inline

◆ operator=() [6/6]

template<class K , int SIZE>
derived_type& Dune::DenseVector< V >::operator=
inline

Assignment operator for scalar.

◆ operator[]() [1/2]

template<class K , int SIZE>
K& Dune::FieldVector< K, SIZE >::operator[] ( size_type  i)
inline

◆ operator[]() [2/2]

template<class K , int SIZE>
const K& Dune::FieldVector< K, SIZE >::operator[] ( size_type  i) const
inline

◆ size()

template<class K , int SIZE>
static constexpr size_type Dune::FieldVector< K, SIZE >::size ( )
inlinestaticconstexpr

Member Data Documentation

◆ const_reference

template<class K , int SIZE>
const typedef value_type& Dune::FieldVector< K, SIZE >::const_reference

The type used for const references to the vector entry.


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