Discussion has migrated to https://bitbucket.org/fenics-project/dolfin/issue/263.

Garth

On Thu, 27 Feb, 2014 at 11:39 AM, Martin Sandve Alnæs <[email protected]> wrote:
The core lines of the issue being fixed are these:

  u0 = project( u0, V )
  #missing u0.update()
  bc = DirichletBC(V, u0, u0_boundary)

In my opinion, _project_ seems to be the one that's missing the update, not DBC which the pull request tries to add it to.

This seems to be to be a rather fundamental issue cross cutting all of dolfin which needs to be done consistently. Should the operation that modifies u0 or the operation that inspects u0 call u0.update()?

In my opinion, as a rule of thumb it has to be the operation that modifies that should call update. I.e. in this code only a single update after project is needed, not one for bc1 and one for bc2:
  u0 = project( u0, V )
  #missing u0.update()
  bc1 = DirichletBC(V, u0, u0_boundary1)
  bc2 = DirichletBC(V, u0, u0_boundary2)

And if vectors are modified directly, the user is responsible for calling update when finished.




Martin


On 27 February 2014 11:29, Martin Sandve Alnæs <[email protected]> wrote:
Hidden behind a pull request there was a discussion now about the right place to insert function.update() calls.

https://bitbucket.org/fenics-project/dolfin/pull-request/117/fix-issue-263/diff#comment-1317810

I found the discussion to be important so instead of continuing there I add my 2 cents here:

Requiring the user to call update at the correct places according to what the dolfin implementation under the hood requires at any particular time would be a massive blow to usability. How can anyone be expected to do that correctly without knowing in detail how dolfin components are implemented?

Martin


_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to