Loading...
Searching...
No Matches
Dune::FieldVector< K, SIZE > Class Template Reference
Common » Dense Matrix and Vector Template Library

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

`#include <dune/common/fvector.hh>`

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

## Public Types

using | size_type = typename Base::size_type
| The type used for the index access and size operation.
using | value_type = typename Base::value_type
| The type of the elements stored in the vector.
using | reference = value_type&
| The type used for references to the vector entries.
using | const_reference = const value_type&
| The type used for const references to the vector entries.
typedef Traits::derived_type | derived_type
| type of derived vector class
typedef FieldTraits< value_type >::field_type | field_type
| export the type representing the field
typedef Traits::value_type | block_type
| export the type representing the components
typedef DenseIterator< DenseVector, value_type > | Iterator
| Iterator class for sequential access.
typedef Iterator | iterator
| typedef for stl compliant access
typedef DenseIterator< const DenseVector, const value_type > | ConstIterator
| ConstIterator class for sequential access.
typedef ConstIterator | const_iterator
| typedef for stl compliant access

## Public Member Functions

constexpr | FieldVector () noexcept(std::is_nothrow_default_constructible_v< K >)
| Default constructor, making value-initialized vector with all components set to zero.
| explicit (SIZE !=1) const expr FieldVector(const value_type &value) noexcept
| Constructor with a given value initializing all entries to this value.
template<Concept::Number S> requires (std::constructible_from<K,S>)
| explicit (SIZE !=1) const expr FieldVector(const S &scalar) noexcept(std::is_nothrow_constructible_v< K, S >)
| Constructor with a given scalar initializing all entries to this value.
constexpr | FieldVector (const std::initializer_list< K > &l)
| Construct from a std::initializer_list of values.
template<class V> requires (IsFieldVectorSizeCorrect<V,SIZE>::value && std::is_assignable_v<K&, decltype(std::declval<const V&>()[0])>)
constexpr | FieldVector (const DenseVector< V > &x)
| Constructor from another dense vector if the elements are assignable to K.
template<class OtherK> requires (std::is_assignable_v<K&, const OtherK&>)
constexpr | FieldVector (const FieldVector< OtherK, SIZE > &x) noexcept(std::is_nothrow_assignable_v< K &, const OtherK & >)
| Converting constructor from FieldVector with different element type.
constexpr | FieldVector (const FieldVector &)=default
| Copy constructor with default behavior.
template<class V> requires (IsFieldVectorSizeCorrect<V,SIZE>::value && std::is_assignable_v<K&, decltype(std::declval<const V&>()[0])>)
constexpr FieldVector & | operator= (const DenseVector< V > &x)
| Assignment from another dense vector.
template<Concept::Number S> requires std::constructible_from<K,S>
constexpr FieldVector & | operator= (const S &scalar) noexcept(std::is_nothrow_constructible_v< K, S >)
| Assignment operator from scalar.
template<class OtherK> requires (std::is_assignable_v<K&, const OtherK&>)
constexpr FieldVector & | operator= (const FieldVector< OtherK, SIZE > &x) noexcept(std::is_nothrow_assignable_v< K &, const OtherK & >)
| Converting assignment operator from FieldVector with different element type.
constexpr FieldVector & | operator= (const FieldVector &)=default
| Copy assignment operator with default behavior.
constexpr value_type & | front ()
| return reference to first element
constexpr const value_type & | front () const
| return reference to first element
constexpr value_type & | back ()
| return reference to last element
constexpr const value_type & | back () const
| return reference to last element
constexpr bool | empty () const
| checks whether the container is empty
constexpr size_type | size () const
| size method
constexpr Iterator | begin ()
| begin iterator
constexpr ConstIterator | begin () const
| begin ConstIterator
constexpr Iterator | end ()
| end iterator
constexpr ConstIterator | end () const
| end ConstIterator
constexpr Iterator | beforeEnd ()
constexpr ConstIterator | beforeEnd () const
constexpr Iterator | beforeBegin ()
constexpr ConstIterator | beforeBegin () const
constexpr Iterator | find (size_type i)
| return iterator to given element or end()
constexpr ConstIterator | find (size_type i) const
| return iterator to given element or end()
constexpr derived_type & | operator+= (const DenseVector< Other > &x)
| vector space addition
constexpr std::enable_if< std::is_convertible< ValueType, value_type >::value, derived_type >::type & | operator+= (const ValueType &kk)
| vector space add scalar to all comps
constexpr derived_type & | operator-= (const DenseVector< Other > &x)
| vector space subtraction
constexpr std::enable_if< std::is_convertible< ValueType, value_type >::value, derived_type >::type & | operator-= (const ValueType &kk)
| vector space subtract scalar from all comps
constexpr derived_type | operator+ (const DenseVector< Other > &b) const
| Binary vector addition.
constexpr derived_type | operator- (const DenseVector< Other > &b) const
| Binary vector subtraction.
constexpr derived_type | operator- () const
| Vector negation.
constexpr std::enable_if< std::is_convertible< FieldType, field_type >::value, derived_type >::type & | operator*= (const FieldType &kk)
| vector space multiplication with scalar
constexpr std::enable_if< std::is_convertible< FieldType, field_type >::value, derived_type >::type & | operator/= (const FieldType &kk)
| vector space division by scalar
constexpr bool | operator== (const DenseVector< Other > &x) const
| Binary vector comparison.
constexpr bool | operator!= (const DenseVector< Other > &x) const
| Binary vector incomparison.
constexpr derived_type & | axpy (const field_type &a, const DenseVector< Other > &x)
| vector space axpy operation ( *this += a x )
constexpr PromotionTraits< field_type, typenameDenseVector< Other >::field_type >::PromotedType | operator* (const DenseVector< Other > &x) const
| indefinite vector dot product which corresponds to Petsc's VecTDot
constexpr PromotionTraits< field_type, typenameDenseVector< Other >::field_type >::PromotedType | dot (const DenseVector< Other > &x) const
| vector dot product which corresponds to Petsc's VecDot
constexpr FieldTraits< value_type >::real_type | one_norm () const
| one norm (sum over absolute values of entries)
constexpr FieldTraits< value_type >::real_type | one_norm_real () const
| simplified one norm (uses Manhattan norm for complex values)
constexpr FieldTraits< value_type >::real_type | two_norm () const
| two norm sqrt(sum over squared values of entries)
constexpr FieldTraits< value_type >::real_type | two_norm2 () const
| square of two norm (sum over squared values of entries), need for block recursion
constexpr FieldTraits< vt >::real_type | infinity_norm () const
| infinity norm (maximum of absolute values of entries)
constexpr FieldTraits< vt >::real_type | infinity_norm () const
| infinity norm (maximum of absolute values of entries)
constexpr FieldTraits< vt >::real_type | infinity_norm_real () const
| simplified infinity norm (uses Manhattan norm for complex values)
constexpr FieldTraits< vt >::real_type | infinity_norm_real () const
| simplified infinity norm (uses Manhattan norm for complex values)
constexpr size_type | N () const
| number of blocks in the vector (are of size 1 here)
constexpr size_type | dim () const
| dimension of the vector space
Element access
constexpr reference | operator[] (size_type i)
| Return a reference to the ith element.
constexpr const_reference | operator[] (size_type i) const
| Return a (const) reference to the ith element.
constexpr K * | data () noexcept
| Return pointer to underlying array.
constexpr const K * | data () const noexcept
| Return pointer to underlying array.
constexpr | operator const_reference () const noexcept
| Conversion operator.
constexpr | operator reference () noexcept
| Conversion operator.

## Static Public Member Functions

Capacity
static constexpr size_type | size () noexcept
| Obtain the number of elements stored in the vector.

## Static Public Attributes

static constexpr int | dimension = SIZE
| The size of this vector.
static constexpr int | blocklevel
| The number of block levels we contain. This is the leaf, that is, 1.

## Friends

Comparison operators
template<Concept::Number S> requires (SIZE == 1)
constexpr bool | operator== (const FieldVector &a, const S &b) noexcept
| comparing FieldVectors<1> with scalar for equality
template<Concept::Number S> requires (SIZE == 1)
constexpr bool | operator== (const S &a, const FieldVector &b) noexcept
| comparing FieldVectors<1> with scalar for equality
template<class T> requires (Std::three_way_comparable_with<K,T>)
constexpr auto | operator<=> (const FieldVector &a, const FieldVector< T, SIZE > &b) noexcept
| three-way comparison of FieldVectors
template<Concept::Number S> requires (SIZE == 1)
constexpr auto | operator<=> (const FieldVector &a, const S &b) noexcept
| three-way comparison of FieldVectors<1> with scalar
template<Concept::Number S> requires (SIZE == 1)
constexpr auto | operator<=> (const S &a, const FieldVector &b) noexcept
| three-way comparison of FieldVectors<1> with scalar
Vector space operations
template<Concept::Number S>
constexpr auto | operator* (const FieldVector &a, const S &b) noexcept
| Vector space multiplication with scalar.
template<Concept::Number S>
constexpr auto | operator* (const S &a, const FieldVector &b) noexcept
| Vector space multiplication with scalar.
template<Concept::Number S>
constexpr auto | operator/ (const FieldVector &a, const S &b) noexcept
| Vector space division by scalar.
template<Concept::Number S> requires (SIZE == 1)
constexpr FieldVector | operator/ (const S &a, const FieldVector &b) noexcept
| Binary division, when using FieldVector<K,1> like K.
template<Concept::Number S> requires (SIZE == 1)
constexpr auto | operator+ (const FieldVector &a, const S &b) noexcept
| Binary addition, when using FieldVector<K,1> like K.
template<Concept::Number S> requires (SIZE == 1)
constexpr auto | operator+ (const S &a, const FieldVector &b) noexcept
| Binary addition, when using FieldVector<K,1> like K.
template<Concept::Number S> requires (SIZE == 1)
constexpr auto | operator- (const FieldVector &a, const S &b) noexcept
| Binary subtraction, when using FieldVector<K,1> like K.
template<Concept::Number S> requires (SIZE == 1)
constexpr auto | operator- (const S &a, const FieldVector &b) noexcept
| Binary subtraction, when using FieldVector<K,1> like K.

## Related Symbols

(Note that these are not member symbols.)
template<class K, int SIZE>
std::istream & | operator>> (std::istream &in, FieldVector< K, SIZE > &v)
| Read a FieldVector from an input stream.
std::ostream & | operator<< (std::ostream &s, const DenseVector< FieldVector< K, SIZE > > &v)
| Write a DenseVector to an output stream.

## Detailed Description

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

vector space out of a tensor product of fields.

Template Parameters

  K | the field type (use float, double, complex, etc)
  SIZE | number of components.

## Member Typedef Documentation

## block_type

typedef Traits::value_type Dune::DenseVector< FieldVector< K, SIZE > >::block_type

inherited

export the type representing the components

## const_iterator

typedef ConstIterator Dune::DenseVector< FieldVector< K, SIZE > >::const_iterator

inherited

typedef for stl compliant access

## const_reference

template<class K, int SIZE>

using Dune::FieldVector< K, SIZE >::const_reference = const value_type&

The type used for const references to the vector entries.

## ConstIterator

typedef DenseIterator<const DenseVector,const value_type> Dune::DenseVector< FieldVector< K, SIZE > >::ConstIterator

inherited

ConstIterator class for sequential access.

## derived_type

typedef Traits::derived_type Dune::DenseVector< FieldVector< K, SIZE > >::derived_type

inherited

type of derived vector class

## field_type

typedef FieldTraits<value_type>::field_type Dune::DenseVector< FieldVector< K, SIZE > >::field_type

inherited

export the type representing the field

## Iterator

typedef DenseIterator<DenseVector,value_type> Dune::DenseVector< FieldVector< K, SIZE > >::Iterator

inherited

Iterator class for sequential access.

## iterator

typedef Iterator Dune::DenseVector< FieldVector< K, SIZE > >::iterator

inherited

typedef for stl compliant access

## reference

template<class K, int SIZE>

using Dune::FieldVector< K, SIZE >::reference = value_type&

The type used for references to the vector entries.

## size_type

template<class K, int SIZE>

using Dune::FieldVector< K, SIZE >::size_type = typename Base::size_type

The type used for the index access and size operation.

## value_type

template<class K, int SIZE>

using Dune::FieldVector< K, SIZE >::value_type = typename Base::value_type

The type of the elements stored in the vector.

## Constructor & Destructor Documentation

## FieldVector() [1/5]

template<class K, int SIZE>

Dune::FieldVector< K, SIZE >::FieldVector | ( |  | ) |

inline constexpr noexcept

Default constructor, making value-initialized vector with all components set to zero.

## FieldVector() [2/5]

template<class K, int SIZE>

Dune::FieldVector< K, SIZE >::FieldVector | ( | const std::initializer_list< K > & | l | ) |

inline constexpr

Construct from a std::initializer_list of values.

## FieldVector() [3/5]

template<class K, int SIZE>
template<class V>
requires (IsFieldVectorSizeCorrect<V,SIZE>::value && std::is_assignable_v<K&, decltype(std::declval<const V&>()[0])>)

Dune::FieldVector< K, SIZE >::FieldVector | ( | const DenseVector< V > & | x | ) |

inline constexpr

Constructor from another dense vector if the elements are assignable to K.

## FieldVector() [4/5]

template<class K, int SIZE>
template<class OtherK>
requires (std::is_assignable_v<K&, const OtherK&>)

Dune::FieldVector< K, SIZE >::FieldVector | ( | const FieldVector< OtherK, SIZE > & | x | ) |

inline explicit constexpr noexcept

Converting constructor from FieldVector with different element type.

## FieldVector() [5/5]

template<class K, int SIZE>

Dune::FieldVector< K, SIZE >::FieldVector | ( | const FieldVector< K, SIZE > & |  | ) |

constexpr default

Copy constructor with default behavior.

## Member Function Documentation

## axpy()

derived_type & Dune::DenseVector< FieldVector< K, SIZE > >::axpy | ( | const field_type & | a,
|  | const DenseVector< Other > & | x )

inline constexpr inherited

vector space axpy operation ( *this += a x )

## back() [1/2]

value_type & Dune::DenseVector< FieldVector< K, SIZE > >::back | ( |  | ) |

inline constexpr inherited

return reference to last element

## back() [2/2]

const value_type & Dune::DenseVector< FieldVector< K, SIZE > >::back | ( |  | ) | const

inline constexpr inherited

return reference to last element

## beforeBegin() [1/2]

Iterator Dune::DenseVector< FieldVector< K, SIZE > >::beforeBegin | ( |  | ) |

inline constexpr inherited

Returns
  an iterator that is positioned before the first entry of the vector.

## beforeBegin() [2/2]

ConstIterator Dune::DenseVector< FieldVector< K, SIZE > >::beforeBegin | ( |  | ) | const

inline constexpr inherited

Returns
  an iterator that is positioned before the first entry of the vector.

## beforeEnd() [1/2]

Iterator Dune::DenseVector< FieldVector< K, SIZE > >::beforeEnd | ( |  | ) |

inline constexpr inherited

Returns
  an iterator that is positioned before the end iterator of the vector, i.e. at the last entry.

## beforeEnd() [2/2]

ConstIterator Dune::DenseVector< FieldVector< K, SIZE > >::beforeEnd | ( |  | ) | const

inline constexpr inherited

Returns
  an iterator that is positioned before the end iterator of the vector. i.e. at the last element

## begin() [1/2]

Iterator Dune::DenseVector< FieldVector< K, SIZE > >::begin | ( |  | ) |

inline constexpr inherited

begin iterator

## begin() [2/2]

ConstIterator Dune::DenseVector< FieldVector< K, SIZE > >::begin | ( |  | ) | const

inline constexpr inherited

begin ConstIterator

## data() [1/2]

template<class K, int SIZE>

const K * Dune::FieldVector< K, SIZE >::data | ( |  | ) | const

inline constexpr noexcept

Return pointer to underlying array.

## data() [2/2]

template<class K, int SIZE>

K * Dune::FieldVector< K, SIZE >::data | ( |  | ) |

inline constexpr noexcept

Return pointer to underlying array.

## dim()

size_type Dune::DenseVector< FieldVector< K, SIZE > >::dim | ( |  | ) | const

inline constexpr inherited

dimension of the vector space

## dot()

PromotionTraits< field_type, typenameDenseVector< Other >::field_type >::PromotedType Dune::DenseVector< FieldVector< K, SIZE > >::dot | ( | const DenseVector< Other > & | x | ) | const

inline constexpr inherited

vector dot product which corresponds to Petsc's VecDot

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecDot.html

Parameters

  x | other vector

Returns

## empty()

bool Dune::DenseVector< FieldVector< K, SIZE > >::empty | ( |  | ) | const

inline constexpr inherited

checks whether the container is empty

## end() [1/2]

Iterator Dune::DenseVector< FieldVector< K, SIZE > >::end | ( |  | ) |

inline constexpr inherited

end iterator

## end() [2/2]

ConstIterator Dune::DenseVector< FieldVector< K, SIZE > >::end | ( |  | ) | const

inline constexpr inherited

end ConstIterator

## explicit() [1/2]

template<class K, int SIZE>
template<Concept::Number S>
requires (std::constructible_from<K,S>)

Dune::FieldVector< K, SIZE >::explicit | ( | SIZE ! | = 1 | ) | const &

inline noexcept

Constructor with a given scalar initializing all entries to this value.

## explicit() [2/2]

template<class K, int SIZE>

Dune::FieldVector< K, SIZE >::explicit | ( | SIZE ! | = 1 | ) | const &

inline noexcept

Constructor with a given value initializing all entries to this value.

## find() [1/2]

Iterator Dune::DenseVector< FieldVector< K, SIZE > >::find | ( | size_type | i | ) |

inline constexpr inherited

return iterator to given element or end()

## find() [2/2]

ConstIterator Dune::DenseVector< FieldVector< K, SIZE > >::find | ( | size_type | i | ) | const

inline constexpr inherited

return iterator to given element or end()

## front() [1/2]

value_type & Dune::DenseVector< FieldVector< K, SIZE > >::front | ( |  | ) |

inline constexpr inherited

return reference to first element

## front() [2/2]

const value_type & Dune::DenseVector< FieldVector< K, SIZE > >::front | ( |  | ) | const

inline constexpr inherited

return reference to first element

## infinity_norm() [1/2]

FieldTraits< vt >::real_type Dune::DenseVector< FieldVector< K, SIZE > >::infinity_norm | ( |  | ) | const

inline constexpr inherited

infinity norm (maximum of absolute values of entries)

## infinity_norm() [2/2]

FieldTraits< vt >::real_type Dune::DenseVector< FieldVector< K, SIZE > >::infinity_norm | ( |  | ) | const

inline constexpr inherited

infinity norm (maximum of absolute values of entries)

## infinity_norm_real() [1/2]

FieldTraits< vt >::real_type Dune::DenseVector< FieldVector< K, SIZE > >::infinity_norm_real | ( |  | ) | const

inline constexpr inherited

simplified infinity norm (uses Manhattan norm for complex values)

## infinity_norm_real() [2/2]

FieldTraits< vt >::real_type Dune::DenseVector< FieldVector< K, SIZE > >::infinity_norm_real | ( |  | ) | const

inline constexpr inherited

simplified infinity norm (uses Manhattan norm for complex values)

## N()

size_type Dune::DenseVector< FieldVector< K, SIZE > >::N | ( |  | ) | const

inline constexpr inherited

number of blocks in the vector (are of size 1 here)

## one_norm()

FieldTraits< value_type >::real_type Dune::DenseVector< FieldVector< K, SIZE > >::one_norm | ( |  | ) | const

inline constexpr inherited

one norm (sum over absolute values of entries)

## one_norm_real()

FieldTraits< value_type >::real_type Dune::DenseVector< FieldVector< K, SIZE > >::one_norm_real | ( |  | ) | const

inline constexpr inherited

simplified one norm (uses Manhattan norm for complex values)

## operator const_reference()

template<class K, int SIZE>

Dune::FieldVector< K, SIZE >::operator const_reference | ( |  | ) | const

inline constexpr noexcept

Conversion operator.

## operator reference()

template<class K, int SIZE>

Dune::FieldVector< K, SIZE >::operator reference | ( |  | ) |

inline constexpr noexcept

Conversion operator.

## operator!=()

bool Dune::DenseVector< FieldVector< K, SIZE > >::operator!= | ( | const DenseVector< Other > & | x | ) | const

inline constexpr inherited

Binary vector incomparison.

## operator*()

PromotionTraits< field_type, typenameDenseVector< Other >::field_type >::PromotedType Dune::DenseVector< FieldVector< K, SIZE > >::operator* | ( | const DenseVector< Other > & | x | ) | const

inline constexpr inherited

indefinite vector dot product which corresponds to Petsc's VecTDot

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecTDot.html

Parameters

  x | other vector

Returns

## operator*=()

std::enable_if< std::is_convertible< FieldType, field_type >::value, derived_type >::type & Dune::DenseVector< FieldVector< K, SIZE > >::operator*= | ( | const FieldType & | kk | ) |

inline constexpr inherited

vector space multiplication with scalar

we use enable_if to avoid an ambiguity, if the function parameter can be converted to field_type implicitly. (see FS#1457)

The function is only enabled, if the parameter is directly convertible to field_type.

## operator+()

derived_type Dune::DenseVector< FieldVector< K, SIZE > >::operator+ | ( | const DenseVector< Other > & | b | ) | const

inline constexpr inherited

Binary vector addition.

## operator+=() [1/2]

derived_type & Dune::DenseVector< FieldVector< K, SIZE > >::operator+= | ( | const DenseVector< Other > & | x | ) |

inline constexpr inherited

vector space addition

## operator+=() [2/2]

std::enable_if< std::is_convertible< ValueType, value_type >::value, derived_type >::type & Dune::DenseVector< FieldVector< K, SIZE > >::operator+= | ( | const ValueType & | kk | ) |

inline constexpr inherited

vector space add scalar to all comps

we use enable_if to avoid an ambiguity, if the function parameter can be converted to value_type implicitly. (see FS#1457)

The function is only enabled, if the parameter is directly convertible to value_type.

## operator-() [1/2]

derived_type Dune::DenseVector< FieldVector< K, SIZE > >::operator- | ( |  | ) | const

inline constexpr inherited

Vector negation.

## operator-() [2/2]

derived_type Dune::DenseVector< FieldVector< K, SIZE > >::operator- | ( | const DenseVector< Other > & | b | ) | const

inline constexpr inherited

Binary vector subtraction.

## operator-=() [1/2]

derived_type & Dune::DenseVector< FieldVector< K, SIZE > >::operator-= | ( | const DenseVector< Other > & | x | ) |

inline constexpr inherited

vector space subtraction

## operator-=() [2/2]

std::enable_if< std::is_convertible< ValueType, value_type >::value, derived_type >::type & Dune::DenseVector< FieldVector< K, SIZE > >::operator-= | ( | const ValueType & | kk | ) |

inline constexpr inherited

vector space subtract scalar from all comps

we use enable_if to avoid an ambiguity, if the function parameter can be converted to value_type implicitly. (see FS#1457)

The function is only enabled, if the parameter is directly convertible to value_type.

## operator/=()

std::enable_if< std::is_convertible< FieldType, field_type >::value, derived_type >::type & Dune::DenseVector< FieldVector< K, SIZE > >::operator/= | ( | const FieldType & | kk | ) |

inline constexpr inherited

vector space division by scalar

we use enable_if to avoid an ambiguity, if the function parameter can be converted to field_type implicitly. (see FS#1457)

The function is only enabled, if the parameter is directly convertible to field_type.

## operator=() [1/4]

template<class K, int SIZE>
template<class V>
requires (IsFieldVectorSizeCorrect<V,SIZE>::value && std::is_assignable_v<K&, decltype(std::declval<const V&>()[0])>)

FieldVector & Dune::FieldVector< K, SIZE >::operator= | ( | const DenseVector< V > & | x | ) |

inline constexpr

Assignment from another dense vector.

## operator=() [2/4]

template<class K, int SIZE>

FieldVector & Dune::FieldVector< K, SIZE >::operator= | ( | const FieldVector< K, SIZE > & |  | ) |

constexpr default

Copy assignment operator with default behavior.

## operator=() [3/4]

template<class K, int SIZE>
template<class OtherK>
requires (std::is_assignable_v<K&, const OtherK&>)

FieldVector & Dune::FieldVector< K, SIZE >::operator= | ( | const FieldVector< OtherK, SIZE > & | x | ) |

inline constexpr noexcept

Converting assignment operator from FieldVector with different element type.

## operator=() [4/4]

template<class K, int SIZE>
template<Concept::Number S>
requires std::constructible_from<K,S>

FieldVector & Dune::FieldVector< K, SIZE >::operator= | ( | const S & | scalar | ) |

inline constexpr noexcept

Assignment operator from scalar.

## operator==()

bool Dune::DenseVector< FieldVector< K, SIZE > >::operator== | ( | const DenseVector< Other > & | x | ) | const

inline constexpr inherited

Binary vector comparison.

## operator[]() [1/2]

template<class K, int SIZE>

reference Dune::FieldVector< K, SIZE >::operator[] | ( | size_type | i | ) |

inline constexpr

Return a reference to the ith element.

Exceptions

  RangeError | if index i is out of range [0,SIZE) (only checked if DUNE_CHECK_BOUNDS is defined).

## operator[]() [2/2]

template<class K, int SIZE>

const_reference Dune::FieldVector< K, SIZE >::operator[] | ( | size_type | i | ) | const

inline constexpr

Return a (const) reference to the ith element.

Exceptions

  RangeError | if index i is out of range [0,SIZE) (only checked if DUNE_CHECK_BOUNDS is defined).

## size() [1/2]

size_type Dune::DenseVector< FieldVector< K, SIZE > >::size | ( |  | ) | const

inline constexpr inherited

size method

## size() [2/2]

template<class K, int SIZE>

constexpr size_type Dune::FieldVector< K, SIZE >::size | ( |  | ) |

inline static constexpr noexcept

Obtain the number of elements stored in the vector.

## two_norm()

FieldTraits< value_type >::real_type Dune::DenseVector< FieldVector< K, SIZE > >::two_norm | ( |  | ) | const

inline constexpr inherited

two norm sqrt(sum over squared values of entries)

## two_norm2()

FieldTraits< value_type >::real_type Dune::DenseVector< FieldVector< K, SIZE > >::two_norm2 | ( |  | ) | const

inline constexpr inherited

square of two norm (sum over squared values of entries), need for block recursion

## Friends And Related Symbol Documentation

## operator* [1/2]

template<class K, int SIZE>
template<Concept::Number S>

auto operator* | ( | const FieldVector< K, SIZE > & | a,
|  | const S & | b )

friend

Vector space multiplication with scalar.

## operator* [2/2]

template<class K, int SIZE>
template<Concept::Number S>

auto operator* | ( | const S & | a,
|  | const FieldVector< K, SIZE > & | b )

friend

Vector space multiplication with scalar.

## operator+ [1/2]

template<class K, int SIZE>
template<Concept::Number S>
requires (SIZE == 1)

auto operator+ | ( | const FieldVector< K, SIZE > & | a,
|  | const S & | b )

friend

Binary addition, when using FieldVector<K,1> like K.

## operator+ [2/2]

template<class K, int SIZE>
template<Concept::Number S>
requires (SIZE == 1)

auto operator+ | ( | const S & | a,
|  | const FieldVector< K, SIZE > & | b )

friend

Binary addition, when using FieldVector<K,1> like K.

## operator- [1/2]

template<class K, int SIZE>
template<Concept::Number S>
requires (SIZE == 1)

auto operator- | ( | const FieldVector< K, SIZE > & | a,
|  | const S & | b )

friend

Binary subtraction, when using FieldVector<K,1> like K.

## operator- [2/2]

template<class K, int SIZE>
template<Concept::Number S>
requires (SIZE == 1)

auto operator- | ( | const S & | a,
|  | const FieldVector< K, SIZE > & | b )

friend

Binary subtraction, when using FieldVector<K,1> like K.

## operator/ [1/2]

template<class K, int SIZE>
template<Concept::Number S>

auto operator/ | ( | const FieldVector< K, SIZE > & | a,
|  | const S & | b )

friend

Vector space division by scalar.

## operator/ [2/2]

template<class K, int SIZE>
template<Concept::Number S>
requires (SIZE == 1)

FieldVector operator/ | ( | const S & | a,
|  | const FieldVector< K, SIZE > & | b )

friend

Binary division, when using FieldVector<K,1> like K.

## operator<<()

std::ostream & operator<< | ( | std::ostream & | s,
|  | const DenseVector< FieldVector< K, SIZE > > & | v )

related

Write a DenseVector to an output stream.

Parameters

  [in] | s | std :: ostream to write to
  [in] | v | DenseVector to write

Returns
  the output stream (s)

## operator<=> [1/3]

template<class K, int SIZE>
template<class T>
requires (Std::three_way_comparable_with<K,T>)

auto operator<=> | ( | const FieldVector< K, SIZE > & | a,
|  | const FieldVector< T, SIZE > & | b )

friend

three-way comparison of FieldVectors

## operator<=> [2/3]

template<class K, int SIZE>
template<Concept::Number S>
requires (SIZE == 1)

auto operator<=> | ( | const FieldVector< K, SIZE > & | a,
|  | const S & | b )

friend

three-way comparison of FieldVectors<1> with scalar

## operator<=> [3/3]

template<class K, int SIZE>
template<Concept::Number S>
requires (SIZE == 1)

auto operator<=> | ( | const S & | a,
|  | const FieldVector< K, SIZE > & | b )

friend

three-way comparison of FieldVectors<1> with scalar

## operator== [1/2]

template<class K, int SIZE>
template<Concept::Number S>
requires (SIZE == 1)

bool operator== | ( | const FieldVector< K, SIZE > & | a,
|  | const S & | b )

friend

comparing FieldVectors<1> with scalar for equality

## operator== [2/2]

template<class K, int SIZE>
template<Concept::Number S>
requires (SIZE == 1)

bool operator== | ( | const S & | a,
|  | const FieldVector< K, SIZE > & | b )

friend

comparing FieldVectors<1> with scalar for equality

## Member Data Documentation

## blocklevel

int Dune::DenseVector< FieldVector< K, SIZE > >::blocklevel

static constexpr inherited

The number of block levels we contain. This is the leaf, that is, 1.

## dimension

template<class K, int SIZE>

int Dune::FieldVector< K, SIZE >::dimension = SIZE

static constexpr

The size of this vector.

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

- densematrix.hh
- fvector.hh