dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #12132
Re: [HG DOLFIN] Move code from Function copy constructor to assignment operator and
On Sunday 15 February 2009 21:23:44 DOLFIN wrote:
> One or more new changesets pushed to the primary dolfin repository.
> A short summary of the last three changesets is included below.
>
> changeset: 5701:d3661203791d9c7707695c59adbbd3a2e20a220c
> tag: tip
> user: Anders Logg <logg@xxxxxxxxx>
> date: Sun Feb 15 21:23:36 2009 +0100
> files: dolfin/function/Function.cpp
> description:
> Move code from Function copy constructor to assignment operator and
> call assignment operator from copy constructor
I liked Garth solution better.
1) A copy constructor that, just copies the Function if it has
a FunctionSpace.
2) The assignment operator works only for discrete Functions.
We could add an interpolate() (or something) function that
v.interpolate(*_vector, *_function_space);
Then the user can explicitly create a discrete function of its user-defined
Function. Now the user gets this as an implicitly result of a function copy,
which make litle sense to me.
But that's just me :)
Johan
> changeset: 5700:751b0e4c4e3cba0c5fe19287f8423815045a496f
> user: Anders Logg <logg@xxxxxxxxx>
> date: Sun Feb 15 21:19:37 2009 +0100
> files: dolfin/function/Function.cpp
> description:
> Either assign vector or interpolate values in Function copy constructor
>
>
> changeset: 5699:10bde5c0899dff38a707c72bfb0a99ae7c50b14d
> user: Anders Logg <logg@xxxxxxxxx>
> date: Sun Feb 15 20:51:59 2009 +0100
> files: ChangeLog dolfin/function/Function.cpp
> description:
> Formatting fixes in Function.cpp and updates of ChangeLog
>
> ----------------------------------------------------------------------
> For more details, visit http://www.fenics.org/hg/dolfin
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
Follow ups
References