vector space out of a tensor product of fields. More...
#include <dune/common/fvector.hh>
Public Types | |
enum | { dimension = SIZE } |
export size More... | |
typedef Base::size_type | size_type |
The type used for the index access and size operation. | |
typedef Base::value_type | value_type |
export the type representing the field | |
typedef value_type & | reference |
The type used for references to the vector entry. | |
typedef const value_type & | const_reference |
The type used for const references to the vector entry. | |
enum | |
We are at the leaf of the block recursion. More... | |
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 () |
Constructor making default-initialized vector. | |
_data (x._data) | |
FieldVector (std::initializer_list< K > const &l) | |
Construct from a std::initializer_list. | |
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. | |
template<class K1 , int SIZE1> | |
FieldVector (const FieldVector< K1, SIZE1 > &x) | |
Constructor making vector with identical coordinates. | |
K & | operator[] (size_type i) |
const K & | operator[] (size_type i) const |
value_type & | operator[] (size_type i) |
random access | |
const value_type & | operator[] (size_type i) const |
size_type | size () const |
size method | |
Iterator | begin () |
begin iterator | |
ConstIterator | begin () const |
begin ConstIterator | |
Iterator | end () |
end iterator | |
ConstIterator | end () const |
end ConstIterator | |
Iterator | beforeEnd () |
ConstIterator | beforeEnd () const |
Iterator | beforeBegin () |
ConstIterator | beforeBegin () const |
Iterator | find (size_type i) |
return iterator to given element or end() | |
ConstIterator | find (size_type i) const |
return iterator to given element or end() | |
derived_type & | operator+= (const DenseVector< Other > &y) |
vector space addition | |
std::enable_if < std::is_convertible < ValueType, value_type > ::value, derived_type >::type & | operator+= (const ValueType &kk) |
vector space add scalar to all comps | |
derived_type & | operator-= (const DenseVector< Other > &y) |
vector space subtraction | |
std::enable_if < std::is_convertible < ValueType, value_type > ::value, derived_type >::type & | operator-= (const ValueType &kk) |
vector space subtract scalar from all comps | |
derived_type | operator+ (const DenseVector< Other > &b) const |
Binary vector addition. | |
derived_type | operator- (const DenseVector< Other > &b) const |
Binary vector subtraction. | |
std::enable_if < std::is_convertible < FieldType, field_type > ::value, derived_type >::type & | operator*= (const FieldType &kk) |
vector space multiplication with scalar | |
std::enable_if < std::is_convertible < FieldType, field_type > ::value, derived_type >::type & | operator/= (const FieldType &kk) |
vector space division by scalar | |
bool | operator== (const DenseVector< Other > &y) const |
Binary vector comparison. | |
bool | operator!= (const DenseVector< Other > &y) const |
Binary vector incomparison. | |
derived_type & | axpy (const field_type &a, const DenseVector< Other > &y) |
vector space axpy operation ( *this += a y ) | |
PromotionTraits< field_type, typename DenseVector< Other > ::field_type >::PromotedType | operator* (const DenseVector< Other > &y) const |
indefinite vector dot product ![]() | |
PromotionTraits< field_type, typename DenseVector< Other > ::field_type >::PromotedType | dot (const DenseVector< Other > &y) const |
vector dot product ![]() | |
FieldTraits< value_type > ::real_type | one_norm () const |
one norm (sum over absolute values of entries) | |
FieldTraits< value_type > ::real_type | one_norm_real () const |
simplified one norm (uses Manhattan norm for complex values) | |
FieldTraits< value_type > ::real_type | two_norm () const |
two norm sqrt(sum over squared values of entries) | |
FieldTraits< value_type > ::real_type | two_norm2 () const |
square of two norm (sum over squared values of entries), need for block recursion | |
FieldTraits< vt >::real_type | infinity_norm () const |
infinity norm (maximum of absolute values of entries) | |
FieldTraits< vt >::real_type | infinity_norm () const |
infinity norm (maximum of absolute values of entries) | |
FieldTraits< vt >::real_type | infinity_norm_real () const |
simplified infinity norm (uses Manhattan norm for complex values) | |
FieldTraits< vt >::real_type | infinity_norm_real () const |
simplified infinity norm (uses Manhattan norm for complex values) | |
size_type | N () const |
number of blocks in the vector (are of size 1 here) | |
size_type | dim () const |
dimension of the vector space | |
Static Public Member Functions | |
static constexpr size_type | size () |
vector space out of a tensor product of fields.
K | the field type (use float, double, complex, etc) | |
SIZE | number of components. |
typedef Traits::value_type Dune::DenseVector< FieldVector< K, SIZE > >::block_type [inherited] |
export the type representing the components
typedef ConstIterator Dune::DenseVector< FieldVector< K, SIZE > >::const_iterator [inherited] |
typedef for stl compliant access
typedef const value_type& Dune::FieldVector< K, SIZE >::const_reference |
The type used for const references to the vector entry.
typedef DenseIterator<const DenseVector,const value_type> Dune::DenseVector< FieldVector< K, SIZE > >::ConstIterator [inherited] |
ConstIterator class for sequential access.
typedef Traits::derived_type Dune::DenseVector< FieldVector< K, SIZE > >::derived_type [inherited] |
type of derived vector class
typedef FieldTraits< value_type >::field_type Dune::DenseVector< FieldVector< K, SIZE > >::field_type [inherited] |
export the type representing the field
typedef Iterator Dune::DenseVector< FieldVector< K, SIZE > >::iterator [inherited] |
typedef for stl compliant access
typedef DenseIterator<DenseVector,value_type> Dune::DenseVector< FieldVector< K, SIZE > >::Iterator [inherited] |
Iterator class for sequential access.
typedef value_type& Dune::FieldVector< K, SIZE >::reference |
The type used for references to the vector entry.
typedef Base::size_type Dune::FieldVector< K, SIZE >::size_type |
The type used for the index access and size operation.
Reimplemented from Dune::DenseVector< FieldVector< K, SIZE > >.
typedef Base::value_type Dune::FieldVector< K, SIZE >::value_type |
export the type representing the field
Reimplemented from Dune::DenseVector< FieldVector< K, SIZE > >.
anonymous enum |
anonymous enum [inherited] |
We are at the leaf of the block recursion.
constexpr Dune::FieldVector< K, SIZE >::FieldVector | ( | ) | [inline] |
Constructor making default-initialized vector.
Dune::FieldVector< K, SIZE >::FieldVector | ( | std::initializer_list< K > const & | l | ) | [inline] |
Construct from a std::initializer_list.
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.
[in] | x | A DenseVector with correct size. |
[in] | dummy | A void* dummy argument needed by SFINAE. |
Dune::FieldVector< K, SIZE >::FieldVector | ( | const FieldVector< K1, SIZE1 > & | x | ) | [inline, explicit] |
Constructor making vector with identical coordinates.
Dune::FieldVector< K, SIZE >::_data | ( | x. | _data | ) | [inline] |
derived_type& Dune::DenseVector< FieldVector< K, SIZE > >::axpy | ( | const field_type & | a, | |
const DenseVector< Other > & | y | |||
) | [inline, inherited] |
vector space axpy operation ( *this += a y )
ConstIterator Dune::DenseVector< FieldVector< K, SIZE > >::beforeBegin | ( | ) | const [inline, inherited] |
Iterator Dune::DenseVector< FieldVector< K, SIZE > >::beforeBegin | ( | ) | [inline, inherited] |
ConstIterator Dune::DenseVector< FieldVector< K, SIZE > >::beforeEnd | ( | ) | const [inline, inherited] |
Iterator Dune::DenseVector< FieldVector< K, SIZE > >::beforeEnd | ( | ) | [inline, inherited] |
ConstIterator Dune::DenseVector< FieldVector< K, SIZE > >::begin | ( | ) | const [inline, inherited] |
begin ConstIterator
Iterator Dune::DenseVector< FieldVector< K, SIZE > >::begin | ( | ) | [inline, inherited] |
begin iterator
size_type Dune::DenseVector< FieldVector< K, SIZE > >::dim | ( | ) | const [inline, inherited] |
dimension of the vector space
PromotionTraits<field_type,typename DenseVector<Other>::field_type>::PromotedType Dune::DenseVector< FieldVector< K, SIZE > >::dot | ( | const DenseVector< Other > & | y | ) | const [inline, inherited] |
vector dot product which corresponds to Petsc's VecDot
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecDot.html
y | other vector |
ConstIterator Dune::DenseVector< FieldVector< K, SIZE > >::end | ( | ) | const [inline, inherited] |
end ConstIterator
Iterator Dune::DenseVector< FieldVector< K, SIZE > >::end | ( | ) | [inline, inherited] |
end iterator
ConstIterator Dune::DenseVector< FieldVector< K, SIZE > >::find | ( | size_type | i | ) | const [inline, inherited] |
return iterator to given element or end()
Iterator Dune::DenseVector< FieldVector< K, SIZE > >::find | ( | size_type | i | ) | [inline, inherited] |
return iterator to given element or end()
FieldTraits<vt>::real_type Dune::DenseVector< FieldVector< K, SIZE > >::infinity_norm | ( | ) | const [inline, inherited] |
infinity norm (maximum of absolute values of entries)
FieldTraits<vt>::real_type Dune::DenseVector< FieldVector< K, SIZE > >::infinity_norm | ( | ) | const [inline, inherited] |
infinity norm (maximum of absolute values of entries)
FieldTraits<vt>::real_type Dune::DenseVector< FieldVector< K, SIZE > >::infinity_norm_real | ( | ) | const [inline, inherited] |
simplified infinity norm (uses Manhattan norm for complex values)
FieldTraits<vt>::real_type Dune::DenseVector< FieldVector< K, SIZE > >::infinity_norm_real | ( | ) | const [inline, inherited] |
simplified infinity norm (uses Manhattan norm for complex values)
size_type Dune::DenseVector< FieldVector< K, SIZE > >::N | ( | ) | const [inline, inherited] |
number of blocks in the vector (are of size 1 here)
FieldTraits<value_type>::real_type Dune::DenseVector< FieldVector< K, SIZE > >::one_norm | ( | ) | const [inline, inherited] |
one norm (sum over absolute values of entries)
FieldTraits<value_type>::real_type Dune::DenseVector< FieldVector< K, SIZE > >::one_norm_real | ( | ) | const [inline, inherited] |
simplified one norm (uses Manhattan norm for complex values)
bool Dune::DenseVector< FieldVector< K, SIZE > >::operator!= | ( | const DenseVector< Other > & | y | ) | const [inline, inherited] |
Binary vector incomparison.
PromotionTraits<field_type,typename DenseVector<Other>::field_type>::PromotedType Dune::DenseVector< FieldVector< K, SIZE > >::operator* | ( | const DenseVector< Other > & | y | ) | const [inline, inherited] |
indefinite vector dot product which corresponds to Petsc's VecTDot
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecTDot.html
y | other vector |
std::enable_if< std::is_convertible<FieldType, field_type>::value, derived_type >::type& Dune::DenseVector< FieldVector< K, SIZE > >::operator*= | ( | const FieldType & | kk | ) | [inline, 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.
derived_type Dune::DenseVector< FieldVector< K, SIZE > >::operator+ | ( | const DenseVector< Other > & | b | ) | const [inline, inherited] |
Binary vector addition.
std::enable_if< std::is_convertible<ValueType, value_type>::value, derived_type >::type& Dune::DenseVector< FieldVector< K, SIZE > >::operator+= | ( | const ValueType & | kk | ) | [inline, 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.
derived_type& Dune::DenseVector< FieldVector< K, SIZE > >::operator+= | ( | const DenseVector< Other > & | y | ) | [inline, inherited] |
vector space addition
derived_type Dune::DenseVector< FieldVector< K, SIZE > >::operator- | ( | const DenseVector< Other > & | b | ) | const [inline, inherited] |
Binary vector subtraction.
std::enable_if< std::is_convertible<ValueType, value_type>::value, derived_type >::type& Dune::DenseVector< FieldVector< K, SIZE > >::operator-= | ( | const ValueType & | kk | ) | [inline, 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.
derived_type& Dune::DenseVector< FieldVector< K, SIZE > >::operator-= | ( | const DenseVector< Other > & | y | ) | [inline, inherited] |
vector space subtraction
std::enable_if< std::is_convertible<FieldType, field_type>::value, derived_type >::type& Dune::DenseVector< FieldVector< K, SIZE > >::operator/= | ( | const FieldType & | kk | ) | [inline, 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.
bool Dune::DenseVector< FieldVector< K, SIZE > >::operator== | ( | const DenseVector< Other > & | y | ) | const [inline, inherited] |
Binary vector comparison.
const value_type& Dune::DenseVector< FieldVector< K, SIZE > >::operator[] | ( | size_type | i | ) | const [inline, inherited] |
value_type& Dune::DenseVector< FieldVector< K, SIZE > >::operator[] | ( | size_type | i | ) | [inline, inherited] |
random access
const K& Dune::FieldVector< K, SIZE >::operator[] | ( | size_type | i | ) | const [inline] |
K& Dune::FieldVector< K, SIZE >::operator[] | ( | size_type | i | ) | [inline] |
size_type Dune::DenseVector< FieldVector< K, SIZE > >::size | ( | ) | const [inline, inherited] |
size method
static constexpr size_type Dune::FieldVector< K, SIZE >::size | ( | ) | [inline, static] |
FieldTraits<value_type>::real_type Dune::DenseVector< FieldVector< K, SIZE > >::two_norm | ( | ) | const [inline, inherited] |
two norm sqrt(sum over squared values of entries)
FieldTraits<value_type>::real_type Dune::DenseVector< FieldVector< K, SIZE > >::two_norm2 | ( | ) | const [inline, inherited] |
square of two norm (sum over squared values of entries), need for block recursion