MCPcopy Create free account
hub / github.com/KratosMultiphysics/Kratos / AddMeshToPython

Function AddMeshToPython

kratos/python/add_mesh_to_python.cpp:382–712  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380}
381
382void AddMeshToPython(pybind11::module& m)
383{
384 py::class_<GeometricalObject, GeometricalObject::Pointer, IndexedObject, Flags>(m,"GeometricalObject")
385 .def(py::init<Kratos::GeometricalObject::IndexType>())
386 .def("IsActive", &GeometricalObject::IsActive)
387 ;
388
389 py::class_<Element, Element::Pointer, Element::BaseType>(m,"Element")
390 .def(py::init<Kratos::Element::IndexType>())
391 .def_property("Properties", GetPropertiesFromElement, SetPropertiesFromElement)
392 .def("GetGeometry", GetGeometryFromObject<Element>, py::return_value_policy::reference_internal)
393
394 .def("__setitem__", SetValueHelperFunction< Element, Variable< array_1d<double, 3> > >)
395 .def("__getitem__", GetValueHelperFunction< Element, Variable< array_1d<double, 3> > >)
396 .def("Has", HasHelperFunction< Element, Variable< array_1d<double, 3> > >)
397 .def("SetValue", SetValueHelperFunction< Element, Variable< array_1d<double, 3> > >)
398 .def("GetValue", GetValueHelperFunction< Element, Variable< array_1d<double, 3> > >)
399
400 .def("__setitem__", SetValueHelperFunction< Element, Variable< array_1d<double, 4> > >)
401 .def("__getitem__", GetValueHelperFunction< Element, Variable< array_1d<double, 4> > >)
402 .def("Has", HasHelperFunction< Element, Variable< array_1d<double, 4> > >)
403 .def("SetValue", SetValueHelperFunction< Element, Variable< array_1d<double, 4> > >)
404 .def("GetValue", GetValueHelperFunction< Element, Variable< array_1d<double, 4> > >)
405
406 .def("__setitem__", SetValueHelperFunction< Element, Variable< array_1d<double, 6> > >)
407 .def("__getitem__", GetValueHelperFunction< Element, Variable< array_1d<double, 6> > >)
408 .def("Has", HasHelperFunction< Element, Variable< array_1d<double, 6> > >)
409 .def("SetValue", SetValueHelperFunction< Element, Variable< array_1d<double, 6> > >)
410 .def("GetValue", GetValueHelperFunction< Element, Variable< array_1d<double, 6> > >)
411
412 .def("__setitem__", SetValueHelperFunction< Element, Variable< array_1d<double, 9> > >)
413 .def("__getitem__", GetValueHelperFunction< Element, Variable< array_1d<double, 9> > >)
414 .def("Has", HasHelperFunction< Element, Variable< array_1d<double, 9> > >)
415 .def("SetValue", SetValueHelperFunction< Element, Variable< array_1d<double, 9> > >)
416 .def("GetValue", GetValueHelperFunction< Element, Variable< array_1d<double, 9> > >)
417
418 .def("__setitem__", SetValueHelperFunction< Element, Variable< Vector > >)
419 .def("__getitem__", GetValueHelperFunction< Element, Variable< Vector > >)
420 .def("Has", HasHelperFunction< Element, Variable< Vector > >)
421 .def("SetValue", SetValueHelperFunction< Element, Variable< Vector > >)
422 .def("GetValue", GetValueHelperFunction< Element, Variable< Vector > >)
423
424 .def("__setitem__", SetValueHelperFunction< Element, Variable< DenseVector<int> > >)
425 .def("__getitem__", GetValueHelperFunction< Element, Variable< DenseVector<int> > >)
426 .def("Has", HasHelperFunction< Element, Variable< DenseVector<int> > >)
427 .def("SetValue", SetValueHelperFunction< Element, Variable< DenseVector<int> > >)
428 .def("GetValue", GetValueHelperFunction< Element, Variable< DenseVector<int> > >)
429
430 .def("__setitem__", SetValueHelperFunction< Element, Variable< Matrix > >)
431 .def("__getitem__", GetValueHelperFunction< Element, Variable< Matrix > >)
432 .def("Has", HasHelperFunction< Element, Variable< Matrix > >)
433 .def("SetValue", SetValueHelperFunction< Element, Variable< Matrix > >)
434 .def("GetValue", GetValueHelperFunction< Element, Variable< Matrix > >)
435
436 .def("__setitem__", SetValueHelperFunction< Element, Variable< int > >)
437 .def("__getitem__", GetValueHelperFunction< Element, Variable< int > >)
438 .def("Has", HasHelperFunction< Element, Variable< int > >)
439 .def("SetValue", SetValueHelperFunction< Element, Variable< int > >)

Callers 1

PYBIND11_MODULEFunction · 0.85

Calls 3

EquationIdVectorMethod · 0.45
GetDofListMethod · 0.45
CreateInterfaceMethod · 0.45

Tested by

no test coverage detected