Header for Python Bindings.
More...
|
template<class Assembler , class... options> |
void | Ikarus::Python::registerSparseFlatAssembler (pybind11::handle scope, pybind11::class_< Assembler, options... > cls) |
| Register Python bindings for a SparseFlatAssembler class.
. More...
|
|
template<class Assembler , class... options> |
void | Ikarus::Python::registerDenseFlatAssembler (pybind11::handle scope, pybind11::class_< Assembler, options... > cls) |
| Register Python bindings for a DenseFlatAssembler class.
. More...
|
|
template<class Basis , class... options> |
void | Ikarus::Python::registerBasis (pybind11::handle scope, pybind11::class_< Basis, options... > cls) |
| Register a Python wrapper for an Ikarus basis class. More...
|
|
template<class DirichletValues , class... options> |
void | Ikarus::Python::registerDirichletValues (pybind11::handle scope, pybind11::class_< DirichletValues, options... > cls) |
| Register Python bindings for a DirichletValues class. More...
|
|
template<class KirchhoffLoveShell , class... options> |
void | Ikarus::Python::registerKirchhoffLoveShell (pybind11::handle scope, pybind11::class_< KirchhoffLoveShell, options... > cls) |
| Register Python bindings for a KirchhoffLoveShell class. More...
|
|
template<class LinearElastic , class... options> |
void | Ikarus::Python::registerLinearElastic (pybind11::handle scope, pybind11::class_< LinearElastic, options... > cls) |
| Register Python bindings for a Linear Elastic class. More...
|
|
template<bool defaultInitializers = true, class FE , class... options> |
void | Ikarus::Python::registerElement (pybind11::handle scope, pybind11::class_< FE, options... > cls) |
| Register Python bindings for a generic finite element class. More...
|
|
◆ registerBasis()
template<class
Basis , class... options>
void Ikarus::Python::registerBasis |
( |
pybind11::handle |
scope, |
|
|
pybind11::class_< Basis, options... > |
cls |
|
) |
| |
- Template Parameters
-
Basis | The Ikarus basis class to be registered. |
options | Variadic template parameters for additional options when defining the Python class. |
- Parameters
-
scope | A Pybind11 handle representing the Python scope where the class should be registered. |
cls | The Pybind11 class template to be used for registering the Ikarus basis class. |
◆ registerDenseFlatAssembler()
template<class Assembler , class... options>
void Ikarus::Python::registerDenseFlatAssembler |
( |
pybind11::handle |
scope, |
|
|
pybind11::class_< Assembler, options... > |
cls |
|
) |
| |
This function registers Python bindings for a DenseFlatAssembler class, allowing it to be used in Python scripts.
This function is a result of the macro MAKE_ASSEMBLER_REGISTERY_FUNCTION( DenseFlatAssembler )
.
The registered class will have an initializer that takes a list of finite elements (fes
) and a DirichletValuesType
object.
It exposes several member functions to Python:
-
getMatrix(req)
: Returns a dense matrix based on the specified FERequirementType
.
-
getReducedMatrix(req)
: Returns a reduced dense matrix based on the specified FERequirementType
.
-
getVector(req)
: Returns a vector based on the specified FERequirementType
.
-
getScalar(req)
: Returns a scalar based on the specified FERequirementType
.
-
getReducedVector(req)
: Returns a reduced vector based on the specified FERequirementType
.
-
createFullVector(redVec)
: Creates a full vector from a reduced vector.
-
reducedSize()
: Returns the size of the reduced space.
- Template Parameters
-
Assembler | The DenseFlatAssembler class to be registered. |
options | Variadic template parameters for additional options when defining the Python class. |
- Parameters
-
scope | A Pybind11 handle representing the Python scope where the class should be registered. |
cls | The Pybind11 class template to be used for registering the DenseFlatAssembler class. <> |
◆ registerDirichletValues()
void Ikarus::Python::registerDirichletValues |
( |
pybind11::handle |
scope, |
|
|
pybind11::class_< DirichletValues, options... > |
cls |
|
) |
| |
This function registers Python bindings for a DirichletValues class, allowing it to be used in Python scripts. The registered class will have an initializer that takes a Basis
object. It exposes several member functions to Python:
fixBoundaryDOFs(f)
: Fixes boundary degrees of freedom using a user-defined function f
.
fixBoundaryDOFsUsingLocalView(f)
: Fixes boundary degrees of freedom using a user-defined function f
with a LocalView
argument.
fixBoundaryDOFsUsingLocalViewAndIntersection(f)
: Fixes boundary degrees of freedom using a user-defined function f
with LocalView
and Intersection
arguments.
fixDOFs(f)
: Fixes boundary degrees of freedom using a user-defined function f
with the boolean vector and the basis as arguments.
- Template Parameters
-
- Parameters
-
scope | A Pybind11 handle representing the Python scope where the class should be registered. |
cls | The Pybind11 class template to be used for registering the DirichletValues class. |
◆ registerElement()
template<bool defaultInitializers = true, class FE , class... options>
void Ikarus::Python::registerElement |
( |
pybind11::handle |
scope, |
|
|
pybind11::class_< FE, options... > |
cls |
|
) |
| |
This function registers Python bindings for a generic finite element class, allowing it to be used in Python scripts. The registered class will have multiple initializers with different sets of parameters and member functions to calculate results and access properties.
- Template Parameters
-
defaultInitializers | If true, include default initializers for the finite element class. |
FE | The generic finite element class to be registered. |
options | Variadic template parameters for additional options when defining the Python class. |
- Parameters
-
scope | A Pybind11 handle representing the Python scope where the class should be registered. |
cls | The Pybind11 class template to be used for registering the finite element class. |
◆ registerKirchhoffLoveShell()
void Ikarus::Python::registerKirchhoffLoveShell |
( |
pybind11::handle |
scope, |
|
|
pybind11::class_< KirchhoffLoveShell, options... > |
cls |
|
) |
| |
This function registers Python bindings for a KirchhoffLoveShell class, allowing it to be used in Python scripts. The registered class will have several initializers with different sets of parameters.
- Template Parameters
-
- Parameters
-
scope | A Pybind11 handle representing the Python scope where the class should be registered. |
cls | The Pybind11 class template to be used for registering the KirchhoffLoveShell class. |
◆ registerLinearElastic()
void Ikarus::Python::registerLinearElastic |
( |
pybind11::handle |
scope, |
|
|
pybind11::class_< LinearElastic, options... > |
cls |
|
) |
| |
This function registers Python bindings for a LinearElastic class, allowing it to be used in Python scripts. The registered class will have several initializers with different sets of parameters.
- Template Parameters
-
- Parameters
-
scope | A Pybind11 handle representing the Python scope where the class should be registered. |
cls | The Pybind11 class template to be used for registering the LinearElastic class. |
◆ registerSparseFlatAssembler()
template<class Assembler , class... options>
void Ikarus::Python::registerSparseFlatAssembler |
( |
pybind11::handle |
scope, |
|
|
pybind11::class_< Assembler, options... > |
cls |
|
) |
| |
This function registers Python bindings for a SparseFlatAssembler class, allowing it to be used in Python scripts.
This function is a result of the macro MAKE_ASSEMBLER_REGISTERY_FUNCTION( SparseFlatAssembler )
.
The registered class will have an initializer that takes a list of finite elements (fes
) and a DirichletValuesType
object.
It exposes several member functions to Python:
-
getMatrix(req)
: Returns a dense matrix based on the specified FERequirementType
.
-
getReducedMatrix(req)
: Returns a reduced dense matrix based on the specified FERequirementType
.
-
getVector(req)
: Returns a vector based on the specified FERequirementType
.
-
getScalar(req)
: Returns a scalar based on the specified FERequirementType
.
-
getReducedVector(req)
: Returns a reduced vector based on the specified FERequirementType
.
-
createFullVector(redVec)
: Creates a full vector from a reduced vector.
-
reducedSize()
: Returns the size of the reduced space.
- Template Parameters
-
Assembler | The SparseFlatAssembler class to be registered. |
options | Variadic template parameters for additional options when defining the Python class. |
- Parameters
-
scope | A Pybind11 handle representing the Python scope where the class should be registered. |
cls | The Pybind11 class template to be used for registering the SparseFlatAssembler class. <> |