pyccel / psydac

Python 3 library for isogeometric analysis
https://pyccel.github.io/psydac/
MIT License
47 stars 17 forks source link

Provide unique interface for push-forward operators #396

Open yguclu opened 5 months ago

yguclu commented 5 months ago

Our push-forward operators take a callable function in the logical domain and an evaluation grid in the logical coordinates, and return the values of the push-forwarded function on the corresponding physical grid. To this end they can take advantage of several optimizations as shown in file psydac/core/field_evaluation_kernels.py.

These kernels are used by the high-level class Pushforward in module psydac.feec.pushforward: the __init__ constructor takes a fairly generic evaluation grid, and the __call__ method evaluates the correct push-forward (H1, H-curl, H-div, or L2) of multiple fields based on the kind parameter of their spaces.

Unfortunately, the functions push_* in module psydac.feec.pull_push provide an alternative interface which is less efficient, but extensively used across Psydac. In particular, these functions are based on the __call__ method of FemField objects, which in turn calls the method eval_field of FemSpace.

In general eval_field is implemented in the subclasses of FemSpace for a single-point evaluation, and it is mostly in pure Python.