Go to the documentation of this file.
36 #include<nanobind/nanobind.h>
38 #include"../../bindings/python/oofemarray-nanobind.h"
39 namespace nb = nanobind;
41 #include <pybind11/embed.h>
42 namespace py = pybind11;
68void PythonField :: setModuleName(std::string
moduleName){
82 nb::module_ calc = nb::module_::import_(
moduleName.c_str());
83 nb::object result = calc.attr(
functionName.c_str())(nb::cast(coords), nb::cast(mode), nb::cast(tStep));
84 answer = nb::cast<FloatArray>(result);
86 py::module calc = py::module::import(
moduleName.c_str());
87 py::object result = calc.attr(
functionName.c_str())(coords, mode, tStep);
Field(FieldType b=FieldType::FT_Unknown)
std::string moduleName
Name of python module containing evaluating function function.
FieldType
Physical type of field.
This page is part of the
OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak
Bořek Patzák
Project e-mail:
oofem@fsv.cvut.cz
Generated at for OOFEM by
doxygen
1.15.0 written by Dimitri van Heesch,
© 1997-2011