← Back to team overview

dolfin team mailing list archive

[HG DOLFIN] Work on 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:   6842:4e1891827208fcab16bc207076618e6b4285aed6
tag:         tip
user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
date:        Mon Aug 24 14:46:15 2009 +0100
files:       demo/pde/elasticity/cpp/main.cpp dolfin/fem/DofMap.cpp dolfin/fem/DofMap.h dolfin/function/Function.cpp dolfin/function/Function.h dolfin/function/FunctionSpace.cpp dolfin/function/FunctionSpace.h dolfin/function/SpecialFunctions.h
description:
Work on copying of sub functions.

Creating a Function u0

  Function u0 = u[0];

npw invovles a deep copy, i.e. u0 will have its own vector which will be shorter than that of u, as it was before the recent re-design.

Recall that copies can be avoided by doing

  Function& u0 = u[0];


changeset:   6841:857728077ba8b73b2f7bf9d918c7da62a958bb1d
user:        "Johan Hake <hake@xxxxxxxxx>"
date:        Mon Aug 24 12:26:53 2009 +0200
files:       ChangeLog dolfin/swig/typemaps.i
description:
Fix in-typemap for uint
  - Python2.6 introduced an incompatability wrt int typechecks in the
    c-api, making function wanting a dolfin::uint complain, when handed a
    numpy.XXint.


changeset:   6840:aa7ba4aea1e817ff1888e85ba32ef815a67a2ab6
user:        "Johan Hake <hake@xxxxxxxxx>"
date:        Sun Aug 23 23:27:57 2009 +0200
files:       dolfin/swig/dolfin.i dolfin/swig/dolfin_la_post.i dolfin/swig/dolfin_la_pre.i dolfin/swig/dolfin_shared_ptr_classes.i
description:
Added in/out typemaps for shared_ptr<Epetra_FEFoo>.
  - EpetraVector.vec() and EpetraMatrix.mat() now returns
    a PyTrilinos proxy class of the underlying Epetra object.
    (you just have to import PyTrilinos.Epetra first)
  - The Constructors taking shared version of these objects also work now.
  - Added a macro for in/out typemaps for shared_ptr wrapping of
    such "foreign" classes.
  - Use these functions with care as the underlying sharedness of these objects are
    destroyed, as PyTrilinos does not use shared_ptr for their types.

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


Follow ups