File: dolfinx_mpc.cpp

package info (click to toggle)
dolfinx-mpc 0.9.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,188 kB
  • sloc: python: 7,263; cpp: 5,462; makefile: 69; sh: 4
file content (29 lines) | stat: -rw-r--r-- 627 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (C) 2020 Jørgen S. Dokken
//
// This file is part of DOLFINX_MPC
//
// SPDX-License-Identifier:    MIT

#include <nanobind/nanobind.h>

namespace nb = nanobind;

namespace dolfinx_mpc_wrappers
{
void mpc(nb::module_& m);
} // namespace dolfinx_mpc_wrappers

NB_MODULE(cpp, m)
{
  // Create module for C++ wrappers
  m.doc() = "DOLFINX MultiPointConstraint Python interface";
  m.attr("__version__") = DOLFINX_MPC_VERSION;

#ifdef NDEBUG
  nanobind::set_leak_warnings(false);
#endif

  // Create mpc submodule [mpc]
  nb::module_ mpc = m.def_submodule("mpc", "General module");
  dolfinx_mpc_wrappers::mpc(mpc);
}