#include <functional>
#include <pybind11/embed.h>
#include "codac2_sympy.h"
#include "codac2_analytic_flat_input_layout.h"
Go to the source code of this file.
|
|
using | codac2::symbolic::detail::SympyTransform |
| | SymPy transformation applied to an exported scalar expression.
|
- Date
- 2026
- Author
- Simon Rohou, Maƫl Godard
- Copyright
- Copyright 2026 Codac Team
- License: GNU Lesser General Public License (LGPL)
◆ import_module()
| const pybind11::object & codac2::symbolic::detail::import_module |
( |
const char * | module_name | ) |
|
Imports a Python module.
Imported modules are cached after the first call.
- Parameters
-
| module_name | Python module name. |
- Returns
- Imported Python module.
◆ import_sympy()
| const pybind11::object & codac2::symbolic::detail::import_sympy |
( |
| ) |
|
Imports the SymPy module.
- Returns
- SymPy module.
◆ import_polyfuncs()
| const pybind11::object & codac2::symbolic::detail::import_polyfuncs |
( |
| ) |
|
Imports the SymPy polyfuncs module.
- Returns
- SymPy polyfuncs module.
◆ import_builtins()
| const pybind11::object & codac2::symbolic::detail::import_builtins |
( |
| ) |
|
Imports the Python builtins module.
- Returns
- Python builtins module.
◆ normalize_sympy_expr()
| pybind11::object codac2::symbolic::detail::normalize_sympy_expr |
( |
const pybind11::object & | sympy, |
|
|
pybind11::object | expr, |
|
|
bool | do_expand = true ) |
Normalizes a SymPy expression before import into Codac.
- Parameters
-
| sympy | SymPy module. |
| expr | SymPy expression. |
| do_expand | Whether the expression should be expanded. |
- Returns
- Normalized SymPy expression.
◆ transform_scalar_expr()
| ScalarExpr codac2::symbolic::detail::transform_scalar_expr |
( |
const FunctionArgsList & | args, |
|
|
const ScalarExpr & | y, |
|
|
const SympyTransform & | transform, |
|
|
bool | do_expand = true ) |
Applies a SymPy transformation to a Codac scalar expression.
- Parameters
-
| args | Function argument list. |
| y | Codac scalar expression. |
| transform | SymPy transformation. |
| do_expand | Whether the transformed expression should be expanded. |
- Returns
- Transformed Codac scalar expression.