diff --git a/python/Allocate.hpp b/python/Allocate.hpp index 922ee90..f3861a9 100644 --- a/python/Allocate.hpp +++ b/python/Allocate.hpp @@ -1,37 +1,37 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #include #include #include namespace py = pybind11; void init_Allocate(py::module& m) { m.def( "AsTensor", static_cast (*)(const xt::pyarray&, const std::vector&)>( &GooseFEM::AsTensor), "See :cpp:func:`GooseFEM::AsTensor`.", py::arg("arg"), py::arg("shape")); m.def( "AsTensor", static_cast (*)(size_t, const xt::pyarray&, size_t)>( &GooseFEM::AsTensor), "See :cpp:func:`GooseFEM::AsTensor`.", py::arg("rank"), py::arg("arg"), py::arg("n")); m.def( "as3d", &GooseFEM::as3d>, "See :cpp:func:`GooseFEM::as3d`.", py::arg("arg")); } diff --git a/python/Element.hpp b/python/Element.hpp index 3800ed5..5c6078a 100644 --- a/python/Element.hpp +++ b/python/Element.hpp @@ -1,182 +1,182 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #ifndef PYGOOSEFEM_ELEMENT_H #define PYGOOSEFEM_ELEMENT_H #include #include #include #include #include namespace py = pybind11; template void register_Mesh_QuadratureBase(P& cls) { cls.def_property_readonly("nelem", &C::nelem, "Number of elements"); cls.def_property_readonly("nne", &C::nne, "Number of nodes per element"); cls.def_property_readonly("ndim", &C::ndim, "Number of spatial dimensions"); cls.def_property_readonly("tdim", &C::tdim, "Number of spatial dimensions for tensors"); cls.def_property_readonly("nip", &C::nip, "Number of integration points per element"); // todo: https://github.com/xtensor-stack/xtensor-python/issues/265 // cls.def("asTensor", // static_cast&, xt::pyarray&) // const>(&C::asTensor), "Convert 'qscalar' to 'qtensor' of certain rank", // py::arg("qscalar"), // py::arg("qtensor")); cls.def( "AsTensor", static_cast (C::*)(size_t, const xt::pyarray&) const>( &C::AsTensor), py::arg("rank"), py::arg("qscalar")); cls.def("shape_elemvec", static_cast (C::*)() const>(&C::shape_elemvec)); cls.def( "shape_elemvec", static_cast (C::*)(size_t) const>(&C::shape_elemvec), py::arg("tdim")); cls.def("shape_elemmat", &C::shape_elemmat); cls.def( "shape_qtensor", static_cast (C::*)(size_t) const>(&C::shape_qtensor), py::arg("rank")); cls.def( "shape_qtensor", static_cast (C::*)(size_t, size_t) const>(&C::shape_qtensor), py::arg("rank"), py::arg("tdim")); cls.def("shape_qscalar", &C::shape_qscalar); cls.def("shape_qvector", static_cast (C::*)() const>(&C::shape_qvector)); cls.def( "shape_qvector", static_cast (C::*)(size_t) const>(&C::shape_qvector), py::arg("tdim")); } template void register_Mesh_QuadratureBaseCartesian(P& cls) { cls.def("update_x", &C::template update_x>, py::arg("x")); cls.def_property_readonly("dV", &C::dV, "Integration point volume (qscalar)"); cls.def( "InterpQuad_vector", &C::template InterpQuad_vector>, py::arg("elemvec")); cls.def( "interpQuad_vector", &C::template interpQuad_vector, xt::pytensor>, py::arg("elemvec"), py::arg("qvector")); cls.def("GradN_vector", &C::template GradN_vector>, py::arg("elemvec")); cls.def( "gradN_vector", &C::template gradN_vector, xt::pytensor>, py::arg("elemvec"), py::arg("qtensor")); cls.def( "GradN_vector_T", &C::template GradN_vector_T>, py::arg("elemvec")); cls.def( "gradN_vector_T", &C::template gradN_vector_T, xt::pytensor>, py::arg("elemvec"), py::arg("qtensor")); cls.def( "SymGradN_vector", &C::template SymGradN_vector>, py::arg("elemvec")); cls.def( "symGradN_vector", &C::template symGradN_vector, xt::pytensor>, py::arg("elemvec"), py::arg("qtensor")); cls.def( "Int_N_vector_dV", &C::template Int_N_vector_dV>, py::arg("qvector")); cls.def( "int_N_vector_dV", &C::template int_N_vector_dV, xt::pytensor>, py::arg("qvector"), py::arg("elemvec")); cls.def( "Int_N_scalar_NT_dV", &C::template Int_N_scalar_NT_dV>, py::arg("qscalar")); cls.def( "int_N_scalar_NT_dV", &C::template int_N_scalar_NT_dV, xt::pytensor>, py::arg("qscalar"), py::arg("elemmat")); cls.def( "Int_gradN_dot_tensor2_dV", &C::template Int_gradN_dot_tensor2_dV>, py::arg("qtensor")); cls.def( "int_gradN_dot_tensor2_dV", &C::template int_gradN_dot_tensor2_dV, xt::pytensor>, py::arg("qtensor"), py::arg("elemvec")); cls.def( "Int_gradN_dot_tensor4_dot_gradNT_dV", &C::template Int_gradN_dot_tensor4_dot_gradNT_dV>, py::arg("qtensor")); cls.def( "int_gradN_dot_tensor4_dot_gradNT_dV", &C::template int_gradN_dot_tensor4_dot_gradNT_dV< xt::pytensor, xt::pytensor>, py::arg("qtensor"), py::arg("elemmat")); } void init_Element(py::module& m) { m.def( "asElementVector", &GooseFEM::Element::asElementVector, "See :cpp:func:`GooseFEM::Element::asElementVector`.", py::arg("conn"), py::arg("nodevec")); m.def( "assembleElementVector", &GooseFEM::Element::assembleNodeVector, "See :cpp:func:`GooseFEM::Element::assembleNodeVector`.", py::arg("conn"), py::arg("elemvec")); } #endif diff --git a/python/ElementHex8.hpp b/python/ElementHex8.hpp index 8054087..8dbfb38 100644 --- a/python/ElementHex8.hpp +++ b/python/ElementHex8.hpp @@ -1,64 +1,64 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #ifndef PYGOOSEFEM_ELEMENTHEX8_H #define PYGOOSEFEM_ELEMENTHEX8_H #include #include #include #include "Element.hpp" namespace py = pybind11; void init_ElementHex8(py::module& m) { py::class_ cls(m, "Quadrature"); cls.def( py::init&>(), "See :cpp:class:`GooseFEM::Element::Hex8::Quadrature`.", py::arg("x")); cls.def( py::init< const xt::pytensor&, const xt::pytensor&, const xt::pytensor&>(), "See :cpp:class:`GooseFEM::Element::Hex8::Quadrature`.", py::arg("x"), py::arg("xi"), py::arg("w")); register_Mesh_QuadratureBase(cls); register_Mesh_QuadratureBaseCartesian(cls); cls.def_property_readonly( "GradN", &GooseFEM::Element::Hex8::Quadrature::GradN, "Shape function gradients [nelem, nip, nne, ndim]"); cls.def("__repr__", [](const GooseFEM::Element::Hex8::Quadrature&) { return ""; }); } void init_ElementHex8Gauss(py::module& m) { m.def("nip", &GooseFEM::Element::Hex8::Gauss::nip); m.def("xi", &GooseFEM::Element::Hex8::Gauss::xi); m.def("w", &GooseFEM::Element::Hex8::Gauss::w); } void init_ElementHex8Nodal(py::module& m) { m.def("nip", &GooseFEM::Element::Hex8::Nodal::nip); m.def("xi", &GooseFEM::Element::Hex8::Nodal::xi); m.def("w", &GooseFEM::Element::Hex8::Nodal::w); } #endif diff --git a/python/ElementQuad4.hpp b/python/ElementQuad4.hpp index f7e9791..98830d7 100644 --- a/python/ElementQuad4.hpp +++ b/python/ElementQuad4.hpp @@ -1,71 +1,71 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #ifndef PYGOOSEFEM_ELEMENTQUAD4_H #define PYGOOSEFEM_ELEMENTQUAD4_H #include #include #include #include "Element.hpp" namespace py = pybind11; void init_ElementQuad4(py::module& m) { py::class_ cls(m, "Quadrature"); cls.def( py::init&>(), "See :cpp:class:`GooseFEM::Element::Quad4::Quadrature`.", py::arg("x")); cls.def( py::init< const xt::pytensor&, const xt::pytensor&, const xt::pytensor&>(), "See :cpp:class:`GooseFEM::Element::Quad4::Quadrature`.", py::arg("x"), py::arg("xi"), py::arg("w")); register_Mesh_QuadratureBase(cls); register_Mesh_QuadratureBaseCartesian(cls); cls.def_property_readonly( "GradN", &GooseFEM::Element::Quad4::Quadrature::GradN, "Shape function gradients [nelem, nip, nne, ndim]"); cls.def("__repr__", [](const GooseFEM::Element::Quad4::Quadrature&) { return ""; }); } void init_ElementQuad4Gauss(py::module& m) { m.def("nip", &GooseFEM::Element::Quad4::Gauss::nip); m.def("xi", &GooseFEM::Element::Quad4::Gauss::xi); m.def("w", &GooseFEM::Element::Quad4::Gauss::w); } void init_ElementQuad4Nodal(py::module& m) { m.def("nip", &GooseFEM::Element::Quad4::Nodal::nip); m.def("xi", &GooseFEM::Element::Quad4::Nodal::xi); m.def("w", &GooseFEM::Element::Quad4::Nodal::w); } void init_ElementQuad4MidPoint(py::module& m) { m.def("nip", &GooseFEM::Element::Quad4::MidPoint::nip); m.def("xi", &GooseFEM::Element::Quad4::MidPoint::xi); m.def("w", &GooseFEM::Element::Quad4::MidPoint::w); } #endif diff --git a/python/ElementQuad4Axisymmetric.hpp b/python/ElementQuad4Axisymmetric.hpp index 1e3ddb3..8a11166 100644 --- a/python/ElementQuad4Axisymmetric.hpp +++ b/python/ElementQuad4Axisymmetric.hpp @@ -1,50 +1,50 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #ifndef PYGOOSEFEM_ELEMENTQUAD4AXISYMMETRIC_H #define PYGOOSEFEM_ELEMENTQUAD4AXISYMMETRIC_H #include #include #include #include "Element.hpp" namespace py = pybind11; void init_ElementQuad4Axisymmetric(py::module& m) { py::class_ cls(m, "QuadratureAxisymmetric"); cls.def( py::init&>(), "See :cpp:class:`GooseFEM::Element::Quad4::QuadratureAxisymmetric`.", py::arg("x")); cls.def( py::init< const xt::pytensor&, const xt::pytensor&, const xt::pytensor&>(), "See :cpp:class:`GooseFEM::Element::Quad4::QuadratureAxisymmetric`.", py::arg("x"), py::arg("xi"), py::arg("w")); register_Mesh_QuadratureBase(cls); register_Mesh_QuadratureBaseCartesian(cls); cls.def_property_readonly( "B", &GooseFEM::Element::Quad4::QuadratureAxisymmetric::B, "B-matrix (shape function gradients) [nelem, nne, tdim, tdim, tdim]"); cls.def("__repr__", [](const GooseFEM::Element::Quad4::QuadratureAxisymmetric&) { return ""; }); } #endif diff --git a/python/ElementQuad4Planar.hpp b/python/ElementQuad4Planar.hpp index 603e09b..3c18780 100644 --- a/python/ElementQuad4Planar.hpp +++ b/python/ElementQuad4Planar.hpp @@ -1,53 +1,53 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #ifndef PYGOOSEFEM_ELEMENTQUAD4PLANAR_H #define PYGOOSEFEM_ELEMENTQUAD4PLANAR_H #include #include #include #include "Element.hpp" namespace py = pybind11; void init_ElementQuad4Planar(py::module& m) { py::class_ cls(m, "QuadraturePlanar"); cls.def( py::init&, double>(), "See :cpp:class:`GooseFEM::Element::Quad4::QuadraturePlanar`.", py::arg("x"), py::arg("thick") = 1.0); cls.def( py::init< const xt::pytensor&, const xt::pytensor&, const xt::pytensor&, double>(), "See :cpp:class:`GooseFEM::Element::Quad4::QuadraturePlanar`.", py::arg("x"), py::arg("xi"), py::arg("w"), py::arg("thick") = 1.0); register_Mesh_QuadratureBase(cls); register_Mesh_QuadratureBaseCartesian(cls); cls.def_property_readonly( "GradN", &GooseFEM::Element::Quad4::QuadraturePlanar::GradN, "Shape function gradients [nelem, nip, nne, ndim]"); cls.def("__repr__", [](const GooseFEM::Element::Quad4::QuadraturePlanar&) { return ""; }); } #endif diff --git a/python/Iterate.hpp b/python/Iterate.hpp index 1898e2a..2e22efe 100644 --- a/python/Iterate.hpp +++ b/python/Iterate.hpp @@ -1,33 +1,33 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #ifndef PYGOOSEFEM_ITERATE_H #define PYGOOSEFEM_ITERATE_H #include #include #include namespace py = pybind11; void init_Iterate(py::module& mod) { py::class_ cls(mod, "StopList"); cls.def(py::init(), "See :cpp:class:`GooseFEM::Iterate::StopList`.", py::arg("n") = 1); cls.def("reset", py::overload_cast<>(&GooseFEM::Iterate::StopList::reset)); cls.def("roll_insert", &GooseFEM::Iterate::StopList::roll_insert, py::arg("res")); cls.def("descending", &GooseFEM::Iterate::StopList::descending); cls.def("all_less", &GooseFEM::Iterate::StopList::all_less, py::arg("tol")); cls.def_property_readonly("data", &GooseFEM::Iterate::StopList::data); cls.def("__repr__", [](const GooseFEM::Iterate::StopList&) { return ""; }); } #endif diff --git a/python/Matrix.hpp b/python/Matrix.hpp index 86c7b77..2f36cbe 100644 --- a/python/Matrix.hpp +++ b/python/Matrix.hpp @@ -1,224 +1,224 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #ifndef PYGOOSEFEM_MATRIX_H #define PYGOOSEFEM_MATRIX_H #include #include #include #include #include #include namespace py = pybind11; template void register_Matrix_MatrixBase(P& cls) { cls.def_property_readonly("nelem", &C::nelem, "Number of elements"); cls.def_property_readonly("nne", &C::nne, "Number of nodes per element"); cls.def_property_readonly("nnode", &C::nnode, "Number of nodes"); cls.def_property_readonly("ndim", &C::ndim, "Number of dimensions"); cls.def_property_readonly("ndof", &C::ndof, "Number of DOFs"); cls.def_property_readonly("dofs", &C::dofs, "DOFs [nnode, ndim]"); cls.def_property_readonly("conn", &C::conn, "Connectivity [nelem, nne]"); cls.def( "assemble", &C::template assemble>, "Assemble from elemmat", py::arg("elemmat")); cls.def("Todense", &C::Todense, "Return a dense matrix (copy)"); cls.def( "todense", &C::template todense>, "Dense matrix (write to ret)", py::arg("ret")); cls.def( "Dot", py::overload_cast&>(&C::Dot, py::const_), "Dot product.", py::arg("x")); cls.def( "Dot", py::overload_cast&>(&C::Dot, py::const_), "Dot product.", py::arg("x")); cls.def( "dot", py::overload_cast&, xt::pytensor&>( &C::dot, py::const_), "Dot product (write to b).", py::arg("x"), py::arg("b")); cls.def( "dot", py::overload_cast&, xt::pytensor&>( &C::dot, py::const_), "Dot product (write to b).", py::arg("x"), py::arg("b")); } template void register_Matrix_MatrixPartitionedBase(P& cls) { cls.def_property_readonly("nnu", &C::nnu, "Number of unknown DOFs"); cls.def_property_readonly("nnp", &C::nnp, "Number of prescribed DOFs"); cls.def_property_readonly("iiu", &C::iiu, "Unknown DOFs"); cls.def_property_readonly("iip", &C::iip, "Prescribed DOFs"); cls.def( "Reaction", py::overload_cast&, const xt::pytensor&>( &C::Reaction, py::const_), "Return ``b`` with correct right-hand-side", py::arg("x"), py::arg("b")); cls.def( "Reaction", py::overload_cast&, const xt::pytensor&>( &C::Reaction, py::const_), "Return ``b`` with correct right-hand-side", py::arg("x"), py::arg("b")); cls.def( "reaction", py::overload_cast&, xt::pytensor&>( &C::reaction, py::const_), "Update ``b`` with correct right-hand-side", py::arg("x"), py::arg("b")); cls.def( "reaction", py::overload_cast&, xt::pytensor&>( &C::reaction, py::const_), "Update ``b`` with correct right-hand-side", py::arg("x"), py::arg("b")); cls.def( "Reaction_p", py::overload_cast&, const xt::pytensor&>( &C::Reaction_p, py::const_), "Return ``b_p``", py::arg("x_u"), py::arg("x_p")); } template void register_Matrix_MatrixPartitionedTyingsBase(P& cls) { cls.def_property_readonly("nni", &C::nnu, "Number of independent DOFs"); cls.def_property_readonly("nnd", &C::nnp, "Number of dependent DOFs"); cls.def_property_readonly("iii", &C::iiu, "Independent DOFs"); cls.def_property_readonly("iid", &C::iip, "Dependent DOFs"); } template void register_MatrixSolver_MatrixSolverBase(P& cls) { cls.def( "solve", py::overload_cast&, xt::pytensor&>( &C::template solve), "Solve system.", py::arg("A"), py::arg("b"), py::arg("x")); cls.def( "solve", py::overload_cast&, xt::pytensor&>( &C::template solve), "Solve system.", py::arg("A"), py::arg("b"), py::arg("x")); } template void register_MatrixSolver_MatrixSolverSingleBase(P& cls) { cls.def( "Solve", py::overload_cast&>(&C::template Solve), "Solve system.", py::arg("A"), py::arg("b")); cls.def( "Solve", py::overload_cast&>(&C::template Solve), "Solve system.", py::arg("A"), py::arg("b")); } template void register_MatrixSolver_MatrixSolverPartitionedBase(P& cls) { cls.def( "Solve", py::overload_cast&, const xt::pytensor&>( &C::template Solve), "Solve system.", py::arg("A"), py::arg("b"), py::arg("x")); cls.def( "Solve", py::overload_cast&, const xt::pytensor&>( &C::template Solve), "Solve system.", py::arg("A"), py::arg("b"), py::arg("x")); } void init_Matrix(py::module& m) { // --- py::class_ cls(m, "Matrix"); register_Matrix_MatrixBase(cls); cls.def( py::init&, const xt::pytensor&>(), "See :cpp:class:`GooseFEM::Matrix`.", py::arg("conn"), py::arg("dofs")); cls.def_property_readonly("data", &GooseFEM::Matrix::data); cls.def("set", &GooseFEM::Matrix::set, py::arg("rows"), py::arg("cols"), py::arg("matrix")); cls.def("add", &GooseFEM::Matrix::add, py::arg("rows"), py::arg("cols"), py::arg("matrix")); cls.def("__repr__", [](const GooseFEM::Matrix&) { return ""; }); // --- py::class_> slv(m, "MatrixSolver"); register_MatrixSolver_MatrixSolverBase, GooseFEM::Matrix>(slv); register_MatrixSolver_MatrixSolverSingleBase, GooseFEM::Matrix>(slv); slv.def(py::init<>(), "See :cpp:class:`GooseFEM::MatrixSolver`."); slv.def("__repr__", [](const GooseFEM::MatrixSolver<>&) { return ""; }); } #endif diff --git a/python/MatrixDiagonal.hpp b/python/MatrixDiagonal.hpp index 530a455..e19f4f7 100644 --- a/python/MatrixDiagonal.hpp +++ b/python/MatrixDiagonal.hpp @@ -1,68 +1,68 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #ifndef PYGOOSEFEM_MATRIXDIAGONAL_H #define PYGOOSEFEM_MATRIXDIAGONAL_H #include #include #include #include #include "Matrix.hpp" namespace py = pybind11; template void register_Matrix_MatrixDiagonalBase(P& cls) { cls.def( "Solve", py::overload_cast&>(&C::Solve), "Solve", py::arg("b")); cls.def( "Solve", py::overload_cast&>(&C::Solve), "Solve", py::arg("b")); cls.def( "solve", py::overload_cast&, xt::pytensor&>(&C::solve), "Solve (write to x)", py::arg("b"), py::arg("x")); cls.def( "solve", py::overload_cast&, xt::pytensor&>(&C::solve), "Solve (write to x)", py::arg("b"), py::arg("x")); } void init_MatrixDiagonal(py::module& m) { py::class_ cls(m, "MatrixDiagonal"); register_Matrix_MatrixBase(cls); register_Matrix_MatrixDiagonalBase(cls); cls.def( py::init&, const xt::pytensor&>(), "See :cpp:class:`GooseFEM::MatrixDiagonal`.", py::arg("conn"), py::arg("dofs")); cls.def("set", &GooseFEM::MatrixDiagonal::set, py::arg("A")); cls.def_property_readonly("data", &GooseFEM::MatrixDiagonal::data); cls.def( "__repr__", [](const GooseFEM::MatrixDiagonal&) { return ""; }); } #endif diff --git a/python/MatrixDiagonalPartitioned.hpp b/python/MatrixDiagonalPartitioned.hpp index 48cb25f..fb74570 100644 --- a/python/MatrixDiagonalPartitioned.hpp +++ b/python/MatrixDiagonalPartitioned.hpp @@ -1,58 +1,58 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #include #include #include #include namespace py = pybind11; void init_MatrixDiagonalPartitioned(py::module& m) { py::class_ cls(m, "MatrixDiagonalPartitioned"); register_Matrix_MatrixBase(cls); register_Matrix_MatrixPartitionedBase(cls); cls.def( py::init< const xt::pytensor&, const xt::pytensor&, const xt::pytensor&>(), "See :cpp:class:`GooseFEM::MatrixDiagonalPartitioned`.", py::arg("conn"), py::arg("dofs"), py::arg("iip")); cls.def("data", &GooseFEM::MatrixDiagonalPartitioned::data, "Copy to assemble diagonal matrix"); cls.def_property_readonly("data_uu", &GooseFEM::MatrixDiagonalPartitioned::data_uu); cls.def_property_readonly("data_pp", &GooseFEM::MatrixDiagonalPartitioned::data_pp); cls.def( "Dot_u", py::overload_cast&, const xt::pytensor&>( &GooseFEM::MatrixDiagonalPartitioned::Dot_u, py::const_), py::arg("x_u"), py::arg("x_p")); cls.def( "Dot_p", py::overload_cast&, const xt::pytensor&>( &GooseFEM::MatrixDiagonalPartitioned::Dot_p, py::const_), py::arg("x_u"), py::arg("x_p")); cls.def( "Solve_u", py::overload_cast&, const xt::pytensor&>( &GooseFEM::MatrixDiagonalPartitioned::Solve_u), py::arg("b_u"), py::arg("x_p")); cls.def("__repr__", [](const GooseFEM::MatrixDiagonalPartitioned&) { return ""; }); } diff --git a/python/MatrixPartitioned.hpp b/python/MatrixPartitioned.hpp index 2d4ca41..c0bac2f 100644 --- a/python/MatrixPartitioned.hpp +++ b/python/MatrixPartitioned.hpp @@ -1,75 +1,75 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #include #include #include #include #include #include #include "Matrix.hpp" namespace py = pybind11; void init_MatrixPartitioned(py::module& m) { py::class_ cls(m, "MatrixPartitioned"); register_Matrix_MatrixBase(cls); register_Matrix_MatrixPartitionedBase(cls); cls.def( py::init< const xt::pytensor&, const xt::pytensor&, const xt::pytensor&>(), "See :cpp:class:`GooseFEM::MatrixPartitioned`.", py::arg("conn"), py::arg("dofs"), py::arg("iip")); cls.def_property_readonly("data_uu", &GooseFEM::MatrixPartitioned::data_uu); cls.def_property_readonly("data_up", &GooseFEM::MatrixPartitioned::data_up); cls.def_property_readonly("data_pu", &GooseFEM::MatrixPartitioned::data_pu); cls.def_property_readonly("data_pp", &GooseFEM::MatrixPartitioned::data_pp); cls.def("__repr__", [](const GooseFEM::MatrixPartitioned&) { return ""; }); py::class_> slv(m, "MatrixPartitionedSolver"); register_MatrixSolver_MatrixSolverBase< GooseFEM::MatrixPartitionedSolver<>, GooseFEM::MatrixPartitioned>(slv); register_MatrixSolver_MatrixSolverPartitionedBase< GooseFEM::MatrixPartitionedSolver<>, GooseFEM::MatrixPartitioned>(slv); slv.def(py::init<>(), "See :cpp:class:`GooseFEM::MatrixPartitionedSolver`."); slv.def( "Solve_u", &GooseFEM::MatrixPartitionedSolver<>::template Solve_u, "Solve system.", py::arg("A"), py::arg("b_u"), py::arg("x_p")); slv.def( "solve_u", &GooseFEM::MatrixPartitionedSolver<>::template solve_u, "Solve system.", py::arg("A"), py::arg("b_u"), py::arg("x_p"), py::arg("x_u")); slv.def("__repr__", [](const GooseFEM::MatrixPartitionedSolver<>&) { return ""; }); } diff --git a/python/MatrixPartitionedTyings.hpp b/python/MatrixPartitionedTyings.hpp index 821f906..b4d7d4c 100644 --- a/python/MatrixPartitionedTyings.hpp +++ b/python/MatrixPartitionedTyings.hpp @@ -1,93 +1,93 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #include #include #include #include #include #include #include "Matrix.hpp" namespace py = pybind11; void init_MatrixPartitionedTyings(py::module& m) { py::class_ cls(m, "MatrixPartitionedTyings"); register_Matrix_MatrixBase(cls); register_Matrix_MatrixPartitionedBase(cls); register_Matrix_MatrixPartitionedTyingsBase(cls); cls.def( py::init< const xt::pytensor&, const xt::pytensor&, const Eigen::SparseMatrix&, const Eigen::SparseMatrix&>(), "See :cpp:class:`GooseFEM::MatrixPartitionedTyings`.", py::arg("conn"), py::arg("dofs"), py::arg("Cdu"), py::arg("Cdp")); cls.def_property_readonly("data_uu", &GooseFEM::MatrixPartitionedTyings::data_uu); cls.def_property_readonly("data_up", &GooseFEM::MatrixPartitionedTyings::data_up); cls.def_property_readonly("data_pu", &GooseFEM::MatrixPartitionedTyings::data_pu); cls.def_property_readonly("data_pp", &GooseFEM::MatrixPartitionedTyings::data_pp); cls.def_property_readonly("data_ud", &GooseFEM::MatrixPartitionedTyings::data_ud); cls.def_property_readonly("data_pd", &GooseFEM::MatrixPartitionedTyings::data_pd); cls.def_property_readonly("data_du", &GooseFEM::MatrixPartitionedTyings::data_du); cls.def_property_readonly("data_dp", &GooseFEM::MatrixPartitionedTyings::data_dp); cls.def_property_readonly("data_dd", &GooseFEM::MatrixPartitionedTyings::data_dd); cls.def("__repr__", [](const GooseFEM::MatrixPartitionedTyings&) { return ""; }); py::class_> slv(m, "MatrixPartitionedTyingsSolver"); register_MatrixSolver_MatrixSolverBase< GooseFEM::MatrixPartitionedTyingsSolver<>, GooseFEM::MatrixPartitionedTyings>(slv); register_MatrixSolver_MatrixSolverPartitionedBase< GooseFEM::MatrixPartitionedTyingsSolver<>, GooseFEM::MatrixPartitionedTyings>(slv); slv.def(py::init<>(), "See :cpp:class:`GooseFEM::MatrixPartitionedTyingsSolver`."); slv.def( "Solve_u", py::overload_cast< GooseFEM::MatrixPartitionedTyings&, const xt::pytensor&, const xt::pytensor&, const xt::pytensor&>(&GooseFEM::MatrixPartitionedTyingsSolver<>::Solve_u), py::arg("matrix"), py::arg("b_u"), py::arg("b_d"), py::arg("x_p")); slv.def( "solve_u", py::overload_cast< GooseFEM::MatrixPartitionedTyings&, const xt::pytensor&, const xt::pytensor&, const xt::pytensor&, xt::pytensor&>(&GooseFEM::MatrixPartitionedTyingsSolver<>::solve_u), py::arg("matrix"), py::arg("b_u"), py::arg("b_d"), py::arg("x_p"), py::arg("x_u")); slv.def("__repr__", [](const GooseFEM::MatrixPartitionedTyingsSolver<>&) { return ""; }); } diff --git a/python/Mesh.hpp b/python/Mesh.hpp index 66d44ec..1761dd9 100644 --- a/python/Mesh.hpp +++ b/python/Mesh.hpp @@ -1,545 +1,545 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #ifndef PYGOOSEFEM_MESH_H #define PYGOOSEFEM_MESH_H #include #include #include #include #include namespace py = pybind11; template void register_Mesh_RegularBase(P& cls) { cls.def_property_readonly("nelem", &C::nelem); cls.def_property_readonly("nnode", &C::nnode); cls.def_property_readonly("nne", &C::nne); cls.def_property_readonly("ndim", &C::ndim); cls.def_property_readonly("nelx", &C::nelx); cls.def_property_readonly("nely", &C::nely); cls.def_property_readonly("h", &C::h); cls.def_property_readonly("elementType", &C::getElementType); cls.def("coor", &C::coor); cls.def("conn", &C::conn); cls.def("dofs", &C::dofs); cls.def("dofsPeriodic", &C::dofsPeriodic); cls.def("nodesPeriodic", &C::nodesPeriodic); cls.def("nodesOrigin", &C::nodesOrigin); } template void register_Mesh_RegularBase2d(P& cls) { cls.def("nodesBottomEdge", &C::nodesBottomEdge); cls.def("nodesTopEdge", &C::nodesTopEdge); cls.def("nodesLeftEdge", &C::nodesLeftEdge); cls.def("nodesRightEdge", &C::nodesRightEdge); cls.def("nodesBottomOpenEdge", &C::nodesBottomOpenEdge); cls.def("nodesTopOpenEdge", &C::nodesTopOpenEdge); cls.def("nodesLeftOpenEdge", &C::nodesLeftOpenEdge); cls.def("nodesRightOpenEdge", &C::nodesRightOpenEdge); cls.def("nodesBottomLeftCorner", &C::nodesBottomLeftCorner); cls.def("nodesBottomRightCorner", &C::nodesBottomRightCorner); cls.def("nodesTopLeftCorner", &C::nodesTopLeftCorner); cls.def("nodesTopRightCorner", &C::nodesTopRightCorner); cls.def("nodesLeftBottomCorner", &C::nodesLeftBottomCorner); cls.def("nodesLeftTopCorner", &C::nodesLeftTopCorner); cls.def("nodesRightBottomCorner", &C::nodesRightBottomCorner); cls.def("nodesRightTopCorner", &C::nodesRightTopCorner); } template void register_Mesh_RegularBase3d(P& cls) { cls.def("nodesFront", &C::nodesFront); cls.def("nodesBack", &C::nodesBack); cls.def("nodesLeft", &C::nodesLeft); cls.def("nodesRight", &C::nodesRight); cls.def("nodesBottom", &C::nodesBottom); cls.def("nodesTop", &C::nodesTop); cls.def("nodesFrontFace", &C::nodesFrontFace); cls.def("nodesBackFace", &C::nodesBackFace); cls.def("nodesLeftFace", &C::nodesLeftFace); cls.def("nodesRightFace", &C::nodesRightFace); cls.def("nodesBottomFace", &C::nodesBottomFace); cls.def("nodesTopFace", &C::nodesTopFace); cls.def("nodesFrontBottomEdge", &C::nodesFrontBottomEdge); cls.def("nodesFrontTopEdge", &C::nodesFrontTopEdge); cls.def("nodesFrontLeftEdge", &C::nodesFrontLeftEdge); cls.def("nodesFrontRightEdge", &C::nodesFrontRightEdge); cls.def("nodesBackBottomEdge", &C::nodesBackBottomEdge); cls.def("nodesBackTopEdge", &C::nodesBackTopEdge); cls.def("nodesBackLeftEdge", &C::nodesBackLeftEdge); cls.def("nodesBackRightEdge", &C::nodesBackRightEdge); cls.def("nodesBottomLeftEdge", &C::nodesBottomLeftEdge); cls.def("nodesBottomRightEdge", &C::nodesBottomRightEdge); cls.def("nodesTopLeftEdge", &C::nodesTopLeftEdge); cls.def("nodesTopRightEdge", &C::nodesTopRightEdge); cls.def("nodesBottomFrontEdge", &C::nodesBottomFrontEdge); cls.def("nodesBottomBackEdge", &C::nodesBottomBackEdge); cls.def("nodesTopFrontEdge", &C::nodesTopFrontEdge); cls.def("nodesTopBackEdge", &C::nodesTopBackEdge); cls.def("nodesLeftBottomEdge", &C::nodesLeftBottomEdge); cls.def("nodesLeftFrontEdge", &C::nodesLeftFrontEdge); cls.def("nodesLeftBackEdge", &C::nodesLeftBackEdge); cls.def("nodesLeftTopEdge", &C::nodesLeftTopEdge); cls.def("nodesRightBottomEdge", &C::nodesRightBottomEdge); cls.def("nodesRightTopEdge", &C::nodesRightTopEdge); cls.def("nodesRightFrontEdge", &C::nodesRightFrontEdge); cls.def("nodesRightBackEdge", &C::nodesRightBackEdge); cls.def("nodesFrontBottomOpenEdge", &C::nodesFrontBottomOpenEdge); cls.def("nodesFrontTopOpenEdge", &C::nodesFrontTopOpenEdge); cls.def("nodesFrontLeftOpenEdge", &C::nodesFrontLeftOpenEdge); cls.def("nodesFrontRightOpenEdge", &C::nodesFrontRightOpenEdge); cls.def("nodesBackBottomOpenEdge", &C::nodesBackBottomOpenEdge); cls.def("nodesBackTopOpenEdge", &C::nodesBackTopOpenEdge); cls.def("nodesBackLeftOpenEdge", &C::nodesBackLeftOpenEdge); cls.def("nodesBackRightOpenEdge", &C::nodesBackRightOpenEdge); cls.def("nodesBottomLeftOpenEdge", &C::nodesBottomLeftOpenEdge); cls.def("nodesBottomRightOpenEdge", &C::nodesBottomRightOpenEdge); cls.def("nodesTopLeftOpenEdge", &C::nodesTopLeftOpenEdge); cls.def("nodesTopRightOpenEdge", &C::nodesTopRightOpenEdge); cls.def("nodesBottomFrontOpenEdge", &C::nodesBottomFrontOpenEdge); cls.def("nodesBottomBackOpenEdge", &C::nodesBottomBackOpenEdge); cls.def("nodesTopFrontOpenEdge", &C::nodesTopFrontOpenEdge); cls.def("nodesTopBackOpenEdge", &C::nodesTopBackOpenEdge); cls.def("nodesLeftBottomOpenEdge", &C::nodesLeftBottomOpenEdge); cls.def("nodesLeftFrontOpenEdge", &C::nodesLeftFrontOpenEdge); cls.def("nodesLeftBackOpenEdge", &C::nodesLeftBackOpenEdge); cls.def("nodesLeftTopOpenEdge", &C::nodesLeftTopOpenEdge); cls.def("nodesRightBottomOpenEdge", &C::nodesRightBottomOpenEdge); cls.def("nodesRightTopOpenEdge", &C::nodesRightTopOpenEdge); cls.def("nodesRightFrontOpenEdge", &C::nodesRightFrontOpenEdge); cls.def("nodesRightBackOpenEdge", &C::nodesRightBackOpenEdge); cls.def("nodesFrontBottomLeftCorner", &C::nodesFrontBottomLeftCorner); cls.def("nodesFrontBottomRightCorner", &C::nodesFrontBottomRightCorner); cls.def("nodesFrontTopLeftCorner", &C::nodesFrontTopLeftCorner); cls.def("nodesFrontTopRightCorner", &C::nodesFrontTopRightCorner); cls.def("nodesBackBottomLeftCorner", &C::nodesBackBottomLeftCorner); cls.def("nodesBackBottomRightCorner", &C::nodesBackBottomRightCorner); cls.def("nodesBackTopLeftCorner", &C::nodesBackTopLeftCorner); cls.def("nodesBackTopRightCorner", &C::nodesBackTopRightCorner); cls.def("nodesFrontLeftBottomCorner", &C::nodesFrontLeftBottomCorner); cls.def("nodesBottomFrontLeftCorner", &C::nodesBottomFrontLeftCorner); cls.def("nodesBottomLeftFrontCorner", &C::nodesBottomLeftFrontCorner); cls.def("nodesLeftFrontBottomCorner", &C::nodesLeftFrontBottomCorner); cls.def("nodesLeftBottomFrontCorner", &C::nodesLeftBottomFrontCorner); cls.def("nodesFrontRightBottomCorner", &C::nodesFrontRightBottomCorner); cls.def("nodesBottomFrontRightCorner", &C::nodesBottomFrontRightCorner); cls.def("nodesBottomRightFrontCorner", &C::nodesBottomRightFrontCorner); cls.def("nodesRightFrontBottomCorner", &C::nodesRightFrontBottomCorner); cls.def("nodesRightBottomFrontCorner", &C::nodesRightBottomFrontCorner); cls.def("nodesFrontLeftTopCorner", &C::nodesFrontLeftTopCorner); cls.def("nodesTopFrontLeftCorner", &C::nodesTopFrontLeftCorner); cls.def("nodesTopLeftFrontCorner", &C::nodesTopLeftFrontCorner); cls.def("nodesLeftFrontTopCorner", &C::nodesLeftFrontTopCorner); cls.def("nodesLeftTopFrontCorner", &C::nodesLeftTopFrontCorner); cls.def("nodesFrontRightTopCorner", &C::nodesFrontRightTopCorner); cls.def("nodesTopFrontRightCorner", &C::nodesTopFrontRightCorner); cls.def("nodesTopRightFrontCorner", &C::nodesTopRightFrontCorner); cls.def("nodesRightFrontTopCorner", &C::nodesRightFrontTopCorner); cls.def("nodesRightTopFrontCorner", &C::nodesRightTopFrontCorner); cls.def("nodesBackLeftBottomCorner", &C::nodesBackLeftBottomCorner); cls.def("nodesBottomBackLeftCorner", &C::nodesBottomBackLeftCorner); cls.def("nodesBottomLeftBackCorner", &C::nodesBottomLeftBackCorner); cls.def("nodesLeftBackBottomCorner", &C::nodesLeftBackBottomCorner); cls.def("nodesLeftBottomBackCorner", &C::nodesLeftBottomBackCorner); cls.def("nodesBackRightBottomCorner", &C::nodesBackRightBottomCorner); cls.def("nodesBottomBackRightCorner", &C::nodesBottomBackRightCorner); cls.def("nodesBottomRightBackCorner", &C::nodesBottomRightBackCorner); cls.def("nodesRightBackBottomCorner", &C::nodesRightBackBottomCorner); cls.def("nodesRightBottomBackCorner", &C::nodesRightBottomBackCorner); cls.def("nodesBackLeftTopCorner", &C::nodesBackLeftTopCorner); cls.def("nodesTopBackLeftCorner", &C::nodesTopBackLeftCorner); cls.def("nodesTopLeftBackCorner", &C::nodesTopLeftBackCorner); cls.def("nodesLeftBackTopCorner", &C::nodesLeftBackTopCorner); cls.def("nodesLeftTopBackCorner", &C::nodesLeftTopBackCorner); cls.def("nodesBackRightTopCorner", &C::nodesBackRightTopCorner); cls.def("nodesTopBackRightCorner", &C::nodesTopBackRightCorner); cls.def("nodesTopRightBackCorner", &C::nodesTopRightBackCorner); cls.def("nodesRightBackTopCorner", &C::nodesRightBackTopCorner); cls.def("nodesRightTopBackCorner", &C::nodesRightTopBackCorner); } void init_Mesh(py::module& mod) { py::enum_( mod, "ElementType", "See :cpp:enum:`GooseFEM::Mesh::ElementType`.") .value("Unknown", GooseFEM::Mesh::ElementType::Unknown) .value("Tri3", GooseFEM::Mesh::ElementType::Tri3) .value("Quad4", GooseFEM::Mesh::ElementType::Quad4) .value("Hex8", GooseFEM::Mesh::ElementType::Hex8) .export_values(); mod.def( "overlapping", &GooseFEM::Mesh::overlapping, xt::pytensor>, "See :cpp:func:`GooseFEM::Mesh::overlapping`.", py::arg("coor_a"), py::arg("coor_b"), py::arg("rtol") = 1e-5, py::arg("atol") = 1e-8); py::class_(mod, "ManualStitch") .def( py::init< const xt::pytensor&, const xt::pytensor&, const xt::pytensor&, const xt::pytensor&, const xt::pytensor&, const xt::pytensor&, bool, double, double>(), "See :cpp:class:`GooseFEM::Mesh::ManualStitch`.", py::arg("coor_a"), py::arg("conn_a"), py::arg("overlapping_nodes_a"), py::arg("coor_b"), py::arg("conn_b"), py::arg("overlapping_nodes_b"), py::arg("check_position") = true, py::arg("rtol") = 1e-5, py::arg("atol") = 1e-8) .def_property_readonly("nmesh", &GooseFEM::Mesh::ManualStitch::nmesh) .def_property_readonly("nnode", &GooseFEM::Mesh::ManualStitch::nnode) .def_property_readonly("nelem", &GooseFEM::Mesh::ManualStitch::nelem) .def_property_readonly("ndim", &GooseFEM::Mesh::ManualStitch::ndim) .def_property_readonly("nne", &GooseFEM::Mesh::ManualStitch::nne) .def_property_readonly("coor", &GooseFEM::Mesh::ManualStitch::coor) .def_property_readonly("conn", &GooseFEM::Mesh::ManualStitch::conn) .def("dofs", &GooseFEM::Mesh::ManualStitch::dofs) .def("nodemap", py::overload_cast<>(&GooseFEM::Mesh::ManualStitch::nodemap, py::const_)) .def("elemmap", py::overload_cast<>(&GooseFEM::Mesh::ManualStitch::elemmap, py::const_)) .def( "nodemap", py::overload_cast(&GooseFEM::Mesh::ManualStitch::nodemap, py::const_), py::arg("mesh_index")) .def( "elemmap", py::overload_cast(&GooseFEM::Mesh::ManualStitch::elemmap, py::const_), py::arg("mesh_index")) .def( "nodeset", &GooseFEM::Mesh::ManualStitch::nodeset>, py::arg("set"), py::arg("mesh_index")) .def( "elemset", &GooseFEM::Mesh::ManualStitch::elemset>, py::arg("set"), py::arg("mesh_index")) .def("__repr__", [](const GooseFEM::Mesh::ManualStitch&) { return ""; }); py::class_(mod, "Stitch") .def( py::init(), "See :cpp:class:`GooseFEM::Mesh::Stitch`.", py::arg("rtol") = 1e-5, py::arg("atol") = 1e-8) .def( "push_back", &GooseFEM::Mesh::Stitch::push_back, xt::pytensor>, py::arg("coor"), py::arg("conn")) .def_property_readonly("nmesh", &GooseFEM::Mesh::Stitch::nmesh) .def_property_readonly("nnode", &GooseFEM::Mesh::Stitch::nnode) .def_property_readonly("nelem", &GooseFEM::Mesh::Stitch::nelem) .def_property_readonly("ndim", &GooseFEM::Mesh::Stitch::ndim) .def_property_readonly("nne", &GooseFEM::Mesh::Stitch::nne) .def_property_readonly("coor", &GooseFEM::Mesh::Stitch::coor) .def_property_readonly("conn", &GooseFEM::Mesh::Stitch::conn) .def("dofs", &GooseFEM::Mesh::Stitch::dofs) .def("nodemap", py::overload_cast<>(&GooseFEM::Mesh::Stitch::nodemap, py::const_)) .def("elemmap", py::overload_cast<>(&GooseFEM::Mesh::Stitch::elemmap, py::const_)) .def( "nodemap", py::overload_cast(&GooseFEM::Mesh::Stitch::nodemap, py::const_), py::arg("mesh_index")) .def( "elemmap", py::overload_cast(&GooseFEM::Mesh::Stitch::elemmap, py::const_), py::arg("mesh_index")) .def( "nodeset", static_cast (GooseFEM::Mesh::Stitch::*)( const xt::pytensor&, size_t) const>(&GooseFEM::Mesh::Stitch::nodeset), py::arg("set"), py::arg("mesh_index")) .def( "elemset", static_cast (GooseFEM::Mesh::Stitch::*)( const xt::pytensor&, size_t) const>(&GooseFEM::Mesh::Stitch::elemset), py::arg("set"), py::arg("mesh_index")) .def( "nodeset", static_cast (GooseFEM::Mesh::Stitch::*)( const std::vector>&) const>( &GooseFEM::Mesh::Stitch::nodeset), py::arg("set")) .def( "elemset", static_cast (GooseFEM::Mesh::Stitch::*)( const std::vector>&) const>( &GooseFEM::Mesh::Stitch::elemset), py::arg("set")) .def("__repr__", [](const GooseFEM::Mesh::Stitch&) { return ""; }); py::class_(mod, "Vstack") .def( py::init(), "See :cpp:class:`GooseFEM::Mesh::Vstack`.", py::arg("check_overlap") = true, py::arg("rtol") = 1e-5, py::arg("atol") = 1e-8) .def( "push_back", &GooseFEM::Mesh::Vstack::push_back< xt::pytensor, xt::pytensor, xt::pytensor>, py::arg("coor"), py::arg("conn"), py::arg("nodes_bottom"), py::arg("nodes_top")) .def("__repr__", [](const GooseFEM::Mesh::Vstack&) { return ""; }); py::class_(mod, "Renumber") .def( py::init&>(), "See :cpp:class:`GooseFEM::Mesh::Renumber`.", py::arg("dofs")) .def("apply", &GooseFEM::Mesh::Renumber::apply>) .def_property_readonly("index", &GooseFEM::Mesh::Renumber::index) .def( "__repr__", [](const GooseFEM::Mesh::Renumber&) { return ""; }); py::class_(mod, "Reorder") .def( py::init([](xt::pytensor& a) { return new GooseFEM::Mesh::Reorder({a}); }), "See :cpp:class:`GooseFEM::Mesh::Reorder`.") .def( py::init([](xt::pytensor& a, xt::pytensor& b) { return new GooseFEM::Mesh::Reorder({a, b}); }), "See :cpp:class:`GooseFEM::Mesh::Reorder`.") .def( py::init([](xt::pytensor& a, xt::pytensor& b, xt::pytensor& c) { return new GooseFEM::Mesh::Reorder({a, b, c}); }), "See :cpp:class:`GooseFEM::Mesh::Reorder`.") .def( py::init([](xt::pytensor& a, xt::pytensor& b, xt::pytensor& c, xt::pytensor& d) { return new GooseFEM::Mesh::Reorder({a, b, c, d}); }), "See :cpp:class:`GooseFEM::Mesh::Reorder`.") .def("apply", &GooseFEM::Mesh::Reorder::apply>) .def_property_readonly("index", &GooseFEM::Mesh::Reorder::index) .def("__repr__", [](const GooseFEM::Mesh::Reorder&) { return ""; }); mod.def( "dofs", &GooseFEM::Mesh::dofs, "See :cpp:func:`GooseFEM::Mesh::dofs`.", py::arg("nnode"), py::arg("ndim")); mod.def( "nodaltyings", &GooseFEM::Mesh::nodaltyings>, "See :cpp:func:`GooseFEM::Mesh::nodaltyings`.", py::arg("dofs")); mod.def( "renumber", &GooseFEM::Mesh::renumber>, "See :cpp:func:`GooseFEM::Mesh::renumber`.", py::arg("dofs")); mod.def( "coordination", &GooseFEM::Mesh::coordination>, "See :cpp:func:`GooseFEM::Mesh::coordination`.", py::arg("conn")); mod.def( "node2dof", &GooseFEM::Mesh::node2dof>, "See :cpp:func:`GooseFEM::Mesh::node2dof`.", py::arg("dofs"), py::arg("sorted") = true); mod.def( "elem2node", py::overload_cast&, bool>( &GooseFEM::Mesh::elem2node>), "See :cpp:func:`GooseFEM::Mesh::elem2node`.", py::arg("conn"), py::arg("sorted") = true); mod.def( "elem2node", py::overload_cast&, const xt::pytensor&, bool>( &GooseFEM::Mesh::elem2node, xt::pytensor>), "See :cpp:func:`GooseFEM::Mesh::elem2node`.", py::arg("conn"), py::arg("dofs"), py::arg("sorted") = true); mod.def( "edgesize", py::overload_cast&, const xt::pytensor&>( &GooseFEM::Mesh::edgesize, xt::pytensor>), "See :cpp:func:`GooseFEM::Mesh::edgesize`.", py::arg("coor"), py::arg("conn")); mod.def( "edgesize", py::overload_cast< const xt::pytensor&, const xt::pytensor&, GooseFEM::Mesh::ElementType>( &GooseFEM::Mesh::edgesize, xt::pytensor>), "See :cpp:func:`GooseFEM::Mesh::edgesize`.", py::arg("coor"), py::arg("conn"), py::arg("type")); mod.def( "centers", py::overload_cast&, const xt::pytensor&>( &GooseFEM::Mesh::centers, xt::pytensor>), "See :cpp:func:`GooseFEM::Mesh::centers`.", py::arg("coor"), py::arg("conn")); mod.def( "centers", py::overload_cast< const xt::pytensor&, const xt::pytensor&, GooseFEM::Mesh::ElementType>( &GooseFEM::Mesh::centers, xt::pytensor>), "See :cpp:func:`GooseFEM::Mesh::centers`.", py::arg("coor"), py::arg("conn"), py::arg("type")); mod.def( "elemmap2nodemap", py::overload_cast< const xt::pytensor&, const xt::pytensor&, const xt::pytensor&>(&GooseFEM::Mesh::elemmap2nodemap< xt::pytensor, xt::pytensor, xt::pytensor>), "See :cpp:func:`GooseFEM::Mesh::elemmap2nodemap`.", py::arg("elem_map"), py::arg("coor"), py::arg("conn")); mod.def( "elemmap2nodemap", py::overload_cast< const xt::pytensor&, const xt::pytensor&, const xt::pytensor&, GooseFEM::Mesh::ElementType>(&GooseFEM::Mesh::elemmap2nodemap< xt::pytensor, xt::pytensor, xt::pytensor>), "See :cpp:func:`GooseFEM::Mesh::elemmap2nodemap`.", py::arg("elem_map"), py::arg("coor"), py::arg("conn"), py::arg("type")); mod.def( "nodal_mass", py::overload_cast&, const xt::pytensor&>( &GooseFEM::Mesh::nodal_mass, xt::pytensor>), "See :cpp:func:`GooseFEM::Mesh::nodal_mass`.", py::arg("coor"), py::arg("conn")); mod.def( "nodal_mass", py::overload_cast< const xt::pytensor&, const xt::pytensor&, GooseFEM::Mesh::ElementType>( &GooseFEM::Mesh::nodal_mass, xt::pytensor>), "See :cpp:func:`GooseFEM::Mesh::nodal_mass`.", py::arg("coor"), py::arg("conn"), py::arg("type")); mod.def( "center_of_gravity", py::overload_cast&, const xt::pytensor&>( &GooseFEM::Mesh::center_of_gravity, xt::pytensor>), "See :cpp:func:`GooseFEM::Mesh::center_of_gravity`.", py::arg("coor"), py::arg("conn")); mod.def( "center_of_gravity", py::overload_cast< const xt::pytensor&, const xt::pytensor&, GooseFEM::Mesh::ElementType>( &GooseFEM::Mesh::center_of_gravity, xt::pytensor>), "See :cpp:func:`GooseFEM::Mesh::center_of_gravity`.", py::arg("coor"), py::arg("conn"), py::arg("type")); } #endif diff --git a/python/MeshHex8.hpp b/python/MeshHex8.hpp index 6c59545..2d7566e 100644 --- a/python/MeshHex8.hpp +++ b/python/MeshHex8.hpp @@ -1,61 +1,61 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #ifndef PYGOOSEFEM_MESHHEX8_H #define PYGOOSEFEM_MESHHEX8_H #include #include #include #include #include #include "Mesh.hpp" namespace py = pybind11; void init_MeshHex8(py::module& mod) { { py::class_ cls(mod, "Regular"); cls.def( py::init(), "See :cpp:class:`GooseFEM::Mesh::Hex8::Regular`.", py::arg("nx"), py::arg("ny"), py::arg("nz"), py::arg("h") = 1.); register_Mesh_RegularBase(cls); register_Mesh_RegularBase3d(cls); cls.def("__repr__", [](const GooseFEM::Mesh::Hex8::Regular&) { return ""; }); } { py::class_ cls(mod, "FineLayer"); cls.def( py::init(), "See :cpp:class:`GooseFEM::Mesh::Hex8::FineLayer`.", py::arg("nx"), py::arg("ny"), py::arg("nz"), py::arg("h") = 1.0, py::arg("nfine") = 1); cls.def("elementsMiddleLayer", &GooseFEM::Mesh::Hex8::FineLayer::elementsMiddleLayer); cls.def("__repr__", [](const GooseFEM::Mesh::Hex8::FineLayer&) { return ""; }); } } #endif diff --git a/python/MeshQuad4.hpp b/python/MeshQuad4.hpp index 2f9d041..c5831e4 100644 --- a/python/MeshQuad4.hpp +++ b/python/MeshQuad4.hpp @@ -1,234 +1,234 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #ifndef PYGOOSEFEM_MESHQUAD4_H #define PYGOOSEFEM_MESHQUAD4_H #include #include #include #include #include #include "Mesh.hpp" namespace py = pybind11; void init_MeshQuad4(py::module& m) { { py::class_ cls(m, "Regular"); cls.def( py::init(), "See :cpp:class:`GooseFEM::Mesh::Quad4::Regular`.", py::arg("nx"), py::arg("ny"), py::arg("h") = 1.0); register_Mesh_RegularBase(cls); register_Mesh_RegularBase2d(cls); cls.def("elementgrid", &GooseFEM::Mesh::Quad4::Regular::elementgrid); cls.def("__repr__", [](const GooseFEM::Mesh::Quad4::Regular&) { return ""; }); } { py::class_ cls(m, "FineLayer"); cls.def( py::init(), "See :cpp:class:`GooseFEM::Mesh::Quad4::FineLayer`.", py::arg("nx"), py::arg("ny"), py::arg("h") = 1., py::arg("nfine") = 1); cls.def( py::init&, const xt::pytensor&>(), "See :cpp:class:`GooseFEM::Mesh::Quad4::FineLayer`.", py::arg("coor"), py::arg("conn")); register_Mesh_RegularBase(cls); register_Mesh_RegularBase2d(cls); cls.def_property_readonly("elemrow_nhx", &GooseFEM::Mesh::Quad4::FineLayer::elemrow_nhx); cls.def_property_readonly("elemrow_nhy", &GooseFEM::Mesh::Quad4::FineLayer::elemrow_nhy); cls.def_property_readonly("elemrow_type", &GooseFEM::Mesh::Quad4::FineLayer::elemrow_type); cls.def_property_readonly( "elemrow_nelem", &GooseFEM::Mesh::Quad4::FineLayer::elemrow_nelem); cls.def("elementsMiddleLayer", &GooseFEM::Mesh::Quad4::FineLayer::elementsMiddleLayer); cls.def( "elementsLayer", &GooseFEM::Mesh::Quad4::FineLayer::elementsLayer, py::arg("layer")); cls.def( "elementgrid_ravel", &GooseFEM::Mesh::Quad4::FineLayer::elementgrid_ravel, py::arg("rows_range"), py::arg("cols_range")); cls.def( "elementgrid_around_ravel", &GooseFEM::Mesh::Quad4::FineLayer::elementgrid_around_ravel, py::arg("element"), py::arg("size"), py::arg("periodic") = true); cls.def( "elementgrid_leftright", &GooseFEM::Mesh::Quad4::FineLayer::elementgrid_leftright, py::arg("element"), py::arg("left"), py::arg("right"), py::arg("periodic") = true); cls.def("roll", &GooseFEM::Mesh::Quad4::FineLayer::roll); cls.def("__repr__", [](const GooseFEM::Mesh::Quad4::FineLayer&) { return ""; }); } } void init_MeshQuad4Map(py::module& m) { py::class_(m, "RefineRegular") .def( py::init(), "See :cpp:class:`GooseFEM::Mesh::Quad4::Map::RefineRegular`.", py::arg("mesh"), py::arg("nx"), py::arg("ny")) .def_property_readonly("coarseMesh", &GooseFEM::Mesh::Quad4::Map::RefineRegular::coarseMesh) .def_property_readonly("fineMesh", &GooseFEM::Mesh::Quad4::Map::RefineRegular::fineMesh) .def_property_readonly("map", &GooseFEM::Mesh::Quad4::Map::RefineRegular::map) .def( "meanToCoarse", py::overload_cast&>( &GooseFEM::Mesh::Quad4::Map::RefineRegular::meanToCoarse, py::const_)) .def( "meanToCoarse", py::overload_cast&>( &GooseFEM::Mesh::Quad4::Map::RefineRegular::meanToCoarse, py::const_)) .def( "meanToCoarse", py::overload_cast&>( &GooseFEM::Mesh::Quad4::Map::RefineRegular::meanToCoarse, py::const_)) .def( "meanToCoarse", py::overload_cast&>( &GooseFEM::Mesh::Quad4::Map::RefineRegular::meanToCoarse, py::const_)) .def( "averageToCoarse", py::overload_cast&, const xt::pytensor&>( &GooseFEM::Mesh::Quad4::Map::RefineRegular::averageToCoarse, py::const_)) .def( "averageToCoarse", py::overload_cast&, const xt::pytensor&>( &GooseFEM::Mesh::Quad4::Map::RefineRegular::averageToCoarse, py::const_)) .def( "averageToCoarse", py::overload_cast&, const xt::pytensor&>( &GooseFEM::Mesh::Quad4::Map::RefineRegular::averageToCoarse, py::const_)) .def( "averageToCoarse", py::overload_cast&, const xt::pytensor&>( &GooseFEM::Mesh::Quad4::Map::RefineRegular::averageToCoarse, py::const_)) .def( "mapToFine", py::overload_cast&>( &GooseFEM::Mesh::Quad4::Map::RefineRegular::mapToFine, py::const_)) .def( "mapToFine", py::overload_cast&>( &GooseFEM::Mesh::Quad4::Map::RefineRegular::mapToFine, py::const_)) .def( "mapToFine", py::overload_cast&>( &GooseFEM::Mesh::Quad4::Map::RefineRegular::mapToFine, py::const_)) .def( "mapToFine", py::overload_cast&>( &GooseFEM::Mesh::Quad4::Map::RefineRegular::mapToFine, py::const_)) .def("__repr__", [](const GooseFEM::Mesh::Quad4::Map::RefineRegular&) { return ""; }); py::class_(m, "FineLayer2Regular") .def( py::init(), "See :cpp:class:`GooseFEM::Mesh::Quad4::Map::FineLayer2Regular`.", py::arg("mesh")) .def_property_readonly( "regularMesh", &GooseFEM::Mesh::Quad4::Map::FineLayer2Regular::regularMesh) .def_property_readonly( "fineLayerMesh", &GooseFEM::Mesh::Quad4::Map::FineLayer2Regular::fineLayerMesh) .def_property_readonly("map", &GooseFEM::Mesh::Quad4::Map::FineLayer2Regular::map) .def_property_readonly( "mapFraction", &GooseFEM::Mesh::Quad4::Map::FineLayer2Regular::mapFraction) .def( "mapToRegular", py::overload_cast&>( &GooseFEM::Mesh::Quad4::Map::FineLayer2Regular::mapToRegular, py::const_)) .def( "mapToRegular", py::overload_cast&>( &GooseFEM::Mesh::Quad4::Map::FineLayer2Regular::mapToRegular, py::const_)) .def( "mapToRegular", py::overload_cast&>( &GooseFEM::Mesh::Quad4::Map::FineLayer2Regular::mapToRegular, py::const_)) .def( "mapToRegular", py::overload_cast&>( &GooseFEM::Mesh::Quad4::Map::FineLayer2Regular::mapToRegular, py::const_)) .def("__repr__", [](const GooseFEM::Mesh::Quad4::Map::FineLayer2Regular&) { return ""; }); } #endif diff --git a/python/MeshTri3.hpp b/python/MeshTri3.hpp index 57bc760..13ce541 100644 --- a/python/MeshTri3.hpp +++ b/python/MeshTri3.hpp @@ -1,68 +1,68 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #ifndef PYGOOSEFEM_MESHTRI3_H #define PYGOOSEFEM_MESHTRI3_H #include #include #include #include #include #include "Mesh.hpp" namespace py = pybind11; void init_MeshTri3(py::module& mod) { py::class_ cls(mod, "Regular"); cls.def( py::init(), "See :cpp:class:`GooseFEM::Mesh::Tri3::Regular`.", py::arg("nx"), py::arg("ny"), py::arg("h") = 1.); register_Mesh_RegularBase(cls); register_Mesh_RegularBase2d(cls); cls.def("__repr__", [](const GooseFEM::Mesh::Tri3::Regular&) { return ""; }); mod.def( "getOrientation", &GooseFEM::Mesh::Tri3::getOrientation, "See :cpp:func:`GooseFEM::Mesh::Tri3::getOrientation`.", py::arg("coor"), py::arg("conn")); mod.def( "setOrientation", py::overload_cast&, const xt::pytensor&, int>( &GooseFEM::Mesh::Tri3::setOrientation), "See :cpp:func:`GooseFEM::Mesh::Tri3::setOrientation`.", py::arg("coor"), py::arg("conn"), py::arg("orientation")); mod.def( "setOrientation", py::overload_cast< const xt::pytensor&, const xt::pytensor&, const xt::pytensor&, int>(&GooseFEM::Mesh::Tri3::setOrientation), "See :cpp:func:`GooseFEM::Mesh::Tri3::setOrientation`.", py::arg("coor"), py::arg("conn"), py::arg("val"), py::arg("orientation")); } #endif diff --git a/python/TyingsPeriodic.hpp b/python/TyingsPeriodic.hpp index 04201ab..5541bce 100644 --- a/python/TyingsPeriodic.hpp +++ b/python/TyingsPeriodic.hpp @@ -1,89 +1,89 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #ifndef PYGOOSEFEM_TYINGSPERIODIC_H #define PYGOOSEFEM_TYINGSPERIODIC_H #include #include #include #include #include namespace py = pybind11; void init_TyingsPeriodic(py::module& mod) { { py::class_ cls(mod, "Periodic"); cls.def( py::init< const xt::pytensor&, const xt::pytensor&, const xt::pytensor&, const xt::pytensor&>(), "See :cpp:class:`GooseFEM::Tyings::Periodic`.", py::arg("coor"), py::arg("dofs"), py::arg("control_dofs"), py::arg("nodal_tyings")); cls.def( py::init< const xt::pytensor&, const xt::pytensor&, const xt::pytensor&, const xt::pytensor&, const xt::pytensor&>(), "See :cpp:class:`GooseFEM::Tyings::Periodic`.", py::arg("coor"), py::arg("dofs"), py::arg("control_dofs"), py::arg("nodal_tyings"), py::arg("iip")); cls.def_property_readonly("nnd", &GooseFEM::Tyings::Periodic::nnd); cls.def_property_readonly("nni", &GooseFEM::Tyings::Periodic::nni); cls.def_property_readonly("nnu", &GooseFEM::Tyings::Periodic::nnu); cls.def_property_readonly("nnp", &GooseFEM::Tyings::Periodic::nnp); cls.def_property_readonly("dofs", &GooseFEM::Tyings::Periodic::dofs); cls.def_property_readonly("control", &GooseFEM::Tyings::Periodic::control); cls.def_property_readonly("nodal_tyings", &GooseFEM::Tyings::Periodic::nodal_tyings); cls.def("iid", &GooseFEM::Tyings::Periodic::iid); cls.def("iii", &GooseFEM::Tyings::Periodic::iii); cls.def("iiu", &GooseFEM::Tyings::Periodic::iiu); cls.def("iip", &GooseFEM::Tyings::Periodic::iip); cls.def("Cdi", &GooseFEM::Tyings::Periodic::Cdi); cls.def("Cdu", &GooseFEM::Tyings::Periodic::Cdu); cls.def("Cdp", &GooseFEM::Tyings::Periodic::Cdp); cls.def("__repr__", [](const GooseFEM::Tyings::Periodic&) { return ""; }); } { py::class_ cls(mod, "Control"); cls.def( py::init&, const xt::pytensor&>(), "See :cpp:class:`GooseFEM::Tyings::Control`.", py::arg("coor"), py::arg("dofs")); cls.def_property_readonly("coor", &GooseFEM::Tyings::Control::coor); cls.def_property_readonly("dofs", &GooseFEM::Tyings::Control::dofs); cls.def_property_readonly("controlDofs", &GooseFEM::Tyings::Control::controlDofs); cls.def_property_readonly("controlNodes", &GooseFEM::Tyings::Control::controlNodes); cls.def("__repr__", [](const GooseFEM::Tyings::Control&) { return ""; }); } } #endif diff --git a/python/Vector.hpp b/python/Vector.hpp index 89e00b8..02b0fe2 100644 --- a/python/Vector.hpp +++ b/python/Vector.hpp @@ -1,121 +1,121 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #include #include #include #include namespace py = pybind11; void init_Vector(py::module& m) { py::class_(m, "Vector") .def( py::init&, const xt::pytensor&>(), "See :cpp:class:`GooseFEM::Vector`.", py::arg("conn"), py::arg("dofs")) .def_property_readonly("nelem", &GooseFEM::Vector::nelem) .def_property_readonly("nne", &GooseFEM::Vector::nne) .def_property_readonly("nnode", &GooseFEM::Vector::nnode) .def_property_readonly("ndim", &GooseFEM::Vector::ndim) .def_property_readonly("ndof", &GooseFEM::Vector::ndof) .def_property_readonly("conn", &GooseFEM::Vector::conn) .def_property_readonly("dofs", &GooseFEM::Vector::dofs) .def( "copy", &GooseFEM::Vector::copy>, py::arg("nodevec_src"), py::arg("nodevec_dest")) .def( "Copy", &GooseFEM::Vector::Copy>, py::arg("nodevec_src"), py::arg("nodevec_dest")) .def("AsDofs", &GooseFEM::Vector::AsDofs>, py::arg("arg")) .def( "asDofs", &GooseFEM::Vector::asDofs, xt::pytensor>, py::arg("arg"), py::arg("ret")) .def("AsNode", &GooseFEM::Vector::AsNode>, py::arg("arg")) .def( "asNode", &GooseFEM::Vector::asNode, xt::pytensor>, py::arg("arg"), py::arg("ret")) .def("AsElement", &GooseFEM::Vector::AsElement>, py::arg("arg")) .def( "asElement", &GooseFEM::Vector::asElement, xt::pytensor>, py::arg("arg"), py::arg("ret")) .def("AssembleDofs", &GooseFEM::Vector::AssembleDofs>, py::arg("arg")) .def( "assembleDofs", &GooseFEM::Vector::assembleDofs, xt::pytensor>, py::arg("arg"), py::arg("ret")) .def("AssembleNode", &GooseFEM::Vector::AssembleNode>, py::arg("arg")) .def( "assembleNode", &GooseFEM::Vector::assembleNode, xt::pytensor>, py::arg("arg"), py::arg("ret")) .def("shape_dofval", &GooseFEM::Vector::shape_dofval) .def("shape_nodevec", &GooseFEM::Vector::shape_nodevec) .def("shape_elemvec", &GooseFEM::Vector::shape_elemvec) .def("shape_elemmat", &GooseFEM::Vector::shape_elemmat) .def("allocate_dofval", py::overload_cast<>(&GooseFEM::Vector::allocate_dofval, py::const_)) .def( "allocate_dofval", py::overload_cast(&GooseFEM::Vector::allocate_dofval, py::const_)) .def( "allocate_nodevec", py::overload_cast<>(&GooseFEM::Vector::allocate_nodevec, py::const_)) .def( "allocate_nodevec", py::overload_cast(&GooseFEM::Vector::allocate_nodevec, py::const_)) .def( "allocate_elemvec", py::overload_cast<>(&GooseFEM::Vector::allocate_elemvec, py::const_)) .def( "allocate_elemvec", py::overload_cast(&GooseFEM::Vector::allocate_elemvec, py::const_)) .def( "allocate_elemmat", py::overload_cast<>(&GooseFEM::Vector::allocate_elemmat, py::const_)) .def( "allocate_elemmat", py::overload_cast(&GooseFEM::Vector::allocate_elemmat, py::const_)) .def("__repr__", [](const GooseFEM::Vector&) { return ""; }); } diff --git a/python/VectorPartitioned.hpp b/python/VectorPartitioned.hpp index d7b7324..a0161b8 100644 --- a/python/VectorPartitioned.hpp +++ b/python/VectorPartitioned.hpp @@ -1,105 +1,105 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #include #include #include #include namespace py = pybind11; void init_VectorPartitioned(py::module& m) { py::class_(m, "VectorPartitioned") .def( py::init< const xt::pytensor&, const xt::pytensor&, const xt::pytensor&>(), "See :cpp:class:`GooseFEM::VectorPartitioned`.", py::arg("conn"), py::arg("dofs"), py::arg("iip")) .def_property_readonly("nnu", &GooseFEM::VectorPartitioned::nnu) .def_property_readonly("nnp", &GooseFEM::VectorPartitioned::nnp) .def_property_readonly("iiu", &GooseFEM::VectorPartitioned::iiu) .def_property_readonly("iip", &GooseFEM::VectorPartitioned::iip) .def("dofs_is_u", &GooseFEM::VectorPartitioned::dofs_is_u) .def("dofs_is_p", &GooseFEM::VectorPartitioned::dofs_is_p) .def( "DofsFromParitioned", py::overload_cast&, const xt::pytensor&>( &GooseFEM::VectorPartitioned::DofsFromParitioned, py::const_), py::arg("dofval_u"), py::arg("dofval_p")) .def( "AsDofs_u", py::overload_cast&>( &GooseFEM::VectorPartitioned::AsDofs_u, py::const_), py::arg("nodevec")) .def( "AsDofs_u", py::overload_cast&>( &GooseFEM::VectorPartitioned::AsDofs_u, py::const_), py::arg("elemvec")) .def( "AsDofs_p", py::overload_cast&>( &GooseFEM::VectorPartitioned::AsDofs_p, py::const_), py::arg("nodevec")) .def( "AsDofs_p", py::overload_cast&>( &GooseFEM::VectorPartitioned::AsDofs_p, py::const_), py::arg("elemvec")) .def( "NodeFromPartitioned", py::overload_cast&, const xt::pytensor&>( &GooseFEM::VectorPartitioned::NodeFromPartitioned, py::const_), py::arg("dofval_u"), py::arg("dofval_p")) .def( "ElementFromPartitioned", py::overload_cast&, const xt::pytensor&>( &GooseFEM::VectorPartitioned::ElementFromPartitioned, py::const_), py::arg("dofval_u"), py::arg("dofval_p")) .def( "Copy_u", &GooseFEM::VectorPartitioned::Copy_u, py::arg("nodevec_src"), py::arg("nodevec_dest")) .def( "Copy_p", &GooseFEM::VectorPartitioned::Copy_p, py::arg("nodevec_src"), py::arg("nodevec_dest")) .def( "copy_u", &GooseFEM::VectorPartitioned::copy_u, py::arg("nodevec_src"), py::arg("nodevec_dest")) .def( "copy_p", &GooseFEM::VectorPartitioned::copy_p, py::arg("nodevec_src"), py::arg("nodevec_dest")) .def("__repr__", [](const GooseFEM::VectorPartitioned&) { return ""; }); } diff --git a/python/VectorPartitionedTyings.hpp b/python/VectorPartitionedTyings.hpp index 13d5369..06763e8 100644 --- a/python/VectorPartitionedTyings.hpp +++ b/python/VectorPartitionedTyings.hpp @@ -1,64 +1,64 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #include #include #include #include namespace py = pybind11; void init_VectorPartitionedTyings(py::module& m) { py::class_(m, "VectorPartitionedTyings") .def( py::init< const xt::pytensor&, const xt::pytensor&, const Eigen::SparseMatrix&, const Eigen::SparseMatrix&, const Eigen::SparseMatrix&>(), "See :cpp:class:`GooseFEM::VectorPartitionedTyings`.", py::arg("conn"), py::arg("dofs"), py::arg("Cdu"), py::arg("Cdp"), py::arg("Cdi")) .def_property_readonly("nnu", &GooseFEM::VectorPartitionedTyings::nnu) .def_property_readonly("nnp", &GooseFEM::VectorPartitionedTyings::nnp) .def_property_readonly("nni", &GooseFEM::VectorPartitionedTyings::nni) .def_property_readonly("nnd", &GooseFEM::VectorPartitionedTyings::nnd) .def_property_readonly("iiu", &GooseFEM::VectorPartitionedTyings::iiu) .def_property_readonly("iip", &GooseFEM::VectorPartitionedTyings::iip) .def_property_readonly("iii", &GooseFEM::VectorPartitionedTyings::iii) .def_property_readonly("iid", &GooseFEM::VectorPartitionedTyings::iid) .def( "copy_p", &GooseFEM::VectorPartitionedTyings::copy_p>, py::arg("dofval_src"), py::arg("dofval_dest")) .def( "asDofs_i", &GooseFEM::VectorPartitionedTyings:: asDofs_i, xt::pytensor>, py::arg("nodevec"), py::arg("dofval_i"), py::arg("apply_tyings") = true) .def( "AsDofs_i", &GooseFEM::VectorPartitionedTyings::AsDofs_i>, py::arg("nodevec")) .def("__repr__", [](const GooseFEM::VectorPartitionedTyings&) { return ""; }); } diff --git a/python/assertions.hpp b/python/assertions.hpp index e52f2bd..7f65cee 100644 --- a/python/assertions.hpp +++ b/python/assertions.hpp @@ -1,20 +1,20 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #include #include #include namespace py = pybind11; void init_assertions(py::module& mod) { mod.def( "is_unique", &GooseFEM::is_unique>, "See :cpp:func:`GooseFEM::is_unique`.", py::arg("a")); } diff --git a/python/version.hpp b/python/version.hpp index a289798..010d89c 100644 --- a/python/version.hpp +++ b/python/version.hpp @@ -1,21 +1,21 @@ /** * @file * @copyright Copyright 2017. Tom de Geus. All rights reserved. - * \license This project is released under the GNU Public License (GPLv3). + * @license This project is released under the GNU Public License (GPLv3). */ #include #include namespace py = pybind11; void init_version(py::module& m) { m.def("version", &GooseFEM::version, "See :cpp:func:`GooseFEM::version`."); m.def( "version_dependencies", &GooseFEM::version_dependencies, "See :cpp:func:`GooseFEM::version_dependencies`."); }