Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Model Development in ViennaPS Python Bindings #97

Open
tobre1 opened this issue Oct 30, 2024 · 0 comments
Open

Custom Model Development in ViennaPS Python Bindings #97

tobre1 opened this issue Oct 30, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@tobre1
Copy link
Member

tobre1 commented Oct 30, 2024

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:

  1. Surface Model

    • 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.
  2. Particles

    • This CRTP class calculates fluxes on surfaces using ray tracing. Overwriting the viennaray::Particle virtual member functions would allow customization of particle properties (e.g., energy, reflections) and flux accumulation logic.
  3. Advection Callback

    • Provides callback functionality during processes, which would allow for customized responses or adjustments at each advection step.
  4. Geometric Model

    • While some wrappers exist, extending this functionality to allow custom models would improve integration with user-defined geometry configurations.
  5. Velocity Field

    • 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:

  1. Extend the Python bindings to support custom implementations of the above classes in ProcessModel.
  2. Investigate possible workarounds for binding the CRTP Particle class to Python.
@tobre1 tobre1 added the enhancement New feature or request label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants