Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F64271439
MeshTri3.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, May 25, 18:44
Size
1 KB
Mime Type
text/x-c
Expires
Mon, May 27, 18:44 (2 d)
Engine
blob
Format
Raw Data
Handle
17876332
Attached To
rGOOSEFEM GooseFEM
MeshTri3.hpp
View Options
/**
* @file
* @copyright Copyright 2017. Tom de Geus. All rights reserved.
* @license This project is released under the GNU Public License (GPLv3).
*/
#ifndef PYGOOSEFEM_MESHTRI3_H
#define PYGOOSEFEM_MESHTRI3_H
#include <GooseFEM/MeshTri3.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <xtensor-python/pyarray.hpp>
#include <xtensor-python/pytensor.hpp>
#include "Mesh.hpp"
namespace py = pybind11;
void init_MeshTri3(py::module& mod)
{
py::class_<GooseFEM::Mesh::Tri3::Regular> cls(mod, "Regular");
cls.def(
py::init<size_t, size_t, double>(),
"See :cpp:class:`GooseFEM::Mesh::Tri3::Regular`.",
py::arg("nx"),
py::arg("ny"),
py::arg("h") = 1.
);
register_Mesh_RegularBase<GooseFEM::Mesh::Tri3::Regular>(cls);
register_Mesh_RegularBase2d<GooseFEM::Mesh::Tri3::Regular>(cls);
cls.def("__repr__", [](const GooseFEM::Mesh::Tri3::Regular&) {
return "<GooseFEM.Mesh.Tri3.Regular>";
});
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<double, 2>&, const xt::pytensor<size_t, 2>&, 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<double, 2>&,
const xt::pytensor<size_t, 2>&,
const xt::pytensor<int, 1>&,
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
Event Timeline
Log In to Comment