novaphy.PressureCompileError¶
ValueError subclass raised when a custom hydroelastic
pressure_func cannot be compiled.
Typical causes include unavailable function source, unsupported Python
syntax, non-numeric scalar fields, device arrays indexed by anything other
than shape_idx, or more than eight referenced arrays. Configuration errors
where only one of pressure_func and pressure_data is supplied raise a
plain ValueError.
try:
config = novaphy.HydroelasticSdfConfig(
pressure_func=my_pressure,
pressure_data=my_data,
)
except novaphy.PressureCompileError as exc:
print(f"unsupported pressure law: {exc}")