DUNE-FEM (unstable)
Public Types | |
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. | |
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 | 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) | |
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> | |
ExplicitFieldVector & | operator= (const C &c) |
Assignment operator for scalar. | |
ExplicitFieldVector & | operator= (const ExplicitFieldVector &other) |
copy assignment operator | |
size_type | size () const |
size method | |
T * | data () noexcept |
return pointer to underlying array | |
const T * | data () const noexcept |
return pointer to underlying array | |
template<class Other > | |
PromotionTraits< field_type, typename DenseVector< Other >::field_type >::PromotedType | operator* (const DenseVector< Other > &x) const |
indefinite vector dot product \(\left (x^T \cdot y \right)\) which corresponds to Petsc's VecTDot More... | |
value_type & | front () |
return reference to first element | |
const value_type & | front () const |
return reference to first element | |
value_type & | back () |
return reference to last element | |
const value_type & | back () const |
return reference to last element | |
bool | empty () const |
checks whether the container is empty | |
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() | |
template<class Other > | |
derived_type & | operator+= (const DenseVector< Other > &x) |
vector space addition | |
template<typename ValueType > | |
std::enable_if< std::is_convertible< ValueType, value_type >::value, derived_type >::type & | operator+= (const ValueType &kk) |
vector space add scalar to all comps More... | |
template<class Other > | |
derived_type & | operator-= (const DenseVector< Other > &x) |
vector space subtraction | |
template<typename ValueType > | |
std::enable_if< std::is_convertible< ValueType, value_type >::value, derived_type >::type & | operator-= (const ValueType &kk) |
vector space subtract scalar from all comps More... | |
template<class Other > | |
derived_type | operator+ (const DenseVector< Other > &b) const |
Binary vector addition. | |
template<class Other > | |
derived_type | operator- (const DenseVector< Other > &b) const |
Binary vector subtraction. | |
derived_type | operator- () const |
Vector negation. | |
template<typename FieldType > | |
std::enable_if< std::is_convertible< FieldType, field_type >::value, derived_type >::type & | operator*= (const FieldType &kk) |
vector space multiplication with scalar More... | |
template<typename FieldType > | |
std::enable_if< std::is_convertible< FieldType, field_type >::value, derived_type >::type & | operator/= (const FieldType &kk) |
vector space division by scalar More... | |
template<class Other > | |
bool | operator== (const DenseVector< Other > &x) const |
Binary vector comparison. | |
template<class Other > | |
bool | operator!= (const DenseVector< Other > &x) const |
Binary vector incomparison. | |
template<class Other > | |
derived_type & | axpy (const field_type &a, const DenseVector< Other > &x) |
vector space axpy operation ( *this += a x ) | |
template<class Other > | |
PromotionTraits< field_type, typename DenseVector< Other >::field_type >::PromotedType | dot (const DenseVector< Other > &x) const |
vector dot product \(\left (x^H \cdot y \right)\) which corresponds to Petsc's VecDot More... | |
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 | |
template<typename vt = value_type, typename std::enable_if<!HasNaN< vt >::value, int >::type = 0> | |
FieldTraits< vt >::real_type | infinity_norm () const |
infinity norm (maximum of absolute values of entries) | |
template<typename vt = value_type, typename std::enable_if< HasNaN< vt >::value, int >::type = 0> | |
FieldTraits< vt >::real_type | infinity_norm () const |
infinity norm (maximum of absolute values of entries) | |
template<typename vt = value_type, typename std::enable_if<!HasNaN< vt >::value, int >::type = 0> | |
FieldTraits< vt >::real_type | infinity_norm_real () const |
simplified infinity norm (uses Manhattan norm for complex values) | |
template<typename vt = value_type, typename std::enable_if< HasNaN< vt >::value, int >::type = 0> | |
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 Attributes | |
constexpr static int | dimension |
The size of this vector. | |
constexpr static int | blocklevel = 1 |
The number of block levels we contain. This is the leaf, that is, 1. | |
Related Functions | |
(Note that these are not member functions.) | |
std::istream & | operator>> (std::istream &in, FieldVector< T, SIZE > &v) |
Read a FieldVector from an input stream. More... | |
template<typename V > | |
std::ostream & | operator<< (std::ostream &s, const DenseVector< V > &v) |
Write a DenseVector to an output stream. More... | |
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/2]
|
inlineexplicit |
Redirect any general construction to the base class during explicit conversion
◆ ExplicitFieldVector() [2/2]
|
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
◆ beforeBegin() [1/2]
|
inlineinherited |
- Returns
- an iterator that is positioned before the first entry of the vector.
◆ beforeBegin() [2/2]
|
inlineinherited |
- Returns
- an iterator that is positioned before the first entry of the vector.
◆ beforeEnd() [1/2]
|
inlineinherited |
- Returns
- an iterator that is positioned before the end iterator of the vector, i.e. at the last entry.
References Dune::DenseVector< V >::size().
◆ beforeEnd() [2/2]
|
inlineinherited |
- Returns
- an iterator that is positioned before the end iterator of the vector. i.e. at the last element
References Dune::DenseVector< V >::size().
◆ dot()
|
inlineinherited |
vector dot product \(\left (x^H \cdot y \right)\) which corresponds to Petsc's VecDot
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecDot.html
- Parameters
-
x other vector
- Returns
References Dune::dot(), and Dune::DenseVector< V >::size().
◆ operator*()
|
inlineinherited |
indefinite vector dot product \(\left (x^T \cdot y \right)\) which corresponds to Petsc's VecTDot
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecTDot.html
- Parameters
-
x other vector
- Returns
References Dune::DenseVector< V >::size().
◆ operator*=()
|
inlineinherited |
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.
References Dune::DenseVector< V >::size().
◆ operator+=()
|
inlineinherited |
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.
References Dune::DenseVector< V >::size().
◆ operator-=()
|
inlineinherited |
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.
References Dune::DenseVector< V >::size().
◆ operator/=()
|
inlineinherited |
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.
References Dune::DenseVector< V >::size().
Friends And Related Function Documentation
◆ operator>>()
|
related |
Read a FieldVector from an input stream.
- Note
- This operator is STL compliant, i.e., the content of v is only changed if the read operation is successful.
- Parameters
-
[in] in std :: istream to read from [out] v FieldVector to be read
- Returns
- the input stream (in)
The documentation for this class was generated from the following file:
- dune/fem/common/explicitfieldvector.hh