Thread Previous • Date Previous • Date Next • Thread Next |
noreply@xxxxxxxxxxxxx wrote:
------------------------------------------------------------ revno: 4340 committer: Johan Hake <hake.dev@xxxxxxxxx> branch nick: dolfin timestamp: Tue 2009-12-08 23:42:50 -0800 message: Work on SWIG interface of Array and Expression - Need to sort out what we want:Array<const double>& or const Array<double>& The latter is to prefer when constructing typemaps
The latter looks nicer, but since Array wraps a pointer, I don't know how to create an Array<double> from a const double* pointer without using const_cast.
- Compiled expression call now kind off works:e = Expression('sin(x[0])')e(pi/2,0) == 1- Array.array() returns a NumPy view of the data. - Need to clean up the SWIG code...
Should we add a file 'Array.i'? Then it's clear where all the Array magic happens.
Garth
modified: dolfin/function/Expression.cpp dolfin/function/Expression.h dolfin/swig/common_post.i dolfin/swig/common_pre.i dolfin/swig/function_pre.i site-packages/dolfin/compile_expressions.py site-packages/dolfin/expression.py -- lp:dolfin https://code.launchpad.net/~dolfin-core/dolfin/main Your team DOLFIN Core Team is subscribed to branch lp:dolfin. To unsubscribe from this branch go to https://code.launchpad.net/~dolfin-core/dolfin/main/+edit-subscription.
Thread Previous • Date Previous • Date Next • Thread Next |