6#include <dune/python/common/typeregistry.hh>
7#include <dune/python/pybind11/pybind11.h>
13template <
class FE,
class... options>
20 using namespace pybind11::literals;
23 "createRequirement", [](pybind11::object ) {
return FERequirements(); },
24 pybind11::return_value_policy::copy);
26 auto includes = Dune::Python::IncludeFiles{
"ikarus/finiteelements/ferequirements.hh"};
27 auto [req, isNew] = Dune::Python::insertClass<FERequirements>(
28 scope,
"FERequirements", Dune::Python::GenerateTypeName(Dune::className<FERequirements>()), includes);
32 req.def(pybind11::init<SolutionVectorType&, ParameterType&>());
35 "insertGlobalSolution",
37 "solutionVector"_a.noconvert());
40 pybind11::return_value_policy::reference_internal);
44 pybind11::keep_alive<1, 2>(),
"parameterValue"_a.noconvert());
Provides a wrapper for scalar types to support passing by reference in Python bindings.
void init(int argc, char **argv, bool enableFileLogger=true)
Initializes the Ikarus framework.
Definition: init.hh:82
Definition: flatassembler.hh:21
void registerFERequirement(pybind11::handle scope, pybind11::class_< FE, options... > cls)
Definition: registerferequirements.hh:14
Class representing the requirements for finite element calculations.
Definition: ferequirements.hh:252
SV SolutionVectorType
Definition: ferequirements.hh:268
PM ParameterType
Definition: ferequirements.hh:269
SolutionVectorReturnType globalSolution()
Get the global solution vector.
Definition: ferequirements.hh:308
FERequirements & insertParameter(ParameterInputType val)
Insert a parameter into the requirements.
Definition: ferequirements.hh:284
FERequirements & insertGlobalSolution(SolutionVectorInputType solVec)
Insert a global solution vector into the requirements.
Definition: ferequirements.hh:297
PMHelper::ConstReturnType parameter() const
Get the parameter value.
Definition: ferequirements.hh:325
RequirementType< requirementDetected >::type Requirement
Definition: mixin.hh:89
A wrapper class for scalar types to facilitate reference passing in Python bindings.
Definition: scalarwrapper.hh:27
const RawScalarType & value() const
Gets the wrapped scalar value as a constant reference.
Definition: scalarwrapper.hh:47