Dune Core Modules (2.6.0)
densevector.hh
Go to the documentation of this file.
24 typedef typename FieldTraits< typename DenseMatVecTraits<V>::value_type >::field_type field_type;
129 friend class DenseIterator<typename std::remove_const<C>::type, typename std::remove_const<T>::type, typename mutable_reference<R>::type >;
130 friend class DenseIterator<const typename std::remove_const<C>::type, const typename std::remove_const<T>::type, typename const_reference<R>::type >;
132 typedef DenseIterator<typename std::remove_const<C>::type, typename std::remove_const<T>::type, typename mutable_reference<R>::type > MutableIterator;
133 typedef DenseIterator<const typename std::remove_const<C>::type, const typename std::remove_const<T>::type, typename const_reference<R>::type > ConstIterator;
197 DifferenceType distanceTo(DenseIterator<const typename std::remove_const<C>::type,const typename std::remove_const<T>::type> other) const
200 return static_cast< DifferenceType >( other.position_ ) - static_cast< DifferenceType >( position_ );
203 DifferenceType distanceTo(DenseIterator<typename std::remove_const<C>::type, typename std::remove_const<T>::type> other) const
206 return static_cast< DifferenceType >( other.position_ ) - static_cast< DifferenceType >( position_ );
272 };
540 typename PromotionTraits<field_type,typename DenseVector<Other>::field_type>::PromotedType operator* (const DenseVector<Other>& y) const {
541 typedef typename PromotionTraits<field_type, typename DenseVector<Other>::field_type>::PromotedType PromotedType;
558 typename PromotionTraits<field_type,typename DenseVector<Other>::field_type>::PromotedType dot(const DenseVector<Other>& y) const {
559 typedef typename PromotionTraits<field_type, typename DenseVector<Other>::field_type>::PromotedType PromotedType;
Macro for wrapping boundary checks.
Generic iterator class for dense vector and matrix implementations.
Definition: densevector.hh:128
std::ptrdiff_t DifferenceType
The type of the difference between two positions.
Definition: densevector.hh:139
C::size_type SizeType
The type to index the underlying container.
Definition: densevector.hh:144
Interface for a class of dense vectors over a given field.
Definition: densevector.hh:235
Traits::value_type value_type
export the type representing the field
Definition: densevector.hh:257
FieldTraits< value_type >::real_type two_norm2() const
square of two norm (sum over squared values of entries), need for block recursion
Definition: densevector.hh:599
ConstIterator const_iterator
typedef for stl compliant access
Definition: densevector.hh:342
Iterator iterator
typedef for stl compliant access
Definition: densevector.hh:305
ConstIterator find(size_type i) const
return iterator to given element or end()
Definition: densevector.hh:371
FieldTraits< value_type >::real_type two_norm() const
two norm sqrt(sum over squared values of entries)
Definition: densevector.hh:590
PromotionTraits< field_type, typenameDenseVector< Other >::field_type >::PromotedType dot(const DenseVector< Other > &y) const
vector dot product which corresponds to Petsc's VecDot
Definition: densevector.hh:558
DenseIterator< const DenseVector, const value_type > ConstIterator
ConstIterator class for sequential access.
Definition: densevector.hh:340
Traits::derived_type derived_type
type of derived vector class
Definition: densevector.hh:254
derived_type operator+(const DenseVector< Other > &b) const
Binary vector addition.
Definition: densevector.hh:400
@ blocklevel
The number of block levels we contain.
Definition: densevector.hh:271
derived_type & axpy(const field_type &a, const DenseVector< Other > &y)
vector space axpy operation ( *this += a y )
Definition: densevector.hh:524
derived_type & operator-=(const DenseVector< Other > &y)
vector space subtraction
Definition: densevector.hh:390
size_type dim() const
dimension of the vector space
Definition: densevector.hh:684
FieldTraits< vt >::real_type infinity_norm() const
infinity norm (maximum of absolute values of entries)
Definition: densevector.hh:610
derived_type & operator=(const value_type &k)
Assignment operator for scalar.
Definition: densevector.hh:276
PromotionTraits< field_type, typenameDenseVector< Other >::field_type >::PromotedType operator*(const DenseVector< Other > &y) const
indefinite vector dot product which corresponds to Petsc's VecTDot
Definition: densevector.hh:540
Traits::size_type size_type
The type used for the index access and size operation.
Definition: densevector.hh:266
derived_type operator-(const DenseVector< Other > &b) const
Binary vector subtraction.
Definition: densevector.hh:408
DenseIterator< DenseVector, value_type > Iterator
Iterator class for sequential access.
Definition: densevector.hh:303
bool operator==(const DenseVector< Other > &y) const
Binary vector comparison.
Definition: densevector.hh:504
std::enable_if< std::is_convertible< FieldType, field_type >::value, derived_type >::type & operator*=(const FieldType &kk)
vector space multiplication with scalar
Definition: densevector.hh:472
derived_type & operator+=(const DenseVector< Other > &y)
vector space addition
Definition: densevector.hh:380
ConstIterator begin() const
begin ConstIterator
Definition: densevector.hh:345
FieldTraits< vt >::real_type infinity_norm_real() const
simplified infinity norm (uses Manhattan norm for complex values)
Definition: densevector.hh:626
Traits::value_type block_type
export the type representing the components
Definition: densevector.hh:263
value_type & operator[](size_type i)
random access
Definition: densevector.hh:286
FieldTraits< value_type >::field_type field_type
export the type representing the field
Definition: densevector.hh:260
bool operator!=(const DenseVector< Other > &y) const
Binary vector incomparison.
Definition: densevector.hh:516
std::enable_if< std::is_convertible< FieldType, field_type >::value, derived_type >::type & operator/=(const FieldType &kk)
vector space division by scalar
Definition: densevector.hh:494
FieldTraits< value_type >::real_type one_norm_real() const
simplified one norm (uses Manhattan norm for complex values)
Definition: densevector.hh:581
Iterator find(size_type i)
return iterator to given element or end()
Definition: densevector.hh:334
FieldTraits< value_type >::real_type one_norm() const
one norm (sum over absolute values of entries)
Definition: densevector.hh:571
size_type N() const
number of blocks in the vector (are of size 1 here)
Definition: densevector.hh:678
Base class for stl conformant forward iterators.
Definition: iteratorfacades.hh:433
Provides the functions dot(a,b) := and dotT(a,b) := .
Type traits to determine the type of reals (when working with complex numbers)
Implements a generic iterator class for writing stl conformant iterators.
auto dot(const A &a, const B &b) -> typename std::enable_if<!IsVector< A >::value &&!std::is_same< typename FieldTraits< A >::field_type, typename FieldTraits< A >::real_type > ::value, decltype(conj(a) *b)>::type
computes the dot product for fundamental data types according to Petsc's VectDot function: dot(a,...
Definition: dotproduct.hh:40
#define DUNE_ASSERT_BOUNDS(cond)
If DUNE_CHECK_BOUNDS is defined: check if condition cond holds; otherwise, do nothing.
Definition: boundschecking.hh:28
Documentation of the traits classes you need to write for each implementation of DenseVector or Dense...
STL namespace.
Compute type of the result of an arithmetic operation involving two different number types.
Compute type of the result of an arithmetic operation involving two different number types.
Definition: promotiontraits.hh:25
get the 'mutable' version of a reference to a const object
Definition: genericiterator.hh:114
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 24, 23:30, 2024)