17#include <pybind11_json/pybind11_json.hpp>
18#include <pybind11/stl.h>
32#define DNDS_PY_ENUM_CLASS_BCType_ADD(v) value(#v, BCType::v)
34 py::enum_<BCType>(m,
"BCType")
35 .DNDS_PY_ENUM_CLASS_BCType_ADD(
Wall)
38 .DNDS_PY_ENUM_CLASS_BCType_ADD(
Far)
39 .DNDS_PY_ENUM_CLASS_BCType_ADD(
Sym)
40 .DNDS_PY_ENUM_CLASS_BCType_ADD(
In)
41 .DNDS_PY_ENUM_CLASS_BCType_ADD(
InPsTs)
42 .DNDS_PY_ENUM_CLASS_BCType_ADD(
Out)
43 .DNDS_PY_ENUM_CLASS_BCType_ADD(
OutP)
44 .DNDS_PY_ENUM_CLASS_BCType_ADD(
Special)
45 .DNDS_PY_ENUM_CLASS_BCType_ADD(
Unknown);
46#undef DNDS_PY_ENUM_CLASS_BCType_ADD
71 return py::dict(nlohmann::json(self));
73 .def_static(
"from_dict",
76 return T(nlohmann::json(d));
80 .def_readwrite(
"name", &T::name)
81 .def_readwrite(
"type", &T::type)
82 .def_readwrite(
"value", &T::value);
105 .def_property(
"id", &T::getId, &T::setId)
106 .def_property(
"type", &T::getType, &T::setType)
107 .def_property(
"values", &T::getValues, &T::setValues);
125 T_.def(py::init([](
const std::vector<BCInput> &bc_inputs, Geom::AutoAppendName2ID &name2id)
126 {
return BCHandler(bc_inputs, name2id); }));
129 .def(
"id2bc", &T::id2bc);
Shared pybind11 plumbing used by every *_bind.hpp in DNDS (buffer-protocol type check,...
Boundary condition types, implementations, and handler for the EulerP module.
Host-side boundary condition handler managing all BC objects for a simulation.
Host-side boundary condition object managing parameter values and device transfer.
Namespace for the EulerP alternative evaluator module with GPU support.
void pybind11_BCInput_define(py::module_ &m)
Registers pybind11 bindings for the BCInput struct.
void pybind11_BCType_define(py::module_ &m)
Registers the BCType enum as a Python enum class.
@ InPsTs
Inflow with specified stagnation pressure and temperature.
@ WallInvis
Inviscid (slip) wall BC.
@ WallIsothermal
No-slip viscous wall with fixed temperature.
@ Out
Supersonic/subsonic outflow BC.
@ Unknown
Uninitialized or unrecognized BC type.
@ Wall
No-slip viscous wall (adiabatic).
@ Special
Special-purpose BC for benchmark cases (e.g., DMR, Riemann).
@ Far
Farfield BC (characteristic-based).
@ In
Supersonic/subsonic inflow BC.
@ OutP
Outflow with specified back-pressure.
void pybind11_BC_define(py::module_ &m)
Registers pybind11 bindings for the BC class.
void pybind11_BC_bind(py::module_ &m)
Top-level binding function for all EulerP boundary condition Python API.
void pybind11_BCHandler_define(py::module_ &m)
Registers pybind11 bindings for the BCHandler class.
py::classh< T > py_class_ssp