← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/main] Rev 4986: Implement named MeshFunctions in Python. Might be a better way (using SWIG

 

On Monday August 16 2010 05:51:24 noreply@xxxxxxxxxxxxx wrote:
> ------------------------------------------------------------
> revno: 4986
> committer: Anders Logg <logg@xxxxxxxxx>
> branch nick: dolfin-dev
> timestamp: Mon 2010-08-16 14:48:44 +0200
> message:
>   Implement named MeshFunctions in Python. Might be a better way (using
> SWIG magic).

I think it is fine. The only reason we would like to wrap it using SWIG would 
be to preserve the types. So one could check if a passed MeshFunction is for 
example a VertexFunction. But I think we should not encourage that and instead 
use dim.

When I looked at the Python implementation I wonder if we should harmonize the 
data type setting with NumPy. Instead of 'int' pass either int or 'i', and so 
on. 

If you agree, do you know of any other place where we could do such a 
harmonizing?

I also think it is better to implement the named MeshFunctions as inheriting 
from MeshFunction, instead of just beeing functions that returns. I can fix 
this.

Johan

> added:
>   site-packages/dolfin/mesh/meshfunction.py
> modified:
>   dolfin/mesh/Cell.h
>   dolfin/mesh/Edge.h
>   dolfin/mesh/Face.h
>   dolfin/mesh/Facet.h
>   dolfin/mesh/Vertex.h
>   site-packages/dolfin/__init__.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://cod, e.launchpad.net/~dolfin-core/dolfin/main/+edit-subscription



Follow ups