Implement __call__ for Grid instances
Grid
instances should be a callable on a given function; calling an instance of Grid
with a function/callable should evaluate the given function on the unisolvent nodes and return the corresponding function values (i.e., the Lagrange coefficients).
The function/callable that can be passed as an argument to an instance of Grid
shall accept as its first argument a two-dimensional NumPy array because the unisolvent nodes are always given as a two-dimensional NumPy array. Additional arguments to the given function may be passed as __call__()
also accepts *args
and **kwargs
that are propagated to the function.
The current codebase has a not-yet-implemented method called apply_func()
which would be less convenient than directly call the instance.
This issue is part of the refactoring of the Grid
class (Issue #135).