← Back to team overview

dolfin team mailing list archive

Re: [HG DOLFIN] Fixed two more demos.

 

On Monday 15 December 2008 22:10:06 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:   5351:ade6313d499535c5992f7600b65e2427e4cd363f
> tag:         tip
> user:        "Johan Hake <hake@xxxxxxxxx>"
> date:        Mon Dec 15 22:10:01 2008 +0100
> files:       TODO demo/pde/adaptive-poisson/python/demo.py
> demo/pde/lift-drag/pressure.xml.gz demo/pde/lift-drag/python/demo.py
> description:
> Fixed two more demos.

The demo in lift-drag works now, but only using the pressure field. 

The demo reads two functions from file, pressure and velocity. These are used 
to define the Lift and Drag forms, but an error is issued when the mesh is 
extracted from the dolfin_form as it compares the mesh pointers and concludes 
that these are not the same. 

Should we have a more extensive check if the pointer check failes? E.g. 
comparing the coordinates of the vertices?

The demo in adaptive-poisson revealed a degration(?) in functionality compared 
with the previous Function interface. 

In this demo a pde is solved many times iteratively, while refining the mesh. 
To make the demo work I had to redefine the FunctionSpace and form for each 
iteration to update the dofmaps.

Would it be possible and usefull to add the functionality:

  V.update_mesh(mesh)

which would then recompute the dofmaps with the new mesh? 

This functionality may also be usefull to fix the bug in the lift-drag demo?

  p = Function('pressure.xml')
  v = Function('velocity.xml')

  v.function_space().update_mesh(p.function_space().mesh())


Johan

> changeset:   5350:0dc4869f21a50048aed11388b3ef2cb2397b79d3
> user:        "Johan Hake <hake@xxxxxxxxx>"
> date:        Mon Dec 15 22:08:35 2008 +0100
> files:       site-packages/dolfin/assemble.py
> description:
> assemble() in PyDOLFIN now also takes a SubDomain as input
>   - If a SubDomain is given for one of the cell/facet-domains in
>     assemble, a MeshFunction will be created and passed to the
>     cpp.assemble()
>
>
> changeset:   5349:25815e4952d36abd5495ccb681a7b0c7f65c3903
> user:        "Martin Sandve Alnæs <martinal@xxxxxxxxx>"
> date:        Mon Dec 15 16:11:39 2008 +0100
> files:       dolfin/io/PVTKFile.cpp dolfin/io/RAWFile.cpp
> dolfin/io/VTKFile.cpp description:
> Extended file writers to tensor elements (using ostringstream).
> (Paraview doesn't easily visualise tensor fields, but at least
> the components are available as scalar fields, which can be
> used in the calculator filter)
>
> Some of the old code is kept in comments,
> feel free to delete it after a review.
>
> ----------------------------------------------------------------------
> For more details, visit http://www.fenics.org/hg/dolfin




References