Nektar++
Functions
Python/Foundations/Basis.cpp File Reference
#include <LibUtilities/Foundations/Basis.h>
#include <LibUtilities/Foundations/ManagerAccess.h>
#include <LibUtilities/Python/NekPyConfig.hpp>

Go to the source code of this file.

Functions

BasisSharedPtr Basis_Create (const BasisKey &pts)
 
py::tuple Basis_GetZW (BasisSharedPtr pts)
 
void export_Basis ()
 Basis exports. More...
 

Function Documentation

◆ Basis_Create()

BasisSharedPtr Basis_Create ( const BasisKey pts)

Definition at line 42 of file Python/Foundations/Basis.cpp.

43{
44 return BasisManager()[pts];
45}
BasisManagerT & BasisManager(void)

References Nektar::LibUtilities::BasisManager().

Referenced by export_Basis().

◆ Basis_GetZW()

py::tuple Basis_GetZW ( BasisSharedPtr  pts)

Definition at line 47 of file Python/Foundations/Basis.cpp.

48{
49 return py::make_tuple(pts->GetZ(), pts->GetW());
50}

Referenced by export_Basis().

◆ export_Basis()

void export_Basis ( )

Basis exports.

Definition at line 55 of file Python/Foundations/Basis.cpp.

56{
57 // Enumerator for basis type
59
60 py::class_<BasisKey>(
61 "BasisKey", py::init<const BasisType &, const int, const PointsKey &>())
62
63 .def("GetNumModes", &BasisKey::GetNumModes)
64 .def("GetTotNumModes", &BasisKey::GetTotNumModes)
65 .def("GetNumPoints", &BasisKey::GetNumPoints)
66 .def("GetTotNumPoints", &BasisKey::GetTotNumPoints)
67 .def("GetBasisType", &BasisKey::GetBasisType)
68 .def("GetPointsKey", &BasisKey::GetPointsKey)
69 .def("GetPointsType", &BasisKey::GetPointsType)
70 .def("Collocation", &BasisKey::Collocation);
71
72 py::class_<Basis, std::shared_ptr<Basis>>("Basis", py::no_init)
73
74 .def("Create", &Basis_Create)
75 .staticmethod("Create")
76
77 .def("GetNumModes", &Basis::GetNumModes)
78 .def("GetTotNumModes", &Basis::GetTotNumModes)
79 .def("GetNumPoints", &Basis::GetNumPoints)
80 .def("GetTotNumPoints", &Basis::GetTotNumPoints)
81 .def("GetBasisType", &Basis::GetBasisType)
82 .def("GetPointsKey", &Basis::GetPointsKey)
83 .def("GetBasisKey", &Basis::GetBasisKey)
84 .def("GetPointsType", &Basis::GetBasisType)
85 .def("Initialize", &Basis::Initialize)
86
87 .def("GetZ", &Basis::GetZ,
88 py::return_value_policy<py::copy_const_reference>())
89 .def("GetW", &Basis::GetW,
90 py::return_value_policy<py::copy_const_reference>())
91 .def("GetZW", &Basis_GetZW)
92
93 .def("GetBdata", &Basis::GetBdata,
94 py::return_value_policy<py::copy_const_reference>())
95 .def("GetDbdata", &Basis::GetDbdata,
96 py::return_value_policy<py::copy_const_reference>());
97}
#define NEKPY_WRAP_ENUM(ENUMNAME, MAPNAME)
Definition: NekPyConfig.hpp:71
BasisSharedPtr Basis_Create(const BasisKey &pts)
py::tuple Basis_GetZW(BasisSharedPtr pts)
const char *const BasisTypeMap[]
Definition: Foundations.hpp:44

References Basis_Create(), Basis_GetZW(), Nektar::LibUtilities::BasisTypeMap, and NEKPY_WRAP_ENUM.

Referenced by BOOST_PYTHON_MODULE().