dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #25243
Re: How to combine component Functions into a VectorFunction
-
To:
Joachim Berdal Haga <jobh@xxxxxxxxx>
-
From:
Anders Logg <logg@xxxxxxxxx>
-
Date:
Wed, 23 Nov 2011 19:14:59 +0100
-
Cc:
dolfin-dev <dolfin@xxxxxxxxxxxxxxxxxxx>
-
In-reply-to:
<CAPKc5=9nV06a0O7Nbf=axE6bR2KRamr25eMU-EbkEHZx98TxUA@mail.gmail.com>
-
User-agent:
Mutt/1.5.21 (2010-09-15)
On Wed, Nov 23, 2011 at 07:06:58PM +0100, Joachim Berdal Haga wrote:
> I was wondering if it's possible to combine components into a vector-valued
> function safely.
>
> The sub-functions returned by Function.split() do not allow assignment, and
> index tricks like
> vf.vector()[d*len(f):(d+1)*len(f)] = f
> don't work in parallel (and are rather too intimate with the DOLFIN details
> anyway).
>
> --Â
> Joachim.
One way would be to project the components into the vector-valued
function, but there might be better ways.
--
Anders
References