← Back to team overview

dolfin team mailing list archive

[HG DOLFIN] Added example of use of deep and shallow copying of sub functions

 

One or more new changesets pushed to the primary dolfin repository.
A short summary of the last three changesets is included below.

changeset:   6847:75486ffc9866523ee849b00dd16203a6a8f827ef
tag:         tip
user:        "Johan Hake <hake@xxxxxxxxx>"
date:        Tue Aug 25 12:12:43 2009 +0200
files:       demo/pde/stokes/taylor-hood/python/demo.py
description:
Added example of use of deep and shallow copying of sub functions


changeset:   6846:c88c78dbfcfb2d87184cbac2e7533df4ad0d23aa
user:        "Johan Hake <hake@xxxxxxxxx>"
date:        Tue Aug 25 11:50:58 2009 +0200
files:       site-packages/dolfin/function.py
description:
Fix sub funciton logic in PyDOLFIN

  >>> v0 = u.sub(0,deepcopy=False)

v0 is a shallowed copied sub function, (deepcopy defaults to False)
and

  >>> v1 = u.sub(0, deepcopy=True)

is a deepcopied version.

The syntax for split is:

   >>> v, p = u.split()
   >>> v, p = u.split(deepcopy=False)
   >>> v, p = u.split(False)

(all equivalent) for two shallow copied sub functions and

   >>> v, p = u.split(deepcopy=True)
   >>> v, p = u.split(True)

(all equivalent) for the deepcopied versions.


changeset:   6845:8fbdbe7ac834c83c954db9fc7affba15ea17c3e3
user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
date:        Mon Aug 24 22:52:39 2009 +0100
files:       dolfin/function/SpecialFunctions.h
description:
Add experimental constructor to DiscreteFunction to be used by the Python interface.

----------------------------------------------------------------------
For more details, visit http://www.fenics.org/hg/dolfin