Skip to content
Snippets Groups Projects
Commit 860c6682 authored by Martin Nolte's avatar Martin Nolte
Browse files

* add scalar product in case of FieldVector< K, 1 >

* make documentation more consistent

[[Imported from SVN: r5206]]
parent f65f2af7
Branches
Tags
No related merge requests found
......@@ -30,7 +30,7 @@ namespace Dune {
*/
// forward declaration of template
template<class K, int n> class FieldVector;
template<class K, int SIZE> class FieldVector;
#endif
......@@ -302,7 +302,7 @@ namespace Dune {
#else
/** \brief Construct a vector space out of a tensor product of fields.
K is the field type (use float, double, complex, etc) and n
K is the field type (use float, double, complex, etc) and SIZE
is the number of components.
It is generally assumed that K is a numerical type compatible with double
......@@ -929,6 +929,16 @@ namespace Dune {
return *this;
}
#ifndef DUNE_EXPRESSIONTEMPLATES
//===== Euclidean scalar product
//! scalar product
inline K operator* ( const FieldVector &y ) const
{
return p * y[ 0 ];
}
#endif
//===== norms
//! one norm (sum over absolute values of entries)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment