dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #11388
Re: [HG DOLFIN] Minor formatting fixes in demo and remove isinstance(v, Function) test in
On Saturday 27 December 2008 00:36:01 Anders Logg wrote:
> On Fri, Dec 26, 2008 at 11:34:48PM +0100, Johan Hake wrote:
> > On Tuesday 23 December 2008 12:14:51 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: 5446:b389f5659227c736445a0d90b16f23df0c52afb4
> > > tag: tip
> > > user: Anders Logg <logg@xxxxxxxxx>
> > > date: Tue Dec 23 12:14:45 2008 +0100
> > > files: demo/pde/dg/advection-diffusion/python/demo.py
> > > site-packages/dolfin/interpolate.py site-packages/dolfin/project.py
> > > description:
> > > Minor formatting fixes in demo and remove isinstance(v, Function) test
> > > in interpolate() and project() which fails for IsOutflowFacet.
> >
> > All special functions now also inherits from Function, making these tests
> > pass again, and they are therfore added back.
> >
> > Johan
>
> Nice.
>
> I've removed the test again in project.py (but not in interpolate.py
> where it is needed) and made a minor fix so that we can now project
> general expressions, not just Functions.
Ok.
> For example, one can now plot the (projection of the) gradient of a
> solution by
>
> plot(project(grad(u), VectorFunctionSpace(mesh, "CG", 1)))
Cool.
> I'm thinking of adding a check to plot.py so that the projection is
> automatically computed whenever we plot something which is not a Mesh,
> a Function or a MeshFunction. It would be nice to be able to do things
> like
>
> plot(grad(u))
>
> plot(curl(u))
>
> plot(div(u))
>
> etc.
Looks nice!
Johan
References