24#ifndef DUMUX_PYTHON_COMMON_BOUNDARYTYPES_HH
25#define DUMUX_PYTHON_COMMON_BOUNDARYTYPES_HH
27#include <dune/common/classname.hh>
28#include <dune/python/pybind11/pybind11.h>
29#include <dune/python/common/typeregistry.hh>
35template <
class BoundaryTypes,
class... Options>
38 using pybind11::operator
""_a;
40 cls.def(pybind11::init());
44 cls.def(
"__deepcopy__", [](
const BoundaryTypes& self, pybind11::dict) {
54template <
class BoundaryTypes>
57 using namespace Dune::Python;
59 auto [cls, addedToRegistry] = insertClass<BoundaryTypes>(
60 scope,
"BoundaryTypes",
61 GenerateTypeName(Dune::className<BoundaryTypes>()),
62 IncludeFiles{
"dumux/python/common/boundarytypes.hh"}
Definition: python/assembly/fvassembler.hh:30
void registerBoundaryTypes(pybind11::handle scope, pybind11::class_< BoundaryTypes, Options... > cls)
Definition: python/common/boundarytypes.hh:36
Class to specify the type of a boundary.
Definition: common/boundarytypes.hh:38
void setAllNeumann()
Set all boundary conditions to Neumann.
Definition: common/boundarytypes.hh:102
void setAllDirichlet()
Set all boundary conditions to Dirichlet.
Definition: common/boundarytypes.hh:111
void reset()
Reset the boundary types for all equations.
Definition: common/boundarytypes.hh:54
bool hasNeumann() const
Returns true if some equation is used to specify a Neumann condition.
Definition: common/boundarytypes.hh:272
bool hasDirichlet() const
Returns true if some equation is used to specify a Dirichlet condition.
Definition: common/boundarytypes.hh:234
Class to specify the type of a boundary.