Skip to content

Add functionality for evaluating a function on a Grid.

Damar Wicaksono requested to merge dev-153 into dev

Add functionality for evaluating a function on a Grid

An instance of Grid may now be used as a Callable. The __call__() method of the Grid class evaluates a given function on the unisolvent nodes of the grid and returns the corresponding function values.

Additionally:

  • Additional arguments to the function may be passed in the call to the Grid instance either via positional or keyword arguments.
  • The test suite has been updated to reflect these changes.
  • A guide on how to use this feature is added to the documentation.
  • The not-yet-implemented method apply_func() has been removed in favor of __call__().
  • The docstring of the property unisolvent_nodes has been updated as well as the test suite.
  • The properties max_exponent and max_exponents() now return None for an empty multi-index set. Previously, accessing these properties for an empty set raises an exception as np.max cannot work on an empty array. The test suite has been updated accordingly.
  • Generating points argument is now copied in the construction of Grid to avoid accidental changes from the outside.

This commit should resolve Issue #153 (closed) and part of the refactoring of the Grid class (Issue #135).

Merge request reports

Loading