diff --git a/dune/common/dynvector.hh b/dune/common/dynvector.hh index 8c9019e5367f732ea2d1fc40ee4a44d092b362fe..c3c82fdf49f89271beffbb741b60de4e1b63e6f4 100644 --- a/dune/common/dynvector.hh +++ b/dune/common/dynvector.hh @@ -71,6 +71,17 @@ namespace Dune { _data(x._data) {} + //! Constructor making vector with identical coordinates + template<class X> + DynamicVector (const DenseVector< X > & x) : + _data( ) + { + const size_type n = x.size(); + _data.reserve(n); + for( size_type i =0; i<n ;++i) + _data.push_back( x[ i ] ); + } + using Base::operator=; //==== forward some methods of std::vector