← Back to team overview

dolfin team mailing list archive

Re: [HG DOLFIN] Work on using 'std::vector<double> x' in Data in place on double* x.

 



Garth N. Wells wrote:

Anders Logg wrote:
Nice. I see you've used std::vector for the x argument. Shouldn't we
also use it for values?


Yes, but I'm finding it hard enough just to get it working for x in PyDOLFIN ;).

How do I create a directorin for a 'const std::vector<double>&'???

How does one interface std::vector and numpy arrays?


Where have all the SWIG/Python experts gone? Ola?

We seem to have

  std::vector<double> -> NumPy array

in place, but we don't have

    NumPy array ->  std::vector<double>

How should this be done? The *.i files are a nightmare to read.

Garth

Garth

--
Anders


On Sun, Nov 15, 2009 at 03:05:09PM +0100, 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:   7448:d7b904e78c10
tag:         tip
user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
date:        Sun Nov 15 14:04:55 2009 +0000
files:       demo/function/eval/cpp/main.cpp dolfin/function/Data.cpp dolfin/function/Data.h dolfin/function/Expression.cpp dolfin/function/Expression.h dolfin/function/Function.cpp dolfin/function/Function.h dolfin/function/SpecialFunctions.cpp dolfin/swig/function_post.i dolfin/swig/function_pre.i test/unit/function/cpp/test.cpp
description:
Work on using 'std::vector<double> x' in Data in place on double* x.


changeset:   7447:9e8eadb9b634
user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
date:        Sat Nov 14 15:09:04 2009 +0000
files:       site-packages/dolfin/constant.py test/unit/function/cpp/test.cpp
description:
small update in constant.py.


changeset:   7446:8db3b96bd82d
user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
date:        Sat Nov 14 11:30:45 2009 +0000
files:       dolfin/function/SpecialFunctions.cpp
description:
Update MeshCoordinates function.

----------------------------------------------------------------------
For more details, visit http://www.fenics.org/hg/dolfin
_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev

------------------------------------------------------------------------

_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev


_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev




Follow ups

References