Custom Model Development in ViennaPS Python Bindings
Description
The ViennaPS Python bindings are currently missing support for certain functionalities critical to custom model development. In particular, the viennaps::ProcessModel class, which encapsulates custom model configurations, is not fully accessible from the Python interface. Implementing this would significantly expand the flexibility of ViennaPS for Python users.
Objective
Provide Python binding support for custom implementations of the following classes in the ProcessModel:
-
- This class defines the surface processes, a critical aspect of simulation. Customizing this model requires overwriting virtual member functions, some of which use custom member types.
-
- This CRTP class calculates fluxes on surfaces using ray tracing. Overwriting the
viennaray::Particlevirtual member functions would allow customization of particle properties (e.g., energy, reflections) and flux accumulation logic.
- This CRTP class calculates fluxes on surfaces using ray tracing. Overwriting the
-
- Provides callback functionality during processes, which would allow for customized responses or adjustments at each advection step.
-
- While some wrappers exist, extending this functionality to allow custom models would improve integration with user-defined geometry configurations.
-
- This class extends surface velocities to level set grid points. The default field suffices for many cases, but the ability to create empirical fields independent of surface processes would be valuable.
Current Limitations
These classes cannot be fully customized within the Python bindings, limiting ViennaPS's flexibility. However, ViennaLS provides an example of wrapping custom classes (e.g., viennals::VelocityField) for Python, suggesting that similar techniques could be applied to ProcessModel classes here, with the exception of the CRTP Particle class, which may require a unique solution.
TODOS:
- Extend the Python bindings to support custom implementations of the above classes in
ProcessModel. - Investigate possible workarounds for binding the CRTP
Particleclass to Python.