Skip to content

Commit 8a4c446

Browse files
committed
Add some docs
1 parent 41c27ed commit 8a4c446

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

python/wrapper.cpp

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -435,19 +435,21 @@ NB_MODULE(_basixcpp, m)
435435

436436
m.def("sobolev_space_intersection", &sobolev::space_intersection);
437437

438-
nb::enum_<lattice::type>(m, "LatticeType", nb::is_arithmetic())
438+
nb::enum_<lattice::type>(m, "LatticeType", nb::is_arithmetic(),
439+
"Lattice type.")
439440
.value("equispaced", lattice::type::equispaced)
440441
.value("gll", lattice::type::gll)
441442
.value("chebyshev", lattice::type::chebyshev)
442443
.value("gl", lattice::type::gl);
443-
nb::enum_<lattice::simplex_method>(m, "LatticeSimplexMethod",
444-
nb::is_arithmetic())
444+
nb::enum_<lattice::simplex_method>(
445+
m, "LatticeSimplexMethod", nb::is_arithmetic(), "Lattice simplex method.")
445446
.value("none", lattice::simplex_method::none)
446447
.value("warp", lattice::simplex_method::warp)
447448
.value("isaac", lattice::simplex_method::isaac)
448449
.value("centroid", lattice::simplex_method::centroid);
449450

450-
nb::enum_<polynomials::type>(m, "PolynomialType", nb::is_arithmetic())
451+
nb::enum_<polynomials::type>(m, "PolynomialType", nb::is_arithmetic(),
452+
"Polynomial type.")
451453
.value("legendre", polynomials::type::legendre)
452454
.value("bernstein", polynomials::type::bernstein);
453455

@@ -467,15 +469,16 @@ NB_MODULE(_basixcpp, m)
467469
lattice::create<double>(celltype, n, type, exterior, method));
468470
});
469471

470-
nb::enum_<maps::type>(m, "MapType", nb::is_arithmetic())
472+
nb::enum_<maps::type>(m, "MapType", nb::is_arithmetic(), "Element map type.")
471473
.value("identity", maps::type::identity)
472474
.value("L2Piola", maps::type::L2Piola)
473475
.value("covariantPiola", maps::type::covariantPiola)
474476
.value("contravariantPiola", maps::type::contravariantPiola)
475477
.value("doubleCovariantPiola", maps::type::doubleCovariantPiola)
476478
.value("doubleContravariantPiola", maps::type::doubleContravariantPiola);
477479

478-
nb::enum_<sobolev::space>(m, "SobolevSpace", nb::is_arithmetic())
480+
nb::enum_<sobolev::space>(m, "SobolevSpace", nb::is_arithmetic(),
481+
"Sobolev space.")
479482
.value("L2", sobolev::space::L2)
480483
.value("H1", sobolev::space::H1)
481484
.value("H2", sobolev::space::H2)
@@ -486,13 +489,14 @@ NB_MODULE(_basixcpp, m)
486489
.value("HEin", sobolev::space::HEin)
487490
.value("HDivDiv", sobolev::space::HDivDiv);
488491

489-
nb::enum_<quadrature::type>(m, "QuadratureType", nb::is_arithmetic())
492+
nb::enum_<quadrature::type>(m, "QuadratureType", nb::is_arithmetic(),
493+
"Quadrature type.")
490494
.value("Default", quadrature::type::Default)
491495
.value("gauss_jacobi", quadrature::type::gauss_jacobi)
492496
.value("gll", quadrature::type::gll)
493497
.value("xiao_gimbutas", quadrature::type::xiao_gimbutas);
494498

495-
nb::enum_<cell::type>(m, "CellType", nb::is_arithmetic())
499+
nb::enum_<cell::type>(m, "CellType", nb::is_arithmetic(), "Cell type.")
496500
.value("point", cell::type::point)
497501
.value("interval", cell::type::interval)
498502
.value("triangle", cell::type::triangle)
@@ -524,7 +528,8 @@ NB_MODULE(_basixcpp, m)
524528
m.def("cell_facet_jacobians", [](cell::type cell_type)
525529
{ return as_nbarrayp(cell::facet_jacobians<double>(cell_type)); });
526530

527-
nb::enum_<element::family>(m, "ElementFamily", nb::is_arithmetic())
531+
nb::enum_<element::family>(m, "ElementFamily", nb::is_arithmetic(),
532+
"Finite element family.")
528533
.value("custom", element::family::custom)
529534
.value("P", element::family::P)
530535
.value("BDM", element::family::BDM)
@@ -540,8 +545,8 @@ NB_MODULE(_basixcpp, m)
540545
.value("Hermite", element::family::Hermite)
541546
.value("iso", element::family::iso);
542547

543-
nb::enum_<element::lagrange_variant>(m, "LagrangeVariant",
544-
nb::is_arithmetic())
548+
nb::enum_<element::lagrange_variant>(
549+
m, "LagrangeVariant", nb::is_arithmetic(), "Lagrange element variant.")
545550
.value("unset", element::lagrange_variant::unset)
546551
.value("equispaced", element::lagrange_variant::equispaced)
547552
.value("gll_warped", element::lagrange_variant::gll_warped)
@@ -557,7 +562,8 @@ NB_MODULE(_basixcpp, m)
557562
.value("legendre", element::lagrange_variant::legendre)
558563
.value("bernstein", element::lagrange_variant::bernstein);
559564

560-
nb::enum_<element::dpc_variant>(m, "DPCVariant", nb::is_arithmetic())
565+
nb::enum_<element::dpc_variant>(m, "DPCVariant", nb::is_arithmetic(),
566+
"DPC variant.")
561567
.value("unset", element::dpc_variant::unset)
562568
.value("simplex_equispaced", element::dpc_variant::simplex_equispaced)
563569
.value("simplex_gll", element::dpc_variant::simplex_gll)
@@ -648,7 +654,8 @@ NB_MODULE(_basixcpp, m)
648654
discontinuous);
649655
});
650656

651-
nb::enum_<polyset::type>(m, "PolysetType", nb::is_arithmetic())
657+
nb::enum_<polyset::type>(m, "PolysetType", nb::is_arithmetic(),
658+
"Polyset type.")
652659
.value("standard", polyset::type::standard)
653660
.value("macroedge", polyset::type::macroedge);
654661

0 commit comments

Comments
 (0)