dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #16262
Re: Python sun functions
On Saturday 17 October 2009 12:32:54 Garth N. Wells wrote:
> Will
>
> uh = U[1]
>
> return a deep or shallow copy of the sub-Function?
To avoid confusion with the ufl interface we have limited the interface for
SubFunctions in PyDOLFIN to split. split returns a shallow copy by default.
pass True to split and it will return a deepcopy. In your case it would be:
uh = U.split()[0]
and
uh = U.split(True)[0]
operator[] is used when you define forms. We have not yet managed to merge the
two operations into one.
> Where is the operator [] define for sub-Functions?
The operator you are using is the ufl one, which is defined in
ufl.exproperators.py.
Johan
Follow ups
References