version 0.4.1
Ikarus::Python Namespace Reference

Classes

struct  SparseMatrixWrapper
 

Functions

template<class Assembler , class... options>
void registerFlatAssembler (pybind11::handle scope, pybind11::class_< Assembler, options... > cls)
 Register Python bindings for a assembler class.
. More...
 
template<class Assembler , class... options>
void registerSparseFlatAssembler (pybind11::handle scope, pybind11::class_< Assembler, options... > cls)
 
template<class Assembler , class... options>
void registerDenseFlatAssembler (pybind11::handle scope, pybind11::class_< Assembler, options... > cls)
 
template<typename T >
void registerSparseMatrixWrapper (pybind11::handle scope)
 
template<class AssemblerManipulator , class... options>
void registerAssemblerManipulator (pybind11::handle scope, pybind11::class_< AssemblerManipulator, options... > cls)
 
template<class BasisHandler , class... options>
void registerBasisHandler (pybind11::handle scope, pybind11::class_< BasisHandler, options... > cls)
 Register a Python wrapper for an Ikarus basis class. More...
 
template<class DirichletValues >
void forwardCorrectFunction (DirichletValues &dirichletValues, const pybind11::function &functor, auto &&cppFunction)
 
template<class DirichletValues , class... options>
void registerDirichletValues (pybind11::handle scope, pybind11::class_< DirichletValues, options... > cls)
 Register Python bindings for a DirichletValues class. More...
 
template<class FE , class... options>
void registerCalculateAt (pybind11::handle scope, pybind11::class_< FE, options... > cls, auto resultTypesTuple)
 Registers the calculateAt method for a finite element class in Python. More...
 
template<class FE , class... options>
void registerFE (pybind11::handle scope, pybind11::class_< FE, options... > cls)
 Register Python bindings for the FE class. More...
 
template<class Material , size_t vecSize, class... options>
void registerMaterial (pybind11::handle scope, pybind11::class_< Material, options... > cls)
 
 MAKE_MATERIAL_REGISTERY_FUNCTION (LinearElasticity, 6)
 
 MAKE_MATERIAL_REGISTERY_FUNCTION (StVenantKirchhoff, 6)
 
 MAKE_MATERIAL_REGISTERY_FUNCTION (NeoHooke, 6)
 
template<class FE , class... options>
void registerFERequirement (pybind11::handle scope, pybind11::class_< FE, options... > cls)
 
template<class NonLinearElasticPre , class... options>
void registerNonLinearElasticPre (pybind11::handle scope, pybind11::class_< NonLinearElasticPre, options... > cls)
 Registers a NonLinearElasticPre class in Python. More...
 
template<class LinearElasticPre , class... options>
void registerLinearElasticPre (pybind11::handle scope, pybind11::class_< LinearElasticPre, options... > cls)
 Registers a LinearElasticPre class in Python. More...
 
template<class TrussPre , class... options>
void registerTrussPre (pybind11::handle scope, pybind11::class_< TrussPre, options... > cls)
 Registers a TrussPre class in Python. More...
 
template<class KirchhoffLoveShellPre , class... options>
void registerKirchhoffLoveShellPre (pybind11::handle scope, pybind11::class_< KirchhoffLoveShellPre, options... > cls)
 Registers a KirchhoffLoveShellPre class in Python. More...
 
template<class EASPre , class... options>
void registerEnhancedAssumedStrainsPre (pybind11::handle scope, pybind11::class_< EASPre, options... > cls)
 Registers an EnhancedAssumedStrainsPre class in Python. More...
 
template<class NeumannBoundaryLoadPre , class... options>
void registerNeumannBoundaryLoadPre (pybind11::handle scope, pybind11::class_< NeumannBoundaryLoadPre, options... > cls)
 Registers a NeumannBoundaryLoadPre class in Python. More...
 
template<class VolumeLoadPre , class... options>
void registerVolumeLoadPre (pybind11::handle scope, pybind11::class_< VolumeLoadPre, options... > cls)
 Registers a VolumeLoadPre class in Python. More...
 
template<class Writer , class... options>
void registerVtkWriter (pybind11::handle scope, pybind11::class_< Writer, options... > cls)
 Register Python bindings for a VtkWriter class.
. More...
 
template<class BoundaryPatch , class... options>
void registerBoundaryPatch (pybind11::handle scope, pybind11::class_< BoundaryPatch, options... > cls)
 

Function Documentation

◆ forwardCorrectFunction()

template<class DirichletValues >
void Ikarus::Python::forwardCorrectFunction ( DirichletValues dirichletValues,
const pybind11::function &  functor,
auto &&  cppFunction 
)

◆ MAKE_MATERIAL_REGISTERY_FUNCTION() [1/3]

Ikarus::Python::MAKE_MATERIAL_REGISTERY_FUNCTION ( LinearElasticity  ,
 
)

◆ MAKE_MATERIAL_REGISTERY_FUNCTION() [2/3]

Ikarus::Python::MAKE_MATERIAL_REGISTERY_FUNCTION ( NeoHooke  ,
 
)

◆ MAKE_MATERIAL_REGISTERY_FUNCTION() [3/3]

Ikarus::Python::MAKE_MATERIAL_REGISTERY_FUNCTION ( StVenantKirchhoff  ,
 
)

◆ registerAssemblerManipulator()

template<class AssemblerManipulator , class... options>
void Ikarus::Python::registerAssemblerManipulator ( pybind11::handle  scope,
pybind11::class_< AssemblerManipulator, options... >  cls 
)

◆ registerBoundaryPatch()

template<class BoundaryPatch , class... options>
void Ikarus::Python::registerBoundaryPatch ( pybind11::handle  scope,
pybind11::class_< BoundaryPatch, options... >  cls 
)

◆ registerCalculateAt()

template<class FE , class... options>
void Ikarus::Python::registerCalculateAt ( pybind11::handle  scope,
pybind11::class_< FE, options... >  cls,
auto  resultTypesTuple 
)

This function is used to expose the calculateAt method of a finite element class to Python using Pybind11.

Template Parameters
FEThe finite element class type.
optionsVariadic template parameters for additional options when defining the Python class.
Parameters
scopeThe Pybind11 handle to the Python module or class where the method will be registered.
clsThe Pybind11 class wrapper for the finite element class.
restultTypesTupleA tuple containing the result types to be supported by the calculateAt method.

The calculateAt method is exposed to Python, allowing users to compute element values at a specific location.

Example usage in Python:

fe_instance = MyFiniteElementClass()
result = fe_instance.calculateAt(feRequirements, local, "linearStress")
Parameters
feRequirementsThe requirements for the finite element calculation.
localThe local coordinates where the calculation is performed.
resultTypeA string specifying the desired result type for the calculation.
Returns
The calculated result as a EigenType but NumPy array.
Exceptions
Dune::NotImplementedIf the specified resultType is not supported by the finite element.
Here is the caller graph for this function:

◆ registerDenseFlatAssembler()

template<class Assembler , class... options>
void Ikarus::Python::registerDenseFlatAssembler ( pybind11::handle  scope,
pybind11::class_< Assembler, options... >  cls 
)

◆ registerEnhancedAssumedStrainsPre()

template<class EASPre , class... options>
void Ikarus::Python::registerEnhancedAssumedStrainsPre ( pybind11::handle  scope,
pybind11::class_< EASPre, options... >  cls 
)
Template Parameters
EASPreThe EnhancedAssumedStrainsPre class.
optionsAdditional options for the pybind11 class.
Parameters
scopePython handle to the module or class scope.
clsThe pybind11 class to register.

◆ registerFERequirement()

template<class FE , class... options>
void Ikarus::Python::registerFERequirement ( pybind11::handle  scope,
pybind11::class_< FE, options... >  cls 
)
Here is the caller graph for this function:

◆ registerKirchhoffLoveShellPre()

template<class KirchhoffLoveShellPre , class... options>
void Ikarus::Python::registerKirchhoffLoveShellPre ( pybind11::handle  scope,
pybind11::class_< KirchhoffLoveShellPre, options... >  cls 
)
Template Parameters
KirchhoffLoveShellPreThe KirchhoffLoveShellPre class.
optionsAdditional options for the pybind11 class.
Parameters
scopePython handle to the module or class scope.
clsThe pybind11 class to register.

◆ registerLinearElasticPre()

template<class LinearElasticPre , class... options>
void Ikarus::Python::registerLinearElasticPre ( pybind11::handle  scope,
pybind11::class_< LinearElasticPre, options... >  cls 
)
Template Parameters
LinearElasticPreThe LinearElasticPre class.
optionsAdditional options for the pybind11 class.
Parameters
scopePython handle to the module or class scope.
clsThe pybind11 class to register.

◆ registerMaterial()

template<class Material , size_t vecSize, class... options>
void Ikarus::Python::registerMaterial ( pybind11::handle  scope,
pybind11::class_< Material, options... >  cls 
)

◆ registerNeumannBoundaryLoadPre()

template<class NeumannBoundaryLoadPre , class... options>
void Ikarus::Python::registerNeumannBoundaryLoadPre ( pybind11::handle  scope,
pybind11::class_< NeumannBoundaryLoadPre, options... >  cls 
)
Template Parameters
NeumannBoundaryLoadPreThe NeumannBoundaryLoadPre class.
optionsAdditional options for the pybind11 class.
Parameters
scopePython handle to the module or class scope.
clsThe pybind11 class to register.

◆ registerNonLinearElasticPre()

template<class NonLinearElasticPre , class... options>
void Ikarus::Python::registerNonLinearElasticPre ( pybind11::handle  scope,
pybind11::class_< NonLinearElasticPre, options... >  cls 
)
Template Parameters
NonLinearElasticPreThe NonLinearElasticPre class.
optionsAdditional options for the pybind11 class.
Parameters
scopePython handle to the module or class scope.
clsThe pybind11 class to register.

◆ registerSparseFlatAssembler()

template<class Assembler , class... options>
void Ikarus::Python::registerSparseFlatAssembler ( pybind11::handle  scope,
pybind11::class_< Assembler, options... >  cls 
)

◆ registerSparseMatrixWrapper()

template<typename T >
void Ikarus::Python::registerSparseMatrixWrapper ( pybind11::handle  scope)

◆ registerTrussPre()

template<class TrussPre , class... options>
void Ikarus::Python::registerTrussPre ( pybind11::handle  scope,
pybind11::class_< TrussPre, options... >  cls 
)
Template Parameters
TrussPreThe TrussPre class.
optionsAdditional options for the pybind11 class.
Parameters
scopePython handle to the module or class scope.
clsThe pybind11 class to register.

◆ registerVolumeLoadPre()

template<class VolumeLoadPre , class... options>
void Ikarus::Python::registerVolumeLoadPre ( pybind11::handle  scope,
pybind11::class_< VolumeLoadPre, options... >  cls 
)
Template Parameters
VolumeLoadPreThe VolumeLoadPre class.
optionsAdditional options for the pybind11 class.
Parameters
scopePython handle to the module or class scope.
clsThe pybind11 class to register.