dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #21776
Re: [Question #147504]: Subfunction does not work any more
On 03/03/11 01:31, Marijke Habermann wrote:
> Question #147504 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/147504
>
> Marijke Habermann requested for more information:
> I have a related question: How can I create the same function p = Function(V2) when I can only access W directly?
> Do I need to use the 'collapse_sub_spaces' method, and if so, what are the necessary arguments?
>
You can do
u = Function(W)
. . .
# View into master function (shallow copy)
p_view = u.split()[1]
# Independent function (deep copy)
p = u.split(True)[1]
Garth
> Thank you for your help,
> marijke
>
References