39#include <boost/python/suite/indexing/map_indexing_suite.hpp>
40#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
52 composite->m_geomVec.clear();
53 for (
int i = 0; i < py::len(geometries); i++)
55 composite->m_geomVec.emplace_back(
56 py::extract<GeometrySharedPtr>(geometries[i]));
66 py::class_<LibUtilities::FieldMetaDataMap>(
"FieldMetaDataMap")
67 .def(py::map_indexing_suite<LibUtilities::FieldMetaDataMap, true>());
69 py::class_<std::vector<GeometrySharedPtr>>(
"GeometryList")
70 .def(py::vector_indexing_suite<std::vector<GeometrySharedPtr>,
true>());
71 py::class_<Composite, std::shared_ptr<Composite>>(
"Composite", py::init<>())
73 .def_readwrite(
"geometries", &Composite::m_geomVec);
75 py::class_<PointGeomMap>(
"PointGeomMap")
76 .def(py::map_indexing_suite<PointGeomMap, true>());
77 py::class_<SegGeomMap>(
"SegGeomMap")
78 .def(py::map_indexing_suite<SegGeomMap, true>());
79 py::class_<QuadGeomMap>(
"QuadGeomMap")
80 .def(py::map_indexing_suite<QuadGeomMap, true>());
81 py::class_<TriGeomMap>(
"TriGeomMap")
82 .def(py::map_indexing_suite<TriGeomMap, true>());
83 py::class_<TetGeomMap>(
"TetGeomMap")
84 .def(py::map_indexing_suite<TetGeomMap, true>());
85 py::class_<PrismGeomMap>(
"PrismGeomMap")
86 .def(py::map_indexing_suite<PrismGeomMap, true>());
87 py::class_<PyrGeomMap>(
"PyrGeomMap")
88 .def(py::map_indexing_suite<PyrGeomMap, true>());
89 py::class_<HexGeomMap>(
"HexGeomMap")
90 .def(py::map_indexing_suite<HexGeomMap, true>());
91 py::class_<CurveMap>(
"CurveMap")
92 .def(py::map_indexing_suite<CurveMap, true>());
93 py::class_<CompositeMap>(
"CompositeMap")
94 .def(py::map_indexing_suite<CompositeMap, true>());
95 py::class_<std::map<int, CompositeMap>>(
"DomainMap")
96 .def(py::map_indexing_suite<std::map<int, CompositeMap>,
true>());
98 py::class_<MeshGraph, std::shared_ptr<MeshGraph>, boost::noncopyable>(
99 "MeshGraph", py::init<>())
101 .def(
"Empty", &MeshGraph::Empty)
103 .def(
"GetMeshDimension", &MeshGraph::GetMeshDimension)
104 .def(
"GetSpaceDimension", &MeshGraph::GetSpaceDimension)
106 .def(
"SetMeshDimension", &MeshGraph::SetMeshDimension)
107 .def(
"SetSpaceDimension", &MeshGraph::SetSpaceDimension)
109 .def(
"GetAllPointGeoms", &MeshGraph::GetAllPointGeoms,
110 py::return_internal_reference<>())
111 .def(
"GetAllSegGeoms", &MeshGraph::GetAllSegGeoms,
112 py::return_internal_reference<>())
113 .def(
"GetAllQuadGeoms", &MeshGraph::GetAllQuadGeoms,
114 py::return_internal_reference<>())
115 .def(
"GetAllTriGeoms", &MeshGraph::GetAllTriGeoms,
116 py::return_internal_reference<>())
117 .def(
"GetAllTetGeoms", &MeshGraph::GetAllTetGeoms,
118 py::return_internal_reference<>())
119 .def(
"GetAllPrismGeoms", &MeshGraph::GetAllPrismGeoms,
120 py::return_internal_reference<>())
121 .def(
"GetAllPyrGeoms", &MeshGraph::GetAllPyrGeoms,
122 py::return_internal_reference<>())
123 .def(
"GetAllHexGeoms", &MeshGraph::GetAllHexGeoms,
124 py::return_internal_reference<>())
125 .def(
"GetCurvedEdges", &MeshGraph::GetCurvedEdges,
126 py::return_internal_reference<>())
127 .def(
"GetCurvedFaces", &MeshGraph::GetCurvedFaces,
128 py::return_internal_reference<>())
129 .def(
"GetComposites", &MeshGraph::GetComposites,
130 py::return_internal_reference<>())
131 .def<std::map<int, CompositeMap> &(
MeshGraph::*)()>(
132 "GetDomain", &MeshGraph::GetDomain,
133 py::return_internal_reference<>())
135 .def(
"GetMovement", &MeshGraph::GetMovement,
136 py::return_value_policy<py::return_by_value>())
138 .def(
"GetNumElements", &MeshGraph::GetNumElements)
140 .def(
"SetExpansionInfosToEvenlySpacedPoints",
141 &MeshGraph::SetExpansionInfoToEvenlySpacedPoints)
142 .def(
"SetExpansionInfosToPolyOrder",
143 &MeshGraph::SetExpansionInfoToNumModes)
144 .def(
"SetExpansionInfosToPointOrder",
145 &MeshGraph::SetExpansionInfoToPointOrder);
void export_MeshGraph()
MeshGraph exports.
CompositeSharedPtr Composite_Init(py::list geometries)
Base class for a spectral/hp element mesh.
std::shared_ptr< Composite > CompositeSharedPtr