[dune-pdelab] New constructor for dense vector backend [patch]

Christian Engwer christian.engwer at uni-muenster.de
Mon May 5 23:43:28 CEST 2014


thanks

On Mon, May 05, 2014 at 11:14:53PM +0200, Oliver Sander wrote:
> Dear pdelab,
> the attached patch adds a new constructor to the dense vector backend,
> which allows to construct such a backend given an externally existing
> container class.  Please consider this patch for inclusion into dune-pdelab.
> Thanks,
> Oliver

> From c0db2415cf19d7dde65341ccdf109b5322cc9dca Mon Sep 17 00:00:00 2001
> From: Oliver Sander <sander at igpm.rwth-aachen.de>
> Date: Mon, 5 May 2014 23:09:27 +0200
> Subject: [PATCH] [backend] Add constructor for a given GridFunctionSpace and
>  dense vector
> 
> ---
>  dune/pdelab/backend/dense/vector.hh | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/dune/pdelab/backend/dense/vector.hh b/dune/pdelab/backend/dense/vector.hh
> index 498f9d1..7c80d08 100644
> --- a/dune/pdelab/backend/dense/vector.hh
> +++ b/dune/pdelab/backend/dense/vector.hh
> @@ -114,6 +114,18 @@ namespace Dune {
>            : _gfs(gfs)
>          {}
>  
> +        /** \brief Constructs an VectorContainer for an explicitly given vector object
> +         *
> +         * \param gfs GridFunctionSpace that determines the size and the blocking of the vector
> +         * \param container The actual container class
> +         */
> +        VectorContainer (const GFS& gfs, Container& container)
> +          : _gfs(gfs)
> +          , _container(stackobject_to_shared_ptr(container))
> +        {
> +          _container->resize(gfs.ordering().blockCount());
> +        }
> +
>          VectorContainer (const GFS& gfs, const E& e)
>            : _gfs(gfs)
>            , _container(make_shared<Container>(gfs.ordering().blockCount(),e))
> -- 
> 2.0.0.rc0
> 




> _______________________________________________
> dune-pdelab mailing list
> dune-pdelab at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-pdelab


-- 
Prof. Dr. Christian Engwer 
Institut für Numerische und Angewandte Mathematik
Fachbereich Mathematik und Informatik der Universität Münster
Einsteinstrasse 62
48149 Münster

E-Mail	christian.engwer at uni-muenster.de
Telefon	+49 251 83-35067
FAX		+49 251 83-32729




More information about the dune-pdelab mailing list