dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #25207
Re: Removal of constructor Function(V, x)?
-
To:
"Garth N. Wells" <gnw20@xxxxxxxxx>
-
From:
Anders Logg <logg@xxxxxxxxx>
-
Date:
Mon, 21 Nov 2011 21:52:53 +0100
-
Cc:
DOLFIN Mailing List <dolfin@xxxxxxxxxxxxxxxxxxx>
-
In-reply-to:
<CAA4C66NUZvrPRTS_vXWPtYeB3+zf7YTzS7U2_tjPey=xuLDGGA@mail.gmail.com>
-
User-agent:
Mutt/1.5.21 (2010-09-15)
On Mon, Nov 21, 2011 at 08:46:13PM +0000, Garth N. Wells wrote:
> On 21 November 2011 13:07, Anders Logg <logg@xxxxxxxxx> wrote:
> > On Sun, Nov 20, 2011 at 11:55:43PM +0100, Anders Logg wrote:
> >> On Sun, Nov 20, 2011 at 11:49:42PM +0100, Marie E. Rognes wrote:
> >> >
> >> >
> >> > On 20. nov. 2011, at 23:31, Anders Logg <logg@xxxxxxxxx> wrote:
> >> >
> >> > > Is anyone using the Function constructor that takes a vector as input
> >> > > argument?
> >> > >
> >> > > Function u(V, x);
> >> > >
> >> >
> >> > Yes.
> >>
> >> Does it work? In parallel?
> >>
> >> Does it not work to instead use
> >>
> >> x = u.vector()
> >>
> >> ?
> >>
> >> If you need it, we should keep it but add an error message that it
> >> doesn't work in parallel, unless it does...
> >
> > Any more input on this? There are several options:
> >
> > 1. Remove this constructor
> >
> > 2. Throw an error when running in parallel
> >
> > 3. Check that the input vector makes sense
> >
> > The last one is problematic since I don't see an easy way to perform
> > the check, other than calling get_local and having it fail.
> >
>
> I haven't heard any reason why it can't be removed. We may need to fix
> assignment (re earlier discussion on assign) to just copy values and
> not the whole object so that a user can get the vector and then assign
> values to it without messing up the ghosting.
Sounds good, but I want to wait for Marie to comment before I remove
it. She is using it.
Marie? Does it work for you to use x = u.vector()?
--
Anders
Follow ups
References
-
Removal of constructor Function(V, x)?
From: Anders Logg, 2011-11-20
-
Re: Removal of constructor Function(V, x)?
From: Marie E. Rognes, 2011-11-20
-
Re: Removal of constructor Function(V, x)?
From: Anders Logg, 2011-11-20
-
Re: Removal of constructor Function(V, x)?
From: Anders Logg, 2011-11-21
-
Re: Removal of constructor Function(V, x)?
From: Garth N. Wells, 2011-11-21