Opened 18 years ago

Closed 18 years ago

#31 closed defect (fixed)

Move and its extension out from pyvolution to utilities/numerical_tools

Reported by: ole Owned by: ole
Priority: normal Milestone: AnuGA ready for release
Component: Compilation and installation Version: 1.0
Severity: normal Keywords:

Description (last modified by ole)

This relates to the issues raised in ticket:20 and changeset:1856 about c-extensions.


  • provides general functionality such as gradient computations
  • relies on its C-extension and the associated header file for speed
  • However, other C extensions (such as shallow_water) relies directly on util_ext.h

We need an elegant solution that

  1. Avoids code duplication
  2. Allows common libraries to appear in directories separate from e.g. pyvolution
  3. Minimises any extra setup requirements

One idea would be to move the functionality from util and its extensions to utilities/numerical_tools and then have shallow_water_ext.c do #include <utilities/numerical_tools.h>

This could be accomplihed by adding the root dir (currently also in PYTHONPATH) to the -I option when compiling. If this could be done automatically, this solution will work nicely. However, it would be undesirable to introduce another environmant variable specifying the root dir for compilation purposes.

A clean solution is required.

Ideas Look at how is Numeric/arrayobject.h is found and mimic that! (This assumes that Numeric is already in Python/include)

The cleanest for our installation would be to add the anuga root dir to include_dirs in distutils, but for running out of the sandpit I suggest we add directories from sys.path to -I in

Change History (6)

comment:1 Changed 18 years ago by ole

  • Description modified (diff)

comment:2 Changed 18 years ago by ole

  • Description modified (diff)

comment:3 Changed 18 years ago by ole

  • Status changed from new to assigned

comment:4 Changed 18 years ago by ole

  • Description modified (diff)

comment:5 Changed 18 years ago by ole

  • Description modified (diff)

comment:6 Changed 18 years ago by ole

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.