Package phi
Open-source simulation toolkit built for optimization and machine learning applications.
Use one of the following imports:
from phi.flow import *
for NumPy modefrom phi.tf.flow import *
for TensorFlow modefrom phi.torch.flow import *
for PyTorch modefrom phi.jax.flow import *
for Jax mode
Project homepage: https://github.com/tum-pbs/PhiFlow
Documentation overview: https://tum-pbs.github.io/PhiFlow
Sub-modules
phi.field
-
The fields module provides a number of data structures and functions to represent continuous, spatially varying data …
phi.flow
-
Main PhiFlow import:
from phi.flow import *
… phi.geom
-
Differentiable geometry package …
phi.jax
-
Jax integration …
phi.math
-
Alias for
phiml.math
… phi.physics
-
Contains built-in physics functions, mainly for partial differential equations, such as incompressible fluids. The actual physics functions are …
phi.tf
-
TensorFlow integration …
phi.torch
-
PyTorch integration …
phi.vis
-
Visualization: plotting, interactive user interfaces …
Functions
def detect_backends() ‑> tuple
-
Registers all available backends and returns them. This includes only backends for which the minimal requirements are fulfilled.
Returns
tuple
ofphiml.backend.Backend
def set_logging_level(level='debug')
-
Sets the logging level for PhiFlow functions.
Args
level
- Logging level, one of
'critical', 'fatal', 'error', 'warning', 'info', 'debug'
def verify()
-
Checks your configuration for potential problems and prints a summary.
To run verify without importing
phi
, run the scripttests/verify.py
included in the source distribution.